/* ==========================================================================
   STORM SP WORK – Unified Stylesheet
   All theme variables, component styles, and status/dropdown/filter styles
   consolidated into a single file. No inline CSS in templates.
   
   DROPDOWN REFERENCE: Эти выпадающие списки привязаны к колонкам
   с такими же названиями колонок (см. COLUMN_HANDBOOK_MAP в JS).
   ========================================================================== */

/* ==========================================================================
   1. CSS VARIABLES / THEMES
   ========================================================================== */

html {
    --bg-color: #121212;
    --sidebar-bg: #1f1f1f;
    --header-bg: #1f1f1f;
    --text-color: #ffffff;
    --accent-color: #4caf50;
    --accent-hover: #66bb6a;
    --border-color: #444;
    --input-bg: #2d2d2d;
    --item-bg: #333;
    --item-hover: #444;
    --modal-bg: #2b2b2b;
    --font-main: 'Century Gothic', 'Segoe UI', sans-serif;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --context-bg: #2a2a2a;
    --delete-color: #d32f2f;
    --gold: #FFD700;
    --btn-text: #ddd;
}

html.light-theme,
body.light-theme {
    --bg-color: #f5f5f5 !important;
    --sidebar-bg: #ffffff !important;
    --header-bg: #ffffff !important;
    --text-color: #333333 !important;
    --accent-color: #2e7d32 !important;
    --accent-hover: #4caf50 !important;
    --border-color: #ccc !important;
    --input-bg: #ffffff !important;
    --item-bg: #e8e8e8 !important;
    --item-hover: #d5d5d5 !important;
    --modal-bg: #ffffff !important;
    --shadow-color: rgba(0, 0, 0, 0.12) !important;
    --context-bg: #ffffff !important;
    --btn-text: #333333 !important;
    --delete-color: #c62828 !important;
}

html.black-theme,
body.black-theme {
    --bg-color: #000000 !important;
    --sidebar-bg: #0a0a0a !important;
    --header-bg: #0a0a0a !important;
    --text-color: #e0e0e0 !important;
    --accent-color: #4caf50 !important;
    --accent-hover: #66bb6a !important;
    --border-color: #222 !important;
    --input-bg: #111 !important;
    --item-bg: #141414 !important;
    --item-hover: #1a1a1a !important;
    --modal-bg: #0e0e0e !important;
    --shadow-color: rgba(0, 0, 0, 0.9) !important;
    --context-bg: #0a0a0a !important;
    --btn-text: #e0e0e0 !important;
    --delete-color: #d32f2f !important;
}

html.cyberpunk-theme,
body.cyberpunk-theme {
    --bg-color: #0a0014 !important;
    --sidebar-bg: #0d0021 !important;
    --header-bg: #0d0021 !important;
    --text-color: #e0d4ff !important;
    --accent-color: #ff00ff !important;
    --accent-hover: #ff66ff !important;
    --border-color: #2a0045 !important;
    --input-bg: #150028 !important;
    --item-bg: #1a0033 !important;
    --item-hover: #2a0050 !important;
    --modal-bg: #120020 !important;
    --shadow-color: rgba(255, 0, 255, 0.15) !important;
    --context-bg: #0d0021 !important;
    --btn-text: #e0d4ff !important;
    --delete-color: #ff1744 !important;
}

/* ==========================================================================
   2. BASE / RESET
   ========================================================================== */

* {
    box-sizing: border-box;
}

/* Custom green checkbox */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    max-height: 16px;
    box-sizing: border-box;
    padding: 0;
    border: 2px solid #666;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

input[type="checkbox"]:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    font-size: 13px;
    overflow: hidden;
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */

header {
    background-color: var(--header-bg);
    padding: 10px 20px;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    flex-shrink: 0;
    z-index: 100;
    height: 55px;
}

.site-branding {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--accent-color);
    gap: 10px;
}

.site-branding h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 72px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
    will-change: width;
    z-index: 900;
}

.sidebar.collapsed {
    width: 70px;
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    color: var(--text-color);
}

.sidebar-top {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar.collapsed .sidebar-top {
    padding: 15px 0 !important;
    text-align: center;
}

.sidebar.collapsed #global-search {
    display: none;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.sidebar-bottom {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.05);
    margin-top: auto;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: var(--bg-color);
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

/* ==========================================================================
   5. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    font-size: 14px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ==========================================================================
   6. FORM ELEMENTS (Inputs, Selects, Textareas)
   ========================================================================== */

input,
select,
textarea {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-main);
    width: 100%;
    box-sizing: border-box;
    transition: border 0.3s;
}

input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Fix Dropdown Options in Dark Mode */
select option {
    background-color: var(--modal-bg);
    color: var(--text-color);
    padding: 10px;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */

.btn {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: var(--item-bg);
    color: var(--btn-text, #ddd);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--item-hover);
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-danger {
    background: var(--delete-color);
    color: #fff;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* ADD ROW button Р Р†Р вЂљРІР‚Сњ unified */
.btn-add-row {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-add-row:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   8. NAVIGATION (Sidebar)
   ========================================================================== */

.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    padding: 8px 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.sidebar.collapsed .nav-item {
    justify-content: center !important;
    padding: 12px 0;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sidebar.collapsed .nav-item:hover {
    transform: translateX(0) scale(1.05);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05)) !important;
    color: var(--accent-color) !important;
    border: 1px solid rgba(76, 175, 80, 0.4) !important;
    border-left: 4px solid var(--accent-color) !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    font-size: 1.2rem;
    margin-right: 8px;
    transition: margin 0.3s ease, transform 0.3s ease;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
    font-size: 1.4rem;
}

.nav-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease, width 0.2s ease;
    text-align: left;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    padding-left: 5px;
}

.sidebar.collapsed .nav-text {
    display: none;
}

/* Tooltip on hover when collapsed */


/* Grouping outline for submenus (огранка) */
.nav-section-content {
    margin-left: 20px;
    padding-left: 8px;
    margin-top: 5px;
    margin-bottom: 8px;
    border-left: 2px solid var(--accent-color);
    position: relative;
    border-radius: 0 0 6px 0;
    transition: border-color 0.3s ease;
}

.nav-section-content:hover {
    border-left-color: var(--accent-hover);
}

.nav-section-content::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.05), transparent);
    pointer-events: none;
    border-radius: 0 0 6px 0;
}

.sidebar.collapsed .nav-section-content {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.sidebar.collapsed .nav-section-content::before {
    display: none;
}

/* Make inner nav items slightly smaller */
.nav-section-content .nav-item {
    padding: 8px 12px;
    font-size: 11px;
}
.nav-section-content .nav-icon {
    font-size: 1rem;
    min-width: 20px;
}

.nav-section {
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    transition: padding 0.3s ease, margin 0.3s ease;
}

.sidebar.collapsed .nav-section {
    padding: 0px !important; /* Removed 5px padding to perfectly align all elements */
    margin-bottom: 10px;
    border: transparent;
    background: transparent;
}


/* Grouping outline for submenus (РѕРіСЂР°РЅРєР°) */
.nav-section-content {
    margin-left: 15px;
    padding-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-left: 2px solid var(--accent-color);
    position: relative;
    border-radius: 0 4px 4px 0;
}

.nav-section-content::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.05), transparent);
    pointer-events: none;
}

