@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    /* Base Colors - Clean White/Light Theme */
    --bg-main: #f0f4f8;
    --bg-gradient: linear-gradient(135deg, #f4f7fa 0%, #e2e8f0 100%);
    
    /* Premium Glassmorphism for Light Mode */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --bento-shadow: 0 8px 30px rgba(149, 157, 165, 0.15);
    
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Accents - Sky Blue and Vibrant Orange */
    --accent-sky: #0ea5e9;
    --accent-sky-light: rgba(14, 165, 233, 0.1);
    --accent-sky-gradient: linear-gradient(135deg, #0284c7, #38bdf8);
    
    --accent-orange: #f97316;
    --accent-orange-light: rgba(249, 115, 22, 0.1);
    --accent-orange-gradient: linear-gradient(135deg, #ea580c, #fb923c);
    
    /* Status */
    --success-color: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger-color: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    /* Layout Tokens */
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 32px;
    --sidebar-width: 280px;
    
    /* Animation / Micro-interaction curves */
    --transition-bouncy: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: var(--bg-main);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

h1:focus {
    outline: none;
}

/* -------------------------------------
   Premium Glassmorphism Utilities
--------------------------------------*/
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    box-shadow: 0 15px 50px -10px rgba(14, 165, 233, 0.15); /* Subtle sky glow on hover */
}

/* Buttons */
.glass-btn {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-bouncy);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.glass-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.1);
    background: #f8fafc;
    color: var(--accent-sky);
}

.glass-btn:active {
    transform: translateY(1px) scale(0.98);
}

.glass-btn.primary {
    background: var(--accent-sky-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.glass-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    color: #ffffff;
}

.glass-btn.secondary {
    background: var(--accent-orange-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.glass-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
    color: #ffffff;
}

/* Inputs */
.glass-input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    width: 100%;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.glass-input:focus {
    border-color: var(--accent-sky);
    box-shadow: 0 0 0 4px var(--accent-sky-light), inset 0 2px 4px rgba(0,0,0,0.02);
    background: #ffffff;
}

.glass-input::placeholder {
    color: var(--text-muted);
}

/* -------------------------------------
   Layout & Navigation
--------------------------------------*/
.app-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    gap: 24px;
    padding: 24px;
    box-sizing: border-box;
    padding-top: 86px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    z-index: 1050;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 40px rgba(0,0,0,0.15);
    background: #ffffff !important;
    backdrop-filter: none !important;
    padding-top: 10px;
    overflow: hidden;
}

.sidebar.open {
    transform: translateX(0);
}

.mobile-only-close { display: block; }

/* Scrollbar hiding for sidebar */
.sidebar::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.brand {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 48px;
    background: var(--accent-sky-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.brand .material-symbols-outlined {
    font-size: 2rem;
    color: var(--accent-orange); /* Orange accent icon */
    -webkit-text-fill-color: initial;
    background: none;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item-wrapper a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.nav-item-wrapper a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-sky);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.nav-item-wrapper a.active {
    background: var(--accent-sky-light);
    color: var(--accent-sky);
    border-left: 4px solid var(--accent-sky);
    font-weight: 600;
}

.nav-item-wrapper span.material-symbols-outlined {
    font-size: 1.3rem;
    transition: var(--transition-smooth);
}

.nav-item-wrapper a:hover span.material-symbols-outlined,
.nav-item-wrapper a.active span.material-symbols-outlined {
    color: var(--accent-orange);
    transform: scale(1.1);
}

/* -------------------------------------
   Main Content & Bento Grid
--------------------------------------*/
.main-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(min-content, max-content);
    gap: 24px;
    padding-bottom: 24px;
}

/* Bento Card Overrides for robust layout */
.bento-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--bento-shadow);
    padding: 32px;
    transition: var(--transition-bouncy);
    grid-column: span 12; /* Default to full width */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

/* Specific Dashboard Grid for Home Page */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Mobile-first grid items within dashboard-grid should default to span 1 column if using auto-fill, 
   but since we use explicit span classes in Home.razor, let's keep them. */

/* Grid Spans - Added !important to ensure they override .bento-card default */
.span-3 { grid-column: span 3 !important; }
.span-4 { grid-column: span 4 !important; }
.span-6 { grid-column: span 6 !important; }
.span-8 { grid-column: span 8 !important; }
.span-12 { grid-column: span 12 !important; }

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 1200px) {
    .span-3, .span-4 { grid-column: span 6 !important; }
    .span-6, .span-8 { grid-column: span 12 !important; }
}

