/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(0, 0, 0, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-blue: #0284c7;
    --accent-purple: #7c3aed;
    --accent-green: #16a34a;
    --accent-yellow: #ea580c;
    --accent-red: #dc2626;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(2, 132, 199, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.05) 0px, transparent 50%);
}

/* Card utility */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

/* Sidebar styling */
.sidebar {
    height: 100vh;
    max-height: 100vh;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1rem;
    transition: var(--transition-smooth);
    border-right: 1px solid var(--border-glass);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand i {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar .nav-item {
    width: 100%;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link-custom:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-primary);
}

.nav-link-custom.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(124, 58, 237, 0.1));
    color: var(--accent-blue);
    border: 1px solid rgba(2, 132, 199, 0.2);
    font-weight: 600;
}

.submenu-link {
    font-size: 0.8rem;
    padding-left: 1.5rem !important;
}

.sidebar.collapsed .submenu-link {
    padding-left: 0 !important;
    justify-content: center;
}

/* Main content wrapper */
.main-wrapper {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* Collapsed Sidebar Styles */
.sidebar.collapsed {
    width: 78px;
    padding: 1rem 0.5rem;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar.collapsed::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    gap: 1rem;
    justify-content: center !important;
}

.sidebar.collapsed .collapse-toggle-btn {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 0.5rem;
}

.sidebar.collapsed .user-profile div:last-child {
    display: none;
}

.sidebar.collapsed .nav-link-custom span {
    display: none;
}

.sidebar.collapsed .nav-link-custom {
    justify-content: center;
    padding: 0.45rem;
    gap: 0;
}

.sidebar.collapsed .nav-menu {
    align-items: center;
}

.sidebar.collapsed .nav-header {
    display: none;
}

.sidebar.collapsed + .main-wrapper {
    margin-left: 78px;
}

/* Navbar Top styling */
.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

/* Stat Cards */
.stat-card {
    position: relative;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.25rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.card-blue { border-left: 4px solid var(--accent-blue); }
.card-blue .stat-icon { color: var(--accent-blue); }

.card-yellow { border-left: 4px solid var(--accent-yellow); }
.card-yellow .stat-icon { color: var(--accent-yellow); }

.card-red { border-left: 4px solid var(--accent-red); }
.card-red .stat-icon { color: var(--accent-red); }

.card-green { border-left: 4px solid var(--accent-green); }
.card-green .stat-icon { color: var(--accent-green); }

.card-purple { border-left: 4px solid var(--accent-purple); }
.card-purple .stat-icon { color: var(--accent-purple); }

/* Badges for status */
.badge-custom {
    padding: 0.5em 0.85em;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-in-warehouse {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-contacted {
    background-color: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-taken {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-deducted {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.badge-expired {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Modals glass styling */
.modal-content-glass {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.modal-header-glass {
    border-bottom: 1px solid var(--border-glass);
    padding: 1.5rem;
}

.modal-footer-glass {
    border-top: 1px solid var(--border-glass);
    padding: 1.25rem;
}

/* Custom Forms */
.form-control-glass {
    background: var(--bg-primary);
    border: 1px solid #cbd5e1;
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: var(--transition-smooth);
}

/* Normalize height for all sm filter inputs */
.form-control-glass.form-control-sm,
.form-control-glass.form-select-sm,
select.form-control-glass.form-select-sm,
.form-control-sm.form-control-glass {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    height: 36px;
    border-radius: 8px;
}

.input-group-sm .form-control-glass {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    height: 36px;
    border-radius: 8px 0 0 8px;
}

.input-group-sm .btn {
    height: 36px;
    font-size: 0.82rem;
    border-radius: 0 8px 8px 0;
}

/* Select2 filter container height match */
.select2-container--bootstrap-5 .select2-selection--single {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 8px !important;
    border-color: #cbd5e1 !important;
    background: var(--bg-primary) !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.4;
    padding: 0;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 34px;
}

.form-control-glass:focus {
    background: var(--bg-surface);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

select.form-control-glass option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* DataTables Styling */
.table-glass-container {
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

table.dataTable {
    border-collapse: collapse !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

table.dataTable thead th {
    background-color: #f8fafc !important;
    border-bottom: 2px solid var(--border-glass) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 1rem !important;
}

table.dataTable tbody td {
    padding: 1rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--text-secondary);
}

table.dataTable tbody tr:hover td {
    color: var(--text-primary);
    background-color: #f8fafc !important;
}

.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_processing, 
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_filter input {
    background: var(--bg-primary) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 5px 10px !important;
}

.dataTables_wrapper .dataTables_length select {
    background: var(--bg-primary) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 4px 8px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    transition: var(--transition-smooth);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)) !important;
    color: var(--text-primary) !important;
    border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e2e8f0 !important;
    color: var(--text-primary) !important;
}

/* User profile card */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}

/* Expiry Progress Bar */
.progress-glass {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-cyan { background-color: var(--accent-blue); }
.progress-bar-yellow { background-color: var(--accent-yellow); }
.progress-bar-red { background-color: var(--accent-red); }

/* Split Screen Login Page Styles */
.login-body {
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Background motifs similar to reference */
.split-bg-circle {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(79, 70, 229, 0.05);
    z-index: 1;
}
.split-bg-circle-1 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -100px;
    border: 30px solid rgba(79, 70, 229, 0.03);
}
.split-bg-circle-2 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
    background-color: rgba(14, 165, 233, 0.05);
}

.split-login-card {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 520px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    z-index: 10;
    position: relative;
    transition: max-width 0.5s ease, min-height 0.5s ease, flex-direction 0.5s ease;
}

/* Left side: Illustration */
.login-left-side {
    flex: 1.1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 3rem 3rem 3rem;
    position: relative;
    overflow: hidden;
    opacity: 1;
    max-width: 500px;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Brand header on left side (desktop) */
.left-brand-header {
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
    transition: opacity 0.3s ease;
}

.left-brand-badge {
    display: inline-flex;
    align-items: center;
    font-size: 1.55rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: -0.5px;
}

.left-brand-badge i {
    color: #3b82f6;
}

.left-brand-sub {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.login-left-side .deco-circle {
    position: absolute;
    border-radius: 50%;
}
.login-left-side .circle-1 {
    width: 150px;
    height: 150px;
    background: rgba(14, 165, 233, 0.05);
    top: -50px;
    left: -50px;
    animation: pulseCircle 10s infinite ease-in-out;
}
.login-left-side .circle-2 {
    width: 100px;
    height: 100px;
    border: 15px solid rgba(79, 70, 229, 0.04);
    bottom: -30px;
    right: -30px;
    animation: pulseCircle 12s infinite ease-in-out-reverse;
}

@keyframes pulseCircle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.08) rotate(180deg);
    }
}

.illustration-wrapper {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 380px;
}

.login-illustration {
    max-height: 320px;
    width: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.05));
    animation: floatIllustration 5s infinite ease-in-out;
    transition: transform 0.3s ease;
}

.login-left-side:hover .login-illustration {
    transform: translateY(-5px) scale(1.02);
}

@keyframes floatIllustration {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Right side: Form (Blue Background) */
.login-right-side {
    flex: 0.9;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6); /* Rich logistics blue gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern inside right side */
.login-right-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.login-form-wrapper {
    width: 100%;
    max-width: 320px;
    z-index: 5;
}

/* Yens Logo Styling & Pulse Animation */
.yens-logo {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: pulseLogo 4s infinite ease-in-out;
    transition: transform 0.3s ease;
}

.yens-logo:hover {
    transform: scale(1.06);
}

@keyframes pulseLogo {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
    }
}

/* Brand badge in form (hidden on desktop, shown on mobile) */
.brand-badge {
    display: none;
    align-items: center;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Custom rounded pill input group */
.input-group-pill {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 0.35rem 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.input-group-pill:focus-within {
    border-color: #f59e0b; /* Orange focus color similar to Create Account button in reference image */
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.input-icon {
    color: #3b82f6;
    padding: 0.35rem 0.5rem 0.35rem 1.25rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-toggle {
    color: #94a3b8;
    padding: 0.35rem 1.25rem 0.35rem 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.input-icon-toggle:hover {
    color: #3b82f6;
}

.form-input-pill {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.45rem 0.25rem;
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
}

.form-input-pill:focus {
    outline: none;
}

.form-input-pill::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Pill Login Button */
.btn-login-pill {
    background: #f59e0b; /* High-contrast orange-yellow like reference */
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    letter-spacing: 0.5px;
}

.btn-login-pill:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.5);
}

.btn-login-pill:active {
    transform: translateY(0);
}

/* Responsive breakpoint for split screen */
@media (max-width: 768px) {
    .split-login-card {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }
    .login-left-side {
        display: none !important;
    }
    .login-right-side {
        flex: 1;
        padding: 3rem 2rem;
    }
    .brand-badge {
        display: inline-flex !important;
    }
}

.alert-alarm-strip {
    background: #fef2f2;
    border: 1px dashed var(--accent-red);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-alarm-strip i {
    font-size: 1.5rem;
    color: var(--accent-red);
}

/* Fix colors of custom text in light theme */
.text-light {
    color: var(--text-primary) !important;
}

.text-white {
    color: var(--text-primary) !important;
}

.bg-dark {
    background-color: #f8fafc !important;
    color: var(--text-primary) !important;
}

.border-secondary {
    border-color: #e2e8f0 !important;
}
.border-opacity-25 {
    border-opacity: 1 !important;
}
.btn-close-white {
    filter: none !important; /* normal dark close button */
}

/* Responsive adjustments for Mobile & Tablet viewports */
@media (max-width: 991.98px) {
    .sidebar {
        left: -260px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        width: 260px;
    }
    .sidebar.show {
        left: 0 !important;
    }
    .sidebar.collapsed {
        left: -260px;
        width: 78px;
    }
    .sidebar.collapsed.show {
        left: 0 !important;
        width: 78px;
    }
    .main-wrapper {
        margin-left: 0 !important;
        padding: 1.5rem 1rem;
    }
}

/* Compact style for manual return item table */
#tableItemRetur th,
#tableItemRetur td {
    padding: 8px 6px !important;
    vertical-align: middle;
}

#tableItemRetur .form-control-glass,
#tableItemRetur .form-select-glass {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    height: auto !important;
}

#tableItemRetur .input-group {
    flex-wrap: nowrap !important;
}

#tableItemRetur .btn-sm {
    padding: 0.25rem 0.5rem !important;
}

/* Autocomplete results dropdown styling */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}

.autocomplete-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.autocomplete-suggestion-item:last-child {
    border-bottom: none;
}

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.active {
    background-color: #e2e8f0;
}

.autocomplete-suggestion-item .item-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.autocomplete-suggestion-item .item-name {
    font-weight: 600;
    color: #0f172a;
}

.autocomplete-suggestion-item .item-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.autocomplete-suggestion-item .item-price {
    font-weight: 700;
    color: #dc2626;
    font-size: 0.85rem;
    margin-left: 10px;
    white-space: nowrap;
}

/* Submenu Arrow Rotation & Defensive styling for Collapsed Sidebar */
.submenu-arrow {
    transition: transform 0.25s ease;
}
.nav-link-custom.collapsed .submenu-arrow {
    transform: rotate(0deg);
}
.nav-link-custom:not(.collapsed) .submenu-arrow {
    transform: rotate(180deg);
}
.sidebar.collapsed #fakturSubmenu {
    display: block !important;
}
.sidebar.collapsed #fakturSubmenu > ul {
    padding-left: 0 !important;
    align-items: center;
}
.sidebar.collapsed #fakturSubmenu .nav-link-custom {
    padding: 0.45rem !important;
    justify-content: center;
    gap: 0;
}
.sidebar.collapsed #fakturSubmenu .nav-link-custom i {
    margin: 0 !important;
    font-size: 1rem;
}
.sidebar.collapsed #fakturSubmenu .nav-link-custom span {
    display: none !important;
}
.sidebar.collapsed .submenu-arrow {
    display: none !important;
}

