/* ============================================================
   PSYE Theme — Light minimal, teal accent
   Áp dụng cho toàn bộ Area (POC bắt đầu ở Admin).
   Không đụng Bootstrap 5 core — chỉ override qua CSS variables
   và class tuỳ chỉnh có prefix `psye-`.
   ============================================================ */

:root {
    /* Palette */
    --psye-bg: #F5F6F8;
    --psye-surface: #FFFFFF;
    --psye-surface-alt: #FAFBFC;
    --psye-border: #E5E7EB;
    --psye-border-strong: #D1D5DB;

    --psye-text: #1F2937;
    --psye-text-muted: #6B7280;
    --psye-text-subtle: #9CA3AF;

    --psye-primary: #2FB8AC;        /* teal accent */
    --psye-primary-hover: #26A599;
    --psye-primary-soft: #E6F7F5;

    --psye-navy: #1E3A5F;            /* hero card gradient */
    --psye-navy-2: #2C5282;

    --psye-success: #10B981;
    --psye-success-soft: #D1FAE5;
    --psye-warning: #F59E0B;
    --psye-warning-soft: #FEF3C7;
    --psye-danger: #EF4444;
    --psye-danger-soft: #FEE2E2;
    --psye-info: #3B82F6;
    --psye-info-soft: #DBEAFE;
    --psye-purple: #8B5CF6;
    --psye-purple-soft: #EDE9FE;

    /* Shape */
    --psye-radius-sm: 6px;
    --psye-radius: 10px;
    --psye-radius-lg: 14px;
    --psye-radius-xl: 18px;

    /* Shadow */
    --psye-shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
    --psye-shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --psye-shadow-md: 0 4px 12px rgba(16, 24, 40, .06);
    --psye-shadow-lg: 0 12px 24px rgba(16, 24, 40, .08);

    /* Layout */
    --psye-sidebar-w: 248px;
    --psye-sidebar-w-collapsed: 72px;
    --psye-topbar-h: 64px;

    /* Bootstrap override */
    --bs-body-bg: var(--psye-bg);
    --bs-body-color: var(--psye-text);
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-primary: var(--psye-primary);
    --bs-primary-rgb: 47, 184, 172;
    --bs-border-color: var(--psye-border);
    --bs-border-radius: var(--psye-radius);
    --bs-link-color: var(--psye-primary);
    --bs-link-hover-color: var(--psye-primary-hover);
}

* { box-sizing: border-box; }

body {
    background: var(--psye-bg);
    color: var(--psye-text);
    font-family: var(--bs-body-font-family);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--psye-text); font-weight: 600; }

/* ============================================================
   LAYOUT: sidebar + topbar + main
   ============================================================ */

.psye-app {
    display: flex;
    min-height: 100vh;
    background: var(--psye-bg);
}

