/* Admin Global Styles */
body.admin-page, body.launcher-page:has(.admin-login-layout) {
    background-color: #f8f9fa;
}

.admin-login-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.admin-form .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.admin-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.admin-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 97, 45, 0.1);
}

.error-text {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
}
.error-text.hidden {
    display: none;
}

/* Admin Dashboard Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-header-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #ddd;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s;
}
.btn-sm:hover { background: #f1f1f1; }
.btn-danger { color: #e74c3c; border-color: #f5b7b1; }
.btn-danger:hover { background: #fadbd8; }

.admin-layout {
    display: flex;
    min-height: calc(100vh - 65px);
    max-width: 1400px;
    margin: 0 auto;
}

.admin-sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #f0f0f0;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.sidebar-link.active {
    color: var(--primary);
    background: rgba(15, 97, 45, 0.05);
    border-right: 3px solid var(--primary);
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 15px 20px;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    overflow-x: hidden;
}

.tab-content.hidden {
    display: none !important;
}

.admin-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 { margin: 0; color: var(--primary-dark); }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-secondary);
}

.badge-role {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-role.teacher { background: rgba(15, 97, 45, 0.1); color: var(--primary); }
.badge-role.student { background: rgba(52, 152, 219, 0.1); color: #2980b9; }

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.action-btn.edit:hover { color: #f39c12; }
.action-btn.delete:hover { color: #e74c3c; }

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

.modal.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 97, 45, 0.1);
}
