/* 
  ESSATPROFESSIONAL DESIGN SYSTEM
  Clean, Accessible, Revolutionary
  Author: Antigravity "system Professional"
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* ESSAT BRAND PALETTE (Professional Light Theme) */
    --primary: #007BFF;
    /* Standard Professional Blue */
    --primary-alt: #0056b3;
    --primary-glow: rgba(0, 123, 255, 0.25);

    --secondary: #F8F9FA;
    /* Light Background */
    --accent: #FFC107;
    /* Golden Amber for highlights */
    --accent-glow: rgba(255, 193, 7, 0.2);

    /* UTILITY COLORS */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;


    --white: #FFFFFF;
    --text-main: #1E293B;
    /* Dark Navy for readability */
    --text-muted: #64748B;
    /* Professional slate gray */

    /* PROFESSIONAL GLASS SURFACES */
    --glass-surface: rgba(255, 255, 255, 0.85);
    /* Frosty White */
    --glass-border: rgba(226, 232, 240, 0.8);
    --glass-glow: rgba(0, 123, 255, 0.1);

    /* MESH TOKENS (Subtle & Clean) */
    --mesh-cyan: #E0F2FE;
    --mesh-indigo: #E0E7FF;
    --mesh-violet: #F3E8FF;

    --radius-fluid: 12px;
    --radius-panel: 20px;
    --radius-full: 9999px;

    /* REFINED MOTION (Professional Speed) */
    --transition-ultimate: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    --shadow-deep: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #F8FAFC;
    /* Slate 50 - Brighter & Cleaner */
    color: var(--text-main);
    overflow-x: auto;
    /* Changed from hidden to auto to allow recovery if layout fails */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* PROFESSIONAL BACKGROUND (Clean & Luminous) */
body::before {
    display: none;
}

.mesh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.mesh-blob {
    display: none;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.05);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #0F172A;
    /* Slate 900 */
}

/* THE HUB SIDEBAR (Clean & Distinct) */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    /* Create stacking context */
    z-index: 10;
    /* Ensure above background */
}


.sidebar {
    width: 240px;
    height: calc(100vh - 32px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    margin: 16px;
    border-radius: var(--radius-panel);
    border: 1px solid var(--glass-border);
    position: fixed;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    transition: var(--transition-ultimate);
    box-shadow: var(--shadow-deep);
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.sidebar-logo img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0F172A;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.nav-menu {
    list-style: none;
}

.nav-group-wrapper {
    margin-bottom: 5px;
}

.nav-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: var(--radius-fluid);
    transition: all 0.3s;
    user-select: none;
}

.nav-group-header:hover {
    background: #F8FAFC;
    color: var(--text-main);
}

.nav-group-header .chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group-wrapper.open .nav-group-header .chevron {
    transform: rotate(180deg);
}

.nav-group-items {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-group-wrapper.open .nav-group-items {
    max-height: 5000px;
    /* Large enough to fit all items in the biggest group (Administration ~20+ items) */
    padding-top: 5px;
}

/* Custom scrollbar for sidebar */
.nav-container::-webkit-scrollbar {
    width: 4px;
}

.nav-container::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 10px;
}

.nav-container::-webkit-scrollbar-thumb:hover {
    background: #CBD5E1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-fluid);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: var(--transition-ultimate);
}

.nav-link:hover {
    background: #F1F5F9;
    color: var(--primary);
    transform: translateX(4px);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 8px 16px -4px var(--primary-glow);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

/* HEADER & PROFILE */
.main-content {
    flex: 1;
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 24px 32px;
    transition: var(--transition-ultimate);
    min-width: 0;
    /* Critical for flex child overflow */
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0F172A;
    background: none;
    -webkit-text-fill-color: initial;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
    border: none;
}

.user-info {
    text-align: right;
}

.user-info div:first-child {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
    color: #0F172A;
}

.user-info div:last-child {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* PROFESSIONAL GLASS CARDS (Clear & Readable) */
.glass-card {
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-panel);
    padding: 32px;
    box-shadow: var(--shadow-deep);
    transition: var(--transition-ultimate);
    position: relative;
    overflow: visible;
    /* Ensure content isn't clipped inappropriately */
}

.glass-card::after {
    display: none;
}

/* Remove complex shine for clarity */

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 123, 255, 0.3);
}

/* DATA TABLES (Clean & Structured) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-fluid);
    border: 1px solid var(--glass-border);
}

.table-system {
    width: 100%;
    border-collapse: collapse;
    /* Cleaner lines */
    border-spacing: 0;
}

