/* Clean Standard Professional CSS - No fancy effects */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg-page: #eef2f5;
    /* Neumorphic Base Color */
    --bg-sidebar: #1f2937;
    /* Dark sidebar for contrast */
    --text-primary: #334155;
    /* Softer dark text */
    --text-secondary: #64748b;
    --text-on-dark: #f9fafb;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Try using Outfit if valid, or fallback */
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
}

/* =========================================
   Global Layout Structure (Moved from Razor)
   ========================================= */
.layout-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.layout-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
    min-width: 0;
    /* Prevent flex overflow */
}

.layout-sidebar {
    width: 280px;
    height: 100vh;
    flex-shrink: 0;
    z-index: 100 !important;
    background-color: var(--bg-sidebar);
    border-right: none;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, margin-left;
    overflow: visible;
    /* Allow inner scrolling to work smoothly */
    contain: paint;
    /* Optimization hint */
}

/* Sidebar Auto-Hide Logic (Desktop) */
@media (min-width: 769px) {
    .layout-sidebar.auto-hidden {
        margin-left: -270px !important;
        /* Leave 10px visible strip */
    }

    .layout-sidebar:hover {
        margin-left: 0 !important;
    }
}

/* Activity Panel Toggle (Ticket Details) - Keep for future if needed or cleanup */
.activity-panel {
    transition: all 0.3s ease-in-out;
    position: relative;
}

