/* ================================================
   SAAS LIGHT THEME HERO BUTTONS
   ================================================ */

.hero-quick-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.btn-hero-doctor {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
    font-family: inherit;
    font-size: inherit;
}

.btn-hero-doctor i,
.btn-hero-doctor span {
    color: #fff !important;
}

.btn-hero-doctor:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(14, 165, 233, 0.45);
}

.btn-hero-faculty {
    background: linear-gradient(135deg, #7c3aed, #0ea5e9) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 18px rgba(108, 76, 241, 0.35);
    font-family: inherit;
    font-size: inherit;
}

.btn-hero-faculty:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(108, 76, 241, 0.45);
}

.btn-faculty-portal {
    background: linear-gradient(135deg, #7c3aed, #0ea5e9);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    width: 100%;
}

.btn-faculty-portal:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-faculty-portal:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* بوابة الكادر — بحث بالاسم */
.fp-login-combobox {
    position: relative;
}

.fp-login-combobox input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(108, 76, 241, 0.25);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    font-family: inherit;
}

.fp-login-combobox input:focus {
    outline: none;
    border-color: #6C4CF1;
    box-shadow: 0 0 0 3px rgba(108, 76, 241, 0.15);
}

.fp-login-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    z-index: 200;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.fp-login-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 8px;
    margin: 2px 4px;
}

.fp-login-suggestion:last-child {
    border-bottom: none;
}

.fp-login-suggestion:hover,
.fp-login-suggestion:focus {
    background: #f0fdf4;
    outline: none;
}

.fp-login-suggestion.fp-login-empty {
    cursor: default;
    color: #64748b;
    font-size: 0.85rem;
    justify-content: center;
}

.fp-sug-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9rem;
    text-align: right;
}

.fp-sug-meta {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.fp-role-sup {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.fp-role-doc {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.fp-login-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.btn-doctor {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-doctor:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-2px);
}

.table-actions .btn-icon {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.table-actions .btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.table-actions .btn-icon.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

.btn-hero-student, .btn-hero-supervisor, .btn-hero-activities {
    background: #FFFFFF;
    color: var(--text-main);
    border: 1px solid rgba(108, 76, 241, 0.15);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(31, 31, 40, 0.04);
}

.btn-hero-student i, .btn-hero-activities i {
    color: var(--primary);
}

.btn-hero-supervisor i {
    color: var(--accent);
}

.btn-hero-student:hover, .btn-hero-supervisor:hover, .btn-hero-activities:hover {
    background: var(--bg-gradient);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(108, 76, 241, 0.12);
}

.btn-hero-academic {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 50%, #34d399 100%) !important;
    color: #065f46 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.22);
    font-family: inherit;
    font-size: inherit;
    white-space: nowrap;
}

.btn-hero-academic i,
.btn-hero-academic span {
    color: #065f46 !important;
    stroke: #065f46 !important;
}

.btn-hero-academic:hover {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%) !important;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.3);
    color: #064e3b !important;
    transform: translateY(-3px);
}

.btn-hero-academic.is-open {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
}

.academic-hub-hero-chevron {
    width: 16px !important;
    height: 16px !important;
    transition: transform 0.25s ease;
    opacity: 0.85;
}

.btn-hero-academic.is-open .academic-hub-hero-chevron {
    transform: rotate(180deg);
}

.academic-hub-wrap--hero {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.academic-hub-submenu--hero {
    position: absolute;
    top: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    min-width: 280px;
    z-index: 200;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
    padding: 10px;
    grid-template-columns: 1fr;
    margin-top: 0;
}

.academic-hub-submenu--hero .academic-hub-option {
    min-height: 52px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 12px;
}

.academic-hub-submenu--hero .academic-hub-option span:last-child {
    text-align: right;
}

@media (max-width: 520px) {
    .btn-hero-academic span {
        font-size: 0.88rem;
    }

    .academic-hub-submenu--hero {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        min-width: min(280px, calc(100vw - 32px));
    }
}


/* Base Buttons */
.btn-primary {
    background: var(--primary);
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 76, 241, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 76, 241, 0.3);
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--primary) !important;
    border: 1px solid rgba(108, 76, 241, 0.2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(31, 31, 40, 0.04);
}

.btn-secondary:hover {
    background: var(--bg-gradient);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 76, 241, 0.12);
}