.table-system th {
    padding: 18px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: #F8FAFC;
    border-bottom: 1px solid var(--glass-border);
}

.table-system td {
    background: var(--white);
    padding: 16px 24px;
    text-align: center;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-main);
    transition: background-color 0.2s;
}

.table-system tr:last-child td {
    border-bottom: none;
}

.table-system tr:hover td {
    background: #F8FAFC;
}

.table-system td:first-child {
    border-left: none;
    font-weight: 600;
    color: var(--primary);
    border-radius: 0;
}

.table-system td:last-child {
    border-right: none;
    border-radius: 0;
}

/* TIMETABLE CARDS (Distinct & Color-Coded) */
.session-card {
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-ultimate);
    cursor: default;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.type-cours {
    background: #FFF7ED;
    border-left: 4px solid #F97316;
    color: #9A3412;
}

.type-td {
    background: #F0FDF4;
    border-left: 4px solid #16A34A;
    color: #166534;
}

.type-tp {
    background: #EFF6FF;
    border-left: 4px solid #3B82F6;
    color: #1E40AF;
}

.session-card strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.session-card small {
    display: block;
    font-size: 11px;
    opacity: 0.9;
}

/* DASHBOARD ACTIONS GRID */
.system-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* DASHBOARD HUB LAYOUT (NEW) */
.dashboard-hub {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-hub {
        grid-template-columns: 1fr;
    }
}

.hub-section {
    margin-bottom: 30px;
}

.hub-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.hub-section-header h3 {
    font-size: 18px;
    color: #0F172A;
    margin: 0;
}

.hub-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: var(--transition-ultimate);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.action-row:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.08);
}

.action-row-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-ultimate);
}

.action-row:hover .action-row-icon {
    background: var(--primary);
    color: white !important;
}

.action-row-info h4 {
    font-size: 15px;
    margin: 0 0 4px 0;
    color: var(--text-main);
}

.action-row-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* STATS (Clear Metrics) */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: row;
    /* Horizontal layout for better density */
    align-items: center;
    gap: 20px;
    text-align: left;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: #EFF6FF;
    color: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    box-shadow: none;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-info h2 {
    font-size: 32px;
    margin-bottom: 2px;
    background: none;
    -webkit-text-fill-color: initial;
    color: #0F172A;
}

.stat-info p {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}

/* BUTTONS & FORMS */
.btn-premium {
    background: var(--primary);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-ultimate);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-premium:hover {
    background: var(--primary-alt);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.btn-icon:hover {
    background: #F1F5F9;
    color: var(--primary);
    transform: scale(1.1);
}

.btn-icon:active {
    transform: scale(0.95);
}

.form-input {
    width: 100%;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-ultimate);
    outline: none;
}

.form-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

/* UTILS */
.animate-slide-up {
    animation: slideUpProfessional 0.6s cubic-bezier(0.2, 1, 0.2, 1) forwards;
}

@keyframes slideUpProfessional {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-150%);
    }

    .sidebar.open {
        transform: translateX(0);
        width: 280px;
    }

    .main-content {
        margin-left: 0;
        padding: 24px;
    }
}

