/* ============================================
   MAINTENANCE MODE - Bar and Overlay Styles
   ============================================ */

#maintenance-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    color: white;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.4);
    animation: slideDownBar 0.3s ease-out;
}

@keyframes slideDownBar {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.maintenance-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.maintenance-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.maintenance-bar-icon {
    font-size: 1.25rem;
    animation: pulse 2s infinite;
}

.maintenance-bar-text {
    font-size: 0.9rem;
}

.maintenance-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.maintenance-bar-info {
    font-size: 0.8rem;
    opacity: 0.9;
}

.maintenance-bar-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.maintenance-bar-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

body.has-maintenance-bar {
    padding-top: 45px !important;
}

body.has-maintenance-bar .fixed-top,
body.has-maintenance-bar .navbar-fixed-top {
    top: 45px !important;
}

#maintenance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0d1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.maintenance-overlay-content {
    text-align: center;
    padding: 3rem;
    background: rgba(38, 42, 56, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.maintenance-overlay-icon {
    font-size: 4rem;
    color: #f59e0b;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.maintenance-overlay-content h1 {
    color: #f59e0b;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.maintenance-overlay-reason {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    color: #fbbf24;
    font-weight: 600;
}

.maintenance-overlay-content p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.maintenance-overlay-info {
    font-size: 0.85rem;
    color: #64748b !important;
}

.maintenance-overlay-spinner {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.maintenance-overlay-spinner .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   ANIMATION SETTINGS DROPDOWN - Elegant Design
   ============================================ */

.animation-settings-dropdown {
    min-width: 240px;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    overflow: hidden;
}

.animation-settings-header {
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
    font-size: 0.85rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
}

.animation-settings-header i {
    font-size: 1.1rem;
    color: #a5b4fc;
}

.animation-settings-body {
    padding: 0.5rem;
}

.animation-option {
    display: block;
    cursor: pointer;
    margin-bottom: 0.35rem;
}

.animation-option:last-child {
    margin-bottom: 0;
}

.animation-option input[type="radio"] {
    display: none;
}

.animation-option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.02);
}

.animation-option-content:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.animation-option input[type="radio"]:checked + .animation-option-content {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
}

.animation-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.animation-option-icon i {
    font-size: 1.2rem;
    color: white;
}

.animation-option-text {
    flex: 1;
    min-width: 0;
}

.animation-option-title {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #f1f5f9;
    line-height: 1.2;
}

.animation-option-desc {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 0.1rem;
}

.animation-option-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.animation-option-check i {
    font-size: 0.85rem;
    color: white;
}

.animation-option input[type="radio"]:checked + .animation-option-content .animation-option-check {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

/* ============================================
   ANIMATION PREFERENCES SYSTEM
   ============================================ */

/* Default: Optimized animations (balanced) */
:root {
    --animation-duration-fast: 0.15s;
    --animation-duration-normal: 0.3s;
    --animation-duration-slow: 2.5s;
    --animation-timing: ease-in-out;
}

/* FULL ANIMATIONS MODE */
body.animations-full .ticket-card.ticket-urgent {
    animation: urgentGlowFull 2s ease-in-out infinite;
}

body.animations-full .ticket-urgent-badge {
    animation: urgentBadgePulseFull 1.5s ease-in-out infinite;
}

body.animations-full .ticket-urgent-badge i {
    animation: urgentBlinkFull 1s ease-in-out infinite;
}

body.animations-full .revision-warning-box {
    animation: pulseFull 2s ease-in-out infinite;
}

@keyframes urgentGlowFull {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 0.8);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.6);
        border-color: #ef4444;
    }
}

@keyframes urgentBadgePulseFull {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.95;
    }
}

@keyframes urgentBlinkFull {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulseFull {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { opacity: 0.85; box-shadow: 0 0 10px 2px rgba(245, 158, 11, 0.2); }
}

/* OPTIMIZED ANIMATIONS MODE (default) */
body.animations-optimized .ticket-card.ticket-urgent,
body:not([class*="animations-"]) .ticket-card.ticket-urgent {
    animation: urgentGlow 2.5s ease-in-out infinite;
    will-change: box-shadow;
}

body.animations-optimized .ticket-urgent-badge,
body:not([class*="animations-"]) .ticket-urgent-badge {
    animation: urgentBadgePulse 2s ease-in-out infinite;
    will-change: opacity;
}

body.animations-optimized .revision-warning-box,
body:not([class*="animations-"]) .revision-warning-box {
    animation: subtlePulse 3s ease-in-out infinite;
    will-change: opacity;
}

/* REDUCED ANIMATIONS MODE */
body.animations-reduced .ticket-card.ticket-urgent {
    animation: none;
    box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.4);
}