/* Cards Modernization */
.portal-card, .premium-card, .admin-card, .stat-card, .quick-link-card, .activity-card {
    background: #FFFFFF;
    border: 1px solid rgba(108, 76, 241, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(31, 31, 40, 0.03);
    transition: all 0.3s ease;
    overflow: hidden;
}

.portal-card:hover, .premium-card:hover, .quick-link-card:hover, .activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(108, 76, 241, 0.08);
    border-color: rgba(108, 76, 241, 0.2);
}

/* Fix Inputs for Light Theme */
input[type="text"], input[type="number"], input[type="email"],
input[type="password"], input[type="tel"], input[type="date"],
input[type="url"], select, textarea, .admin-form input, .admin-form select, .admin-form textarea {
    background: #FAFAFC !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(108, 76, 241, 0.15) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
}

input:focus, select:focus, textarea:focus, .admin-form input:focus {
    background: #FFFFFF !important;
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 4px rgba(108, 76, 241, 0.1) !important;
    outline: none !important;
}

/* Update Footer for Light Theme */
.main-footer {
    background: #FFFFFF;
    border-top: 1px solid rgba(108, 76, 241, 0.1);
    color: var(--text-muted);
}
.main-footer h4, .main-footer .footer-logo span {
    color: var(--text-heading);
}

/* Empty State */
.empty-state-modern {
    background: #FAFAFC;
    border: 1px dashed rgba(108, 76, 241, 0.2);
}

/* Modals */
.modal-content, .details-modal-content, .archive-search-modal-content {
    background: #FFFFFF !important;
    border: 1px solid rgba(108, 76, 241, 0.1) !important;
    box-shadow: 0 25px 60px rgba(31, 31, 40, 0.1) !important;
    color: var(--text-main) !important;
}

/* Tables */
.data-table, .admin-table {
    background: #FFFFFF !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(31, 31, 40, 0.03);
}

.data-table thead th, .admin-table thead th {
    background: #F5F3FF !important;
    color: var(--text-heading) !important;
    border-bottom: 1px solid rgba(108, 76, 241, 0.1) !important;
    font-weight: 700;
}

.data-table tbody tr, .admin-table tbody tr {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(31, 31, 40, 0.05) !important;
}

.data-table tbody tr:hover, .admin-table tbody tr:hover {
    background: #FAFAFC !important;
}

/* ================================================
   AUDIT TRAIL SYSTEM - PROFESSIONAL TRACKING
   ================================================ */
.audit-trail-log {
    margin-top: 15px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: rgba(108, 76, 241, 0.03);
    border: 1px dashed rgba(108, 76, 241, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.audit-trail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.audit-trail-item i {
    width: 14px;
    height: 14px;
    color: var(--primary-accent);
}
.audit-trail-item .audit-user {
    font-weight: 600;
    color: var(--text-heading);
}
.audit-trail-item .audit-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    direction: ltr;
    display: inline-block;
    opacity: 0.8;
}
.audit-badges-top .audit-trail-log {
    margin-top: 0;
    padding: 8px 15px;
    background: transparent;
    border: 1px solid rgba(108, 76, 241, 0.1);
}

/* ================================================
   THESIS STAGES LOCKING SYSTEM
   ================================================ */
.tracking-stage-card.locked {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(80%);
    transition: all 0.4s ease;
}
.tracking-stage-card.locked .stage-header {
    background: rgba(0, 0, 0, 0.03);
}

/* ================================================
   ROBUST PORTAL CARDS CLICK FIX
   ================================================ */
.portal-card * {
    pointer-events: none; /* Directs clicks to the main container with the onclick handler */
}

/* ================================================
   PROGRAM DETAIL HERO — readable text over banner
   (Overrides global forced-black text in style.css)
   ================================================ */
.program-detail-hero {
    position: relative;
    min-height: 380px;
}

@media (max-width: 768px) {
    .program-detail-hero {
        min-height: 320px;
    }
}

.program-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.55) 0%,
        rgba(15, 23, 42, 0.72) 45%,
        rgba(15, 23, 42, 0.92) 100%
    );
    pointer-events: none;
}

