/**
 * =====================================================================
 * CCS OPTIK PUSAT — DESIGN SYSTEM & MASTER STYLESHEET
 * =====================================================================
 * Architecture:
 * 1. CSS Custom Properties / Tokens (:root)
 * 2. Typography & Core Layout
 * 3. Component Modules (Cards, Buttons, Inputs, Badges, Tables, Sidebar)
 * 4. Micro-Animations & Utilities
 * =====================================================================
 */

:root {
    --primary-color: #6366f1;
    /* Indigo */
    --primary-light: #818cf8;
    --secondary-color: #0d9488;
    /* Teal */
    --secondary-light: #2dd4bf;
    --background-color: #f8fafc;
    --card-background: rgba(255, 255, 255, 0.95);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --sidebar-bg: linear-gradient(135deg, #4f46e5, #0d9488);
    --sidebar-width: 240px;
    --sidebar-mini-width: 64px;
    --topbar-height: 60px;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 0.875rem;
    /* Smaller base font */
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Auth Login Page */
.auth-bg {
    background: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(204, 251, 241, 0.8) 0%, transparent 40%),
        #f1f5f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    border: none;
    border-radius: 24px;
    background: var(--card-background);
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.7);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

/* =====================================================
   LAYOUT STRUCTURE — Sidebar + Main Content
   ===================================================== */

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ----- SIDEBAR ----- */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(.4, 0, .2, 1), min-width 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 4px 0 20px rgba(79, 70, 229, 0.1);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 200;
    flex-shrink: 0;
}

/* MINI sidebar state */
.sidebar.mini {
    width: var(--sidebar-mini-width);
    min-width: var(--sidebar-mini-width);
}

/* Sidebar toggle button (style of Gambar 1, position at the top header) */
.sidebar-expand-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -1px;
    /* sits exactly on the sidebar border */
    z-index: 201;
    background: linear-gradient(160deg, #4f46e5 0%, #0d9488 100%);
    color: white;
    width: 18px;
    height: 48px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    box-shadow: 3px 3px 12px rgba(79, 70, 229, 0.3);
    border: none;
    transition: width 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.72rem;
    outline: none;
}

.sidebar-expand-tab:hover {
    width: 24px;
    box-shadow: 5px 3px 16px rgba(79, 70, 229, 0.45);
    color: white;
}

.sidebar-expand-tab i {
    transition: transform 0.25s ease;
    pointer-events: none;
}

/* Sidebar Header — same height as topbar */
.sidebar-header {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    background: linear-gradient(to right, #ffffff, #ccfbf1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 1;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

/* Hide brand name when sidebar is mini and center the brand wrapper / logo */
.sidebar.mini .sidebar-brand-name {
    display: none !important;
}

.sidebar.mini .sidebar-header {
    justify-content: center !important;
}

.sidebar.mini .sidebar-brand-wrapper {
    justify-content: center !important;
    width: 100%;
}

/* Sidebar Body — scrollable */
.sidebar-body {
    flex: 1;
    padding: 0.85rem 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

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

/* Sidebar menu item links */
.sidebar-item-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-item-link i {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
    /* No fixed width here — width is handled per mode */
}

.sidebar-item-link span {
    opacity: 1;
    transition: opacity 0.2s ease;
    overflow: hidden;
}

.sidebar.mini .sidebar-item-link span {
    display: none;
    /* Completely remove from grid so icon is the only child */
}

/* Also reduce sidebar-body padding in mini mode */
.sidebar.mini .sidebar-body {
    padding: 0.85rem 0.3rem;
}

/* Center each sidebar-item li in mini mode */
.sidebar.mini .sidebar-menu li {
    display: flex;
    justify-content: center;
}

.sidebar-item-link:hover,
.sidebar-item.active .sidebar-item-link {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-item.active .sidebar-item-link {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* Mini tooltip on hover */
/* Mini mode: icon perfectly centered inside highlight */
.sidebar.mini .sidebar-item-link {
    position: relative;
    /* Override flex to use grid for true centering */
    display: grid;
    place-items: center;
    gap: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    /* center item inside sidebar-menu li */
    border-radius: 10px;
}

.sidebar.mini .sidebar-item-link i {
    font-size: 1.05rem;
    width: auto;
    line-height: 1;
}

.sidebar.mini .sidebar-item-link:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-mini-width) + 4px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 999;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.25s ease;
    font-size: 0.85rem;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

/* Sidebar section separator label */
.sidebar-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.6rem 0.85rem 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.mini .sidebar-section-label {
    font-size: 0;
    line-height: 0;
    height: 0;
    padding: 0;
    margin: 0.5rem 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 1;
}
.sidebar.mini .sidebar-menu > .sidebar-section-label:first-child {
    display: none !important;
}

/* Sidebar footer */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.6rem;
    margin-top: 0.5rem;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    min-width: 0;
    /* Prevent overflow */
}

/* Topbar — STICKY */
.topbar {
    min-height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.75rem 0.5rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topbar h5 {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.content-body {
    flex: 1;
    padding: 1.25rem 1rem;
    /* lebih rapat ke kiri & kanan */
    overflow-y: auto;
}

/* Override: semua kolom di dalam content-body memakai lebar penuh
   (menghilangkan justify-content-center + col-lg-8/col-lg-10 yang mempersempit form) */
.content-body>.row.justify-content-center>[class*="col-lg-"],
.content-body>.row.justify-content-center>[class*="col-md-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

/* =====================================================
   CUSTOM UI CARDS
   ===================================================== */

.custom-card {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.025);
    border: 1px solid #f1f5f9;
}

.custom-card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.1rem 1.5rem;
}

.custom-card-body {
    padding: 1.5rem;
}

/* =====================================================
   PREMIUM GRADIENT BUTTONS
   ===================================================== */

.btn-indigo-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.2);
}

.btn-indigo-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.btn-teal-gradient {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.2);
}

.btn-teal-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.3);
}