body.animations-reduced .ticket-urgent-badge {
    animation: none;
}

body.animations-reduced .revision-warning-box {
    animation: none;
}

body.animations-reduced * {
    transition-duration: 0.1s !important;
}

/* DISABLED ANIMATIONS MODE */
body.animations-disabled .ticket-card.ticket-urgent,
body.animations-disabled .ticket-urgent-badge,
body.animations-disabled .ticket-busy-badge,
body.animations-disabled .revision-warning-box {
    animation: none !important;
}

body.animations-disabled * {
    animation: none !important;
    transition: none !important;
}

/* Respect OS preference when no user setting */
@media (prefers-reduced-motion: reduce) {
    body:not([class*="animations-"]) .ticket-card.ticket-urgent,
    body:not([class*="animations-"]) .ticket-urgent-badge,
    body:not([class*="animations-"]) .ticket-busy-badge,
    body:not([class*="animations-"]) .revision-warning-box {
        animation: none !important;
    }
    
    body:not([class*="animations-"]) * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   MODERN SIDEBAR
   ============================================ */

.vertical-menu {
    width: 260px;
    position: fixed;
    top: 70px;
    bottom: 0;
    background: linear-gradient(180deg, #0f172a 0%, #111827 45%, #0b1220 100%);
    border-right: 1px solid rgba(255,255,255,0.03);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.02), 8px 0 24px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: width 0.25s ease, background 0.25s ease;
}

#sidebar-menu {
    padding: 1.5rem 0;
}

#sidebar-menu .menu-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

#sidebar-menu .metismenu li {
    position: relative;
}

#sidebar-menu .metismenu li a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
    letter-spacing: 0.2px;
}

#sidebar-menu .metismenu li a:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
    border-left-color: var(--primary);
}

#sidebar-menu .metismenu li a.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    color: var(--primary-light);
    border-left-color: var(--primary);
}

#sidebar-menu .metismenu li a i {
    min-width: 2rem;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    color: #e5e7eb;
    opacity: 0.9;
}

#sidebar-menu .metismenu li a:hover i {
    color: #c7d2fe;
}

/* Submenu */
#sidebar-menu .metismenu .sub-menu {
    list-style: none;
    padding-left: 0;
    background: rgba(0, 0, 0, 0.2);
}

#sidebar-menu .metismenu .sub-menu li a {
    padding-left: 4rem;
    font-size: 0.9rem;
    border-left: none;
    position: relative;
}

#sidebar-menu .metismenu .sub-menu li a::before {
    content: "";
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.2s ease;
}

#sidebar-menu .metismenu .sub-menu li a:hover::before {
    background: var(--primary-light);
    transform: translateY(-50%) scale(1.5);
}

/* ============================================
   MODERN TOPBAR
   ============================================ */

#page-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1002;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    height: 70px;
}

.navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 1rem;
    gap: 0.5rem;
}

.navbar-brand-box {
    width: 260px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem 0 0.75rem;
    height: 70px;
    background: var(--bg-secondary);
}

.navbar-brand-box .logo img {
    height: 48px;
    transition: all 0.3s ease;
    object-fit: contain;
}

.navbar-brand-box .logo {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    justify-content: flex-start;
}

.navbar-brand-box .logo:hover img {
    transform: scale(1.05);
}

/* Logo swap / center when sidebar collapsed */
.logo-sm { display: none; }
.logo-lg { display: inline-block; }

body.vertical-collapsed .navbar-brand-box {
    width: 72px;
    padding: 0;
    justify-content: center;
    background: var(--bg-secondary);
}

body.vertical-collapsed .logo-sm { display: inline-block; }
body.vertical-collapsed .logo-lg { display: none; }

#vertical-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

#vertical-menu-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.header-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.header-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    margin-left: 260px;
    padding-top: 70px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.page-content {
    padding: 2rem;
}