.program-detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 6;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.35) 0%, transparent 55%);
    pointer-events: none;
}

.program-detail-hero .program-hero-bg {
    opacity: 0.55 !important;
    filter: saturate(0.95) brightness(0.85);
}

.program-detail-hero .program-hero-content {
    position: relative;
    z-index: 20;
}

.program-detail-hero .program-hero-glass {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.program-detail-hero h1,
.program-detail-hero h2,
.program-detail-hero .program-hero-title,
.program-detail-hero .program-hero-subtitle,
.program-detail-hero .program-hero-stat-label,
.program-detail-hero .program-hero-stat-value,
.program-detail-hero .program-hero-badge,
.program-detail-hero .program-hero-back-btn span {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.program-detail-hero .program-hero-subtitle {
    color: #bfdbfe !important;
}

.program-detail-hero .program-hero-stat-label {
    color: rgba(255, 255, 255, 0.75) !important;
    text-shadow: none;
}

.program-detail-hero [data-lucide] {
    color: inherit !important;
    stroke: currentColor !important;
}

.program-detail-hero .program-hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 640px) {
    .program-detail-hero .program-hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

.program-detail-hero .program-hero-stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Study plan — mobile-friendly course cards */
.program-study-plan .program-course-card {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem !important;
}

@media (min-width: 640px) {
    .program-study-plan .program-course-card {
        flex-direction: row;
        align-items: center !important;
    }
}

.program-study-plan .program-course-card h5 {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    word-break: break-word;
}

.program-study-plan .program-course-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.program-detail-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.program-detail-tabs::-webkit-scrollbar {
    display: none;
}

@media (max-width: 640px) {
    .program-detail-tabs button {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
}

/* Notifications — RTL-friendly, above modals */
.notification-container {
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 100000 !important;
}

@media (max-width: 640px) {
    .notification-container {
        right: 12px !important;
        left: 12px !important;
    }

    .notification {
        min-width: unset !important;
        width: 100%;
    }
}

.notification-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%) !important;
}

.notification-success span {
    color: #065f46 !important;
    font-weight: 700 !important;
}

/* ================================================
   ACADEMIC COMPLAINTS & SUGGESTIONS PORTAL
   ================================================ */
.academic-feedback-section {
    margin: 80px auto 100px;
    max-width: 1200px;
    padding: 0 16px;
}

.academic-feedback-header {
    text-align: center;
    margin-bottom: 40px;
}

.academic-feedback-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.academic-feedback-badge i,
.academic-feedback-badge span {
    color: #fff !important;
}

.academic-feedback-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0 0 12px;
    font-family: 'Cairo', sans-serif;
}

.academic-feedback-desc {
    color: #64748b !important;
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.8;
}

.academic-feedback-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    margin-bottom: 36px;
}

.academic-feedback-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.academic-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid rgba(30, 58, 95, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.academic-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.1);
}

.academic-contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.academic-contact-icon i {
    color: #2563eb !important;
    stroke: #2563eb !important;
    width: 22px;
    height: 22px;
}

.academic-contact-card h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3a5f !important;
}

.academic-contact-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b !important;
    word-break: break-word;
}

.academic-feedback-note {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 14px;
    margin-top: 4px;
}

.academic-feedback-note i {
    color: #059669 !important;
    stroke: #059669 !important;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.academic-feedback-note p {
    margin: 0;
    font-size: 0.85rem;
    color: #047857 !important;
    line-height: 1.6;
}

.academic-feedback-form-panel {
    background: #fff;
    border: 1px solid rgba(30, 58, 95, 0.08);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: visible;
}

.academic-feedback-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a5f, #2563eb, #d97706);
}

.academic-form-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.academic-form-panel-head i {
    color: #2563eb !important;
    stroke: #2563eb !important;
}

.academic-form-panel-head h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a !important;
}

.academic-feedback-form .academic-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.academic-form-group {
    margin-bottom: 18px;
}

.academic-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155 !important;
    margin-bottom: 8px;
}

.academic-feedback-form input,
.academic-feedback-form select,
.academic-feedback-form textarea {
    width: 100%;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.academic-feedback-form input:focus,
.academic-feedback-form select:focus,
.academic-feedback-form textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    background: #fff !important;
    outline: none !important;
}