/* =====================================================
   FORM STYLING
   ===================================================== */

.form-control-custom {
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    border: 1px solid #cbd5e1;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Alert Styling */
.custom-alert {
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
}

/* =====================================================
   BUTTON & FILE INPUT ALIGNMENT OVERRIDES (PREMIUM FIX)
   ===================================================== */

/* Align heights of all small buttons */
.btn-sm,
.btn-indigo-gradient.btn-sm,
.btn-teal-gradient.btn-sm {
    height: 36px !important;
    padding: 0 1.1rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* Align heights of regular buttons (non-sm) */
.btn:not(.btn-sm),
.btn-indigo-gradient:not(.btn-sm),
.btn-teal-gradient:not(.btn-sm) {
    height: 44px !important;
    padding: 0 1.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    line-height: 1 !important;
}

/* File Input Vertical Centering Fix */
input[type="file"].form-control-custom {
    padding: 0.4rem 0.75rem !important;
    line-height: 1.5 !important;
    display: flex !important;
    align-items: center !important;
}

input[type="file"].form-control-custom::file-selector-button {
    padding: 0.2rem 0.75rem !important;
    margin: -0.2rem -0.5rem !important;
    margin-right: 0.75rem !important;
    border-radius: 6px !important;
}

/* Icon-only buttons should be square */
.btn-icon.btn-sm {
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
}

.btn-icon:not(.btn-sm) {
    width: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
}

/* Sidebar Tooltip */
.sidebar-tooltip {
    position: fixed;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%) translateX(-8px);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-tooltip.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* =====================================================
   EXTRACTED STYLES FROM BLADE VIEWS
   ===================================================== */

/* 1. Status and Customer Type Badges */
.badge-terkirim {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 0.72rem;
}

.badge-komplit {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.72rem;
}

.badge-dibatalkan {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.72rem;
}

.badge-toko {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: 0.7rem;
}

.badge-ritel {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.7rem;
}

.badge-none {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.7rem;
}

.badge-transfer {
    background: rgba(20, 184, 166, 0.1);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.2);
    font-size: 0.7rem;
}

.badge-qris {
    background: rgba(139, 92, 246, 0.1);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-size: 0.7rem;
}

/* 2. Premium Select2 single select (standard size) */
.select2-container--default .select2-selection--single {
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    height: 38px !important;
    padding: 0 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
}

/* 3. Select2 for tables & transaction forms (like Stock Ins) */
.stock-ins-form-wrapper .select2-container,
.select2-container-block {
    display: block !important;
}

.stock-ins-form-wrapper .select2-container--default .select2-selection--single {
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    height: auto !important;
    min-height: unset !important;
    padding: 0.55rem 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    font-size: 0.85rem !important;
}

.stock-ins-form-wrapper .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.stock-ins-form-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 8px !important;
}

.stock-ins-form-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    padding-right: 20px !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
}

.stock-ins-form-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8 !important;
}

/* 4. Select2 inside tables */
.table-select2+.select2-container--default .select2-selection--single {
    height: 38px !important;
    border-radius: 8px !important;
}

.table-select2+.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
}

.table-select2+.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}

/* 5. Currency input prefixes and dynamic layout elements */
.currency-prefix {
    position: relative;
}

.currency-prefix .prefix-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
}