.sidebar.collapsed .nav-section-content {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.sidebar.collapsed .nav-section-content::before {
    display: none;
}

.nav-header {
    color: var(--accent-color) !important;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   9. DATA TABLES
   ========================================================================== */

.data-table-wrapper {
    overflow: auto;
    position: relative;
    max-height: calc(100vh - 180px);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.data-table {
    width: max-content;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 11px;
    background: var(--sidebar-bg);
    table-layout: auto;
    contain: layout style;
}

.data-table tbody {
    content-visibility: auto;
    contain-intrinsic-size: auto 5000px;
}

#kc-partners-table-el,
#engineers-clients-table,
#kc-cities-table-el,
#clients-table {
    width: 100% !important;
    table-layout: auto !important;
}

.data-table th,
.data-table td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid var(--border-color);
    position: relative;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    vertical-align: middle !important;
}

#acc-journal-body td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

#acc-journal-head th {
    position: sticky !important;
    top: 0 !important;
    z-index: 110 !important;
    background-color: var(--item-bg, #2a2a2a) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}

.data-table th {
    position: sticky !important;
    top: 0;
    z-index: 100 !important;
    background-color: var(--item-bg) !important;
    color: var(--accent-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    user-select: none;
    padding: 10px 15px;
    font-size: 11px;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.5);
}

.data-table th:last-child,
.data-table td:last-child {
    border-right: none;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.header-controls {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-edit-btn {
    cursor: pointer;
    opacity: 0.6;
    font-size: 14px;
    transition: opacity 0.2s;
}

.header-edit-btn:hover {
    opacity: 1;
}

/* Column Resizer */
.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    cursor: col-resize;
    user-select: none;
    height: 100%;
    z-index: 10;
    transition: background-color 0.2s;
}

.resizer:hover,
.resizing {
    background-color: var(--accent-color);
    opacity: 0.5;
}

/* Editable Cells Р Р†Р вЂљРІР‚Сњ unified */
.editable-cell {
    outline: none;
}

.editable-cell:focus {
    outline: none !important;
    background: rgba(76, 175, 80, 0.05) !important;
    box-shadow: inset 0 0 0 2px var(--accent-color) !important;
    border-radius: 2px;
    text-align: left;
    display: table-cell;
}

.editable-cell:empty:before {
    content: "\00a0";
}

/* ==========================================================================
   10. TABS
   ========================================================================== */

.tabs-nav {
    display: flex;
    margin-bottom: 0;
    background: #252526;
    padding: 0 10px;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.tab-link {
    padding: 12px 20px;
    cursor: pointer;
    color: #888;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}

.tab-link:hover {
    color: #ccc;
}

.tab-link.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.tab-content {
    background: var(--sidebar-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    border-top: none;
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   11. MODALS
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--modal-bg);
    color: var(--text-color);
    margin: auto;
    padding: 25px;
    border: 2px solid var(--accent-color);
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* Modal Form Groups Р Р†Р вЂљРІР‚Сњ outlined style */
.modal-content .form-group {
    position: relative;
    margin-bottom: 20px;
}

.modal-content .form-group label {
    position: absolute;
    top: 0;
    left: 10px;
    transform: translateY(-50%);
    background-color: var(--modal-bg);
    padding: 0 5px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-color);
    z-index: 10;
    pointer-events: none;
    line-height: 1;
}

.modal-content .form-group input:not([type="checkbox"]),
.modal-content .form-group select,
.modal-content .form-group textarea {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    width: 100%;
    color: var(--text-color);
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: none;
}

/* ==========================================================================
   12. UNIFIED DROPDOWNS (storm-select)
   All table cell dropdowns use this unified class.
   Each dropdown references its corresponding Р В Р Р‹Р В РЎвЂ”Р РЋР вЂљР В Р’В°Р В Р вЂ Р В РЎвЂўР РЋРІР‚РЋР В Р вЂ¦Р В РЎвЂР В РЎвЂќ.
   ========================================================================== */

.cell-select {
    background: var(--input-bg, #2d2d2d) !important;
    color: var(--text-color, #fff) !important;
    border: 1px solid var(--border-color, #444) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 6px center !important;
    background-size: 18px !important;
    padding-right: 28px !important;
    width: 100%;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cell-select option {
    background: var(--modal-bg, #2b2b2b) !important;
    color: var(--text-color, #fff) !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
}

.cell-select:focus {
    background: var(--input-bg);
    outline: 1px solid var(--accent-color);
    border-radius: 2px;
}

/* ==========================================================================
   13. UNIFIED STATUS SYSTEM
   Single source of truth for all status badges and status selects.
   ========================================================================== */

/* Base: status select (editable dropdown) */
.status-select,
.engineer-status-select {
    border-radius: 4px;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 10px;
    cursor: pointer;
    letter-spacing: 0.3px;
    appearance: auto;
}

.engineer-status-select {
    font-weight: bold !important;
    text-align-last: left !important;
}

/* Base: status badge (read-only label) */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Status Colors (unified Р Р†Р вЂљРІР‚Сњ one definition each) --- */

/* Active / Р В Р’В Р В Р’В°Р В Р’В±Р В РЎвЂўР РЋРІР‚С™Р В Р’В°Р В Р’ВµР В РЎВ / Р В РЎвЂєР РЋР С“Р В Р вЂ¦Р В РЎвЂўР В Р вЂ Р В Р вЂ¦Р В РЎвЂўР В РІвЂћвЂ“ */
.status-active,
.status-badge.status-active {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

/* Stopped / Р В РЎСљР В Р’Вµ Р РЋР вЂљР В Р’В°Р В Р’В±Р В РЎвЂўР РЋРІР‚С™Р В Р’В°Р В Р’ВµР РЋРІР‚С™ */
.status-stopped,
.status-badge.status-stopped {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* Reserve / Р В РІР‚вЂќР В Р’В°Р В РЎвЂ”Р В Р’В°Р РЋР С“Р В Р вЂ¦Р В РЎвЂўР В РІвЂћвЂ“ */
.status-reserve,
.status-badge.status-reserve {
    background: rgba(234, 179, 8, 0.15) !important;
    color: #facc15 !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

/* Blacklisted / Р В Р’В§Р РЋРІР‚ВР РЋР вЂљР В Р вЂ¦Р РЋРІР‚в„–Р В РІвЂћвЂ“ Р РЋР С“Р В РЎвЂ”Р В РЎвЂР РЋР С“Р В РЎвЂўР В РЎвЂќ */
.status-blacklisted,
.status-badge.status-blacklisted {
    background: rgba(100, 116, 139, 0.15) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(100, 116, 139, 0.4) !important;
}

/* Agreed / Р В Р Р‹Р В РЎвЂўР В РЎвЂ“Р В Р’В»Р В Р’В°Р РЋР С“Р В РЎвЂўР В Р вЂ Р В Р’В°Р В Р вЂ¦ */
.status-agreed,
.status-badge.status-agreed {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2), rgba(0, 200, 83, 0.1)) !important;
    color: #00c853 !important;
    border: 1px solid #00c853 !important;
}

/* Declined / Р В РЎвЂєР РЋРІР‚С™Р В РЎвЂќР В Р’В»Р В РЎвЂўР В Р вЂ¦Р РЋРІР‚ВР В Р вЂ¦ */
.status-declined,
.status-badge.status-declined {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.2), rgba(255, 23, 68, 0.1)) !important;
    color: #ff1744 !important;
    border: 1px solid #ff1744 !important;
}

/* Pending / Р В РЎСљР В Р’В° Р РЋР вЂљР В Р’В°Р РЋР С“Р РЋР С“Р В РЎВР В РЎвЂўР РЋРІР‚С™Р РЋР вЂљР В Р’ВµР В Р вЂ¦Р В РЎвЂР В РЎвЂ */
.status-pending,
.status-badge.status-pending {
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.2), rgba(255, 214, 0, 0.1)) !important;
    color: #ffd600 !important;
    border: 1px solid #ffd600 !important;
}

/* Dynamic status-val classes for select onchange */
.status-val-agreed {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2), rgba(0, 200, 83, 0.1)) !important;
    color: #00c853 !important;
    border-color: #00c853 !important;
}

.status-val-declined {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.2), rgba(255, 23, 68, 0.1)) !important;
    color: #ff1744 !important;
    border-color: #ff1744 !important;
}

.status-val-pending {
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.2), rgba(255, 214, 0, 0.1)) !important;
    color: #ffd600 !important;
    border-color: #ffd600 !important;
}

/* Badge aliases */
.badge.blacklisted,
.badge.cherny_spisok {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

/* Centering for status columns */
.data-table td:has(.status-select),
.data-table th:has(.status-select) {
    text-align: center !important;
}

/* ==========================================================================
   14. UNIFIED FILTER DROPDOWN
   Used by toggleFilterDropdown() Р Р†Р вЂљРІР‚Сњ replaces inline styles.
   ========================================================================== */

.filter-dropdown {
    position: fixed;
    background: var(--modal-bg, #2b2b2b);
    border: 1px solid var(--accent-color);
    padding: 8px;
    border-radius: 8px;
    z-index: 9999;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-height: 350px;
    overflow-y: auto;
    animation: fadeIn 0.15s ease;
    will-change: transform, opacity;
    contain: layout style;
}

.filter-dropdown .filter-header {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.filter-dropdown .filter-header label {
    display: block;
    cursor: pointer;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.filter-dropdown .filter-search {
    width: 100%;
    padding: 4px 8px;
    margin-bottom: 6px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-color);
}

.filter-dropdown .filter-values {
    max-height: 180px;
    overflow-y: auto;
}

.filter-dropdown .filter-values label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-bottom: 2px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.15s;
    color: var(--text-color);
}

.filter-dropdown .filter-values label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-dropdown .filter-values label span {
    margin-left: 6px;
}

.filter-dropdown .filter-actions {
    padding: 8px 0 0 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.filter-dropdown .filter-actions .filter-right-btns {
    display: flex;
    gap: 8px;
}

.filter-dropdown .filter-hint {
    font-size: 10px;
    color: var(--accent-color);
    opacity: 0.7;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

/* ==========================================================================
   15. LOGIN PAGE
   ========================================================================== */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: url('../img/bg-login.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--bg-color);
}

.login-card {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.login-card .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.login-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

.login-card input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.login-card input:focus {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.login-card .btn-primary {
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 1rem;
    border-radius: 8px;
    letter-spacing: 1px;
}

.login-card .auth-toggle {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #666;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card .auth-toggle a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
    transition: color 0.2s;
}

.login-card .auth-toggle a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   16. LOGS TABLE
   ========================================================================== */

#logs-table th {
    width: 200px;
}

#logs-table th:first-child {
    width: 50px !important;
}

/* ==========================================================================
   17. ROLE BADGES
   ========================================================================== */

.badge-role {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
}

.role-admin {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

.role-usp_head {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

.role-usp_emp {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid #0ea5e9;
}

.role-kc_head {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid #a855f7;
}

.role-kc_emp {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid #eab308;
}

.role-doc_flow {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid #06b6d4;
}

.role-user {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid #64748b;
}

/* ==========================================================================
   18. ANIMATIONS
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ==========================================================================
   19. THEME-SPECIFIC OVERRIDES
   ========================================================================== */

/* --- Light Theme --- */
.light-theme .btn-add-row {
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.light-theme .nav-section {
    border-color: #ddd;
    background: rgba(0, 0, 0, 0.02);
}

.light-theme .data-table tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Light Theme: High contrast statuses */
.light-theme .status-select,
.light-theme .status-badge {
    font-weight: 800 !important;
    color: #000 !important;
    border-width: 2px !important;
    opacity: 1 !important;
}

.light-theme .status-active,
.light-theme .status-select.active {
    background: #4ade80 !important;
    color: #004d40 !important;
}

.light-theme .status-stopped,
.light-theme .status-select.stopped {
    background: #f87171 !important;
    color: #3b0000 !important;
}

.light-theme .status-reserve,
.light-theme .status-select.reserve {
    background: linear-gradient(135deg, #facc15 0%, #fde047 100%) !important;
    color: #422006 !important;
    border: 1px solid #eab308 !important;
}

.light-theme .status-agreed {
    background: linear-gradient(135deg, #c8e6c9 0%, #e8f5e9 100%) !important;
    color: #1b5e20 !important;
    border: 2px solid #4caf50 !important;
}

.light-theme .status-declined {
    background: linear-gradient(135deg, #ffcdd2 0%, #ffebee 100%) !important;
    color: #b71c1c !important;
    border: 2px solid #ef5350 !important;
}

.light-theme .status-pending {
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%) !important;
    color: #f57f17 !important;
    border: 2px solid #fbc02d !important;
}

/* --- Black Theme --- */
.black-theme .nav-item.active {
    background: rgba(76, 175, 80, 0.12) !important;
    color: #4caf50 !important;
    border: 1px solid #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* --- Cyberpunk Theme --- */
.cyberpunk-theme .nav-item.active {
    background: rgba(255, 0, 255, 0.15) !important;
    color: #ff00ff !important;
    border: 1px solid #ff00ff !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4), inset 0 0 10px rgba(255, 0, 255, 0.1);
}

.cyberpunk-theme .nav-item:hover {
    background: rgba(255, 0, 255, 0.08);
}

.cyberpunk-theme .btn-primary {
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.cyberpunk-theme .btn-primary:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

.cyberpunk-theme header {
    border-bottom: 2px solid #ff00ff;
}

.cyberpunk-theme .sidebar-bottom {
    background: rgba(255, 0, 255, 0.05);
}

.cyberpunk-theme .modal-content {
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

/* ==========================================================================
   FILE MANAGER Р Р†Р вЂљРІР‚Сњ Partner Documents
   ========================================================================== */

/* Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    color: var(--text-muted, #888);
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(76, 175, 80, 0.03);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-direction: row;
    font-size: 0.85rem;
}

.file-drop-zone:hover {
    border-color: var(--accent-color);
    background: rgba(76, 175, 80, 0.08);
    color: var(--accent-color);
}

.file-drop-zone.dragover {
    border-color: var(--accent-color);
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
    transform: scale(1.01);
}

.file-drop-zone .drop-icon {
    font-size: 1.2rem;
    opacity: 0.6;
}

/* File Stats Bar */
.file-stats-bar {
    display: flex;
    gap: 20px;
    padding: 10px 16px;
    background: var(--item-bg);
    border-radius: 8px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.file-stats-bar .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted, #aaa);
}

.file-stats-bar .stat-value {
    font-weight: bold;
    color: var(--text-color);
}

/* Period Group Accordion */
.period-group {
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.period-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--item-bg);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    font-weight: bold;
    font-size: 0.9rem;
}

.period-group-header:hover {
    background: var(--item-hover);
}

.period-group-header .period-badge {
    background: var(--accent-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.period-group-header .chevron {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.period-group.collapsed .chevron {
    transform: rotate(-90deg);
}

.period-group.collapsed .period-group-body {
    display: none;
}

.period-group-body {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

/* File Card */
.file-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    min-height: 70px;
}

.file-card .file-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.file-card .file-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.file-card .file-info {
    flex: 1;
    min-width: 0;
}

.file-card .file-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
    word-break: break-word;
    line-height: 1.3;
}

.file-card .file-name a {
    color: inherit;
    text-decoration: none;
}

.file-card .file-name a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.file-card .file-meta {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    margin-top: 3px;
}

.file-card .file-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
    margin-top: auto;
}

.file-card:hover .file-actions {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.file-card .file-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    color: var(--text-color);
}

.file-card .file-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-card .file-actions button.delete-btn:hover {
    background: rgba(211, 47, 47, 0.2);
    color: #ff5252;
}

/* File Preview Thumbnail */
.file-card .file-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Network Drive Badge */
.network-drive-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid;
}

.network-drive-badge.connected {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.network-drive-badge.disconnected {
    background: rgba(211, 47, 47, 0.1);
    border-color: rgba(211, 47, 47, 0.3);
    color: #d32f2f;
}

/* File Manager Toolbar */
.fm-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.fm-toolbar .fm-search {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.85rem;
}

/* Light theme adjustments */
.light-theme .file-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .file-card:hover {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.light-theme .file-card .file-actions button:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   STAFF-BINDING: Region Replacement Checkbox & Undo/Redo
   ========================================================================== */

.sb-region-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: middle;
    margin: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sb-region-checkbox:checked {
    background: #4ade80;
    border-color: #22c55e;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

.sb-region-checkbox:hover {
    border-color: #4ade80;
}

.sb-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sb-toolbar-group label {
    font-size: 11px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.btn-undo,
.btn-redo {
    padding: 6px 12px !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    transition: all 0.2s !important;
}

.btn-undo {
    background: #f59e0b !important;
    color: #fff !important;
}

.btn-undo:hover {
    background: #d97706 !important;
}

.btn-undo:disabled {
    background: #555 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

.btn-redo {
    background: #3b82f6 !important;
    color: #fff !important;
}

.btn-redo:hover {
    background: #2563eb !important;
}

.btn-redo:disabled {
    background: #555 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
}

/* ==========================================================================
   LIGHT THEME: Document Manager Fixes
   ========================================================================== */

.light-theme {
    --empty-color: #e65100;
    --fm-breadcrumb-bg: rgba(0, 0, 0, 0.04);
    --fm-breadcrumb-border: rgba(0, 0, 0, 0.12);
    --fm-btn-bg: rgba(0, 0, 0, 0.06);
}

.light-theme .fm-toolbar button,
.light-theme [title="Р В РІР‚в„ўР В Р вЂ Р В Р’ВµР РЋР вЂљР РЋРІР‚В¦"],
.light-theme [title="Р В РЎСљР В Р’В°Р В Р’В·Р В Р’В°Р В РўвЂ"] {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.light-theme .fm-toolbar button:hover,
.light-theme [title="Р В РІР‚в„ўР В Р вЂ Р В Р’ВµР РЋР вЂљР РЋРІР‚В¦"]:hover,
.light-theme [title="Р В РЎСљР В Р’В°Р В Р’В·Р В Р’В°Р В РўвЂ"]:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #000 !important;
}

.light-theme .period-group-header .period-badge {
    color: #fff;
}

/* Breadcrumb separator */
.light-theme .fm-breadcrumb-sep,
.light-theme [style*="color:#555"] {
    color: #999 !important;
}

/* ==========================================================================
   NEON THEME Р Р†Р вЂљРІР‚Сњ Ultra-modern, vivid, animated
   Inspired by cyberpunk/neon aesthetics for partner management
   ========================================================================== */

.neon-theme {
    --bg-color: #0a0a14;
    --text-color: #e0e0f0;
    --sidebar-bg: #0d0d1a;
    --item-bg: #12122a;
    --item-hover: #1a1a3a;
    --border-color: rgba(0, 255, 200, 0.12);
    --accent-color: #00ffc8;
    --accent-hover: #00e6b0;
    --input-bg: #0f0f24;
    --modal-bg: #10102a;
    --card-bg: #12122e;
    --text-muted: #6a6a9a;
    --fm-breadcrumb-bg: rgba(0, 255, 200, 0.04);
    --fm-breadcrumb-border: rgba(0, 255, 200, 0.12);
    --fm-btn-bg: rgba(0, 255, 200, 0.08);
}

/* Animated gradient background */
.neon-theme body {
    background: linear-gradient(135deg, #0a0a14 0%, #0d1117 50%, #0a0a14 100%);
}

/* Glowing header */
.neon-theme header {
    background: linear-gradient(90deg, #0d0d1a 0%, #151530 50%, #0d0d1a 100%) !important;
    border-bottom: 2px solid #00ffc8 !important;
    box-shadow: 0 2px 20px rgba(0, 255, 200, 0.15);
}

/* Sidebar glow */
.neon-theme .sidebar {
    background: linear-gradient(180deg, #0d0d1a 0%, #0a0a18 100%) !important;
    border-right: 1px solid rgba(0, 255, 200, 0.1) !important;
    box-shadow: 2px 0 20px rgba(0, 255, 200, 0.05);
}

/* Active nav with neon glow */
.neon-theme .nav-item.active {
    background: rgba(0, 255, 200, 0.1) !important;
    color: #00ffc8 !important;
    border: 1px solid rgba(0, 255, 200, 0.4) !important;
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.2), inset 0 0 15px rgba(0, 255, 200, 0.05);
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 200, 0.15), inset 0 0 10px rgba(0, 255, 200, 0.03); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 200, 0.3), inset 0 0 15px rgba(0, 255, 200, 0.06); }
}

.neon-theme .nav-item:hover {
    background: rgba(0, 255, 200, 0.06) !important;
    color: #00ffc8;
}

/* Neon section headers */
.neon-theme 
/* Grouping outline for submenus (РѕРіСЂР°РЅРєР°) */
.nav-section-content {
    margin-left: 15px;
    padding-left: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    border-left: 2px solid var(--accent-color);
    position: relative;
    border-radius: 0 4px 4px 0;
}

.nav-section-content::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.05), transparent);
    pointer-events: none;
}

.sidebar.collapsed .nav-section-content {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.sidebar.collapsed .nav-section-content::before {
    display: none;
}

.nav-header {
    color: #00ffc8 !important;
    border-bottom-color: rgba(0, 255, 200, 0.2) !important;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.3);
}

/* Buttons with neon glow */
.neon-theme .btn-primary,
.neon-theme .btn[style*="background:#2e7d32"],
.neon-theme .btn[style*="background: #2e7d32"] {
    background: linear-gradient(135deg, #00c896, #00a87a) !important;
    color: #000 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(0, 255, 200, 0.3), 0 4px 12px rgba(0, 200, 150, 0.2);
    transition: all 0.3s ease !important;
}

.neon-theme .btn-primary:hover {
    box-shadow: 0 0 24px rgba(0, 255, 200, 0.5), 0 6px 20px rgba(0, 200, 150, 0.3) !important;
    transform: translateY(-1px);
}

/* Data tables */
.neon-theme .data-table {
    background: #0d0d1a !important;
}

.neon-theme .data-table th {
    background: linear-gradient(180deg, #15153a, #12122a) !important;
    color: #00ffc8 !important;
    text-shadow: 0 0 6px rgba(0, 255, 200, 0.2);
    border-bottom: 2px solid rgba(0, 255, 200, 0.2) !important;
}

.neon-theme .data-table td {
    border-color: rgba(0, 255, 200, 0.06) !important;
}

.neon-theme .data-table tr:hover {
    background: rgba(0, 255, 200, 0.03) !important;
}

/* Input fields glow on focus */
.neon-theme input:focus,
.neon-theme select:focus,
.neon-theme textarea:focus {
    border-color: #00ffc8 !important;
    box-shadow: 0 0 12px rgba(0, 255, 200, 0.2), inset 0 0 4px rgba(0, 255, 200, 0.05) !important;
    outline: none !important;
}

.neon-theme .form-control {
    background: rgba(0, 255, 200, 0.03) !important;
    border-color: rgba(0, 255, 200, 0.1) !important;
    color: #e0e0f0 !important;
}

/* Modals with neon border */
.neon-theme .modal-content {
    background: linear-gradient(145deg, #10102a, #15153a) !important;
    border: 1px solid rgba(0, 255, 200, 0.3) !important;
    box-shadow: 0 0 40px rgba(0, 255, 200, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Tabs */
.neon-theme .tab-link.active {
    color: #00ffc8 !important;
    border-bottom-color: #00ffc8 !important;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.3);
}

.neon-theme .tab-content {
    background: rgba(13, 13, 26, 0.95) !important;
    border-color: rgba(0, 255, 200, 0.1) !important;
}

/* Cards with glass effect */
.neon-theme .info-box {
    background: rgba(0, 255, 200, 0.02) !important;
    border: 1px solid rgba(0, 255, 200, 0.08) !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.neon-theme .info-box:hover {
    border-color: rgba(0, 255, 200, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 255, 200, 0.08);
}

/* Toast notifications */
.neon-theme .toast {
    background: linear-gradient(135deg, #15153a, #10102a) !important;
    border: 1px solid rgba(0, 255, 200, 0.3) !important;
    box-shadow: 0 0 16px rgba(0, 255, 200, 0.1) !important;
}

/* Scrollbar */
.neon-theme ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.neon-theme ::-webkit-scrollbar-track {
    background: #0a0a14;
}

.neon-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ffc8, #00a87a);
    border-radius: 3px;
}

.neon-theme ::-webkit-scrollbar-thumb:hover {
    background: #00ffc8;
}

/* File manager cards */
.neon-theme .file-card {
    background: rgba(0, 255, 200, 0.02) !important;
    border-color: rgba(0, 255, 200, 0.08) !important;
}

.neon-theme .file-card:hover {
    background: rgba(0, 255, 200, 0.06) !important;
    border-color: rgba(0, 255, 200, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 255, 200, 0.1);
}

/* Status badges */
.neon-theme .status-active {
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.neon-theme .status-reserve {
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.neon-theme .status-stopped {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Sidebar bottom controls */
.neon-theme .sidebar-bottom {
    background: rgba(0, 255, 200, 0.03) !important;
    border-top: 1px solid rgba(0, 255, 200, 0.1) !important;
}

/* Theme label styling */
.neon-theme .theme-toggle-label {
    color: #00ffc8 !important;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.4);
}

/* Filter dropdowns */
.neon-theme .filter-dropdown {
    background: linear-gradient(145deg, #10102a, #15153a) !important;
    border-color: rgba(0, 255, 200, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 255, 200, 0.1) !important;
}

/* Cell select */
.neon-theme .cell-select {
    background: rgba(0, 255, 200, 0.04) !important;
    border-color: rgba(0, 255, 200, 0.12) !important;
}

.neon-theme .cell-select:focus {
    outline-color: #00ffc8 !important;
}

/* Animated accent underline on partner name */
.neon-theme .partner-card-header {
    position: relative;
}

.neon-theme .partner-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffc8, transparent);
    animation: neonLine 4s ease-in-out infinite;
}

@keyframes neonLine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Partner card top bar glow effect */
.neon-theme [style*="background:#d32f2f"],
.neon-theme .btn-danger {
    box-shadow: 0 0 12px rgba(211, 47, 47, 0.3);
}

.light-theme [onclick*='_nfNavigateTo'] { color: #333 !important; font-weight: 600 !important; }

.light-theme {
    --empty-color: #e65100; --breadcrumb-active-text: #000; }

.light-theme {
    --empty-color: #e65100; --bc-active-text: #1565c0; --bc-active-bg: rgba(33,150,243,0.15); --bc-text: #333; --bc-sep: #999; }

/* Light theme: file action buttons visibility */
.light-theme .nf-file-row button, .light-theme [style*='opacity:0.6'][title*='Р В Р’ВР В Р’В·Р В Р вЂ Р В Р’В»Р В Р’ВµР РЋРІР‚РЋР РЋР Р‰'], .light-theme [style*='opacity:0.6'][title*='Р В Р Р‹Р В РЎвЂќР В Р’В°Р РЋРІР‚РЋР В Р’В°Р РЋРІР‚С™Р РЋР Р‰'], .light-theme [style*='opacity:0.6'][title*='Р В Р в‚¬Р В РўвЂР В Р’В°Р В Р’В»Р В РЎвЂР РЋРІР‚С™Р РЋР Р‰'] { opacity: 1 !important; background: rgba(0,0,0,0.04) !important; }
.light-theme [title='Р В Р’ВР В Р’В·Р В Р вЂ Р В Р’В»Р В Р’ВµР РЋРІР‚РЋР РЋР Р‰ Р В Р’В°Р РЋР вЂљР РЋРІР‚В¦Р В РЎвЂР В Р вЂ '] { color: #e65100 !important; border-color: rgba(230,81,0,0.4) !important; font-weight: 600 !important; }
.light-theme [title='Р В Р Р‹Р В РЎвЂќР В Р’В°Р РЋРІР‚РЋР В Р’В°Р РЋРІР‚С™Р РЋР Р‰'] { color: #2e7d32 !important; border-color: rgba(46,125,50,0.4) !important; }
.light-theme [title='Р В Р в‚¬Р В РўвЂР В Р’В°Р В Р’В»Р В РЎвЂР РЋРІР‚С™Р РЋР Р‰'] { color: #c62828 !important; border-color: rgba(198,40,40,0.4) !important; }

/* Light theme: modal + cancel button */
.light-theme .modal-overlay .modal, .light-theme [style*='border-radius:16px'] { --modal-bg: linear-gradient(145deg, #ffffff, #f5f5f5); }
.light-theme .modal-overlay .modal button[style*='transparent'], .light-theme [id='storm-refresh-stay'] { color: #333 !important; border-color: rgba(0,0,0,0.2) !important; }


.rbac-checkbox { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; background-color: transparent; border: 2px solid var(--border-color, #444); border-radius: 4px; cursor: pointer; transition: all 0.2s ease; display: inline-block; vertical-align: middle; }
.rbac-checkbox:checked { background-color: #4ade80 !important; border-color: #4ade80 !important; }
.light-theme .rbac-checkbox { border-color: #bbb; }
.light-theme .rbac-checkbox:checked { background-color: #fccc24 !important; border-color: #fccc24 !important; }


/* Disabled and ReadOnly fields */
.edit-form-control:disabled, .edit-form-control[readonly], input:disabled, input[readonly], textarea:disabled, textarea[readonly], select:disabled {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted, #888) !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}
.light-theme .edit-form-control:disabled, .light-theme .edit-form-control[readonly], .light-theme input:disabled, .light-theme input[readonly], .light-theme textarea:disabled, .light-theme textarea[readonly], .light-theme select:disabled {
    background-color: #f5f5f5 !important;
    border-color: #d1d1d1 !important;
    color: #666 !important;
}





/* Sidebar Collapsed Polish */
.sidebar.collapsed .nav-header {
    display: none !important;
}

.sidebar.collapsed #zoom-slider,
.sidebar.collapsed #zoom-value {
    display: none !important;
}

/* Thin Scrollbar for Sidebar */
.sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}
.sidebar-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}


/* Sidebar Collapsed Polish */
.sidebar.collapsed .nav-header { display: none !important; }
.sidebar.collapsed #zoom-slider,
.sidebar.collapsed #zoom-value { display: none !important; }

/* Thin Scrollbar for Sidebar */
.sidebar-content { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.sidebar-content::-webkit-scrollbar { width: 4px; }
.sidebar-content::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); border-radius: 4px; }
.sidebar-content::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.4); }

/* -- FINAL UI POLISH (Squares and Submenu Indicators) -- */
.sidebar.collapsed {
    width: 80px !important;
}

.sidebar.collapsed .nav-item {
    justify-content: center !important;
    padding: 0 !important;
    width: 44px !important;
    height: 44px !important;
    margin: 6px auto !important;
    border-radius: 12px !important;
}

/* Submenu Indicator */
.sidebar.collapsed .nav-item[data-has-submenu="true"]::before {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-color);
}

.nav-section-content {
    margin-left: 10px !important;
}

.nav-item {
    padding: 6px 6px !important;
}
.nav-icon {
    margin-right: 6px !important;
}

/* FINAL FIXES FOR USER VISUALS */
/* Make zoom slider visible and tiny in collapsed mode */
.sidebar.collapsed #zoom-slider {
    display: inline-block !important;
    width: 35px !important;
    margin: 0 4px !important;
}

/* Add background block linking sub-items to their parent in collapsed view */
.sidebar.collapsed .nav-section-content {
    margin: 2px 4px !important;
    padding: 4px 0 !important;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed .nav-section-content::before {
    display: none !important;
}

/* Zoom Popover for Collapsed Sidebar */
.sidebar.collapsed #zoom-collapsed-btn {
    display: block !important;
}

.sidebar.collapsed #zoom-popover {
    display: none !important;
    position: absolute;
    left: 85px;
    bottom: 10px;
    width: 200px;
    background: #1e1e24;
    padding: 12px 15px !important;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    gap: 10px;
}
.sidebar.collapsed #zoom-popover.show {
    display: flex !important;
}
.sidebar.collapsed #zoom-popover::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #1e1e24;
}

/* Fix icon centering nicely inside square nav items */
.sidebar.collapsed .nav-icon {
    margin-right: 0 !important;
}

/* FINAL ISLAND & POPOVER FIXES */
.sidebar.collapsed .nav-section-content {
    margin-left: 0px !important; /* Capsule reaches full width */
    margin-right: 0px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.sidebar.collapsed #zoom-value {
    display: inline-block !important; 
}

/* FIX CAPSULE SHIFTS */
.sidebar.collapsed .nav-section-content {
    border-left: none !important;
    border-right: none !important;
}
.sidebar.collapsed .nav-item.active {
    border-left: 1px solid var(--accent-color) !important;
    border: 1px solid var(--accent-color) !important;
}

/* FIX: Absolute left align to ignore scrollbar layout shifts */
.sidebar.collapsed .nav-item {
    margin-left: 6px !important; /* Vertically exact */
    margin-right: 0 !important;
}
.sidebar.collapsed .nav-section-content .nav-item {
    margin-left: 4px !important; /* EXACT CENTER */
}

/* Fix Sidebar Toggle Button Alignment */
.sidebar.collapsed .sidebar-toggle-btn {
    border-radius: 12px;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 16px !important;
    padding: 0 !important;
}

/* FIX: Perfect Instant Tooltips */
.sidebar.collapsed .nav-item {
    position: relative;
}



.sidebar.collapsed .sidebar-content {
    overflow: visible !important;
}

/* ==========================================================================
   STORM UNIFIED UI FRAMEWORK (Auto-Scaling & Consistency)
   ========================================================================== */
.storm-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--input-bg, rgba(0,0,0,0.15));
    color: var(--text-main, #ffffff);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}
.storm-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(var(--accent-rgb, 0,255,200), 0.2);
    background: rgba(0,0,0,0.25);
}
.storm-input[readonly], .storm-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(120, 130, 150, 0.08);
}
.storm-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    font-weight: 800;
    color: var(--accent-color, #00ffc8);
}
.storm-card {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--item-bg, rgba(255,255,255,0.03));
    margin-bottom: 12px;
}
.storm-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
  
/* Hardware Acceleration & Optimization */
.data-table tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: 40px;
}
.info-box, .storm-card {
    content-visibility: auto;
    contain-intrinsic-size: 80px;
}

/* Force uppercase on all table headers */
.data-table th {
    text-transform: uppercase !important;
}

/* ==========================================================================
   PROFESSIONAL UI OVERHAUL v2.0
   High-impact visual & UX enhancements. All existing selectors preserved.
   ========================================================================== */

/* --- Global Typography & Rendering --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

html {
    --font-main: 'Inter', 'Century Gothic', 'Segoe UI', system-ui, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --text-muted: #888;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-main) !important;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* --- Global Scrollbars (sleek thin) --- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    transition: background var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }

/* --- Header Upgrade --- */
header {
    height: 52px !important;
    padding: 0 24px !important;
    backdrop-filter: blur(12px) saturate(1.5);
    background: rgba(31,31,31,0.85) !important;
    border-bottom: 1px solid var(--accent-color) !important;
    transition: all var(--transition-smooth);
}

.site-branding h1 {
    font-size: 20px !important;
    font-weight: 800 !important;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Sidebar Polish --- */
.sidebar {
    width: 320px !important;
    border-right: 1px solid var(--glass-border) !important;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, rgba(15,15,15,0.98) 100%) !important;
    backdrop-filter: blur(8px);
    transition: width var(--transition-smooth) !important;
}

.sidebar-top {
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

.sidebar-content { padding: 8px 10px !important; }

.sidebar-bottom {
    padding: 10px 14px !important;
    border-top: 1px solid var(--glass-border) !important;
    background: rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(4px);
}

/* --- Navigation Items --- */
.nav-item {
    padding: 7px 10px !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 2px !important;
    transition: all var(--transition-fast) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    border: 1px solid transparent !important;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06) !important;
    border-color: rgba(255,255,255,0.08) !important;
    transform: translateX(3px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(76,175,80,0.12), rgba(76,175,80,0.04)) !important;
    border: 1px solid rgba(76,175,80,0.35) !important;
    border-left: 3px solid var(--accent-color) !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(76,175,80,0.12), inset 0 0 20px rgba(76,175,80,0.03) !important;
}

.nav-text {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
}

.nav-header {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    margin-bottom: 10px !important;
    padding-bottom: 6px !important;
    opacity: 0.9;
}

.nav-section {
    margin-bottom: 14px !important;
    border-radius: var(--radius-md) !important;
    padding: 8px !important;
    background: rgba(0,0,0,0.08) !important;
    border: 1px solid rgba(255,255,255,0.03) !important;
}

.nav-section-content {
    margin-left: 12px !important;
    padding-left: 10px !important;
    border-left: 2px solid rgba(76,175,80,0.25) !important;
}

.nav-section-content .nav-item {
    padding: 5px 10px !important;
    font-size: 11px !important;
}

/* --- Form Inputs Upgrade --- */
input, select, textarea {
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast) !important;
    font-family: var(--font-main) !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.12), 0 0 8px rgba(76,175,80,0.15) !important;
    outline: none !important;
}

.storm-input {
    padding: 8px 12px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    background: rgba(0,0,0,0.2);
    transition: all var(--transition-fast) !important;
}

.storm-input:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1), 0 0 12px rgba(76,175,80,0.1) !important;
    background: rgba(0,0,0,0.3) !important;
}

/* Fix: White text for readonly account fields */
.storm-input[readonly] {
    opacity: 0.85 !important;
}

/* --- Buttons Polish --- */
.btn {
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    transition: all var(--transition-fast) !important;
    position: relative;
    overflow: hidden;
    height: 34px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    gap: 4px !important;
    vertical-align: middle !important;
}

/* Sidebar nav-items that also have .btn — restore auto height */
.nav-item.btn {
    height: auto !important;
    padding: 7px 10px !important;
    display: flex !important;
    justify-content: flex-start !important;
}

/* Small buttons keep proportional height */
.btn.btn-sm, .btn-sm {
    height: 28px !important;
    font-size: 10px !important;
    padding: 0 10px !important;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.btn:hover::after { opacity: 1; }

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover)) !important;
    box-shadow: 0 2px 8px rgba(76,175,80,0.25) !important;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(76,175,80,0.35) !important;
    transform: translateY(-1px);
}

.btn-secondary {
    border: 1px solid rgba(255,255,255,0.12) !important;
    background: rgba(255,255,255,0.04) !important;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* --- Data Tables Pro --- */
.data-table-wrapper {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    overflow: auto !important;
}

/* Custom scrollbars for data tables */
.data-table-wrapper::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.data-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
.light-theme .data-table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
.data-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.5);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(100, 100, 100, 0.8);
}
.light-theme .data-table-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
}
.light-theme .data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.data-table {
    font-size: 11.5px !important;
}

.data-table th {
    padding: 10px 14px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    background: linear-gradient(180deg, var(--item-bg), rgba(0,0,0,0.1)) !important;
    border-bottom: 2px solid var(--accent-color) !important;
    box-shadow: none !important;
}

.data-table td {
    padding: 7px 10px !important;
    border-color: rgba(255,255,255,0.04) !important;
    transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

.data-table tbody tr:hover {
    background: rgba(76,175,80,0.04) !important;
}

.data-table tbody tr:hover td {
    border-color: rgba(76,175,80,0.08) !important;
}

/* --- Tabs Enhancement --- */
.tabs-nav {
    background: rgba(37,37,38,0.9) !important;
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 0 12px !important;
    gap: 2px;
    border: 1px solid var(--glass-border) !important;
    border-bottom: none !important;
}

.tab-link {
    padding: 10px 18px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    border-bottom: 2px solid transparent !important;
    transition: all var(--transition-fast) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--text-muted) !important;
}

.tab-link:hover {
    color: var(--text-color) !important;
    background: rgba(255,255,255,0.04);
}

.tab-link.active {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color) !important;
    background: rgba(76,175,80,0.06);
}

.tab-content {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
    border: 1px solid var(--glass-border) !important;
    border-top: none !important;
    padding: 16px !important;
    animation: tabFadeIn 0.2s ease-out !important;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Modals Pro --- */
.modal {
    backdrop-filter: blur(8px) saturate(1.2) !important;
    background: rgba(0,0,0,0.7) !important;
}

.modal-content {
    border-radius: var(--radius-xl) !important;
    border: 1px solid rgba(76,175,80,0.2) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) !important;
    padding: 24px !important;
    animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.05);
    transition: all var(--transition-fast) !important;
    font-size: 18px !important;
}

.close-modal:hover {
    background: rgba(211,47,47,0.15) !important;
    color: #ff5252 !important;
    transform: rotate(90deg);
}

/* --- Storm Cards Glassmorphism --- */
.storm-card {
    padding: 14px !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--glass-border) !important;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(0,0,0,0.1)) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: all var(--transition-smooth);
}

/* --- Info Boxes --- */
.info-box {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--glass-border) !important;
    transition: all var(--transition-smooth) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-box:hover {
    border-color: rgba(76,175,80,0.15) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
    transform: translateY(-1px);
}

/* --- Toast Notifications --- */
.toast {
    border-radius: var(--radius-lg) !important;
    padding: 12px 20px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
}

/* --- Status Badges Polish --- */
.status-badge, .status-select {
    border-radius: var(--radius-sm) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

/* --- File Manager Cards --- */
.file-card {
    border-radius: var(--radius-lg) !important;
    padding: 12px 16px !important;
    transition: all var(--transition-smooth) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}

.file-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
    border-color: rgba(76,175,80,0.2) !important;
}

/* --- Filter Dropdown --- */
.filter-dropdown {
    border-radius: var(--radius-lg) !important;
    backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid rgba(76,175,80,0.2) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05) !important;
    animation: dropdownSlide 0.15s ease-out !important;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Login Card --- */
.login-card {
    border-radius: var(--radius-xl) !important;
    backdrop-filter: blur(20px) saturate(1.5) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(76,175,80,0.15) !important;
}

/* --- Global Search --- */
#global-search {
    border-radius: var(--radius-lg) !important;
    padding: 9px 14px !important;
    font-size: 12px !important;
    background: rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    transition: all var(--transition-fast) !important;
}

#global-search:focus {
    background: rgba(0,0,0,0.3) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1) !important;
}

/* --- Editable Cell Focus --- */
.editable-cell:focus {
    box-shadow: inset 0 0 0 2px var(--accent-color), 0 0 8px rgba(76,175,80,0.1) !important;
    border-radius: var(--radius-sm) !important;
}

/* --- Light Theme: Checkbox visibility fix ---
   In light theme, checkboxes need a visible border and green fill when checked (no checkmark) */
.light-theme input[type="checkbox"], .light-theme .filter-dropdown input[type="checkbox"] { appearance: none !important; -webkit-appearance: none !important; width: 16px !important; height: 16px !important;
    border: 2px solid #999 !important;
    background: #fff !important;
}

.light-theme input[type="checkbox"]:checked, .light-theme .filter-dropdown input[type="checkbox"]:checked {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
    box-shadow: 0 0 4px rgba(76,175,80,0.4);
}



.light-theme input[type="checkbox"]:hover {
    border-color: #4caf50 !important;
}

/* Filter dropdown checkbox visibility in light theme */
.light-theme .filter-dropdown input[type="checkbox"] {
    border: 2px solid #999 !important;
    background: #fff !important;
}
.light-theme .filter-dropdown input[type="checkbox"]:checked {
    background: #4caf50 !important;
    border-color: #4caf50 !important;
}

/* --- Light Theme Enhancements --- */
.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15) !important;
}
.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3) !important;
}
.light-theme * { scrollbar-color: rgba(0,0,0,0.15) transparent; }

/* --- Selection highlight --- */
::selection {
    background: rgba(76,175,80,0.3);
    color: #fff;
}

/* --- Smooth page transitions --- */
.main-content {
    padding: 16px !important;
    transition: padding var(--transition-smooth);
}

/* --- Container height fix --- */
.container {
    height: calc(100vh - 52px) !important;
}

/* --- Role Badges Polish --- */
.badge-role {
    border-radius: var(--radius-sm) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    padding: 3px 8px !important;
}

/* --- Cell Select Polish --- */
.cell-select {
    border-radius: var(--radius-md) !important;
    font-size: 11px !important;
    transition: all var(--transition-fast) !important;
}

.cell-select:focus {
    outline: none !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(76,175,80,0.15) !important;
}

/* --- Period Group Accordion --- */
.period-group {
    border-radius: var(--radius-lg) !important;
    overflow: hidden !important;
    border: 1px solid var(--glass-border) !important;
}

.period-group-header {
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    transition: all var(--transition-fast) !important;
}

/* --- Network Badge --- */
.network-drive-badge {
    border-radius: var(--radius-md) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    backdrop-filter: blur(4px);
}

/* --- Checkbox upgrade --- */
input[type="checkbox"] { appearance: none !important; -webkit-appearance: none !important; width: 16px !important; height: 16px !important; border: 2px solid rgba(255, 255, 255, 0.4) !important; background: rgba(0, 0, 0, 0.2) !important; cursor: pointer !important; position: relative !important; vertical-align: middle !important; margin: 0 4px 0 0 !important;
    border-radius: 4px !important;
    transition: all var(--transition-fast) !important;
}

input[type="checkbox"]:checked { background: #4caf50 !important; border-color: #4caf50 !important;
    box-shadow: 0 0 6px rgba(76,175,80,0.3);
}



input[type="checkbox"]:hover {
    border-color: var(--accent-color) !important;
}

/* --- Loading Skeleton Pulse (for future use) --- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Light Theme Enhancements --- */
.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15) !important;
}
.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3) !important;
}
.light-theme * { scrollbar-color: rgba(0,0,0,0.15) transparent; }