.academic-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    margin-top: 8px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.35);
}

.academic-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(29, 78, 216, 0.4);
}

.academic-submit-btn i {
    color: #fff !important;
    stroke: #fff !important;
}

.academic-public-wall {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 32px;
}

.academic-public-wall-head h4 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.academic-public-wall-head h4 i {
    color: #2563eb !important;
    stroke: #2563eb !important;
}

.academic-public-wall-head p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b !important;
}

.academic-public-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.academic-feed-loading,
.academic-feed-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #64748b !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.academic-public-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    border-right: 4px solid #2563eb;
    transition: box-shadow 0.25s;
}

.academic-public-card.type-suggestion {
    border-right-color: #d97706;
}

.academic-public-card.type-inquiry {
    border-right-color: #059669;
}

.academic-public-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.academic-public-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.academic-public-type-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #eff6ff;
    color: #1d4ed8 !important;
}

.academic-public-type-badge.suggestion {
    background: #fffbeb;
    color: #b45309 !important;
}

.academic-public-type-badge.inquiry {
    background: #ecfdf5;
    color: #047857 !important;
}

.academic-public-date {
    font-size: 0.8rem;
    color: #94a3b8 !important;
}

.academic-public-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569 !important;
}

.academic-public-text {
    font-size: 0.95rem;
    color: #334155 !important;
    line-height: 1.7;
    margin: 0 0 12px;
}

.academic-public-response {
    padding: 12px 14px;
    background: #f0f9ff;
    border-radius: 10px;
    border: 1px solid #bae6fd;
    font-size: 0.88rem;
    color: #0369a1 !important;
    line-height: 1.6;
}

.academic-public-response strong {
    color: #0c4a6e !important;
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
}

@media (max-width: 992px) {
    .academic-feedback-layout {
        grid-template-columns: 1fr;
    }

    .academic-feedback-form .academic-form-row {
        grid-template-columns: 1fr;
    }

    .academic-feedback-form-panel,
    .academic-public-wall {
        padding: 20px;
    }
}

/* ================================================
   مسار الرسالة — تمييز المرحلة الحالية (صفحة الطالب)
   يتجاوز قواعد الإطار الأسود العامة
   ================================================ */
#student-result-page .premium-timeline {
    --active-stage: 1;
}

#student-result-page .stage-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-dark));
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(108, 76, 241, 0.25);
}

#student-result-page .timeline-step.active .t-content-premium {
    border: 2px solid var(--primary-accent) !important;
    border-right-width: 6px !important;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.12) 0%, rgba(139, 92, 246, 0.06) 40%, #ffffff 100%) !important;
    box-shadow: 0 8px 24px rgba(108, 76, 241, 0.16) !important;
}

#student-result-page .timeline-step.active .t-content-premium h4 {
    color: var(--primary-dark) !important;
    font-weight: 700;
}

#student-result-page .timeline-step.active .status-text {
    color: var(--primary-accent) !important;
    font-weight: 700;
}

#student-result-page .timeline-step.done .t-content-premium {
    border: 2px solid rgba(16, 185, 129, 0.5) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, #ffffff 100%) !important;
}

#student-result-page .timeline-step.done .status-text {
    color: #059669 !important;
}

#student-result-page .timeline-step.pending .t-content-premium {
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
}

#student-result-page .timeline-step.active .t-marker {
    background: var(--primary-accent) !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(108, 76, 241, 0.28) !important;
}

#student-result-page .timeline-step.done .t-marker {
    background: #10b981 !important;
    border-color: #ffffff !important;
}

#student-result-page .premium-timeline::before {
    background: linear-gradient(
        180deg,
        #10b981 0%,
        #10b981 calc((var(--active-stage) - 1) / 6 * 100%),
        #e2e8f0 calc((var(--active-stage) - 1) / 6 * 100%),
        #e2e8f0 100%
    );
}

@media (max-width: 768px) {
    #student-result-page .timeline-step.active .t-content-premium {
        border-right-width: 4px !important;
    }
}

/* ================================================
   إعلان الصفحة الرئيسية — أسفل مربع البحث
   ================================================ */