.container-fluid {
    max-width: 100%;
    padding: 0 1rem;
}

/* ============================================
   PAGE TITLE
   ============================================ */

.page-title-box {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title-box h4 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary-light);
}

/* ============================================
   STATS CARDS
   ============================================ */

.stats-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    transition: all 0.5s ease;
}

.stats-card:hover::before {
    top: -30%;
    right: -30%;
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: var(--shadow-lg);
}

.stats-card .stats-content {
    position: relative;
    z-index: 1;
}

.stats-card .stats-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: auto; /* Changed from 100% to allow card to shrink when collapsed */
    display: flex;
    flex-direction: column;
    transition: height 0.35s ease;
}

/* When collapse content is not shown, don't force full height */
.dashboard-card .collapse:not(.show) {
    display: none;
}

/* Cards with expanded content can grow to fill space */
.dashboard-card:has(.collapse.show) {
    height: 100%;
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.dashboard-card .card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.dashboard-card .card-body {
    flex: 1;
    padding: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modern-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* ---- Force bigger base font on mobile ---- */
    body {
        font-size: 1.05rem !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 56px !important;
    }

    .navbar-brand-box {
        width: auto;
    }

    #page-topbar {
        height: 56px !important;
    }

    .navbar-header {
        height: 56px !important;
    }

    .page-content {
        padding: 0.35rem 0 !important;
    }

    .container-fluid {
        padding: 0 0.35rem !important;
    }

    .breadcrumb {
        margin-bottom: 0.25rem !important;
        padding-left: 0.5rem !important;
        font-size: 1rem !important;
    }

    .breadcrumb-item a,
    .breadcrumb-item.active {
        font-size: 1rem !important;
    }

    .page-title-box {
        padding: 0.2rem 0 !important;
        margin-bottom: 0.2rem !important;
    }

    /* ---- Global mobile card / text scaling ---- */
    .card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .card-header {
        padding: 0.85rem 0.75rem !important;
    }

    .card-body {
        padding: 0.6rem 0.5rem !important;
    }

    /* ---- Tickets header compact - mobile ---- */
    .tickets-header-compact {
        flex-direction: column;
        align-items: stretch !important;
        padding: 0.85rem !important;
        gap: 0.75rem;
    }

    .tickets-header-compact .d-flex {
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .tickets-pagesize-group {
        font-size: 1.1rem !important;
        color: rgba(255,255,255,0.8);
    }

    .tickets-pagesize-select {
        width: auto !important;
        background: rgba(255,255,255,0.08) !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        color: #fff !important;
        border-radius: 10px !important;
        padding: 0.55rem 0.85rem !important;
        font-size: 1.1rem !important;
        min-height: 48px !important;
    }

    .tickets-export-btn {
        font-size: 1.1rem !important;
        padding: 0.6rem 1.15rem !important;
        min-height: 48px !important;
    }

    .tickets-search-compact {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 1.1rem !important;
        border-radius: 12px !important;
        min-height: 48px !important;
    }

    .tickets-add-btn-compact {
        padding: 0.65rem 1.25rem !important;
        font-size: 1.1rem !important;
        min-height: 48px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* ---- Ticket cards grid - single column, full width ---- */
    .tickets-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 0.75rem;
    }

    /* ---- Ticket card - large, modern mobile ---- */
    .ticket-card {
        padding: 1.15rem 1.1rem !important;
        font-size: 1.1rem !important;
        border-radius: 16px !important;
        border-width: 2px;
    }

    .ticket-card-header {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.65rem !important;
        margin-bottom: 0.85rem !important;
        padding-bottom: 0.7rem !important;
        min-height: 40px !important;
    }

    .ticket-number-label {
        font-size: 1.4rem !important;
        font-weight: 800 !important;
    }

    .ticket-badges {
        gap: 0.4rem !important;
    }

    .ticket-badge {
        font-size: 0.95rem !important;
        padding: 0.35rem 0.7rem !important;
        border-radius: 12px !important;
    }

    .ticket-badge i {
        font-size: 1.05rem !important;
    }

    /* Urgent / status badges */
    .ticket-urgent-badge {
        font-size: 0.9rem !important;
        padding: 0.35rem 0.75rem !important;
        top: 0.65rem;
        right: 0.65rem;
        border-radius: 12px;
    }

    .ticket-urgent-badge i {
        font-size: 0.95rem !important;
    }

    .ticket-status-top {
        font-size: 0.95rem !important;
        padding: 0.35rem 0.8rem !important;
        top: 0.65rem;
        right: 0.65rem;
        border-radius: 12px;
    }

    .ticket-status-top i {
        font-size: 1rem !important;
    }

    .ticket-busy-badge {
        font-size: 0.9rem !important;
        padding: 0.35rem 0.7rem !important;
    }

    /* ---- Card body - large info blocks ---- */
    .ticket-card-body {
        gap: 0.7rem !important;
        margin-bottom: 0.85rem !important;
    }

    .ticket-info-block {
        padding: 0.75rem 0.85rem !important;
        gap: 0.85rem !important;
        border-radius: 12px !important;
    }

    .ticket-info-icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        font-size: 1.35rem !important;
    }

    .ticket-info-content {
        line-height: 1.4 !important;
    }

    .ticket-info-value {
        font-size: 1.1rem !important;
    }

    .ticket-info-value strong {
        font-size: 1.2rem !important;
    }

    .ticket-info-value small {
        font-size: 1rem !important;
        opacity: 0.75;
    }

    /* ---- Dates section ---- */
    .ticket-dates {
        padding: 0.7rem 0.85rem !important;
        gap: 0.45rem !important;
        border-radius: 12px !important;
        border-left-width: 3px !important;
    }

    .ticket-date-item {
        font-size: 1.05rem !important;
        gap: 0.55rem !important;
    }

    .ticket-date-item i {
        font-size: 1.15rem !important;
    }

    /* ---- User row ---- */
    .ticket-user {
        font-size: 1.05rem !important;
        padding: 0.6rem 0.75rem !important;
        gap: 0.55rem !important;
        border-radius: 10px !important;
    }

    .ticket-user i {
        font-size: 1.3rem !important;
    }

    /* ---- Footer buttons - large touch targets (48px) ---- */
    .ticket-card-footer {
        gap: 0.7rem !important;
        padding-top: 0.75rem !important;
    }

    .ticket-card-footer .btn {
        padding: 0.75rem 0.85rem !important;
        font-size: 1.1rem !important;
        border-radius: 12px !important;
        min-height: 48px !important;
        font-weight: 600 !important;
    }

    .ticket-card-footer .btn i {
        font-size: 1.2rem !important;
    }

    /* ---- Pagination ---- */
    .tickets-pagination-inner {
        gap: 0.85rem !important;
        padding: 0.7rem 1rem !important;
        border-radius: 14px;
    }

    .tickets-pagination-inner .btn {
        min-height: 48px !important;
        min-width: 48px !important;
        font-size: 1.2rem !important;
    }

    .tickets-pagination-info {
        font-size: 1.1rem !important;
    }

    /* Dashboard cards */
    .dashboard-card {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .stats-card {
        border-radius: 8px;
    }

    /* ---- Global form elements - 48px touch targets ---- */
    .form-select,
    .form-control,
    .form-select-sm,
    .form-control-sm {
        font-size: 1.1rem !important;
        padding: 0.6rem 0.85rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
    }

    .btn-sm {
        font-size: 1.1rem !important;
        padding: 0.6rem 0.95rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
    }

    .btn {
        min-height: 48px;
        font-size: 1.05rem !important;
    }

    .form-check-label {
        font-size: 1.1rem !important;
    }

    .form-check-input {
        width: 1.5em !important;
        height: 1.5em !important;
    }

    .form-check.form-switch .form-check-input {
        width: 2.75em !important;
        height: 1.5em !important;
    }

    /* ---- Dropdown items ---- */
    .dropdown-item {
        padding: 0.85rem 1.1rem !important;
        font-size: 1.1rem !important;
    }

    /* ============================================================
       GLOBAL DataTables Mobile - targets BOTH DT 1.x and 2.x classes
       ============================================================ */

    /* Top controls row: stack vertically */
    .dataTables_wrapper .row.mb-3,
    .dataTables_wrapper .row.align-items-center.mb-3,
    div.dt-container .row.mb-3,
    div.dt-container .row.align-items-center.mb-3 {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .dataTables_wrapper .row.mb-3 > [class*="col-"],
    div.dt-container .row.mb-3 > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 4px !important;
    }

    /* Length control (Afisare X inregistrari) */
    .dataTables_length,
    div.dt-length {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        padding: 0 !important;
        color: rgba(255, 255, 255, 0.7) !important;
    }

    .dataTables_length label,
    div.dt-length label {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 1.1rem !important;
        white-space: nowrap !important;
    }

    .dataTables_length select,
    div.dt-length select {
        padding: 10px 16px !important;
        font-size: 1.15rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        color: rgba(255, 255, 255, 0.9) !important;
        font-weight: 600 !important;
        text-align: center !important;
        min-width: 70px !important;
    }

    /* Search (Cautare) - full width, hide label text */
    .dataTables_filter,
    div.dt-search {
        display: flex !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .dataTables_filter label,
    div.dt-search label {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        gap: 0 !important;
        font-size: 0 !important;
    }

    .dataTables_filter input,
    .dataTables_filter input[type="search"],
    div.dt-search input,
    div.dt-search input[type="search"] {
        padding: 14px 18px !important;
        font-size: 1.15rem !important;
        width: 100% !important;
        min-height: 54px !important;
        border-radius: 14px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        margin-left: 0 !important;
    }

    .dataTables_filter input:focus,
    div.dt-search input:focus {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        outline: none !important;
    }

    /* Info bar (Pagina X din Y) */
    .dataTables_info,
    div.dt-info {
        font-size: 1.05rem !important;
        padding: 12px 8px !important;
        text-align: center !important;
        color: rgba(255, 255, 255, 0.5) !important;
    }

    /* Bottom row: stack */
    .dataTables_wrapper .row.mt-3,
    .dataTables_wrapper .row.align-items-center.mt-3,
    div.dt-container .row.mt-3,
    div.dt-container .row.align-items-center.mt-3 {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .dataTables_wrapper .row.mt-3 > [class*="col-"],
    div.dt-container .row.mt-3 > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        text-align: center !important;
        padding: 0 4px !important;
    }

    /* Pagination: centered pills */
    .dataTables_paginate,
    div.dt-paging {
        padding: 10px 0 !important;
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .dataTables_paginate .paginate_button,
    div.dt-paging .dt-paging-button {
        padding: 12px 16px !important;
        font-size: 1.1rem !important;
        min-height: 48px !important;
        border-radius: 12px !important;
        min-width: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* DataTables Responsive: expanded child rows */
    table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
    table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before {
        font-size: 1.2rem !important;
        width: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
    }

    ul.dtr-details,
    .dtr-details {
        font-size: 1.15rem !important;
        width: 100% !important;
    }

    ul.dtr-details li,
    .dtr-details li {
        padding: 12px 4px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        display: grid !important;
        grid-template-columns: 110px minmax(0, 1fr) !important;
        align-items: start !important;
        column-gap: 12px !important;
    }

    .dtr-details .dtr-title,
    ul.dtr-details .dtr-title {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: rgba(255, 255, 255, 0.55) !important;
        min-width: 110px !important;
        width: 110px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin: 0 !important;
        text-align: left !important;
        justify-self: start !important;
        display: block !important;
    }

    .dtr-details .dtr-data,
    ul.dtr-details .dtr-data {
        font-size: 1.15rem !important;
        font-weight: 500 !important;
        color: rgba(255, 255, 255, 0.92) !important;
        text-align: left !important;
        justify-self: start !important;
        width: 100% !important;
        margin: 0 !important;
        word-break: break-word !important;
        display: block !important;
    }
}

/* Desktop collapsed sidebar adjustments */
@media (min-width: 992px) {
    body.vertical-collapsed .vertical-menu {
        width: 72px;
    }

    body.vertical-collapsed .navbar-brand-box {
        width: 72px;
        padding-left: 0;
    }

    body.vertical-collapsed .main-content {
        margin-left: 72px;
    }

    body.vertical-collapsed #sidebar-menu .menu-title {
        display: none;
    }

    body.vertical-collapsed #sidebar-menu .metismenu li a {
        padding: 0.85rem 0.4rem;
        justify-content: center;
        border-left: none;
    }

    body.vertical-collapsed #sidebar-menu .metismenu li a i {
        margin-right: 0;
    }

    body.vertical-collapsed #sidebar-menu .metismenu .sub-menu {
        display: none;
    }
}