.currency-prefix input {
    padding-left: 2.8rem !important;
}

.section-divider {
    border-top: 1px solid #f1f5f9;
    margin: 1.5rem 0;
    padding-top: 1.5rem;
}

.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 1rem;
}

/* 6. Product Detail styling */
.barcode-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.barcode-container svg {
    max-width: 100%;
    height: auto;
}

.detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.price-card {
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.stock-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.stock-card.low-stock {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border-color: #fdba74;
}

.stock-card-gray {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

/* 7. Product Print overrides */
@media print {
    .no-print {
        display: none !important;
    }

    .custom-card {
        box-shadow: none !important;
    }

    .barcode-container {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* 8. Sales details layouts & Thermal receipt */
.detail-header {
    background: linear-gradient(135deg, #1e293b, #263044);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.info-chip {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    color: #a5b4fc;
    font-weight: 600;
}

.detail-table thead th {
    background: #f8fafc;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}



/* 9. Global Indigo Utilities for Badge and Text visibility */
.bg-indigo-subtle {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

.text-indigo {
    color: #6366f1 !important;
}

.border-indigo-subtle {
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* =====================================================
   10. AUTO TEXT FORMATTING — Kapitalisasi Otomatis
   ===================================================== */

/* Field Nama, Alamat, Keterangan → Capitalize (Huruf awal setiap kata besar) */
input[name="name"],
input[name*="name"],
input[name="address"],
input[name*="address"],
input[name="keterangan"],
input[name="notes"],
input[name="customer_name"],
input[name="supplier_name"],
textarea[name="address"],
textarea[name="notes"],
textarea[name="keterangan"] {
    text-transform: capitalize;
}

/* Field Kode → UPPERCASE */
input[name$="_code"],
input[name="product_code"],
input[name="category_code"],
input[name="supplier_code"],
input[name="marketing_code"],
input[name="retail_code"],
input[name="store_code"],
input[name="invoice_number"],
input[name="sale_number"] {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Tampilan teks di tabel dan detail view → capitalize untuk nama */
td .fw-semibold,
td .text-capitalize-auto,
.detail-value.name-value {
    text-transform: capitalize;
}

/* Badge status tetap seperti apa adanya (override jika ada konflik) */
.badge {
    text-transform: none !important;
}

/* Helper classes yang bisa dipakai manual */
.text-auto-capitalize {
    text-transform: capitalize !important;
}

.text-auto-uppercase {
    text-transform: uppercase !important;
}

.text-auto-lowercase {
    text-transform: lowercase !important;
}

.text-auto-none {
    text-transform: none !important;
}

/* 11. Helper Utility Classes for Clean Blade Templates */
.icon-indigo {
    color: #6366f1 !important;
}

.brand-logo-img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    background-color: #ffffff;
}

.user-badge {
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 8px;
}

.user-badge-icon {
    font-size: 11px;
}

.header-search-input {
    width: 240px;
    border-radius: 8px;
    font-size: 0.8rem;
    height: 32px;
}

.header-search-btn {
    height: 32px !important;
    width: 36px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.rounded-8 {
    border-radius: 8px !important;
}

.rounded-12 {
    border-radius: 12px !important;
}

.rounded-16 {
    border-radius: 16px !important;
}

.img-product-preview {
    max-height: 200px;
    object-fit: contain;
}

.price-val {
    font-size: 1.0rem;
    font-weight: 600;
    color: #4338ca;
}

.stock-val {
    font-size: 1.25rem;
    font-weight: 600;
    color: #15803d;
}

.stock-val-gray {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
}

.barcode-text {
    letter-spacing: 0.15em;
    font-size: 1rem;
}

.barcode-icon-lg {
    font-size: 3rem;
}

.badge-status-lg {
    border-radius: 8px;
    font-size: 0.78rem;
}

/* =====================================================
   PAGINATION LAYOUT
   Ensure 'Showing X to Y of Z results' is on the left,
   and page number links are on the right.
   ===================================================== */
nav.d-flex.justify-content-between,
nav.d-flex.justify-items-center,
.d-flex.justify-content-end > nav,
.pagination-wrapper nav {
    width: 100% !important;
}

nav .pagination {
    margin-bottom: 0 !important;
}

nav p.small,
nav .text-muted {
    margin-bottom: 0 !important;
}

/* =====================================================
   APPLICATION FOOTER
   ===================================================== */
.app-footer {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 0.85rem 1.5rem;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: auto;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.02);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-left {
    font-weight: 500;
}

.footer-left strong {
    color: #334155;
    font-weight: 600;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-weight: 500;
}