/* =============================================
   GALAXY CRM - Dark Theme v2
   Accent: Cyan/Teal (#e94560, #ff6b81)
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gx-bg-app, #1a1a2e);
    color: #eee;
}

/* =============================================
   SIDEBAR / MENIU LATERAL
   - Header Galaxy = fix sus
   - Meniu = scroll în mijloc
   - Logout = fix jos
   ============================================= */
.sidebar {
    width: 200px;
    height: 100vh;
    background: var(--gx-bg-chrome, #16213e);
    color: var(--gx-text, #eee);
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--gx-bg-panel, #0f3460);
    z-index: 1000;
    /* IMPORTANT: Nu mai are overflow - folosim flex layout */
    display: flex;
    flex-direction: column;
    /* Izolare completă - previne flash în timpul animațiilor 3D */
    isolation: isolate;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Logo/Titlu meniu - FIX SUS - aceeași înălțime ca header CRM */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 56px;
    min-height: 56px;
    background: var(--gx-bg-chrome, #16213e);
    border-bottom: 1px solid var(--gx-bg-panel, #0f3460);
    flex-shrink: 0; /* Nu se micșorează */
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 0;
    font-size: 20px;
    color: var(--gx-accent, #e94560);
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0;
}

/* Buton Expand/Collapse All */
.btn-expand-all {
    background: transparent;
    border: 1px solid var(--gx-bg-panel, #0f3460);
    color: #6c757d;
    font-size: 10px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-expand-all:hover {
    background: var(--gx-bg-panel, #0f3460);
    color: var(--gx-accent, #e94560);
    border-color: var(--gx-accent, #e94560);
}

/* Container items meniu - SCROLL DOAR AICI */
.meniu-items {
    flex: 1; /* Ocupă tot spațiul disponibil */
    overflow-y: auto; /* Scroll vertical */
    overflow-x: hidden;
    padding: 10px 0;
}

/* Scrollbar meniu */
.meniu-items::-webkit-scrollbar {
    width: 5px;
}
.meniu-items::-webkit-scrollbar-track {
    background: var(--gx-bg-chrome, #16213e);
}
.meniu-items::-webkit-scrollbar-thumb {
    background: var(--gx-bg-panel, #0f3460);
    border-radius: 3px;
}
.meniu-items::-webkit-scrollbar-thumb:hover {
    background: var(--gx-accent, #e94560);
}

/* Loading */
.meniu-loading {
    padding: 12px 16px;
    font-size: 13px;
    color: #6c757d;
}

/* ===== SECȚIUNI MENIU ===== */
.meniu-sectiune {
    width: 100%;
    text-align: left;
    background: var(--gx-bg-panel, #0f3460);
    border: 0;
    border-left: 3px solid var(--gx-banda, #e94560);
    box-shadow: var(--gx-glow, none);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    margin: 10px 0 4px 0;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--gx-sect-text, #e94560);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.meniu-sectiune:hover {
    background: var(--gx-bg-panel-hover, #1a3a6e);
    color: var(--gx-accent-hover, #ff6b81);
}

.meniu-sectiune-icon {
    font-size: 11px;
    opacity: 0.8;
    transition: transform 0.15s ease;
}

.meniu-sectiune.inchis .meniu-sectiune-icon {
    transform: rotate(-90deg);
}

/* Grup de pagini în secțiune */
.meniu-grup {
    background: rgba(15, 52, 96, 0.3);
    border-left: 1px solid var(--gx-bg-panel, #0f3460);
    margin-left: 10px;
}

.meniu-grup.inchis {
    display: none;
}

/* ===== SUB-MENIU (nivel 2) ===== */
.meniu-parent-wrap {
    display: flex;
    align-items: stretch;
}

.meniu-parent-wrap .meniu-parent-link {
    flex: 1;
    min-width: 0;
}

.meniu-sub-toggle {
    width: 28px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.meniu-sub-toggle:hover {
    background: rgba(var(--gx-accent-rgb, 233, 69, 96), 0.15);
    color: var(--gx-accent, #e94560);
}

.meniu-sub-arrow {
    font-size: 9px;
    transition: transform 0.2s ease;
    display: block;
}

.meniu-sub-toggle.inchis .meniu-sub-arrow {
    transform: rotate(-90deg);
}

/* Container sub-meniu */
.meniu-sub-grup {
    margin-left: 14px;
    padding: 4px 0;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid rgba(var(--gx-accent-rgb, 233, 69, 96), 0.4);
    border-radius: 0 0 6px 0;
}

.meniu-sub-grup.inchis {
    display: none;
}

.meniu-sub-grup a {
    padding: 7px 14px 7px 12px !important;
    font-size: 12px !important;
    color: #8b949e !important;
    border-left: none !important;
}

.meniu-sub-grup a:hover {
    background: rgba(var(--gx-accent-rgb, 233, 69, 96), 0.1) !important;
    color: #e2e8f0 !important;
    padding-left: 16px !important;
    border-left: none !important;
}

.meniu-sub-grup a.active {
    background: rgba(var(--gx-accent-rgb, 233, 69, 96), 0.15) !important;
    color: var(--gx-accent, #e94560) !important;
    font-weight: 600 !important;
    border-left: none !important;
}

/* ===== LINKURI PAGINI ===== */
.sidebar a {
    display: block;
    padding: 10px 16px;
    color: var(--gx-text-mut, #adb5bd);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.sidebar a:hover {
    background: rgba(23, 162, 184, 0.1);
    color: var(--gx-text, #eee);
    border-left-color: var(--gx-banda, #e94560);
    padding-left: 20px;
}

.sidebar a.active {
    background: rgba(23, 162, 184, 0.15);
    color: var(--gx-text-activ, #48c9b0);
    border-left-color: var(--gx-banda, #e94560);
    font-weight: 600;
}

/* Logout link - FIX JOS - aceeași înălțime ca footer CRM (36px) */
.sidebar > a[href*="logout"] {
    flex-shrink: 0;
    width: 100%;
    height: 36px;
    min-height: 36px;
    background: var(--gx-bg-panel, #0f3460);
    border-top: 1px solid var(--gx-bg-panel-hover, #1a3a6e);
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar > a[href*="logout"]:hover {
    background: var(--gx-accent, #e94560);
    color: #fff;
    border-left-color: transparent;
    padding-left: 0;
}

/* =============================================
   HEADER CRM
   ============================================= */
.header-crm {
    position: fixed;
    top: 0;
    left: 200px;
    right: 0;
    height: 56px;
    background: var(--gx-bg-chrome, #16213e);
    border-bottom: 1px solid var(--gx-bg-panel, #0f3460);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
    /* Izolare - previne flash în timpul animațiilor */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gx-text, #eee);
    letter-spacing: 0.3px;
}

/* Header Right - toate elementele în linie */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

/* Data și ora */
.header-datetime {
    color: var(--gx-text-mut, #adb5bd);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.header-separator {
    color: var(--gx-bg-panel, #0f3460);
    font-weight: 300;
}

/* Online indicator */
.header-online {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gx-text-mut, #adb5bd);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #198754;
    border-radius: 50%;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(25, 135, 84, 0); }
}

.online-count {
    color: var(--gx-accent, #e94560);
}

/* User info */
.header-user-info {
    color: var(--gx-text, #eee);
}

.header-user-name {
    font-weight: 500;
}

/* Buton Revenire */
.header-btn-stop {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-btn-stop:hover {
    background: #bb2d3b;
}

/* ===== DROPDOWN CUSTOM ===== */
.header-dropdown {
    position: relative;
}

.header-dropdown-btn {
    background: var(--gx-bg-panel, #0f3460);
    color: var(--gx-text-mut, #adb5bd);
    border: 1px solid var(--gx-bg-panel-hover, #1a3a6e);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.header-dropdown-btn:hover,
.header-dropdown-btn.active {
    background: var(--gx-bg-panel-hover, #1a3a6e);
    color: var(--gx-text, #eee);
    border-color: var(--gx-accent, #e94560);
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.header-dropdown-menu.open .dropdown-arrow,
.header-dropdown-btn:focus + .header-dropdown-menu .dropdown-arrow {
    transform: rotate(180deg);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--gx-bg-chrome, #16213e);
    border: 1px solid var(--gx-bg-panel, #0f3460);
    border-radius: 6px;
    min-width: 380px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

.header-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header tabel dropdown */
.dropdown-header {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    padding: 10px 14px;
    background: var(--gx-bg-panel-head, #0f3460);
    font-size: 10px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lista dropdown */
.dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: var(--gx-bg-chrome, #16213e);
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: var(--gx-bg-panel-head, #0f3460);
    border-radius: 3px;
}

/* Item dropdown */
.dropdown-item {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid var(--gx-bg-panel, #0f3460);
}

.dropdown-item:hover {
    background: rgba(23, 162, 184, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item-name {
    color: var(--gx-text, #eee);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item-role {
    color: #6c757d;
    font-size: 11px;
    text-align: right;
}

/* =============================================
   FOOTER CRM
   ============================================= */
.footer-crm {
    position: fixed;
    bottom: 0;
    left: 200px;
    right: 0;
    height: 36px;
    background: var(--gx-bg-panel, #0f3460);
    border-top: 1px solid var(--gx-bg-chrome, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 11px;
    z-index: 998;
}

/* =============================================
   CONTAINER CONȚINUT PRINCIPAL
   ============================================= */
.content,
.crm-content {
    position: fixed;
    top: 56px;
    bottom: 36px;
    left: 200px;
    right: 0;
    padding: 14px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
}

/* Scrollbar content */
.content::-webkit-scrollbar,
.crm-content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track,
.crm-content::-webkit-scrollbar-track {
    background: var(--gx-bg-app, #1a1a2e);
}

.content::-webkit-scrollbar-thumb,
.crm-content::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover,
.crm-content::-webkit-scrollbar-thumb:hover {
    background: #e94560;
}

/* Titlu pagină */
.content h1,
.crm-content h1 {
    font-size: 20px;
    font-weight: 600;
    color: #eee;
    margin-bottom: 20px;
    display: none; /* ascuns - titlul e în header */
}

/* =============================================
   CARDURI
   ============================================= */
.card {
    background: #16213e;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #0f3460;
    margin-bottom: 20px;
}

.card h2, .card h3 {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* =============================================
   BUTOANE GENERALE - V3 Paletă Diversificată
   Translucid + Border + Umbră subtilă
   ============================================= */

/* === Baza pentru toate butoanele === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === Variante de culori === */

/* Primary - Acțiune principală (Salvează, Confirmă) - VERDE MENTĂ */
.btn-primary {
    background: rgba(26, 188, 156, 0.1);
    color: #1abc9c;
    border: 1px solid rgba(26, 188, 156, 0.3);
    box-shadow: 0 2px 6px rgba(26, 188, 156, 0.2);
}
.btn-primary:hover {
    background: rgba(26, 188, 156, 0.2);
    border-color: rgba(26, 188, 156, 0.5);
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.3);
}

/* Success - Succes, Activează - VERDE */
.btn-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2);
}
.btn-success:hover {
    background: rgba(39, 174, 96, 0.2);
    border-color: rgba(39, 174, 96, 0.5);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

/* Danger - Ștergere/Pericol - ROȘU */
.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.2);
}
.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

/* Secondary - Anulează/Secundar - GRI-ALBĂSTRUI */
.btn-secondary {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.15);
}
.btn-secondary:hover {
    background: rgba(149, 165, 166, 0.2);
    border-color: rgba(149, 165, 166, 0.5);
    box-shadow: 0 4px 10px rgba(149, 165, 166, 0.25);
}

/* Accent - Culoarea temei - ROZ-FUCSIA */
.btn-accent {
    background: rgba(233, 30, 99, 0.1);
    color: #e91e63;
    border: 1px solid rgba(233, 30, 99, 0.3);
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.2);
}
.btn-accent:hover {
    background: rgba(233, 30, 99, 0.2);
    border-color: rgba(233, 30, 99, 0.5);
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3);
}

/* Warning - Avertizare - GALBEN-AURIU */
.btn-warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.2);
}
.btn-warning:hover {
    background: rgba(243, 156, 18, 0.2);
    border-color: rgba(243, 156, 18, 0.5);
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

/* Info - Informativ - CYAN */
.btn-info {
    background: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
    border: 1px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 2px 6px rgba(0, 188, 212, 0.2);
}
.btn-info:hover {
    background: rgba(0, 188, 212, 0.2);
    border-color: rgba(0, 188, 212, 0.5);
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

/* Outline variants */
.btn-outline-primary {
    background: transparent;
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.5);
}
.btn-outline-primary:hover {
    background: rgba(52, 152, 219, 0.1);
}

.btn-outline-danger {
    background: transparent;
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}
.btn-outline-danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

.btn-outline-accent {
    background: transparent;
    color: #e91e63;
    border: 1px solid rgba(233, 30, 99, 0.5);
}
.btn-outline-accent:hover {
    background: rgba(233, 30, 99, 0.1);
}

/* === Variante de mărime === */

/* Small - pentru tabele, inline */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    gap: 4px;
}

/* Medium - default (nu e nevoie de clasă) */

/* Large - pentru acțiuni importante */
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 8px;
    gap: 8px;
}

/* === Butoane speciale === */

/* Buton adăugare (+ Adaugă) - ALBASTRU */
.btn-add {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.2);
    padding: 8px 16px;
    font-size: 13px;
}
.btn-add:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}


/* Buton adăugare cu border dashed (pentru liste) */
.btn-add-dashed {
    background: transparent;
    color: #17a2b8;
    border: 1px dashed #17a2b8;
    padding: 5px 10px;
    font-size: 11px;
}
.btn-add-dashed:hover {
    background: rgba(23, 162, 184, 0.1);
    transform: none;
}

/* Butoane acțiuni în tabele (icon only) */
/* btn-icon — suprascrie .btn base cu specificitate mai mare */
.btn.btn-icon,
.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: #888;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: none;
}
.btn.btn-icon:hover,
.btn-icon:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    transform: none;
    box-shadow: none;
}
.btn.btn-icon.edit,
.btn-icon.edit { color: #3498db; }
.btn.btn-icon.edit:hover,
.btn-icon.edit:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}
.btn.btn-icon.delete,
.btn-icon.delete { color: #e74c3c; }
.btn.btn-icon.delete:hover,
.btn-icon.delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}
.btn.btn-icon.add,
.btn-icon.add { color: #27ae60; }
.btn.btn-icon.add:hover,
.btn-icon.add:hover {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}
.btn-icon-sm {
    width: 26px;
    height: 26px;
    font-size: 12px;
}

/* === Grupuri de butoane === */
.btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-group-end {
    justify-content: flex-end;
}

/* === Modal footer standard === */
.modal-footer-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =============================================
   FORMULARE
   ============================================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #0f3460;
    border-radius: 5px;
    background: #1a1a2e;
    color: #eee;
    font-size: 14px;
    transition: border-color 0.2s;
}

/* Stiluri pentru opțiunile din select - TEXT NEGRU pe fundal alb (nativ browser) */
select option {
    background-color: #fff;
    color: #000;
    padding: 10px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #e94560;
}

input::placeholder,
textarea::placeholder {
    color: #6c757d;
}

label {
    display: block;
    font-size: 13px;
    color: #adb5bd;
    margin-bottom: 8px;
}

/* =============================================
   TABELE
   ============================================= */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

th {
    background: #0f3460;
    color: #adb5bd;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(23, 162, 184, 0.05);
}

/* =============================================
   BADGE-URI / ETICHETE
   ============================================= */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success,
.ok {
    background: #0f5132;
    color: #75b798;
}

.badge-danger,
.err {
    background: #5c2830;
    color: #ea868f;
}

.badge-warning {
    background: #664d03;
    color: #ffda6a;
}

.badge-info {
    background: #055160;
    color: #6edff6;
}

/* =============================================
   CODE BLOCKS / LOG-URI
   ============================================= */
.code-block,
pre,
code {
    background: #0d1b2a;
    border-radius: 5px;
    padding: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #adb5bd;
    line-height: 1.5;
    overflow-x: auto;
}

/* =============================================
   MESAJE ALERT
   ============================================= */
.msg {
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 13px;
    margin-bottom: 16px;
}

.msg.ok {
    background: rgba(25, 135, 84, 0.15);
    border: 1px solid #198754;
    color: #75b798;
}

.msg.bad {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #ea868f;
}

/* =============================================
   CENTRAT (pentru pagini login etc)
   ============================================= */
.center-box {
    max-width: 420px;
    margin: 60px auto;
    padding: 32px;
    background: #16213e;
    border-radius: 8px;
    border: 1px solid #0f3460;
    text-align: center;
}

.center-box h2 {
    color: #e94560;
    margin-bottom: 24px;
    font-size: 20px;
}

/* =============================================
   LINKBOX (pentru URL-uri)
   ============================================= */
.linkbox {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #0f3460;
    border-radius: 6px;
    background: #0d1b2a;
    word-break: break-all;
    font-size: 13px;
    color: #adb5bd;
}

/* =============================================
   RESPONSIVE
   ============================================= */
/* Hamburger button - hidden on desktop, visible on mobile */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gx-accent, #e94560);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    /* Hamburger button - visible on mobile */
    .sidebar-toggle {
        display: flex;
    }
    
    /* Sidebar as overlay */
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 10001;
        flex-direction: column;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Overlay backdrop */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.6);
        z-index: 10000;
    }
    .sidebar-backdrop.open {
        display: block;
    }
    
    .meniu-items {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .sidebar > a[href*="logout"] {
        width: 100%;
    }
    
    .header-crm {
        left: 0;
    }
    
    .header-datetime,
    .header-online,
    .header-separator {
        display: none !important;
    }
    
    .footer-crm {
        left: 0;
    }
    
    .content,
    .crm-content {
        left: 0;
        padding: 16px;
    }
}

/* Hamburger button - hidden on desktop */
/* =============================================
   PRINT - Ascunde CRM și afișează doar conținutul
   ============================================= */
@media print {
    /* Ascunde elementele de navigare */
    .sidebar,
    .header-crm,
    .footer-crm {
        display: none !important;
    }
    
    /* Resetează body */
    html, body {
        overflow: visible !important;
        height: auto !important;
        background: #fff !important;
    }
    
    /* Content ocupă tot */
    .content,
    .crm-content {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        width: 100% !important;
    }
}

/* =============================================
   PAGE FLIP TRANSITIONS - Animații navigare
   ============================================= */

/* Ieșire: pagina pleacă spre stânga */
@keyframes page-flip-out {
    0% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: perspective(1200px) rotateY(-90deg);
        opacity: 0;
    }
}

/* Ieșire reverse: pagina pleacă spre dreapta (pentru înapoi) */
@keyframes page-flip-out-reverse {
    0% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: perspective(1200px) rotateY(90deg);
        opacity: 0;
    }
}

/* Intrare: pagina vine din dreapta */
@keyframes page-flip-in {
    0% {
        transform: perspective(1200px) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
}

/* Intrare reverse: pagina vine din stânga (pentru înapoi) */
@keyframes page-flip-in-reverse {
    0% {
        transform: perspective(1200px) rotateY(-90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(1200px) rotateY(0deg);
        opacity: 1;
    }
}

.page-flip-out {
    animation: page-flip-out 0.3s ease-in forwards;
    transform-origin: left center;
    z-index: 1;
}

.page-flip-out-reverse {
    animation: page-flip-out-reverse 0.3s ease-in forwards;
    transform-origin: left center;
    z-index: 1;
}

.page-flip-in {
    animation: page-flip-in 0.3s ease-out forwards;
    transform-origin: left center;
    z-index: 1;
}

.page-flip-in-reverse {
    animation: page-flip-in-reverse 0.3s ease-out forwards;
    transform-origin: left center;
    z-index: 1;
}

/* Stiluri pentru compatibilitatea animațiilor cu toate containerele */
.gsm-container,
.gsm-add-container,
.gsm-apt-page,
.contract-add-container,
.contract-edit-container,
.contract-pdf-container,
.contract-template-container,
.scara-page-container,
.echipe-container,
.page-container,
.config-container,
.contracte-container,
.crm-content,
.content {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}