.hero-announcement-wrap {
    max-width: 820px;
    margin: 22px auto 0;
    animation: heroAnnFadeIn 0.55s ease forwards;
}

.hero-announcement-wrap.hidden {
    display: none !important;
}

@keyframes heroAnnFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-announcement {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 243, 255, 0.95) 100%);
    border: 1px solid rgba(108, 76, 241, 0.18);
    box-shadow:
        0 12px 40px rgba(108, 76, 241, 0.1),
        0 2px 8px rgba(31, 31, 40, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-announcement::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(108, 76, 241, 0.06) 0%, transparent 45%, rgba(139, 92, 246, 0.04) 100%);
    pointer-events: none;
}

.hero-announcement__inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    z-index: 1;
}

.hero-announcement__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-dark));
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(108, 76, 241, 0.28);
}

.hero-announcement__icon i,
.hero-announcement__icon svg {
    color: #fff !important;
    stroke: #fff !important;
    width: 22px;
    height: 22px;
}

.hero-announcement__body {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.hero-announcement__badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary-dark) !important;
    background: rgba(108, 76, 241, 0.1);
    border: 1px solid rgba(108, 76, 241, 0.15);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.hero-announcement__text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #334155 !important;
    font-weight: 500;
}

.hero-announcement__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.hero-announcement__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-dark));
    box-shadow: 0 4px 14px rgba(108, 76, 241, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-announcement__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(108, 76, 241, 0.32);
}

.hero-announcement__cta i,
.hero-announcement__cta svg {
    color: #fff !important;
    stroke: #fff !important;
    width: 16px;
    height: 16px;
}

.hero-announcement__close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.hero-announcement__close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
}

.hero-announcement--youtube .hero-announcement__inner {
    flex-direction: column;
    align-items: stretch;
}

.hero-announcement__video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
    background: #0f172a;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.hero-announcement__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .hero-announcement-wrap {
        margin-top: 18px;
        padding: 0 4px;
    }

    .hero-announcement__inner {
        flex-direction: column;
        padding: 16px;
    }

    .hero-announcement__close {
        position: absolute;
        top: 12px;
        left: 12px;
    }
}

/* إعدادات الإعلان — لوحة المشرف */
.ann-admin-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ann-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ann-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ann-status-badge--on {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.ann-status-badge--off {
    background: rgba(148, 163, 184, 0.2);
    color: #64748b;
}

.ann-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ann-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

.ann-toggle-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ann-toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: background 0.25s;
}

.ann-toggle-switch::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ann-toggle-label input:checked + .ann-toggle-switch {
    background: var(--primary, #2563eb);
}

.ann-toggle-label input:checked + .ann-toggle-switch::before {
    transform: translateX(22px);
}

.ann-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.ann-form-actions .btn-primary,
.ann-form-actions .btn-danger,
.ann-form-actions .btn-primary-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ann-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.ann-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ann-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.25s;
}

.ann-toggle-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ann-toggle input:checked + .ann-toggle-slider {
    background: var(--primary, #2563eb);
}

.ann-toggle input:checked + .ann-toggle-slider::before {
    transform: translateX(22px);
}

.ann-admin-preview {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.ann-admin-preview-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
}

.ann-save-note {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

.ann-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.ann-color-swatch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 78px;
    padding: 10px 8px 8px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.ann-color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ann-color-swatch.is-selected {
    border-color: var(--swatch-to, #7C6FD4);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch-to, #7C6FD4) 18%, transparent);
    background: rgba(255, 255, 255, 0.95);
}

.ann-color-swatch__dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--swatch-from), var(--swatch-to));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--swatch-to) 35%, transparent);
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.ann-color-swatch__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
}

.ann-color-swatch.is-selected .ann-color-swatch__label {
    color: #334155;
}

@media (max-width: 640px) {
    .ann-color-swatch {
        min-width: calc(33.333% - 8px);
        flex: 1 1 calc(33.333% - 8px);
    }
}

/* PWA install button (manual, no auto prompt) */
.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(108, 76, 241, 0.25);
    background: linear-gradient(135deg, rgba(165, 148, 249, 0.18), rgba(76, 46, 204, 0.12));
    color: #4c2ecc;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 10px 25px rgba(76, 46, 204, 0.10);
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 76, 241, 0.45);
    box-shadow: 0 14px 30px rgba(76, 46, 204, 0.14);
}