/* --- Sidebar --- */
.psye-sidebar {
    width: var(--psye-sidebar-w);
    background: var(--psye-surface);
    border-right: 1px solid var(--psye-border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width .2s ease;
}

.psye-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--psye-topbar-h);
    padding: 0 18px;
    border-bottom: 1px solid var(--psye-border);
    color: var(--psye-text);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
}
.psye-sidebar__brand-logo {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: var(--psye-radius);
    background: linear-gradient(135deg, var(--psye-primary), #4FD1C5);
    display: grid; place-items: center;
    color: #fff; font-weight: 700;
    box-shadow: var(--psye-shadow-sm);
}
.psye-sidebar__brand-text { font-size: 15px; line-height: 1.2; }
.psye-sidebar__brand-text small { color: var(--psye-text-muted); font-weight: 500; font-size: 11px; }

.psye-sidebar__nav {
    padding: 14px 10px;
    flex: 1;
    overflow-y: auto;
}
.psye-nav-section {
    padding: 12px 12px 6px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--psye-text-subtle);
    font-weight: 600;
}
.psye-nav-link {
    display: flex; align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: var(--psye-radius);
    color: var(--psye-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.psye-nav-link i { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.psye-nav-link:hover { background: var(--psye-surface-alt); color: var(--psye-text); }
.psye-nav-link.active {
    background: var(--psye-primary-soft);
    color: var(--psye-primary-hover);
    font-weight: 600;
}
.psye-nav-link.active i { color: var(--psye-primary); }

.psye-sidebar__toggle {
    border: none; background: transparent;
    color: var(--psye-text-muted);
    padding: 12px;
    border-top: 1px solid var(--psye-border);
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px;
}
.psye-sidebar__toggle:hover { color: var(--psye-primary); }

/* Collapsed sidebar */
.psye-app.is-collapsed .psye-sidebar { width: var(--psye-sidebar-w-collapsed); }
.psye-app.is-collapsed .psye-main { margin-left: var(--psye-sidebar-w-collapsed); }
.psye-app.is-collapsed .psye-sidebar__brand-text,
.psye-app.is-collapsed .psye-nav-link span,
.psye-app.is-collapsed .psye-nav-section,
.psye-app.is-collapsed .psye-sidebar__toggle span { display: none; }
.psye-app.is-collapsed .psye-nav-link { justify-content: center; padding: 10px; }
.psye-app.is-collapsed .psye-sidebar__brand { justify-content: center; padding: 0; }

/* --- Main + Topbar --- */
.psye-main {
    flex: 1;
    margin-left: var(--psye-sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .2s ease;
}

.psye-topbar {
    height: var(--psye-topbar-h);
    background: var(--psye-surface);
    border-bottom: 1px solid var(--psye-border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.psye-topbar__search {
    flex: 1;
    max-width: 480px;
    position: relative;
}
.psye-topbar__search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border-radius: 999px;
    border: 1px solid var(--psye-border);
    background: var(--psye-surface-alt);
    font-size: 13px;
    outline: none;
    transition: border-color .15s, background .15s;
}
.psye-topbar__search input:focus {
    border-color: var(--psye-primary);
    background: #fff;
}
.psye-topbar__search i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--psye-text-subtle);
    font-size: 13px;
}
.psye-topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.psye-icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--psye-text-muted);
    position: relative;
    cursor: pointer;
    transition: background .15s;
}
.psye-icon-btn:hover { background: var(--psye-surface-alt); color: var(--psye-text); }
.psye-icon-btn__badge {
    position: absolute; top: 6px; right: 6px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    background: var(--psye-danger);
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    display: grid; place-items: center;
    border: 2px solid var(--psye-surface);
}
.psye-user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: var(--psye-surface-alt);
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--psye-text);
    cursor: pointer;
    transition: border-color .15s;
}
.psye-user-chip:hover { border-color: var(--psye-border); color: var(--psye-text); }
.psye-user-chip__avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--psye-navy), var(--psye-navy-2));
    color: #fff; font-weight: 600;
    display: grid; place-items: center;
    font-size: 13px;
}
.psye-user-chip__meta { line-height: 1.15; display: flex; flex-direction: column; }
.psye-user-chip__name { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psye-user-chip__role { font-size: 11px; color: var(--psye-text-muted); }

/* --- Breadcrumb --- */
.psye-breadcrumb {
    padding: 14px 28px 0;
    display: flex; align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--psye-text-muted);
}
.psye-breadcrumb a { color: var(--psye-text-muted); text-decoration: none; }
.psye-breadcrumb a:hover { color: var(--psye-primary); }
.psye-breadcrumb .sep { color: var(--psye-text-subtle); font-size: 11px; }
.psye-breadcrumb .current { color: var(--psye-text); font-weight: 600; }

/* --- Content --- */
.psye-content { padding: 20px 28px 32px; flex: 1; }

.psye-page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.psye-page-header__title h3 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.psye-page-header__title p { color: var(--psye-text-muted); margin: 0; font-size: 13px; }

/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- Card --- */
.psye-card {
    background: var(--psye-surface);
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius-lg);
    box-shadow: var(--psye-shadow-sm);
}
.psye-card__header,
.psye-card__footer {
    padding: 16px 20px;
    border-bottom: 1px solid var(--psye-border);
}
.psye-card__footer { border-bottom: none; border-top: 1px solid var(--psye-border); }
.psye-card__body { padding: 20px; }
.psye-card__title { font-size: 15px; font-weight: 600; margin: 0; }