/* ============================================
   MAP CONTAINER
   ============================================ */

.amef-map {
    min-height: 500px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================
   CHARTS STYLING
   ============================================ */

canvas {
    max-width: 100%;
    height: auto !important;
}

.chart-loader {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   WELCOME BANNER
   ============================================ */

.welcome-banner {
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip-inner {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--border-color);
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: var(--border-color);
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--border-color);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: var(--border-radius-sm);
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* ============================================
   DROPDOWN
   ============================================ */

.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    gap: 0.5rem;
}

.page-link {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   BREADCRUMB MODERN
   ============================================ */

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ============================================
   SELECT2 DARK THEME
   ============================================ */

.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.select2-container--bootstrap-5 .select2-dropdown {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.select2-container--bootstrap-5 .select2-results__option {
    color: var(--text-secondary);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

/* ============================================
   DATATABLES MODERN STYLING
   ============================================ */

.dataTables_wrapper {
    color: var(--text-primary);
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
}

.dataTables.wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-light) !important;
    border-color: var(--primary) !important;
}

/* ============================================
   DEVICE STATUS CARD - Ticket Page
   ============================================ */

.device-info-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.device-status-item {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.device-status-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-left-color: var(--primary);
}

.revision-warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-left: 3px solid var(--warning);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    /* Animation applied via body.animations-* classes */
}

@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.intervention-details-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.intervention-details-box:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* ============================================
   ACCORDION CUSTOM STYLING
   ============================================ */

.accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

/* ============================================
   TICKETS CARDS - Ultra Compact + Alert System
   ============================================ */

/* Compact Header for Tickets Page */
.tickets-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem !important;
    gap: 1rem;
    flex-wrap: wrap;
}