.pwa-install-btn i,
.pwa-install-btn svg {
    width: 18px;
    height: 18px;
    color: #4c2ecc !important;
    stroke: #4c2ecc !important;
}

.pwa-install-btn__label {
    font-size: 0.92rem;
}

@media (max-width: 520px) {
    .pwa-install-btn__label { display: none; }
    .pwa-install-btn { padding: 9px 10px; }
}

/* Academic feedback — advanced form */
.af-options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
    width: 100%;
}

.af-check-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    text-align: center;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.af-check-card:hover {
    border-color: #93c5fd;
    background: #f1f5f9;
}

.af-check-card:has(input:checked) {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.af-check-card input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.af-check-card__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    text-align: center;
    color: #334155 !important;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.55;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.af-check-card__label i,
.af-check-card__label svg {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    color: #2563eb !important;
    stroke: #2563eb !important;
}

.af-check-card__text {
    display: inline;
    color: #334155 !important;
}

/* legacy span support */
.af-check-card > span:not(.af-check-card__label) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155 !important;
    line-height: 1.55;
    text-align: center;
    white-space: normal;
}

.af-upload-zone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.af-upload-zone:hover { border-color: #2563eb; }

.af-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.af-upload-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    pointer-events: none;
}

.af-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.af-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #eff6ff;
    border-radius: 999px;
    font-size: 0.82rem;
    color: #1e40af;
}

.af-file-remove {
    border: none;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.af-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.af-form-actions--single {
    margin-top: 16px;
}

.af-preview-main-btn {
    width: 100%;
    margin-top: 0 !important;
}

.af-preview-note {
    text-align: center;
    font-size: 0.82rem;
    color: #64748b !important;
    margin: 0;
    line-height: 1.6;
}

.af-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
}