/* --- Hero card (dashboard) --- */
.psye-hero {
    background: linear-gradient(135deg, #1E3A5F 0%, #2C5282 55%, #285E7E 100%);
    color: #fff;
    border-radius: var(--psye-radius-xl);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--psye-shadow-md);
}
.psye-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 90% 10%, rgba(79, 209, 197, .18), transparent 40%),
        radial-gradient(circle at 100% 90%, rgba(47, 184, 172, .12), transparent 45%);
    pointer-events: none;
}
.psye-hero__eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; opacity: .8; margin-bottom: 6px; }
.psye-hero__title { font-size: 26px; font-weight: 700; margin: 0 0 6px; color: #fff; }
.psye-hero__sub { color: rgba(255,255,255,.75); margin: 0 0 20px; font-size: 13px; }
.psye-hero__actions { position: absolute; top: 24px; right: 24px; }

.psye-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    position: relative;
}
.psye-hero__stat {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--psye-radius);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    backdrop-filter: blur(4px);
}
.psye-hero__stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center;
    font-size: 16px; color: #fff;
    flex-shrink: 0;
}
.psye-hero__stat-icon.is-red { background: #EF4444; }
.psye-hero__stat-icon.is-amber { background: #F59E0B; }
.psye-hero__stat-icon.is-blue { background: #3B82F6; }
.psye-hero__stat-icon.is-slate { background: #64748B; }
.psye-hero__stat-value { font-size: 22px; font-weight: 700; line-height: 1; }
.psye-hero__stat-label { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 4px; }

/* --- Stat card (compact, dùng ngoài hero) --- */
.psye-stat {
    background: var(--psye-surface);
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius-lg);
    padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--psye-shadow-xs);
}
.psye-stat__icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 18px;
    flex-shrink: 0;
}
.psye-stat__icon.is-teal { background: var(--psye-primary-soft); color: var(--psye-primary-hover); }
.psye-stat__icon.is-blue { background: var(--psye-info-soft); color: #1D4ED8; }
.psye-stat__icon.is-amber { background: var(--psye-warning-soft); color: #B45309; }
.psye-stat__icon.is-purple { background: var(--psye-purple-soft); color: #6D28D9; }
.psye-stat__icon.is-green { background: var(--psye-success-soft); color: #047857; }
.psye-stat__value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.psye-stat__label { font-size: 12px; color: var(--psye-text-muted); margin-top: 3px; }

/* --- Alert (yellow warning strip) --- */
.psye-alert {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-left: 4px solid var(--psye-warning);
    border-radius: var(--psye-radius);
    margin-bottom: 20px;
}
.psye-alert__icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: #FEF3C7; color: var(--psye-warning);
    display: grid; place-items: center; font-size: 16px;
    flex-shrink: 0;
}
.psye-alert__body { flex: 1; min-width: 0; }
.psye-alert__title { font-weight: 600; color: #92400E; font-size: 14px; }
.psye-alert__text { color: #78350F; font-size: 12.5px; margin: 2px 0 0; }

/* --- Buttons --- */
.btn { border-radius: var(--psye-radius-sm); font-weight: 500; padding: 8px 16px; font-size: 13.5px; }
.btn-primary {
    --bs-btn-bg: var(--psye-primary);
    --bs-btn-border-color: var(--psye-primary);
    --bs-btn-hover-bg: var(--psye-primary-hover);
    --bs-btn-hover-border-color: var(--psye-primary-hover);
    --bs-btn-active-bg: var(--psye-primary-hover);
    --bs-btn-active-border-color: var(--psye-primary-hover);
    color: #fff;
}
.btn-success {
    --bs-btn-bg: var(--psye-primary);
    --bs-btn-border-color: var(--psye-primary);
    --bs-btn-hover-bg: var(--psye-primary-hover);
    --bs-btn-hover-border-color: var(--psye-primary-hover);
    color: #fff;
}
.btn-outline-secondary {
    --bs-btn-color: var(--psye-text-muted);
    --bs-btn-border-color: var(--psye-border-strong);
    --bs-btn-hover-bg: var(--psye-surface-alt);
    --bs-btn-hover-color: var(--psye-text);
    --bs-btn-hover-border-color: var(--psye-border-strong);
}
.btn-warning {
    --bs-btn-bg: var(--psye-warning-soft);
    --bs-btn-color: #B45309;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: #FDE68A;
    --bs-btn-hover-color: #92400E;
    --bs-btn-hover-border-color: transparent;
}
.btn-danger {
    --bs-btn-bg: var(--psye-danger-soft);
    --bs-btn-color: #B91C1C;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: #FECACA;
    --bs-btn-hover-color: #991B1B;
    --bs-btn-hover-border-color: transparent;
}
.btn-sm { padding: 5px 12px; font-size: 12.5px; }

/* --- Form controls --- */
.form-label { font-size: 12.5px; font-weight: 600; color: var(--psye-text); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius-sm);
    padding: 9px 12px;
    font-size: 13.5px;
    background: var(--psye-surface);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--psye-primary);
    box-shadow: 0 0 0 3px rgba(47, 184, 172, .12);
    outline: none;
}
.form-control::placeholder { color: var(--psye-text-subtle); }
textarea.form-control { min-height: 100px; }
.required-label::after { content: " *"; color: var(--psye-danger); }

/* --- Table --- */
.psye-table-wrap { overflow-x: auto; }
.psye-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}
.psye-table thead th {
    background: var(--psye-surface-alt);
    color: var(--psye-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--psye-border);
    text-align: left;
    white-space: nowrap;
}
.psye-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--psye-border);
    vertical-align: middle;
    color: var(--psye-text);
}
.psye-table tbody tr:hover td { background: var(--psye-surface-alt); }
.psye-table tbody tr:last-child td { border-bottom: none; }
.psye-table .cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* --- Badge pill --- */
.psye-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.psye-badge::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.psye-badge.is-success { background: var(--psye-success-soft); color: #047857; }
.psye-badge.is-muted { background: #F3F4F6; color: #4B5563; }
.psye-badge.is-warning { background: var(--psye-warning-soft); color: #B45309; }
.psye-badge.is-danger { background: var(--psye-danger-soft); color: #B91C1C; }
.psye-badge.is-info { background: var(--psye-info-soft); color: #1D4ED8; }

/* --- Pagination --- */
.psye-pagination {
    display: flex; align-items: center; gap: 6px;
    justify-content: flex-end;
    padding: 4px 0;
}
.psye-pagination__info { color: var(--psye-text-muted); font-size: 12.5px; margin-right: auto; }
.psye-pagination__btn {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--psye-radius-sm);
    border: 1px solid var(--psye-border);
    background: var(--psye-surface);
    color: var(--psye-text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: all .15s;
}
.psye-pagination__btn:hover:not(.is-disabled) { border-color: var(--psye-primary); color: var(--psye-primary); }
.psye-pagination__btn.is-disabled { opacity: .4; pointer-events: none; }
.psye-pagination__page {
    padding: 0 14px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--psye-radius-sm);
    background: var(--psye-primary-soft);
    color: var(--psye-primary-hover);
    font-weight: 600; font-size: 12.5px;
}

/* --- Dropdown menu override --- */
.dropdown-menu {
    border-radius: var(--psye-radius-lg);
    border: 1px solid var(--psye-border);
    box-shadow: var(--psye-shadow-lg);
    padding: 6px;
    font-size: 13px;
}
.dropdown-item { border-radius: var(--psye-radius-sm); padding: 8px 12px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--psye-surface-alt); color: var(--psye-text); }
.dropdown-divider { margin: 6px 0; border-color: var(--psye-border); }

/* --- Nav tabs (Bootstrap override) --- */
.nav-tabs {
    border-bottom: 1px solid var(--psye-border);
    gap: 4px;
    margin-bottom: 16px;
}
.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: var(--psye-text-muted);
    font-weight: 500;
    padding: 10px 16px;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 13.5px;
}
.nav-tabs .nav-link:hover {
    color: var(--psye-text);
    background: var(--psye-surface-alt);
    border-color: transparent;
    border-bottom-color: transparent;
}
.nav-tabs .nav-link.active {
    color: var(--psye-primary-hover);
    background: transparent;
    border-color: transparent transparent var(--psye-primary);
    font-weight: 600;
}

/* --- Chip (soft badge cho tag/danh sách nhỏ) --- */
.psye-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    background: var(--psye-surface-alt);
    color: var(--psye-text);
    border: 1px solid var(--psye-border);
    margin: 1px 2px 1px 0;
    line-height: 1.4;
    white-space: nowrap;
}
.psye-chip.is-primary { background: var(--psye-primary-soft); color: var(--psye-primary-hover); border-color: transparent; }
.psye-chip.is-info    { background: var(--psye-info-soft); color: #1D4ED8; border-color: transparent; }
.psye-chip.is-purple  { background: var(--psye-purple-soft); color: #6D28D9; border-color: transparent; }
.psye-chip.is-count   { min-width: 26px; justify-content: center; font-weight: 600; }
.psye-chip.is-warning { background: var(--psye-warning-soft); color: #B45309; border-color: transparent; }
.psye-chip.is-danger  { background: var(--psye-danger-soft); color: #B91C1C; border-color: transparent; }

/* --- Icon-only button (dùng trong cell action) --- */
.btn.is-icon {
    width: 32px; height: 32px; padding: 0;
    display: inline-grid; place-items: center;
    border-radius: 8px;
}
.btn.is-icon i { font-size: 13px; }

/* --- Info hint (dòng gợi ý dưới form) --- */
.psye-hint {
    color: var(--psye-text-muted);
    font-size: 12px;
    margin-top: 8px;
    display: flex; align-items: center; gap: 6px;
}
.psye-hint i { color: var(--psye-info); }

/* --- Auth (Login/Register) split card --- */
.psye-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--psye-bg);
}
.psye-auth__card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    background: var(--psye-surface);
    border-radius: var(--psye-radius-xl);
    overflow: hidden;
    box-shadow: var(--psye-shadow-lg);
    width: 100%;
    max-width: 960px;
}
.psye-auth__hero {
    padding: 44px 40px;
    color: #fff;
    background: linear-gradient(140deg, #1E3A5F 0%, #2C5282 55%, var(--psye-primary) 130%);
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
}
.psye-auth__hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 90%, rgba(79, 209, 197, .25), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(47, 184, 172, .2), transparent 50%);
    pointer-events: none;
}
.psye-auth__hero-eyebrow {
    text-transform: uppercase; letter-spacing: .1em;
    font-size: 11px; font-weight: 600; opacity: .8;
    position: relative;
}
.psye-auth__hero h2 { color: #fff; font-size: 26px; font-weight: 700; margin: 8px 0 12px; position: relative; }
.psye-auth__hero p { color: rgba(255,255,255,.85); position: relative; margin: 0; font-size: 14px; }
.psye-auth__hero img { position: relative; align-self: center; max-height: 220px; max-width: 100%; height: auto; object-fit: contain; margin: 24px 0; }
.psye-auth__form { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.psye-auth__form h3 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.psye-auth__form p.lead { color: var(--psye-text-muted); font-size: 13.5px; margin: 0 0 24px; }

@media (max-width: 767.98px) {
    .psye-auth__card { grid-template-columns: 1fr; max-width: 480px; }
    .psye-auth__hero { display: none; }
    .psye-auth__form { padding: 32px 24px; }
}

/* --- Toastr override --- */
#toast-container > div { border-radius: var(--psye-radius); box-shadow: var(--psye-shadow-lg); opacity: 1; padding: 14px 18px 14px 50px; }

/* ============================================================
   MORE COMPONENTS (Round 2)
   ============================================================ */

/* --- Section header (dùng trong Details page — icon + title + actions) --- */
.psye-section {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--psye-border);
}
.psye-section__icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center; font-size: 14px;
    flex-shrink: 0;
    background: var(--psye-primary-soft); color: var(--psye-primary-hover);
}
.psye-section__icon.is-blue { background: var(--psye-info-soft); color: #1D4ED8; }
.psye-section__icon.is-amber { background: var(--psye-warning-soft); color: #B45309; }
.psye-section__icon.is-purple { background: var(--psye-purple-soft); color: #6D28D9; }
.psye-section__icon.is-green { background: var(--psye-success-soft); color: #047857; }
.psye-section__icon.is-red { background: var(--psye-danger-soft); color: #B91C1C; }
.psye-section__title { flex: 1; min-width: 0; }
.psye-section__title h5 { font-size: 15px; font-weight: 600; margin: 0; }
.psye-section__title .sub { font-size: 12px; color: var(--psye-text-muted); margin-top: 2px; }
.psye-section__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Info grid (key-value trong Details) --- */
.psye-info-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px 20px;
    padding: 20px;
}
.psye-info-grid > .col-3 { grid-column: span 3; }
.psye-info-grid > .col-4 { grid-column: span 4; }
.psye-info-grid > .col-5 { grid-column: span 5; }
.psye-info-grid > .col-6 { grid-column: span 6; }
.psye-info-grid > .col-8 { grid-column: span 8; }
.psye-info-grid > .col-12 { grid-column: span 12; }
.psye-info__label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--psye-text-subtle); font-weight: 600;
    margin-bottom: 4px;
}
.psye-info__value { font-size: 14px; color: var(--psye-text); font-weight: 500; word-break: break-word; }
.psye-info__value code { font-size: 12px; color: var(--psye-primary-hover); background: transparent; padding: 0; }
@media (max-width: 767.98px) {
    .psye-info-grid > [class^="col-"] { grid-column: span 12; }
}

/* --- Check card (chọn nhiều teacher/student) --- */
.psye-check-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding: 6px 2px;
}
.psye-check-card {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius);
    background: var(--psye-surface);
    cursor: pointer;
    transition: all .15s;
}
.psye-check-card:hover { border-color: var(--psye-primary); background: var(--psye-primary-soft); }
.psye-check-card input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--psye-primary);
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}
.psye-check-card__label {
    flex: 1; min-width: 0;
    font-size: 13.5px;
    color: var(--psye-text);
    line-height: 1.35;
    font-weight: 500;
    cursor: pointer;
}
.psye-check-card__label small { color: var(--psye-text-muted); font-weight: 400; margin-left: 4px; }
.psye-check-card.is-warning { border-color: #FDE68A; background: #FFFBEB; }
.psye-check-card:has(input:checked) {
    border-color: var(--psye-primary);
    background: var(--psye-primary-soft);
}
.psye-check-toolbar {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 4px;
}
@media (max-width: 767.98px) { .psye-check-list { grid-template-columns: 1fr; } }

/* --- Empty state --- */
.psye-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--psye-text-muted);
    font-size: 13px;
}
.psye-empty i.fa-2x { display: block; margin-bottom: 10px; color: var(--psye-text-subtle); }