/* MOBILE TOGGLE (Hidden by default) */
.menu-toggle {
    display: none;
    background: var(--white);
    border: 1px solid #E2E8F0;
    color: var(--text-main);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* SIDEBAR OVERLAY */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-150%);
        width: 280px;
        /* Fixed width on mobile */
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.5);
        /* Dim background */
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        /* Tighter padding */
    }

    .glass-card {
        padding: 20px;
        /* Smaller card padding */
    }

    .page-title {
        font-size: 24px;
        /* Smaller title */
    }

    .top-header {
        flex-direction: row;
        /* Keep row */
        gap: 12px;
        margin-bottom: 20px;
    }

    .user-profile {
        width: auto;
    }

    .user-info {
        display: none;
        /* Hide text on mobile, keep avatar */
    }

    /* Stack Grids on constrained screens */
    .system-grid,
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Better Table Scrolling */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        /* Bleed to edges inside card */
        width: calc(100% + 40px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .table-system th,
    .table-system td {
        padding: 12px 16px;
        white-space: nowrap;
        /* Prevent wrapping causing tall rows */
    }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* DASHBOARD TABS */
.tab-nav {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid #E2E8F0;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition-ultimate);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PDF TEMPLATE STYLES */
#pdf-timetable-system {
    background: #fff;
    padding: 15px;
    font-family: 'Arial', sans-serif;
    color: #000;
    width: 270mm;
    /* Slightly less than A4 Width (297mm) to account for print margins */
    display: none;
}

.pdf-header {
    width: 100%;
    border-bottom: 2px solid #000;
    margin-bottom: 5px;
    padding-bottom: 5px;
}

.pdf-logo {
    width: 70px;
    height: auto;
}

.school-title {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.3;
}

.ref-box {
    border: 1px solid #000;
    padding: 4px;
    font-size: 9px;
    width: 110px;
    text-align: center;
}

.pdf-sub-header {
    width: 100%;
    margin-bottom: 5px;
    background: #f0f0f0;
    padding: 4px;
    border: 1px solid #000;
}

.class-title {
    font-weight: bold;
    font-size: 14px;
    margin-left: 10px;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    table-layout: fixed;
}

.pdf-table th,
.pdf-table td {
    border: 1px solid #000;
    padding: 3px;
    text-align: center;
    vertical-align: top;
    height: 50px;
}


.pdf-table th {
    background: #e0e0e0;
    font-weight: bold;
}

.session-content {
    text-align: left;
}

.session-content .subject {
    display: block;
    font-weight: bold;
    font-size: 10px;
    margin-bottom: 1px;
}

.session-content .prof {
    display: block;
    font-style: italic;
    font-size: 8px;
}

.session-content .room {
    display: block;
    font-weight: bold;
    margin-top: 1px;
    font-size: 8px;
}

.session-content .type {
    font-size: 8px;
    font-weight: bold;
}

.session-type-cours {
    border-left: 2px solid orange;
    padding-left: 2px;
}

.session-type-td {
    border-left: 2px solid green;
    padding-left: 2px;
}

.session-type-tp {
    border-left: 2px solid blue;
    padding-left: 2px;
}

.pause-col {
    width: 15px;
    background: #f9f9f9;
    writing-mode: vertical-lr;
    text-align: center;
    font-size: 7px;
    color: #666;
    vertical-align: middle;
}


/*NOTIFICATIONS & ALERTS */
.alert-success,
.alert-error,
.alert-danger,
.alert-info,
.alert-warning {
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.5s cubic-bezier(0.2, 1, 0.2, 1);
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-success span,
.alert-error span,
.alert-danger span,
.alert-info span,
.alert-warning span {
    flex: 1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* CUSTOMMODAL (Confirm/Alert replacement) */
.system-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.system-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.system-modal {
    background: var(--white);
    width: 400px;
    max-width: 90%;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.system-modal-overlay.active .system-modal {
    transform: scale(1);
}

.system-modal-icon {
    width: 64px;
    height: 64px;
    background: #F1F5F9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
}

.system-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 12px;
}

.system-modal-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.system-modal-actions {
    display: flex;
    gap: 12px;
}

.system-modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-ultimate);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-cancel {
    background: #F1F5F9;
    color: var(--text-muted);
}

.btn-confirm {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-confirm:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}


/* TOAST SYSTEM */
#toast-container {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--white);
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border-left: 4px solid var(--primary);
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

.toast.active {
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

/* system SELECT SYSTEM (Premium Glasmorphism) */
.system-select-container {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.system-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--white);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    min-height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-select-container.active .system-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: white;
}

.system-select-arrow {
    transition: transform 0.3s ease;
    color: #94A3B8;
}

.system-select-container.active .system-select-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.system-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.2, 1, 0.2, 1);
    overflow: hidden;
}

.system-select-container.active .system-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.system-select-search {
    padding: 10px;
    border-bottom: 1px solid #F1F5F9;
}

.system-select-search input {
    width: 100%;
    border: none;
    background: #F8FAFC;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.system-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 6px;
}

.system-select-options::-webkit-scrollbar {
    width: 4px;
}

.system-select-options::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 10px;
}

.system-select-option {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.system-select-option:hover {
    background: #F1F5F9;
}

.system-select-option.selected {
    background: var(--primary-glow);
    color: var(--primary);
}

.system-select-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent !important;
}

.system-select-container.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.system-select-container.disabled .system-select-trigger {
    background: #F8FAFC;
}

/* PROFESSIONAL FORM LABELS */
.label-system {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}
.form-group {
    margin-bottom: 20px;
}
.glass-card {
    transition: var(--transition-ultimate);
}
.glass-card:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

/* Prevent hover transform on form-containing cards so custom select dropdowns aren't clipped */
.glass-card.no-hover-lift:hover {
    transform: none;
}

/* Ensure system-select dropdown can escape parent overflow */
.system-select-container.active {
    z-index: 9999;
}