.af-preview-modal-actions {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.af-preview-modal-actions .btn-primary { flex: 1; }

.af-preview-card { display: flex; flex-direction: column; gap: 12px; }

.af-preview-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.af-preview-row span { color: #64748b; }

.af-preview-block label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.af-preview-block p {
    margin: 0;
    line-height: 1.7;
    color: #334155;
}

.af-preview-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fef3c7;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #92400e;
}

.af-preview-note--secret { background: #fef2f2; color: #991b1b; }

.af-preview-flags { display: flex; flex-wrap: wrap; gap: 8px; }

.af-flag {
    padding: 4px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.af-priority-badge {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.af-pri-high { background: #fef2f2; color: #dc2626; }
.af-pri-med { background: #fffbeb; color: #d97706; }
.af-pri-low { background: #f0fdf4; color: #16a34a; }

.academic-public-title {
    margin: 8px 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a !important;
}

@media (max-width: 768px) {
    .academic-feedback-layout { grid-template-columns: 1fr; }
    .academic-feedback-form .academic-form-row { grid-template-columns: 1fr; }
    .af-form-actions { grid-template-columns: 1fr; }
    .academic-submit-btn { order: -1; }
}

/* ================================================
   Academic course entry — professional + mobile cards
   ================================================ */
.academic-record-modal-content {
    max-width: 96vw !important;
    width: 1180px !important;
}

.academic-courses-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.academic-courses-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.academic-courses-sub {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
}

.btn-academic-add-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #059669;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s;
}

.btn-academic-add-row:hover {
    background: #d1fae5;
    transform: translateY(-1px);
}

.academic-mobile-tip {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 0.78rem;
}

.academic-mobile-tip i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.academic-excel-scroll {
    overflow-x: auto;
    margin-top: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.academic-excel-table.academic-entry-table {
    border-spacing: 0;
}

.academic-excel-table.academic-entry-table td {
    background: inherit;
}

.academic-excel-table.academic-entry-table input,
.academic-excel-table.academic-entry-table select {
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
}


/* Header: neutral slate — high contrast, no blue-on-blue */
.academic-excel-table thead tr {
    background: #f1f5f9;
}

.academic-excel-table thead th {
    padding: 12px 10px;
    text-align: center;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #059669;
    border-left: 1px solid #e2e8f0;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.4;
    font-size: 0.8rem;
}

.academic-excel-table thead th:first-child {
    border-left: none;
}

.academic-excel-table thead th small {
    display: block;
    font-weight: 500;
    color: #64748b;
    font-size: 0.72rem;
    margin-top: 2px;
}

.academic-excel-table tbody tr {
    transition: background 0.12s;
}

.academic-excel-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.academic-excel-table tbody tr:nth-child(odd) td {
    background: #fff;
}

.academic-excel-table tbody tr:hover td {
    background: #f0fdf4;
}

.academic-excel-table td {
    padding: 8px 7px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;
}

.academic-excel-table td:first-child {
    border-left: none;
}

.academic-excel-table .col-num {
    width: 40px;
    font-weight: 800;
    color: #059669;
    background: #f0fdf4 !important;
    font-size: 0.9rem;
}

.academic-excel-table input,
.academic-excel-table select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.academic-excel-table input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.academic-excel-table input:focus,
.academic-excel-table select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
    background: #fff;
}

.academic-excel-table input[readonly] {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 800;
    border-color: #a7f3d0;
    cursor: default;
}

.academic-excel-table .col-name input,
.academic-excel-table .col-program input,
.academic-excel-table .col-teacher input.c-teacher-multi {
    min-width: 120px;
    text-align: right;
}

.academic-excel-table .col-teacher .c-teacher-wrap {
    margin: 0;
}

.academic-excel-table .col-name-en input {
    min-width: 110px;
    text-align: left;
    direction: ltr;
}

.academic-excel-table .col-nature select {
    min-width: 78px;
    cursor: pointer;
}

.academic-excel-table .col-plan input,
.academic-excel-table .col-report input,
.academic-excel-table .col-total input {
    min-width: 56px;
    max-width: 72px;
    margin: 0 auto;
    font-variant-numeric: tabular-nums;
}

.c-progress-wrap {
    min-width: 88px;
    padding: 4px 2px;
}

.c-progress-val {
    display: block;
    font-weight: 800;
    font-size: 0.85rem;
    color: #065f46;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.c-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.c-progress-bar-fill {
    height: 100%;
    width: 0;
    background: #059669;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.btn-academic-row-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-academic-row-delete:hover {
    background: #fee2e2;
}

.btn-academic-row-delete i {
    width: 16px;
    height: 16px;
}

.academic-excel-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-right: 3px solid #059669;
    border-radius: 8px;
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.5;
}

.academic-excel-hint i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #059669;
    margin-top: 2px;
}

.academic-preview-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #334155;
}

.academic-preview-meta p {
    margin: 4px 0;
}

.academic-excel-table--preview thead th {
    background: #f1f5f9;
    color: #1e293b;
}

.academic-excel-table--preview tbody td {
    font-size: 0.85rem;
    color: #0f172a;
}

.ahp-pct-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ── Mobile: card layout per course ── */
@media (max-width: 768px) {
    .academic-record-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100dvh !important;
        height: 100dvh;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .academic-mobile-tip {
        display: flex;
    }

    .academic-excel-scroll {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .academic-excel-table {
        min-width: 0;
        border: none;
    }

    .academic-excel-table thead {
        display: none;
    }

    .academic-excel-table tbody tr {
        display: block;
        margin-bottom: 14px;
        padding: 14px 14px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
        position: relative;
    }

    .academic-excel-table tbody tr::before {
        content: 'مقرر #' attr(data-row-num);
        display: block;
        font-weight: 800;
        font-size: 0.9rem;
        color: #059669;
        padding-bottom: 10px;
        margin-bottom: 6px;
        border-bottom: 1px solid #f1f5f9;
    }

    .academic-excel-table tbody td {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid #f8fafc;
        background: transparent !important;
        text-align: right;
    }

    .academic-excel-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #475569;
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .academic-excel-table tbody td[data-label=""]::before {
        display: none;
    }

    .academic-excel-table .col-num {
        display: none;
    }

    .academic-excel-table .col-action {
        position: absolute;
        top: 10px;
        left: 10px;
        padding: 0;
        border: none;
    }

    .academic-excel-table .col-action::before {
        display: none;
    }

    .academic-excel-table input,
    .academic-excel-table select {
        min-height: 44px;
        font-size: 1rem;
        padding: 10px 12px;
        text-align: right;
    }

    .academic-excel-table .col-name-en input {
        text-align: left;
    }

    .academic-excel-table .col-plan input,
    .academic-excel-table .col-report input,
    .academic-excel-table .col-total input {
        max-width: none;
    }

    /* Group numeric fields in 2×2 grid on mobile */
    .academic-excel-table .col-plan,
    .academic-excel-table .col-report,
    .academic-excel-table .col-total {
        display: inline-block;
        width: calc(50% - 6px);
        vertical-align: top;
        margin-bottom: 4px;
    }

    .academic-excel-table .col-plan { margin-left: 6px; }
    .academic-excel-table .col-report:nth-of-type(1) { margin-left: 6px; }

    .academic-excel-table .col-total,
    .academic-excel-table .col-pct {
        width: 100%;
        display: flex;
    }

    .btn-academic-row-delete {
        width: 44px;
        height: 44px;
    }

    .btn-academic-add-row {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .academic-courses-toolbar {
        flex-direction: column;
    }

    #academic-record-modal .modal-footer {
        flex-direction: column-reverse;
        gap: 10px !important;
    }

    #academic-record-modal .modal-footer .btn-primary,
    #academic-record-modal .modal-footer .btn-secondary {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .academic-excel-table {
        min-width: 900px;
        font-size: 0.82rem;
    }
}

/* Complaints admin — delete & actions */
.complaint-row-actions {
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.btn-complaint-delete {
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.complaint-delete-preview {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.88rem;
    color: #334155;
}

.complaint-delete-preview p {
    margin: 4px 0;
}

@media (max-width: 768px) {
    .complaint-row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .complaint-row-actions .btn-sm,
    .complaint-row-actions .btn-complaint-delete {
        width: 100%;
        min-height: 44px;
    }

    .btn-complaint-delete {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .btn-complaint-delete::after {
        content: 'حذف';
        font-weight: 700;
        font-size: 0.85rem;
    }
}

/* Academic process — action buttons fix */
.ac-table-actions,
.ac-table-actions .ac-act-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 3;
}

.ac-table-actions .ac-act-btn i,
.ac-table-actions .ac-act-btn svg {
    pointer-events: none;
}

#academicDataTable .table-actions {
    white-space: nowrap;
}

#add-new-academic-record {
    pointer-events: auto !important;
}

/* Student profile timeline — restore per-stage colored borders (overrides dark-override global border) */
.premium-timeline .timeline-step[data-stage="1"] .t-content-premium { border-color: #7dd3fc !important; background: linear-gradient(135deg, rgba(186, 230, 253, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="2"] .t-content-premium { border-color: #86efac !important; background: linear-gradient(135deg, rgba(187, 247, 208, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="3"] .t-content-premium { border-color: #fde047 !important; background: linear-gradient(135deg, rgba(254, 240, 138, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="4"] .t-content-premium { border-color: #c4b5fd !important; background: linear-gradient(135deg, rgba(221, 214, 254, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="5"] .t-content-premium { border-color: #fda4af !important; background: linear-gradient(135deg, rgba(254, 205, 211, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="6"] .t-content-premium { border-color: #fdba74 !important; background: linear-gradient(135deg, rgba(255, 237, 213, 0.35), #fff) !important; }
.premium-timeline .timeline-step[data-stage="7"] .t-content-premium { border-color: #5eead4 !important; background: linear-gradient(135deg, rgba(153, 246, 228, 0.35), #fff) !important; }

.premium-timeline .timeline-step .t-content-premium {
    border-width: 2px !important;
    border-style: solid !important;
}

.premium-timeline .timeline-step.active .t-content-premium {
    border-color: var(--primary-accent, #6C4CF1) !important;
    border-right-width: 5px !important;
    background: linear-gradient(135deg, rgba(108, 76, 241, 0.12), rgba(108, 76, 241, 0.03), #fff) !important;
    box-shadow: 0 6px 22px rgba(108, 76, 241, 0.14) !important;
}

.premium-timeline .timeline-step.done .t-content-premium {
    border-color: #34d399 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), #fff) !important;
}

.premium-timeline .timeline-step.pending .t-content-premium {
    opacity: 1 !important;
}