.light-theme header {
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(12px) saturate(1.5) !important;
}

.light-theme .sidebar {
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%) !important;
}

.light-theme .data-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.015);
}

.light-theme .data-table tbody tr:hover {
    background: rgba(46,125,50,0.04) !important;
}

.light-theme ::selection {
    background: rgba(46,125,50,0.25);
    color: #000;
}

/* --- Print Media --- */
@media print {
    header, .sidebar, .sidebar-bottom, .toast-container { display: none !important; }
    .main-content { padding: 0 !important; overflow: visible !important; }
    .container { height: auto !important; }
    .data-table-wrapper { max-height: none !important; box-shadow: none !important; }
}

/* ==========================================================================
   FIX PATCH: Table headers, sidebar text, nav bold
   ========================================================================== */

/* Fix: Table headers must be visible, accent-colored, readable */
.data-table th {
    background: linear-gradient(180deg, var(--item-bg), rgba(0,0,0,0.15)) !important;
    color: var(--accent-color) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 10px 12px !important;
    border-bottom: 2px solid rgba(76,175,80,0.3) !important;
    border-right: 1px solid rgba(255,255,255,0.06) !important;
    white-space: nowrap !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

.data-table th:last-child {
    border-right: none !important;
}

/* Fix: Sidebar text must not be truncated */
.nav-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sidebar:not(.collapsed) .nav-text {
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Fix: КАРТОЧКА ПАРТНЕРА, СПРАВОЧНИКИ, НАСТРОЙКИ - bold font */
.nav-item[data-has-submenu="true"] .nav-text {
    font-weight: 700 !important;
    font-size: 12px !important;
}

/* Bold for parent section nav items that expand submenus */
.nav-section-content > .nav-item {
    font-weight: 500 !important;
}

/* Fix: parent submenu items overflow visible */
.nav-item[data-has-submenu="true"] > div {
    overflow: visible !important;
}

/* ==========================================================================
   FIX: Uniform input/button heights & thead backgrounds
   ========================================================================== */

/* Force thead to be transparent so th gradient background shows */
.data-table thead,
.data-table thead tr {
    background: var(--sidebar-bg, #1e1e1e) !important;
}

/* Consistent form element sizing */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
    min-height: 32px;
    line-height: 1.4;
}

/* btn height already unified above */

/* Fix: НАСТРОЙКИ - УПРАВЛЕНИЕ centered th */
.data-table th {
    text-align: center !important;
}

/* Fix: data-table td borders for logs/management consistency */
.data-table td {
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    border-right: 1px solid rgba(255,255,255,0.04) !important;
}
.data-table td:last-child {
    border-right: none !important;
}

/* Fix: light theme thead background */
.light-theme .data-table th {
    background: linear-gradient(180deg, var(--item-bg), rgba(0,0,0,0.03)) !important;
}

.light-theme .data-table td {
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

/* ==========================================================================
   FIX: Light theme comprehensive visibility + Dark theme white labels
   ========================================================================== */

/* --- Light Theme: Table headers readable --- */
.light-theme .data-table th {
    background: linear-gradient(180deg, #f0f0f0, #e8e8e8) !important;
    color: #222 !important;
    border-bottom: 2px solid #4caf50 !important;
    border-right: 1px solid rgba(0,0,0,0.1) !important;
    text-shadow: none !important;
}
.light-theme .data-table th:last-child {
    border-right: none !important;
}

.light-theme .data-table thead,
.light-theme .data-table thead tr {
    background: #f0f0f0 !important;
}

/* --- Light Theme: Table rows & text --- */
.light-theme .data-table td {
    color: #333 !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    border-right: 1px solid rgba(0,0,0,0.06) !important;
}
.light-theme .data-table td:last-child {
    border-right: none !important;
}

.light-theme .data-table tbody tr:hover {
    background: rgba(76,175,80,0.06) !important;
}

/* --- Light Theme: Form labels visible --- */
.light-theme label,
.light-theme .storm-label,
.light-theme .form-label {
    color: #333 !important;
}

/* --- Light Theme: Inputs & Selects --- */
.light-theme input,
.light-theme select,
.light-theme textarea {
    color: #222 !important;
    background: #fff !important;
    border-color: rgba(0,0,0,0.15) !important;
}

.light-theme input:focus,
.light-theme select:focus,
.light-theme textarea:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.12) !important;
}

.light-theme input::placeholder {
    color: #999 !important;
}

/* --- Light Theme: Select dropdowns text --- */
.light-theme select option {
    color: #222 !important;
    background: #fff !important;
}

/* --- Light Theme: Buttons --- */
.light-theme .btn {
    border-color: rgba(0,0,0,0.12) !important;
}

.light-theme .btn-primary {
    color: #fff !important;
}

.light-theme .btn-secondary {
    color: #333 !important;
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.15) !important;
}

.light-theme .btn-secondary:hover {
    background: rgba(0,0,0,0.1) !important;
}

/* --- Light Theme: Nav header section --- */
.light-theme .nav-header {
    color: #2e7d32 !important;
    text-shadow: none !important;
    border-bottom-color: rgba(46,125,50,0.2) !important;
}

/* --- Light Theme: Cell select / status badges --- */
.light-theme .cell-select {
    color: #333 !important;
    background: #fff !important;
    border-color: rgba(0,0,0,0.12) !important;
}

/* --- Light Theme: Info text and muted --- */
.light-theme [style*="color:#888"],
.light-theme [style*="color: #888"],
.light-theme [style*="color:var(--text-muted)"] {
    color: #555 !important;
}

/* --- Light Theme: Table wrapper border --- */
.light-theme .data-table-wrapper {
    border-color: rgba(0,0,0,0.1) !important;
}

/* --- Light Theme: Period badges, status badges --- */
.light-theme .period-badge {
    color: #fff !important;
}

/* --- Light Theme: Storm card / info-box --- */
.light-theme .storm-card,
.light-theme .info-box {
    background: #fff !important;
    border-color: rgba(0,0,0,0.08) !important;
}

/* --- Light Theme: Modals --- */
.light-theme .modal-content {
    background: linear-gradient(145deg, #fff, #f8f8f8) !important;
    border-color: rgba(0,0,0,0.12) !important;
    color: #222 !important;
}

/* --- Light Theme: Toast --- */
.light-theme .toast {
    background: #fff !important;
    color: #333 !important;
    border-color: rgba(0,0,0,0.12) !important;
}

/* ==========================================================================
   FIX: Dark theme — white form labels & field info (screenshot 3)
   ========================================================================== */

/* Dark theme: form field labels white */
label,
.storm-label,
.form-label,
[style*="font-weight:bold"] {
    color: #fff !important;
}

/* Specific fix for partner card info labels */
td[style*="text-align:right"],
td[style*="text-align: right"] {
    color: #fff !important;
}

/* Form field values (input/select) white text in dark theme */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    color: #fff !important;
}

/* Light theme: override back to dark text */
.light-theme label,
.light-theme .storm-label,
.light-theme .form-label,
.light-theme [style*="font-weight:bold"] {
    color: #333 !important;
}

.light-theme td[style*="text-align:right"],
.light-theme td[style*="text-align: right"] {
    color: #333 !important;
}

.light-theme input:not([type="checkbox"]):not([type="radio"]),
.light-theme select,
.light-theme textarea {
    color: #222 !important;
}

/* --- Light Theme: storm-input specific --- */
.light-theme .storm-input {
    background: #fff !important;
    border-color: rgba(0,0,0,0.15) !important;
    color: #222 !important;
}

.light-theme .storm-input:focus {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.12) !important;
    background: #fff !important;
}