/* --- Alerts (soft, thay Bootstrap alert-*) --- */
.psye-alert.is-info    { background: var(--psye-info-soft); border-color: #BFDBFE; border-left-color: var(--psye-info); }
.psye-alert.is-info .psye-alert__icon    { background: #DBEAFE; color: var(--psye-info); }
.psye-alert.is-info .psye-alert__title   { color: #1E40AF; }
.psye-alert.is-info .psye-alert__text    { color: #1E3A8A; }
.psye-alert.is-success { background: var(--psye-success-soft); border-color: #A7F3D0; border-left-color: var(--psye-success); }
.psye-alert.is-success .psye-alert__icon { background: #D1FAE5; color: var(--psye-success); }
.psye-alert.is-success .psye-alert__title { color: #065F46; }
.psye-alert.is-success .psye-alert__text  { color: #064E3B; }
.psye-alert.is-danger  { background: var(--psye-danger-soft); border-color: #FECACA; border-left-color: var(--psye-danger); }
.psye-alert.is-danger .psye-alert__icon { background: #FEE2E2; color: var(--psye-danger); }
.psye-alert.is-danger .psye-alert__title { color: #991B1B; }
.psye-alert.is-danger .psye-alert__text { color: #7F1D1D; }

/* --- Credentials box (username / password) --- */
.psye-credentials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
.psye-credentials__field {
    background: var(--psye-surface);
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius);
    padding: 10px 14px;
}
.psye-credentials__field label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--psye-text-muted); font-weight: 600;
    display: block; margin-bottom: 4px;
}
.psye-credentials__field .value {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 14px; font-weight: 600;
    color: var(--psye-text);
    user-select: all;
    word-break: break-all;
}
@media (max-width: 575.98px) { .psye-credentials { grid-template-columns: 1fr; } }

/* --- Audit strip (Created / Updated info) --- */
.psye-audit {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 20px;
    background: var(--psye-surface-alt);
    border-top: 1px solid var(--psye-border);
    border-radius: 0 0 var(--psye-radius-lg) var(--psye-radius-lg);
    font-size: 12px;
    color: var(--psye-text-muted);
}
.psye-audit i { color: var(--psye-text-subtle); }

/* --- Modal override --- */
.modal-content {
    border: none;
    border-radius: var(--psye-radius-xl);
    box-shadow: var(--psye-shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--psye-border);
    padding: 16px 20px;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--psye-border); padding: 12px 20px; }

/* --- Form check (Bootstrap check-input) --- */
.form-check-input {
    border: 1.5px solid var(--psye-border-strong);
    width: 16px; height: 16px;
    margin-top: 3px;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--psye-primary);
    border-color: var(--psye-primary);
}
.form-check-input:focus {
    border-color: var(--psye-primary);
    box-shadow: 0 0 0 3px rgba(47, 184, 172, .12);
}
.form-check-label { cursor: pointer; font-size: 13.5px; }

/* --- Detail page header (banner với title + status + actions) --- */
.psye-detail-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 20px 24px;
    background: var(--psye-surface);
    border: 1px solid var(--psye-border);
    border-radius: var(--psye-radius-lg);
    margin-bottom: 20px;
}
.psye-detail-header__title { min-width: 0; flex: 1; }
.psye-detail-header__title h2 {
    font-size: 22px; font-weight: 700; margin: 0;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.psye-detail-header__meta {
    color: var(--psye-text-muted); font-size: 12.5px; margin-top: 6px;
}
.psye-detail-header__meta code { font-size: 11.5px; color: var(--psye-text); background: var(--psye-surface-alt); padding: 2px 8px; border-radius: 6px; }
.psye-detail-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Avatar circle (dùng cho detail header) --- */
.psye-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 20px;
    background: linear-gradient(135deg, var(--psye-navy), var(--psye-primary));
    flex-shrink: 0;
    box-shadow: var(--psye-shadow-sm);
}
.psye-avatar.is-teal { background: linear-gradient(135deg, var(--psye-primary), #4FD1C5); }
.psye-avatar.is-blue { background: linear-gradient(135deg, #1D4ED8, #60A5FA); }
.psye-avatar.is-purple { background: linear-gradient(135deg, #6D28D9, #A78BFA); }
.psye-avatar.is-amber { background: linear-gradient(135deg, #B45309, #FBBF24); }

/* --- FullCalendar override --- */
.fc { font-family: var(--bs-body-font-family); font-size: 13px; }
.fc .fc-toolbar.fc-header-toolbar { margin-bottom: 14px; align-items: center; }
.fc .fc-toolbar-title { font-size: 16px; font-weight: 600; color: var(--psye-text); }
.fc .fc-button {
    background: var(--psye-surface);
    color: var(--psye-text-muted);
    border: 1px solid var(--psye-border);
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    text-transform: none;
    border-radius: var(--psye-radius-sm);
    box-shadow: none !important;
}
.fc .fc-button:hover { background: var(--psye-surface-alt); color: var(--psye-text); border-color: var(--psye-border-strong); }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--psye-primary);
    color: #fff;
    border-color: var(--psye-primary);
}
.fc .fc-button-primary:disabled { background: var(--psye-surface-alt); color: var(--psye-text-subtle); border-color: var(--psye-border); opacity: 1; }
.fc .fc-button-group { gap: 0; }
.fc .fc-button-group > .fc-button { border-radius: 0; margin-left: -1px; }
.fc .fc-button-group > .fc-button:first-child { border-top-left-radius: var(--psye-radius-sm); border-bottom-left-radius: var(--psye-radius-sm); margin-left: 0; }
.fc .fc-button-group > .fc-button:last-child { border-top-right-radius: var(--psye-radius-sm); border-bottom-right-radius: var(--psye-radius-sm); }
.fc .fc-today-button { text-transform: none; }

.fc-theme-standard td, .fc-theme-standard th, .fc-theme-standard .fc-scrollgrid { border-color: var(--psye-border); }
.fc .fc-col-header-cell-cushion { color: var(--psye-text); font-weight: 600; font-size: 12.5px; padding: 8px 4px; text-decoration: none; }
.fc .fc-daygrid-day-number, .fc .fc-timegrid-slot-label-cushion { color: var(--psye-text-muted); font-size: 11.5px; text-decoration: none; }
.fc .fc-day-today { background: rgba(47, 184, 172, .05) !important; }
.fc .fc-timegrid-now-indicator-line { border-color: var(--psye-danger); }
.fc .fc-timegrid-now-indicator-arrow { border-color: var(--psye-danger); }

.fc .fc-event {
    border: none;
    border-left: 3px solid var(--psye-primary);
    border-radius: 6px;
    background: rgba(47, 184, 172, .18);
    color: var(--psye-text);
    padding: 3px 6px;
    font-size: 11.5px;
    cursor: pointer;
}
.fc .fc-event:hover { filter: brightness(0.97); }
.fc .fc-event .fc-event-time, .fc .fc-event .fc-event-title { color: var(--psye-text); font-weight: 500; }

/* Trạng thái theo màu (backend gán bg-info/success/danger/warning/secondary vào event.className) */
.fc .fc-event.bg-info      { background: var(--psye-info-soft); border-left-color: var(--psye-info); }
.fc .fc-event.bg-info .fc-event-time, .fc .fc-event.bg-info .fc-event-title { color: #1E40AF; }
.fc .fc-event.bg-success   { background: var(--psye-success-soft); border-left-color: var(--psye-success); }
.fc .fc-event.bg-success .fc-event-time, .fc .fc-event.bg-success .fc-event-title { color: #065F46; }
.fc .fc-event.bg-danger    { background: var(--psye-danger-soft); border-left-color: var(--psye-danger); }
.fc .fc-event.bg-danger .fc-event-time, .fc .fc-event.bg-danger .fc-event-title { color: #991B1B; }
.fc .fc-event.bg-warning   { background: var(--psye-warning-soft); border-left-color: var(--psye-warning); }
.fc .fc-event.bg-warning .fc-event-time, .fc .fc-event.bg-warning .fc-event-title { color: #92400E; }
.fc .fc-event.bg-secondary { background: #F3F4F6; border-left-color: #9CA3AF; }
.fc .fc-event.bg-secondary .fc-event-time, .fc .fc-event.bg-secondary .fc-event-title { color: #374151; }

/* --- Fix filter toolbar (button không tràn dòng) --- */
.psye-filter-actions {
    display: flex; gap: 8px;
    align-items: stretch;
}
.psye-filter-actions .btn {
    white-space: nowrap;
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center;
}

/* --- Timeline dot (dùng ở audit history) --- */
.psye-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--psye-primary); display: inline-block; margin: 0 6px; vertical-align: middle; }

/* --- Utilities --- */
.psye-divider { height: 1px; background: var(--psye-border); margin: 16px 0; border: none; }
.text-primary { color: var(--psye-primary) !important; }
.bg-primary-soft { background: var(--psye-primary-soft); }

/* ============================================================
   RESPONSIVE (POC — desktop-first, thu gọn sidebar dưới 992px)
   ============================================================ */
@media (max-width: 991.98px) {
    .psye-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .psye-sidebar.is-open { transform: translateX(0); box-shadow: var(--psye-shadow-lg); }
    .psye-main { margin-left: 0; }
    .psye-app.is-collapsed .psye-main { margin-left: 0; }
    .psye-content, .psye-breadcrumb { padding-left: 16px; padding-right: 16px; }
    .psye-topbar { padding: 0 16px; }
    .psye-topbar__search { max-width: none; }
    .psye-hero__stats { grid-template-columns: repeat(2, 1fr); }
    .psye-user-chip__meta { display: none; }
}
@media (max-width: 575.98px) {
    .psye-hero { padding: 22px 20px; }
    .psye-hero__stats { grid-template-columns: 1fr; }
    .psye-hero__actions { position: static; margin-bottom: 14px; }
}