.tickets-search-compact {
    max-width: 200px;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.tickets-add-btn-compact {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tickets-add-btn-compact i {
    font-size: 0.85rem;
}

.tickets-pagesize-group {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

.tickets-pagesize-select {
    width: auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.85rem;
}

.tickets-export-btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

.tickets-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.6rem;
    margin-top: 0.6rem;
    /* Performance: contain layout calculations */
    contain: layout style;
    align-items: stretch;
}

.ticket-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid rgba(51, 65, 85, 0.6);
    border-radius: 8px;
    padding: 0.65rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 0.75rem;
    /* Performance optimizations */
    transform: translateZ(0);
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    height: 100%;
}

.ticket-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    transform: scaleX(0);
    transform-origin: left;
}

.ticket-card:hover {
    border-color: inherit;
}

/* ============================================
   URGENT TICKETS - Base Styles (animation controlled by mode classes)
   ============================================ */

.ticket-card.ticket-urgent {
    border-color: var(--danger);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(30, 41, 59, 0.95) 100%);
    /* Animation applied via body.animations-* classes */
}

.ticket-card.ticket-urgent::before {
    background: linear-gradient(90deg, var(--danger) 0%, #dc2626 100%);
    transform: scaleX(1);
}

.ticket-card.ticket-urgent .ticket-card-header {
    border-bottom-color: rgba(239, 68, 68, 0.3);
}

/* Simplified glow animation - GPU accelerated */
@keyframes urgentGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.5);
    }
}