.light-theme .storm-input[readonly] {
    background: #f5f5f5 !important;
    color: #444 !important;
}

/* --- Light Theme: sidebar nav text --- */
.light-theme .nav-text {
    color: #333 !important;
}

.light-theme .nav-item.active .nav-text {
    color: #2e7d32 !important;
}

/* --- Light Theme: view container text --- */
.light-theme .workspace,
.light-theme .view-container {
    color: #222 !important;
}

/* --- Light Theme: accounts-form-row labels --- */
.light-theme .accounts-form-row label {
    color: #444 !important;
}

/* --- Light Theme: muted text override --- */
.light-theme .text-muted,
.light-theme [style*="color:var(--text-muted)"],
.light-theme [style*="color:#888"] {
    color: #666 !important;
}


/* --- Light Theme: File Manager Hardcoded overrides --- */
.light-theme [style*="rgba(255,255,255,0.04)"],
.light-theme [style*="rgba(255, 255, 255, 0.04)"] {
    background: rgba(0,0,0,0.04) !important;
}

.light-theme [style*="rgba(255,255,255,0.05)"],
.light-theme [style*="rgba(255, 255, 255, 0.05)"] {
    background: rgba(0,0,0,0.05) !important;
    border-color: rgba(0,0,0,0.1) !important;
}