/* Submenu tabs width safety override */
#submenuTabs .nav-item {
    width: auto !important;
}

/* Document opening/flipping transition effect for tab panes */
.tab-content {
    perspective: 1500px;
}

.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.25s ease-out, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    transform: rotateX(-4deg) translateY(12px);
    transform-origin: top center;
}

.tab-pane.fade.show {
    opacity: 1;
    transform: rotateX(0deg) translateY(0);
}

/* Ensure consistent heights for all filter inputs including Select2 and Flatpickr */
#filterForm .form-control-sm,
#filterForm .form-control,
#filterForm .select2-container--bootstrap-5 .select2-selection,
#filterForm .btn-sm,
#filterForm .btn,
#filterForm a.btn {
    height: 32px !important;
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

#filterForm .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 24px !important;
    font-size: 0.75rem !important;
}

/* Custom Full Height Split Detail Modal for desktop */
@media (min-width: 992px) {
    .modal-detail-custom {
        max-width: 95vw !important;
        width: 95vw !important;
        margin: 2.5vh auto !important;
    }
    .modal-detail-custom .modal-content {
        height: 90vh !important;
        display: flex;
        flex-direction: column;
    }
    .modal-detail-custom .modal-body {
        overflow: hidden !important;
        flex: 1;
        height: calc(90vh - 120px) !important;
    }
    .modal-detail-custom .modal-split-layout {
        height: 100%;
        display: flex;
    }
    .modal-detail-custom .modal-split-left {
        flex: 0 0 65%;
        max-width: 65%;
        height: 100%;
        display: flex;
        flex-direction: column;
        border-right: 1px solid rgba(0,0,0,0.08);
        padding-right: 1rem;
    }
    .modal-detail-custom .modal-split-right {
        flex: 0 0 35%;
        max-width: 35%;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding-left: 1rem;
    }
    .modal-detail-custom .modal-table-container {
        flex: 1;
        overflow-y: auto;
    }
    .modal-detail-custom .modal-timeline-container {
        flex: 1;
        overflow-y: auto;
    }
}
@media (max-width: 991px) {
    .modal-detail-custom .modal-split-layout {
        display: block;
    }
    .modal-detail-custom .modal-split-left,
    .modal-detail-custom .modal-split-right {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 1.5rem;
    }
}

.table-nowrap th, .table-nowrap td {
    white-space: nowrap !important;
}

table.table-compact {
    font-size: 0.76rem !important;
}
table.table-compact thead th {
    padding: 0.5rem 0.4rem !important;
    font-size: 0.78rem !important;
}
table.table-compact tbody td {
    padding: 0.5rem 0.4rem !important;
}