.ticket-urgent-badge {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 10;
    /* Animation applied via body.animations-* classes */
}

@keyframes urgentBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.ticket-urgent-badge i {
    font-size: 0.65rem;
}

/* Status top-right badge (non-urgent/non-busy) */
.ticket-status-top {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 10;
}

.ticket-status-top i {
    font-size: 0.75rem;
}

/* ============================================
   BUSY TICKET
   ============================================ */

.ticket-card.ticket-busy {
    border-color: rgba(251, 191, 36, 0.5);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(30, 41, 59, 0.95) 100%);
}

.ticket-card.ticket-waiting {
    border-color: rgba(251, 191, 36, 0.7);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(30, 41, 59, 0.95) 100%);
}

.ticket-busy-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning);
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    animation: none;
}

/* ============================================
   HEADER - Compact Horizontal Layout
   ============================================ */

.ticket-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    min-height: 24px;
}

.ticket-number-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.ticket-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.ticket-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    white-space: nowrap;
}

.ticket-badge i {
    font-size: 0.75rem;
}

.badge-lock {
    background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(251,191,36,0.1) 100%);
    color: #facc15;
    border-color: rgba(251,191,36,0.4);
}

.badge-status.badge-nou { color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.badge-status.badge-in-lucru { color: #fbbf24; border-color: rgba(251,191,36,0.35); }
.badge-status.badge-in-asteptare { color: #a855f7; border-color: rgba(168,85,247,0.35); }
.badge-status.badge-asteptare { color: #fbbf24; border-color: rgba(251,191,36,0.45); background: rgba(251,191,36,0.08); }
.badge-status.badge-finalizat { color: #4ade80; border-color: rgba(34,197,94,0.35); }

.badge-urgent {
    background: linear-gradient(135deg, rgba(239,68,68,0.22) 0%, rgba(239,68,68,0.12) 100%);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.35);
}

.badge-days {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border-color: rgba(255,255,255,0.12);
}

/* ============================================
   BODY - F?r? Label-uri, Super Compact
   ============================================ */

.ticket-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    flex: 1;
}

.ticket-info-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.4rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 5px;
    transition: all 0.2s ease;
    min-height: 42px;
}

.ticket-info-block:hover {
    background: rgba(99, 102, 241, 0.08);
}

.ticket-info-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.ticket-info-icon.bg-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.ticket-info-icon.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.ticket-info-icon.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.ticket-info-content {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

/* Removed labels, direct values only */
.ticket-info-value {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.ticket-info-value strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
}

.ticket-info-value small {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.1rem;
}

/* ============================================
   DATES - Compact
   ============================================ */

.ticket-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 5px;
    border-left: 2px solid var(--primary);
    min-height: 56px;
    justify-content: center;
}

.ticket-date-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
    min-height: 15px;
}

.ticket-date-item.is-placeholder {
    opacity: 0.6;
}

.ticket-date-item i {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ticket-date-item strong {
    font-weight: 600;
}

/* ============================================
   USER - Compact
   ============================================ */

.ticket-user {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.4rem;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 5px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    min-height: 28px;
}

.ticket-user.is-placeholder {
    opacity: 0.7;
}

.ticket-user i {
    font-size: 0.85rem;
    color: var(--primary-light);
}

/* ============================================
   FOOTER - Ultra Compact Buttons
   ============================================ */

.ticket-card-footer {
    display: flex;
    gap: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
    margin-top: auto;
}

.ticket-card-footer .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-weight: 500;
    padding: 0.3rem 0.4rem;
    font-size: 0.65rem;
    border-radius: 5px;
    min-height: 34px;
    border-width: 1px;
    transition: all 0.2s ease;
}

.ticket-card-footer .btn:hover {
    transform: translateY(-1px);
}

.ticket-card-footer .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.ticket-card-footer .btn-outline-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16) 0%, rgba(79, 70, 229, 0.08) 100%);
    border-color: rgba(129, 140, 248, 0.55);
    color: #c7d2fe;
}