.light-theme [style*="rgba(255,255,255,0.1)"],
.light-theme [style*="rgba(255, 255, 255, 0.1)"] {
    border-color: rgba(0,0,0,0.15) !important;
}

.light-theme [style*="rgba(255,255,255,0.15)"],
.light-theme [style*="rgba(255, 255, 255, 0.15)"] {
    border-color: rgba(0,0,0,0.2) !important;
    background: rgba(0,0,0,0.08) !important;
}

.light-theme [style*="rgba(255,255,255,0.08)"],
.light-theme [style*="rgba(255, 255, 255, 0.08)"] {
    background: rgba(0,0,0,0.06) !important;
}

.light-theme [style*="rgba(255,255,255,0.2)"],
.light-theme [style*="rgba(255, 255, 255, 0.2)"] {
    border-color: rgba(0,0,0,0.25) !important;
    background: rgba(0,0,0,0.1) !important;
}

/* --- Modal & Card Animations --- */
.fade-in {
    animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.fade-in-up {
    animation: fadeInUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.fade-out {
    animation: fadeOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.fade-out-down {
    animation: fadeOutDown 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */
.skeleton-row td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.skeleton-text {
    height: 12px;
    background: linear-gradient(90deg, var(--sidebar-bg) 25%, var(--item-bg) 50%, var(--sidebar-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite linear;
    border-radius: 4px;
    opacity: 0.7;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 65%; }
.skeleton-text.long { width: 90%; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeOutDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(15px) scale(0.98); }
}