/* Split Layout (Tickets List) */
.split-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .split-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 350px !important;
        gap: 1.5rem;
        align-items: start;
        width: 100%;
    }

    .split-layout.collapsed-sidebar {
        grid-template-columns: minmax(0, 1fr) 50px !important;
        gap: 0.5rem;
    }

    .split-main {
        min-width: 0;
    }

    .split-sidebar {
        min-width: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .split-sidebar.collapsed {
        padding: 0 !important;
        overflow: hidden;
    }

    .split-sidebar.collapsed .glass-container {
        padding: 0 !important;
        border-radius: 8px 0 0 8px !important;
        background: transparent !important;
        box-shadow: none !important;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .split-sidebar.collapsed .activity-header-text,
    .split-sidebar.collapsed .activity-content {
        display: none !important;
    }

    .split-sidebar.collapsed .toggle-btn-sidebar {
        margin-bottom: 1rem;
    }

    /* Floating Expand Button (Sticky on Right Edge) */
    /* Floating Expand Button (Round FAB) */
    /* Floating Expand Button (Big Rounded Square) */
    .expand-activity-fab {
        position: fixed;
        right: 0;
        /* Align perfectly with edge */
        top: 50%;
        transform: translateY(-50%);
        z-index: 1050;
        /* Match .btn-primary gradient but lighter/brighter */
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 48px;
        /* Width of the visible part (pill/tab shape) */
        height: 64px;
        /* Taller */
        border-radius: 12px 0 0 12px;
        /* Rounded corners on left only */
        box-shadow:
            -4px 4px 12px rgba(37, 99, 235, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        font-size: 1.5rem;
    }

    .expand-activity-fab:hover {
        width: 56px;
        /* Slide out slightly */
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        box-shadow:
            -6px 6px 16px rgba(37, 99, 235, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .expand-activity-fab:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* Ticket Metadata Colors - Explicit classes to ensure visibility */
/* Voice Toggle Highlight */
.voice-toggle-item.active-alert {
    background: rgba(40, 167, 69, 0.1);
    box-shadow: inset 0 0 10px rgba(40, 167, 69, 0.1);
}

.voice-toggle-item i {
    font-size: 1.25rem;
}

.meta-updated {
    color: #3b82f6 !important;
    /* Blue --primary */
}

.meta-comment {
    color: #f97316 !important;
    /* Orange */
}

.meta-default {
    color: #64748b;
    /* Grey backup */
}

/* Default: Hide mobile trigger on desktop */
.mobile-nav-trigger {
    display: none;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
        /* Stack header and content */
    }

    .layout-content {
        padding: 1rem;
        /* Smaller padding on mobile */
        width: 100%;
    }

    /* Show mobile trigger on mobile */
    .mobile-nav-trigger {
        display: block;
    }

    .layout-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050 !important;
        /* Above overlay */
        transform: translateX(-100%);
        /* Hidden by default */
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .layout-sidebar.show {
        transform: translateX(0);
        /* Slide in */
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        backdrop-filter: blur(2px);
    }
}

/* Login Page - Soft Geometric Minimalism Design */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Soft gradient background */
    background: linear-gradient(135deg, #ffffff 0%, #e7f1ff 50%, #d1e7ff 100%);
}

/* Animated geometric background pattern */
.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(147, 197, 253, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(191, 219, 254, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

/* Floating geometric circles */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 85% 25%, rgba(147, 197, 253, 0.06) 3px, transparent 3px),
        radial-gradient(circle at 25% 85%, rgba(191, 219, 254, 0.04) 2.5px, transparent 2.5px),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.03) 4px, transparent 4px);
    background-size: 200px 200px, 250px 250px, 180px 180px, 220px 220px, 300px 300px;
    animation: float-reverse 25s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes float-reverse {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, -20px);
    }
}

.login-box {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    /* Enhanced depth with multiple shadow layers */
    box-shadow:
        0 20px 60px rgba(59, 130, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 420px;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
    transform: translateY(-4px);
    box-shadow:
        0 25px 70px rgba(59, 130, 246, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(59, 130, 246, 0.08);
}

.login-box h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Cards */
.glass-container {
    background: var(--bg-page);
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    /* Neumorphic Shadow Mixin */
    box-shadow:
        8px 8px 16px #d1d9e6,
        -8px -8px 16px #ffffff;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    /* Slightly more rounded */
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    letter-spacing: 0.02em;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 12px rgba(59, 130, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    /* Top highlight */
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow:
        0 8px 16px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.625rem 1.25rem;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #64748b;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #475569;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 12px rgba(16, 185, 129, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow:
        0 8px 16px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 12px rgba(239, 68, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow:
        0 8px 16px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}


/* Link Button */
.btn-link {
    background: transparent;
    color: var(--primary);
    box-shadow: none;
    border: none;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Disabled State */
.btn:disabled,
.btn.disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
    background: #9ca3af;
    /* Fallback grey */
    color: #e5e7eb;
}

.btn-outline-primary:disabled {
    background: transparent;
    border-color: #cbd5e1;
    color: #94a3b8;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    /* Smaller radius for small buttons */
}

/* Icons in buttons */
.btn i {
    font-size: 1.1em;
    transition: transform 0.2s;
}

.btn:hover i {
    transform: scale(1.1);
}

.w-full {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

tr:hover {
    background: #f9fafb;
}

/* Status Pills - Enhanced 3D Depth Design */
.status-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.status-Open {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow:
        0 2px 4px rgba(30, 64, 175, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #93c5fd;
}

.status-Open:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(30, 64, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-InProgress {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow:
        0 2px 4px rgba(146, 64, 14, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fcd34d;
}

.status-InProgress:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(146, 64, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Pending {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    box-shadow:
        0 2px 4px rgba(3, 105, 161, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #7dd3fc;
}

.status-Pending:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(3, 105, 161, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Resolved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow:
        0 2px 4px rgba(6, 95, 70, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #6ee7b7;
}

.status-Resolved:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(6, 95, 70, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Closed {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    box-shadow:
        0 2px 4px rgba(55, 65, 81, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #d1d5db;
}

.status-Closed:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(55, 65, 81, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Overdue {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow:
        0 2px 4px rgba(153, 27, 27, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fca5a5;
}

.status-Overdue:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(153, 27, 27, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-DueToday {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #9a3412;
    box-shadow:
        0 2px 4px rgba(154, 52, 18, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fdba74;
}

.status-DueToday:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(154, 52, 18, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Future {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow:
        0 2px 4px rgba(30, 64, 175, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #93c5fd;
}

.status-Future:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(30, 64, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.status-Aging {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow:
        0 2px 4px rgba(146, 64, 14, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fcd34d;
}

.status-Aging:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(146, 64, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Priority Pills - 3D Design */
.status-Critical {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow:
        0 2px 4px rgba(153, 27, 27, 0.2),
        0 1px 2px rgba(153, 27, 27, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #fca5a5;
}

.status-Critical:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(153, 27, 27, 0.25),
        0 2px 4px rgba(153, 27, 27, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status-High {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow:
        0 2px 4px rgba(146, 64, 14, 0.2),
        0 1px 2px rgba(146, 64, 14, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #fcd34d;
}

.status-High:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(146, 64, 14, 0.25),
        0 2px 4px rgba(146, 64, 14, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status-Medium {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow:
        0 2px 4px rgba(30, 64, 175, 0.2),
        0 1px 2px rgba(30, 64, 175, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #93c5fd;
}

.status-Medium:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(30, 64, 175, 0.25),
        0 2px 4px rgba(30, 64, 175, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.status-Low {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    box-shadow:
        0 2px 4px rgba(75, 85, 99, 0.15),
        0 1px 2px rgba(75, 85, 99, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #d1d5db;
}

.status-Low:hover {
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(75, 85, 99, 0.2),
        0 2px 4px rgba(75, 85, 99, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}


/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.text-orange {
    color: #fd7e14 !important;
    /* Bootstrap orange */
}

.text-danger {
    color: #dc3545 !important;
    /* Bootstrap red */
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-6 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.fw-bold {
    font-weight: 600;
}

/* Badge - Enhanced 3D Depth Design */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.badge:hover {
    transform: translateY(-1px);
}

/* Success Badge */
.bg-success-subtle {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    box-shadow:
        0 2px 4px rgba(6, 95, 70, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #6ee7b7;
}

.bg-success-subtle:hover {
    box-shadow:
        0 4px 8px rgba(6, 95, 70, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Primary Badge */
.bg-primary-subtle {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    box-shadow:
        0 2px 4px rgba(30, 64, 175, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #93c5fd;
}

.bg-primary-subtle:hover {
    box-shadow:
        0 4px 8px rgba(30, 64, 175, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Danger Badge */
.bg-danger-subtle {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    box-shadow:
        0 2px 4px rgba(153, 27, 27, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fca5a5;
}

.bg-danger-subtle:hover {
    box-shadow:
        0 4px 8px rgba(153, 27, 27, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Warning Badge */
.bg-warning-subtle {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    box-shadow:
        0 2px 4px rgba(146, 64, 14, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #fcd34d;
}

.bg-warning-subtle:hover {
    box-shadow:
        0 4px 8px rgba(146, 64, 14, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Secondary Badge */
.bg-secondary-subtle {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    box-shadow:
        0 2px 4px rgba(55, 65, 81, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #d1d5db;
}

.bg-secondary-subtle:hover {
    box-shadow:
        0 4px 8px rgba(55, 65, 81, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Info Badge */
.bg-info-subtle {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
    box-shadow:
        0 2px 4px rgba(7, 89, 133, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: #7dd3fc;
}

.bg-info-subtle:hover {
    box-shadow:
        0 4px 8px rgba(7, 89, 133, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-blink {
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
        transform: scale(0.98);
    }
}

.animate-blink-fast {
    animation: blinker-fast 0.8s linear infinite;
}

@keyframes blinker-fast {
    50% {
        opacity: 0.3;
        transform: scale(0.95);
    }
}

/* Blazor Error */
#blazor-error-ui {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

/* Dashboard Stats */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stats-row {
    display: flex;
    gap: 1rem;
}

.stat-card {
    flex: 1;
    min-width: 0;
    padding: 1.5rem !important;
}

/* Navigation Menu Styles */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    /* Pure white for maximum visibility */
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.3);
    /* Brighter blue background */
    color: #ffffff;
    /* White text on active */
}

.nav-item i {
    font-size: 1.25rem;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-item:hover i {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.nav-section {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    /* Pure white for section headers */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1rem 0.5rem;
    margin-top: 0.5rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .nav-item {
    color: #ffffff !important;
    /* Pure white */
}

.sidebar-footer .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

/* Consolidated Sidebar Styles */
.nav-sidebar {
    height: 100%;
    width: 100%;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
    /* FORCE WHITE */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

.brand-link svg {
    width: 24px;
    height: 24px;
}

.tenant-name {
    font-size: 0.75rem;
    color: #f97316 !important;
    /* Orange color */
    font-weight: 500;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Version Display */
.nav-version {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.nav-version small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* Force filters to stay horizontal */
.glass-container .row.flex-nowrap {
    overflow-x: auto;
    flex-wrap: nowrap !important;
}

.glass-container .row.flex-nowrap>div {
    flex-shrink: 0;
}

/* Activity Feed Styling */
.activity-item {
    padding: 0.75rem;
    border-radius: 6px;
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    transition: all 0.2s;
}

.activity-item:hover {
    background: #f3f4f6;
    border-left-color: #3b82f6;
}


/* =========================================
   3D Card Prototyping Styles - Deprecated
   ========================================= */
/* Neumorphic style adapted into global .glass-container */
/* Attachment Card Delete Button */
.file-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: #bb2d3b;
    transform: scale(1.1);
}

/* Internal Message Styling - Yellow Background */
.chat-bubble-internal {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.15);
}

.text-warning-dark {
    color: #92400e !important;
}

/* Dashboard Stats Cards */
.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    white-space: normal !important;
    text-transform: none !important;
    overflow: visible !important;
    line-height: 1.4 !important;
    /* Increased line height */
    min-height: 2.8em;
    /* Reserve space for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Fix lint: standard property */
    -webkit-box-orient: vertical;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Stats Grid */
@media (max-width: 850px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem !important;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

@media (min-width: 851px) {
    .stats-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Tenant Logo Branding */
.tenant-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tenant-logo {
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.tenant-logo-fallback {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}