.ticket-card-footer .btn-outline-primary:hover,
.ticket-card-footer .btn-outline-primary:focus {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(79, 70, 229, 0.16) 100%);
    border-color: rgba(129, 140, 248, 0.8);
    color: #eef2ff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
}

.ticket-card-footer .btn-outline-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.94) 0%, rgba(5, 150, 105, 0.9) 100%);
    border-color: rgba(52, 211, 153, 0.55);
    color: #f0fdf4;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
}

.ticket-card-footer .btn-outline-success:hover,
.ticket-card-footer .btn-outline-success:focus {
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(4, 120, 87, 0.95) 100%);
    border-color: rgba(110, 231, 183, 0.8);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.28);
}

.ticket-card-footer .btn i {
    font-size: 0.75rem;
}

/* ============================================
   EMPTY & LOADING STATES
   ============================================ */

.tickets-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.tickets-empty-state i {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.tickets-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.6rem;
    padding: 2.5rem;
    color: var(--text-muted);
}

.tickets-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}
.tickets-pagination {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.tickets-pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
}

.tickets-pagination-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 120px;
    text-align: center;
}

/* ============================================
   VIEW TOGGLE
   ============================================ */

.btn-group .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1600px) {
    .tickets-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1200px) {
    .tickets-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .tickets-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .ticket-card-header {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.6rem !important;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}