@media (max-width: 768px) {
    .span-3, .span-4, .span-6, .span-8 { grid-column: span 12 !important; }
    .dashboard-grid {
        gap: 16px;
    }
}

.bento-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px -5px rgba(14, 165, 233, 0.15);
}

/* A decorative subtle gradient orb inside bento cards */
.bento-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card > * {
    z-index: 1; /* Keep content above decorative orb */
}

/* Page Headers */
.page-header-card {
    grid-column: span 12;
    padding: 40px;
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--bento-shadow);
    position: relative;
    overflow: visible;
}

/* Adding an accent blob to the header */
.page-header-card::after {
    content: '';
    position: absolute;
    right: -10%;
    top: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-sky-light) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

/* Alert Styling */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.alert-info {
    background: #eff6ff;
    color: var(--accent-sky);
    border-left: 4px solid var(--accent-sky);
}

.alert-success {
    background: #ecfdf5;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #fef2f2;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Animations */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered animation classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* -------------------------------------
   Forms & Upload
--------------------------------------*/
.upload-drop-zone {
    position: relative;
    border: 2px dashed rgba(14, 165, 233, 0.3);
    border-radius: var(--border-radius-md);
    padding: 60px 40px;
    text-align: center;
    background: #fafaf9;
    transition: var(--transition-bouncy);
    cursor: pointer;
    overflow: hidden;
}

.upload-drop-zone::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200%; padding-bottom: 200%;
    background: var(--accent-sky-light);
    border-radius: 50%;
    transition: transform 0.6s ease;
    z-index: 0;
}

.upload-drop-zone:hover {
    border-color: var(--accent-sky);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.1);
}

.upload-drop-zone:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.upload-drop-zone.active {
    background: var(--accent-sky-light);
    border-color: var(--accent-sky);
    border-style: solid;
}

.upload-icon {
    font-size: 72px;
    color: var(--accent-sky);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.upload-drop-zone:hover .upload-icon {
    transform: scale(1.1);
    color: var(--accent-orange);
}

.upload-text {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
}

.file-input-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* Global Table Spacing Fix */
.table th, .table td {
    padding: 16px 24px !important;
}

/* Top Bar - Always visible */
.mobile-topbar {
    display: flex;
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1040;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    padding: 0 24px;
    align-items: center;
    justify-content: space-between;
}

.mobile-topbar .brand { 
    margin: 0; padding: 0 20px; font-size: 1.5rem; height: 100%;
}

.hamburger-btn {
    background: transparent; border: none; font-size: 2rem;
    color: var(--text-primary); cursor: pointer; padding: 15px 20px;
}

.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); z-index: 1045;
}
.sidebar-overlay.open { display: block; }
.mobile-only-close { display: block; }

@media (max-width: 1024px) {
    .app-layout {
        padding: 16px;
        gap: 16px;
    }
    
    .split-panel {
        flex-direction: column !important;
    }
    
    .split-panel-left {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .split-panel-right {
        padding-left: 0 !important;
        padding-top: 16px;
    }
}

/* -------------------------------------
   Split Panel for Multi-Company Config
--------------------------------------*/
.split-panel {
    display: flex;
    gap: 20px;
    min-height: 450px;
}

.company-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.company-list-item:hover {
    background: rgba(14, 165, 233, 0.05);
}

.company-list-item.selected {
    background: var(--accent-sky-light);
    border-left: 3px solid var(--accent-sky);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: var(--success-bg);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}

.glass-btn.small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.glass-btn.danger {
    color: var(--danger-color);
}

.glass-btn.danger:hover {
    background: var(--danger-bg);
    color: var(--danger-color);
}

.glass-btn.success {
    color: var(--success-color);
}

.glass-btn.success:hover {
    background: var(--success-bg);
    color: var(--success-color);
}

/* -------------------------------------
   Responsive Tables (Card Transformation)
--------------------------------------*/
@media (max-width: 768px) {
    /* Main Table Container */
    table.responsive-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    table.responsive-table thead {
        display: none !important;
    }

    table.responsive-table tbody,
    table.responsive-table tr,
    table.responsive-table td {
        display: block !important;
        width: 100% !important;
    }

    table.responsive-table tr {
        margin-bottom: 24px !important;
        background: #ffffff !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
        padding: 12px !important;
        position: relative !important;
        overflow: hidden !important;
    }

    table.responsive-table td {
        border: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.03) !important;
        position: relative !important;
        padding: 12px 12px 12px 45% !important;
        text-align: right !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        font-size: 0.9rem !important;
    }

    table.responsive-table td:last-child {
        border-bottom: none !important;
    }

    table.responsive-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 40%;
        text-align: left;
        font-weight: 800;
        color: var(--text-secondary);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Actions Specifics */
    table.responsive-table td.actions-cell {
        background: rgba(14, 165, 233, 0.03) !important;
        padding-left: 15px !important;
        justify-content: center !important;
        margin-top: 8px !important;
        border-radius: 12px !important;
        border-bottom: none !important;
    }

    table.responsive-table td.actions-cell:before {
        display: none !important;
    }
}

