/* =============================================================
   S.F.Y — auth.css
   Styles cho: auth, login form, teacher dashboard, teacher cards
   ============================================================= */

/* ── Navbar auth wrapper ─────────────────────────────────── */

.nav-auth-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-user-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(0,198,255,0.12) 0%, rgba(0,114,255,0.12) 100%);
    border: 1.5px solid rgba(0,114,255,0.25);
    color: #0072FF;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-logout-btn {
    background: none;
    border: 1.5px solid #E2E8F0;
    color: #64748B;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-logout-btn:hover {
    transform: translateY(-2px);
    border-color: #CBD5E1;
    color: #0F172A;
    background: #F8FAFC;
}

/* ── Section switcher bar (support.html) ─────────────────── */

.support-switcher-bar {
    background: white;
    border-bottom: 2px solid #F1F5F9;
    position: sticky;
    top: 65px;        /* below navbar */
    z-index: 90;
}

.switcher-tab {
    padding: 0.65rem 2rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    background: white;
    color: #64748B;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.switcher-tab:hover {
    border-color: rgba(0,114,255,0.4);
    color: #0072FF;
    transform: translateY(-2px);
}

.switcher-tab.active {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 14px rgba(0,114,255,0.3);
}

/* ── Role tabs (login card) ──────────────────────────────── */

.role-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
}

.role-tab {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: white;
    color: #64748B;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border-right: 2px solid #E2E8F0;
}

.role-tab:last-child {
    border-right: none;
}

.role-tab:hover:not(.active) {
    background: #F8FAFC;
    color: #0F172A;
}

.role-tab.active {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    color: white;
}

/* ── Filter bar (teacher.html) ───────────────────────────── */

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-select {
    padding: 0.55rem 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #0F172A;
    background: white;
    cursor: pointer;
    min-width: 160px;
    transition: border-color 0.25s;
}

.filter-select:focus {
    outline: none;
    border-color: #0072FF;
}

.profile-count-badge {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    color: white;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Profile card list ───────────────────────────────────── */

.profile-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border-left: 5px solid #0072FF;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,114,255,0.12);
}

.profile-card[data-priority="high"] { border-left-color: #EF4444; }
.profile-card[data-priority="medium"] { border-left-color: #F59E0B; }
.profile-card[data-priority="low"] { border-left-color: #10B981; }

/* Dynamic border via JS: apply colour by reading priority from badge */
.profile-card:has(.priority-badge.high) { border-left-color: #EF4444; }
.profile-card:has(.priority-badge.medium) { border-left-color: #F59E0B; }
.profile-card:has(.priority-badge.low) { border-left-color: #10B981; }

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-date {
    color: #94A3B8;
    font-size: 0.82rem;
}

.profile-card-body {
    padding: 0.5rem 1.5rem 0.75rem;
}

.profile-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.profile-id    { color: #94A3B8; font-size: 0.8rem; font-family: monospace; }
.profile-name  { color: #0F172A; font-weight: 600; font-size: 0.9rem; }
.profile-class { color: #64748B; font-size: 0.9rem; }
.profile-topic { color: #0072FF; font-weight: 500; font-size: 0.9rem; }

.profile-summary-preview {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.65;
}

.profile-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem 1rem;
    border-top: 1.5px solid #F1F5F9;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-mark-received {
    background: #DCFCE7;
    color: #15803D;
    border: none;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-mark-received:hover {
    background: #BBF7D0;
    transform: translateY(-1px);
}

.btn-view-detail {
    background: none;
    border: none;
    color: #0072FF;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
}

.btn-view-detail:hover {
    background: rgba(0,114,255,0.08);
    transform: translateX(3px);
}

/* ── Priority & Status badges ────────────────────────────── */

.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.priority-badge.high   { background:#FEE2E2; color:#DC2626; }
.priority-badge.medium { background:#FEF3C7; color:#D97706; }
.priority-badge.low    { background:#DCFCE7; color:#15803D; }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.pending  { background:#EFF6FF; color:#2563EB; }
.status-badge.received { background:#F0FDF4; color:#15803D; }

/* ── Import panel ────────────────────────────────────────── */

.import-panel {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.3s ease;
}

.import-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.75rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.import-tab {
    padding: 0.6rem 1.5rem;
    border: none;
    background: white;
    color: #64748B;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 2px solid #E2E8F0;
}

.import-tab:last-child { border-right: none; }

.import-tab.active {
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    color: white;
}

.import-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.import-tab-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.file-drop-zone {
    border: 2.5px dashed #CBD5E1;
    border-radius: 14px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.25s ease;
    cursor: default;
}

.file-drop-zone:hover {
    border-color: #0072FF;
    background: #EFF6FF;
}

/* ── Detail modal ────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: white;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalSlideUp 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem 0;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
}

.modal-close {
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #64748B;
}

.modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem 1rem;
    flex-wrap: wrap;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0 2rem 1.25rem;
    background: #F8FAFC;
    border-radius: 12px;
    padding: 1.25rem;
}

.modal-info-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    font-weight: 600;
}

.modal-summary-label {
    font-weight: 700;
    color: #0F172A;
    padding: 0 2rem 0.5rem;
    font-size: 0.95rem;
}

.modal-summary-body {
    margin: 0 2rem;
    padding: 1.25rem;
    background: #F8FAFC;
    border-radius: 12px;
    color: #334155;
    line-height: 1.8;
    font-size: 0.95rem;
    white-space: pre-wrap;
    border-left: 4px solid #0072FF;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 2px solid #F1F5F9;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Empty state ─────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748B;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
    .import-row-2 {
        grid-template-columns: 1fr;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }

    .modal-box {
        border-radius: 16px;
    }

    .filter-bar {
        gap: 1rem;
    }

    .profile-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-user-badge {
        max-width: 130px;
        font-size: 0.8rem;
    }

    .import-tabs {
        width: 100%;
    }

    .import-tab {
        flex: 1;
        padding: 0.6rem 0.5rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .modal-header,
    .modal-meta,
    .modal-info-grid,
    .modal-summary-label,
    .modal-summary-body,
    .modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .modal-info-grid {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }

    .modal-summary-body {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }

    .switcher-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}
@keyframes sfyCardReveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sfy-card-anim {
    opacity: 0;
    animation: sfyCardReveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}