/* Admin Panel CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #3498db;
}

.user-info {
    padding: 15px;
    background-color: #34495e;
    border-radius: 5px;
    margin-bottom: 20px;
}

.user-info p {
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 8px;
}

/* Role Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-super-admin {
    background-color: #e74c3c;
    color: white;
}

.badge-org-admin,
.badge-admin {
    background-color: #3498db;
    color: white;
}

.badge-teacher {
    background-color: #27ae60;
    color: white;
}

.badge-student {
    background-color: #17a2b8;
    color: white;
}

.badge-regular {
    background-color: #6c757d;
    color: white;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #34495e;
}

.logout a {
    display: block;
    padding: 12px 15px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.logout a:hover {
    background-color: #c0392b;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 40px;
}

.main-content h1 {
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
}

/* Tables */
.table-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #34495e;
    color: white;
}

th, td {
    padding: 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.pagination button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination button:hover {
    background-color: #2980b9;
}

.pagination span {
    color: #7f8c8d;
}

/* Filters */
.filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.filters input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    flex-grow: 1;
}

.filters button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filters button:hover {
    background-color: #2980b9;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #229954;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: -10px;
    font-size: 14px;
}

.modal-content input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.modal-content button[type="submit"] {
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.modal-content button[type="submit"]:hover {
    background-color: #229954;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
}

.login-box h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-box p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.g_id_signin {
    display: flex;
    justify-content: center;
}

.error-message {
    margin-top: 20px;
    padding: 10px;
    background-color: #e74c3c;
    color: white;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .main-content {
        padding: 20px;
    }
}