/* -------------------------------------
   Glassmorphism Modal System
--------------------------------------*/
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-glass {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 32px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: flex-end;
    background: rgba(0,0,0,0.02);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Modal Content Card for line items */
.modal-item-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.modal-item-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-item-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 750;
    letter-spacing: 0.5px;
}

.modal-item-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* -------------------------------------
   Visibility & Layout Utilities
--------------------------------------*/
@media (max-width: 768px) {
    .desktop-only-cell, .desktop-only-row, .desktop-only {
        display: none !important;
    }

    .responsive-container {
        overflow: visible !important;
        overflow-x: visible !important;
        border: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .responsive-container {
        overflow-x: auto;
    }
}

/* --- Grid System Utilities --- */
.grid-2-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-6-cols { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.grid-12-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

@media (max-width: 992px) {
    .grid-2-cols, .grid-3-cols, .grid-4-cols, .grid-6-cols, .grid-12-cols { 
        grid-template-columns: 1fr; 
    }
    .span-2, .span-3, .span-4, .span-6, .span-12 { grid-column: span 1; }
}

/* --- Premium List & Table Utilities --- */
.responsive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.responsive-table thead tr {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.responsive-table th {
    padding: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}

.responsive-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* --- Status Pill Tabs (Standardized) --- */
.so-pill-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.so-pill-tab:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(14, 165, 233, 0.2);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.so-pill-active {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--accent-sky) !important;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.12), inset 0 0 0 1px rgba(14, 165, 233, 0.15) !important;
    font-weight: 600 !important;
    transform: translateY(-2px) !important;
    border-color: rgba(14, 165, 233, 0.25) !important;
}

.so-pill-pending { color: #d97706 !important; }
.so-pill-active.so-pill-pending {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12), inset 0 0 0 1px rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

.so-pill-success { color: #059669 !important; }
.so-pill-active.so-pill-success {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.12), inset 0 0 0 1px rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

.so-pill-failed { color: #dc2626 !important; }
.so-pill-active.so-pill-failed {
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.12), inset 0 0 0 1px rgba(220, 38, 38, 0.15) !important;
    border-color: rgba(220, 38, 38, 0.25) !important;
}

/* --- Audit Log Tabs (Standardized) --- */
.audit-log-tabs-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
}
.audit-log-tabs-container::-webkit-scrollbar {
    height: 4px;
}
.audit-log-tabs-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.audit-log-pill-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.audit-log-pill-tab:hover {
    background: #f8fafc;
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--accent-sky);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.audit-log-pill-active {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35) !important;
    font-weight: 600 !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
}

.audit-log-pill-count {
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.audit-log-pill-active .audit-log-pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --- Audit Log Sub-Tabs (PetPooja) --- */
.audit-log-sub-tabs-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
}
.audit-log-sub-tabs-container::-webkit-scrollbar {
    height: 4px;
}
.audit-log-sub-tabs-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.audit-log-sub-pill-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.audit-log-sub-pill-tab:hover {
    background: #f8fafc;
    border-color: rgba(124, 58, 237, 0.3);
    color: #7c3aed;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.audit-log-sub-pill-active {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35) !important;
    font-weight: 600 !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
}
