/*
 * ============================================================
 * TRIPURA COLLECTIONS - Premium Warm Theme
 * ============================================================
 * Inspired by the vibrant logo: Golden warmth, Fresh teal, Purple elegance
 * Design Philosophy: Warm, Premium, Alive - Not cold or generic
 * ============================================================
 */

/* ============================================================
   ROOT VARIABLES - LOGO DNA
   ============================================================ */
:root {
    /* Brand Colors - Direct from Logo */
    --brand-golden: #f7c724;
    --brand-golden-light: #ffd54f;
    --brand-golden-dark: #e5a93a;

    --brand-teal: #3bb4c1;
    --brand-teal-light: #5cc4d0;
    --brand-teal-dark: #2a9aa6;

    --brand-purple: #8b3a8b;
    --brand-purple-light: #a855a8;
    --brand-purple-dark: #6b2d6b;

    --brand-orange: #e86b2c;

    /* Warm Dark Background - Not cold blue-gray */
    --bg-base: #1a1625;
    --bg-elevated: #221d2e;
    --bg-surface: #2a2438;
    --bg-hover: #342d42;

    /* Glass - MUCH lighter, more transparent */
    --glass-bg: rgba(42, 36, 56, 0.5);
    --glass-bg-light: rgba(52, 45, 66, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(247, 199, 36, 0.2);
    --glass-blur: 14px;

    /* Text - Crystal clear, high contrast */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-subtle: rgba(255, 255, 255, 0.4);

    /* Shadows & Glows */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.2);
    --glow-golden: 0 0 40px rgba(247, 199, 36, 0.15);
    --glow-teal: 0 0 30px rgba(59, 180, 193, 0.2);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s var(--ease);
    --transition-fast: all 0.15s ease;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --topbar-height: var(--header-height);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
}

/* ============================================================
   BASE & LIVING BACKGROUND
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Warm Living Background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        /* Golden warmth - top left */
        radial-gradient(
            ellipse 90% 70% at 5% 10%,
            rgba(247, 199, 36, 0.08) 0%,
            transparent 50%
        ),
        /* Teal freshness - top right */
        radial-gradient(
                ellipse 70% 60% at 95% 15%,
                rgba(59, 180, 193, 0.07) 0%,
                transparent 45%
            ),
        /* Purple elegance - bottom */
        radial-gradient(
                ellipse 100% 60% at 50% 100%,
                rgba(139, 58, 139, 0.09) 0%,
                transparent 50%
            ),
        /* Orange accent - center */
        radial-gradient(
                circle at 40% 50%,
                rgba(232, 107, 44, 0.04) 0%,
                transparent 35%
            ),
        /* Warm base gradient */
        linear-gradient(165deg, #1a1625 0%, #221d2e 40%, #1a1625 100%);
    pointer-events: none;
    z-index: 0;
}

/* Floating orb for depth */
body::after {
    content: "";
    position: fixed;
    width: 700px;
    height: 700px;
    top: -250px;
    right: -150px;
    background: radial-gradient(
        circle,
        rgba(247, 199, 36, 0.05) 0%,
        transparent 60%
    );
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Prevents overflow in flex containers */
    overflow-x: hidden; /* Contains any horizontal spillage */
}

.content-body {
    flex: 1;
    padding: 30px;
    min-width: 0; /* Prevents overflow in flex containers */
}

/* ============================================================
   SIDEBAR - Warm Glass Panel
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Golden accent stripe */
.sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--brand-golden) 0%,
        rgba(247, 199, 36, 0.4) 25%,
        rgba(59, 180, 193, 0.3) 50%,
        rgba(139, 58, 139, 0.3) 75%,
        transparent 100%
    );
}

.sidebar-logo {
    height: var(--header-height);
    padding: 0 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(
        135deg,
        rgba(247, 199, 36, 0.04) 0%,
        transparent 100%
    );
}

.sidebar-logo img {
    height: 46px;
    width: auto;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 4px 16px rgba(247, 199, 36, 0.2));
    background-color: #f1e924;
}

.sidebar-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--brand-golden) 0%,
        var(--brand-orange) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.sidebar-menu {
    flex: 1;
    padding: 22px 16px;
    overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
    width: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(247, 199, 36, 0.2);
    border-radius: 4px;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0 14px;
    margin-bottom: 12px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    margin-bottom: 4px;
}

.menu-link i {
    width: 20px;
    font-size: 0.95rem;
    opacity: 0.75;
    transition: var(--transition-fast);
}

.menu-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(6px);
}

.menu-link:hover i {
    opacity: 1;
    color: var(--brand-teal-light);
}

/* Active - Golden glow */
.menu-link.active {
    background: linear-gradient(
        90deg,
        rgba(247, 199, 36, 0.15) 0%,
        rgba(247, 199, 36, 0.04) 100%
    );
    color: var(--text-primary);
}

.menu-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: linear-gradient(
        180deg,
        var(--brand-golden) 0%,
        var(--brand-orange) 100%
    );
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 16px rgba(247, 199, 36, 0.5);
}

.menu-link.active i {
    color: var(--brand-golden);
    opacity: 1;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-glass-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-glass-icon:hover,
.btn-glass-icon.active {
    background: var(--bg-hover);
    color: var(--brand-teal);
    border-color: rgba(59, 180, 193, 0.3);
    box-shadow: 0 0 15px rgba(59, 180, 193, 0.2);
    transform: translateY(-2px);
}

/* Navbar Clock */
#navbar-clock {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: default;
}

#navbar-clock:hover {
    color: var(--brand-teal-light);
    background: rgba(59, 180, 193, 0.05);
    box-shadow: 0 0 15px rgba(59, 180, 193, 0.1);
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px 8px 8px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown-toggle:hover {
    background: var(--bg-hover);
    border-color: rgba(247, 199, 36, 0.25);
    box-shadow: 0 0 20px rgba(247, 199, 36, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--brand-golden) 0%,
        var(--brand-orange) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1625;
    box-shadow: 0 4px 12px rgba(247, 199, 36, 0.3);
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 230px;
    background: var(--glass-bg-light);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transition: var(--transition);
    z-index: 1100;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item.logout {
    color: #f87171;
}

.dropdown-item.logout:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* ============================================================
   CARDS - Floating Premium Glass
   ============================================================ */
.card,
.glass-card {
    background: var(--glass-bg-light);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Subtle top highlight */
.card::before,
.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(247, 199, 36, 0.15),
        transparent
    );
}

.card:hover,
.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated), var(--glow-golden);
}

.card-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h5,
.card-header .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-body {
    padding: 26px;
}

/* Premium Stat Cards Enhancements */
.stats-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.glass-card:hover .stats-icon-circle {
    transform: scale(1.1) rotate(-5deg);
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.premium-stat-card {
    background: var(--glass-bg-light);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: var(--transition);
}

.bg-splash-primary {
    background: linear-gradient(135deg, var(--brand-golden) 0%, transparent 100%);
    opacity: 0.1;
}

.bg-splash-teal {
    background: linear-gradient(135deg, var(--brand-teal) 0%, transparent 100%);
    opacity: 0.1;
}


/* ============================================================
   STAT CARDS - Vibrant Gradient Orbs
   ============================================================ */
.stat-card {
    position: relative;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg-light);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Large gradient orb */
.stat-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    filter: blur(40px);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--glass-border-hover);
}

.stat-card:hover::before {
    transform: scale(1.15);
}

/* Teal */
.stat-card.teal::before {
    background: radial-gradient(
        circle,
        rgba(59, 180, 193, 0.35) 0%,
        transparent 70%
    );
}
.stat-card.teal .stat-icon {
    background: linear-gradient(
        135deg,
        rgba(59, 180, 193, 0.25) 0%,
        rgba(59, 180, 193, 0.08) 100%
    );
    color: var(--brand-teal-light);
    box-shadow: 0 0 24px rgba(59, 180, 193, 0.2);
}

/* Purple */
.stat-card.purple::before {
    background: radial-gradient(
        circle,
        rgba(168, 85, 168, 0.35) 0%,
        transparent 70%
    );
}
.stat-card.purple .stat-icon {
    background: linear-gradient(
        135deg,
        rgba(168, 85, 168, 0.25) 0%,
        rgba(168, 85, 168, 0.08) 100%
    );
    color: var(--brand-purple-light);
    box-shadow: 0 0 24px rgba(168, 85, 168, 0.2);
}

/* Golden */
.stat-card.golden::before {
    background: radial-gradient(
        circle,
        rgba(247, 199, 36, 0.3) 0%,
        transparent 70%
    );
}
.stat-card.golden .stat-icon {
    background: linear-gradient(
        135deg,
        rgba(247, 199, 36, 0.25) 0%,
        rgba(247, 199, 36, 0.08) 100%
    );
    color: var(--brand-golden);
    box-shadow: 0 0 24px rgba(247, 199, 36, 0.2);
}

/* Green */
.stat-card.green::before {
    background: radial-gradient(
        circle,
        rgba(52, 211, 153, 0.3) 0%,
        transparent 70%
    );
}
.stat-card.green .stat-icon {
    background: linear-gradient(
        135deg,
        rgba(52, 211, 153, 0.25) 0%,
        rgba(52, 211, 153, 0.08) 100%
    );
    color: #34d399;
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.2);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.08) rotate(-5deg);
}

.stat-value {
    font-size: clamp(1.2rem, 2vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* ============================================================
   QUICK ACTIONS - Vibrant Interactive
   ============================================================ */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(59, 180, 193, 0.12) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: var(--transition);
}

.quick-action:hover {
    background: var(--bg-hover);
    border-color: rgba(59, 180, 193, 0.3);
    color: var(--text-primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft), var(--glow-teal);
}

.quick-action:hover::before {
    opacity: 1;
}

.quick-action i {
    font-size: 1.8rem;
    opacity: 0.8;
    transition: var(--transition);
    color: var(--brand-teal);
    position: relative;
    z-index: 1;
}

.quick-action:hover i {
    opacity: 1;
    transform: scale(1.2) rotate(-8deg);
}

.quick-action span {
    font-size: 0.85rem;
    font-weight: 550;
    position: relative;
    z-index: 1;
}

/* Primary action - Golden */
.quick-action.primary::before {
    background: radial-gradient(
        circle at 50% 50%,
        rgba(247, 199, 36, 0.15) 0%,
        transparent 70%
    );
}

/* ============================================================
   REPORTS - Sales Report Specific
   ============================================================ */
.filter-form .select2-container--default .select2-selection--single,
.filter-form .form-control,
.filter-form .btn {
    min-height: 38px;
    display: flex;
    align-items: center;
    font-size: 0.85rem !important;
}

.filter-form .form-label {
    font-size: 0.75rem !important;
    margin-bottom: 2px !important;
    white-space: nowrap;
}

.search-container {
    width: 100%;
    max-width: 300px;
}

.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1rem;
    position: relative;
}

#adminSalesTable {
    font-size: 0.85rem;
}

#adminSalesTable td {
    padding: 10px 12px;
}


.quick-action.primary i {
    color: var(--brand-golden);
}

.quick-action.primary:hover {
    border-color: rgba(247, 199, 36, 0.35);
    box-shadow: var(--shadow-soft), var(--glow-golden);
}

/* ============================================================
   BUTTONS - Premium Touchable
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

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

/* Primary - Teal */
.btn-primary,
.btn-glass-primary {
    background: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        var(--brand-teal-dark) 100%
    );
    color: white;
    box-shadow: 0 6px 20px rgba(59, 180, 193, 0.35);
}

.btn-primary:hover,
.btn-glass-primary:hover {
    background: linear-gradient(
        135deg,
        var(--brand-teal-light) 0%,
        var(--brand-teal) 100%
    );
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(59, 180, 193, 0.45);
    color: white;
}

/* Success */
.btn-success,
.btn-glass-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-success:hover,
.btn-glass-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
    color: white;
}

/* Warning - Golden */
.btn-warning,
.btn-glass-warning {
    background: linear-gradient(
        135deg,
        var(--brand-golden) 0%,
        var(--brand-golden-dark) 100%
    );
    color: #1a1625;
    box-shadow: 0 6px 20px rgba(247, 199, 36, 0.35);
}

.btn-warning:hover,
.btn-glass-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(247, 199, 36, 0.45);
    color: #1a1625;
}

/* Danger */
.btn-danger,
.btn-glass-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover,
.btn-glass-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.45);
    color: white;
}

/* Info */
.btn-info,
.btn-glass-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-info:hover,
.btn-glass-info:hover {
    transform: translateY(-3px);
    color: white;
}

/* Secondary */
.btn-secondary,
.btn-glass-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover,
.btn-glass-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--glass-border-hover);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
}
.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ============================================================
   FORMS - SOFT APPLE-LIKE FOCUS
   ============================================================ */
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-hover);
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 4px rgba(59, 180, 193, 0.15);
    color: white;
}

.form-control::placeholder {
    color: var(--text-subtle);
}

.input-group-text {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.form-check-input {
    background-color: var(--bg-surface);
    border-color: var(--glass-border);
    width: 1.25em;
    height: 1.25em;
}

.form-check-input:checked {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
}

/* ============================================================
   TABLES - CLEAN & SPACIOUS
   ============================================================ */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-secondary);
    border-color: var(--glass-border);
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
}

.table tbody td {
    padding: 5px 20px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   MODALS - CENTERED GLASS
   ============================================================ */
.modal-content {
    background: #1c1e3a; /* Darker solid background for readability */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
}

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

.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

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

/* Close button white override */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ============================================================
   UTILITIES & BADGES
   ============================================================ */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.badge-glass-teal {
    background: rgba(59, 180, 193, 0.15);
    color: var(--brand-teal-light);
    border: 1px solid rgba(59, 180, 193, 0.2);
}

.badge-glass-purple {
    background: rgba(139, 58, 139, 0.15);
    color: var(--brand-purple-light);
    border: 1px solid rgba(139, 58, 139, 0.2);
}

.badge-glass-golden {
    background: rgba(247, 199, 36, 0.15);
    color: var(--brand-golden);
    border: 1px solid rgba(247, 199, 36, 0.2);
}

.badge-glass-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-glass-primary {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-glass-secondary {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

.text-gradient {
    background: linear-gradient(
        135deg,
        var(--brand-golden) 0%,
        var(--brand-teal) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-teal {
    color: var(--brand-teal) !important;
}
.text-golden {
    color: var(--brand-golden) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}

.fw-500 {
    font-weight: 500;
}
.fw-600 {
    font-weight: 600;
}
.fw-700 {
    font-weight: 700;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 22, 37, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-custom {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 180, 193, 0.1);
    border-radius: 50%;
    border-top-color: var(--brand-teal);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification Customization */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1055;
}

.toast {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-elevated) !important;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.toast-header {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.toast-header strong {
    margin-right: auto;
    margin-left: 8px;
}

.toast-body {
    padding: 1rem;
    font-size: 0.9rem;
}

/* Close button positioning fix */
.toast-header .btn-close {
    margin: -8px -8px -8px auto;
    padding: 1rem;
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: var(--transition-fast);
}

.toast-header .btn-close:hover {
    opacity: 1;
}

/* Toast Success */
.toast-success-glass {
    border-left: 4px solid var(--brand-teal) !important;
}

.toast-success-glass i,
.text-teal {
    color: var(--brand-teal) !important;
}

/* Toast Error */
.toast-error-glass {
    border-left: 4px solid #ef4444 !important;
}

.toast-error-glass i,
.text-danger-custom {
    color: #ef4444 !important;
}

/* ============================================================
   SELECT2
   ============================================================ */
.select2-container--default .select2-selection--single {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    height: 50px;
    padding: 12px 16px;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--text-primary);
    line-height: 26px;
}

.select2-container--default .select2-dropdown {
    background-color: #1c1e3a !important; /* Solid dark background */
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-elevated) !important;
    z-index: 9999 !important;
}

.select2-container--default .select2-results__option {
    background-color: #1c1e3a !important;
    color: var(--text-primary) !important;
    padding: 14px 18px !important;
}

.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-teal) !important;
    color: white !important;
}

/* Select2 Search Field */
.select2-search--dropdown {
    padding: 10px;
}

.select2-search--dropdown .select2-search__field {
    background-color: #2a2438 !important; /* Solid background surface color */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 12px;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 2px rgba(59, 180, 193, 0.2);
}

/* ============================================================
   DATATABLES DARK THEME OVERRIDES
   ============================================================ */

/* Wrapper text colors */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--text-muted) !important;
    margin-bottom: 1rem;
}

/* Search Input */
.dataTables_filter input {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    outline: none;
    transition: var(--transition);
}

.dataTables_filter input:focus {
    border-color: var(--brand-teal) !important;
    box-shadow: 0 0 0 2px rgba(59, 180, 193, 0.2);
}

/* Length Select */
.dataTables_length select {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 24px 6px 10px !important;
    outline: none;
}

.dataTables_length select:focus {
    border-color: var(--brand-teal) !important;
}

/* Pagination Buttons */
.page-item .page-link {
    background-color: var(--bg-surface);
    border-color: var(--glass-border);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.page-item.active .page-link {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
}

.page-item.disabled .page-link {
    background-color: var(--bg-base);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--text-subtle);
}

.page-item .page-link:hover:not(.active) {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* Export Buttons */
.dt-buttons .btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    margin-right: 6px;
    transition: var(--transition-fast);
}

.dt-buttons .btn:hover {
    background-color: var(--bg-hover);
    transform: translateY(-1px);
    border-color: var(--glass-border-hover);
}

/* Custom Table Card Overrides */
.card-dark {
    background-color: #1c1e3a !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-dark-custom thead th {
    background-color: #15162b;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-dark-custom tbody td {
    background-color: transparent;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-dark-custom tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 80px;
}

.password-actions {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    padding-right: 0.5rem;
    z-index: 5;
    display: flex;
    gap: 4px;
}

/* User Info Notice */
.user-info-notice {
    background: rgba(59, 180, 193, 0.1);
    border: 1px solid rgba(59, 180, 193, 0.2);
    color: var(--brand-teal);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   LOGIN PAGE - CENTERED GLASS
   ============================================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-elevated);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--brand-golden) 0%,
        var(--brand-teal) 50%,
        var(--brand-purple) 100%
    );
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    background-color: #f1e924;
    border-radius: 5px;
    padding: 2px;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
    transition: var(--transition);
}

.login-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px 14px 48px; /* space for icon */
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.login-input:focus {
    background: var(--bg-hover);
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 4px rgba(59, 180, 193, 0.15);
    outline: none;
}

.login-input:focus + .input-icon,
.login-input:focus ~ .input-icon {
    color: var(--brand-teal);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.login-btn {
    width: 100%;
    background: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        var(--brand-teal-dark) 100%
    );
    color: white;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(59, 180, 193, 0.3);
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 180, 193, 0.4);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.text-danger-custom {
    color: #ef4444 !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Table Password Input */
.table-password-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 120px;
    padding: 0;
    pointer-events: none; /* Prevent editing directly */
}

.table-password-input:focus {
    outline: none;
}

.text-10 {
    font-size: 10px;
}

/* ============================================================
   WAREHOUSE MODULE - Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
    display: block;
    color: var(--text-subtle);
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-muted);
}

/* ============================================================
   WAREHOUSE MODULE - Scan Feedback
   ============================================================ */
#scanFeedback {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    padding: 12px 16px;
}

/* ============================================================
   WAREHOUSE MODULE - Qty Validation Warning
   ============================================================ */
#qtyValidation {
    border-radius: var(--radius-sm);
}

/* ============================================================
   WAREHOUSE MODULE - Stock In/Out Tables (Responsive)
   ============================================================ */
#stockInForm .table th,
#stockInForm .table td {
    white-space: nowrap;
    padding: 8px 6px;
    vertical-align: middle;
}

#stockInForm .form-control-sm,
#stockInForm .form-select-sm {
    font-size: 0.8rem;
    padding: 6px 8px;
}

/* Scanned items table for Stock Out */
#scannedItems td code {
    background: rgba(59, 180, 193, 0.12);
    color: var(--brand-teal);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================================
   PRINT STYLES - Barcode Pages
   ============================================================ */
@media print {
    /* Hide everything except print content */
    .sidebar,
    .topbar,
    .main-content > .card-header,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        margin: 0;
        padding: 0;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    /* Barcode label styling */
    .barcode-label {
        border: 1px dashed #ccc;
        padding: 8px;
        text-align: center;
        page-break-inside: avoid;
        background: white;
    }

    .barcode-label .brand-name {
        font-weight: 700;
        font-size: 10pt;
        margin-bottom: 4px;
    }

    .barcode-label .barcode-number {
        font-size: 8pt;
        font-family: monospace;
    }

    .barcode-label .product-info {
        font-size: 8pt;
        margin-top: 4px;
    }

    .barcode-label .mrp-price {
        font-weight: 700;
        font-size: 10pt;
        margin-top: 2px;
    }

    /* Master barcode - Stock Out */
    .master-barcode-print {
        border: 2px solid #333;
        padding: 16px;
        page-break-inside: avoid;
    }

    .master-barcode-print table {
        width: 100%;
        border-collapse: collapse;
    }

    .master-barcode-print table th,
    .master-barcode-print table td {
        border: 1px solid #ccc;
        padding: 4px 8px;
        font-size: 9pt;
    }
}

/* ============================================================
   WAREHOUSE MODULE - Action Button (Teal)
   ============================================================ */
.btn-action-teal {
    background: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        var(--brand-teal-dark) 100%
    );
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 180, 193, 0.3);
    font-weight: 600;
}

.btn-action-teal:hover,
.btn-action-teal:focus {
    background: linear-gradient(
        135deg,
        var(--brand-teal-light) 0%,
        var(--brand-teal) 100%
    );
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 180, 193, 0.45);
}

.btn-action-teal:active {
    transform: scale(0.96);
    color: white;
}

/* ============================================================
   WAREHOUSE MODULE - Action Button (Golden)
   ============================================================ */
.btn-action-golden {
    background: linear-gradient(135deg, var(--brand-golden) 0%, #eab308 100%);
    color: #1e293b;
    border: none;
    box-shadow: 0 4px 15px rgba(247, 199, 36, 0.3);
    font-weight: 600;
}

.btn-action-golden:hover,
.btn-action-golden:focus {
    background: linear-gradient(135deg, #fcd34d 0%, var(--brand-golden) 100%);
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 199, 36, 0.45);
}

.btn-action-golden:active {
    transform: scale(0.96);
}

/* ============================================================
   BOOTSTRAP MODAL FIX - Stacking Context
   ============================================================
   backdrop-filter on .card/.glass-card creates a new stacking
   context that traps fixed-position Bootstrap modals.
   These overrides ensure modals render above everything.
   ============================================================ */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: 1056 !important;
}

/* Remove backdrop-filter and overflow:hidden from modal-content
   so it doesn't create a nested stacking context trap */
.modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    background: #1c1e3a !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-elevated) !important;
}

/* ============================================================
   PRODUCT DETAIL ENHANCEMENTS - Sales & Offers
   ============================================================ */
.sales-history-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.offer-details-card {
    background: rgba(247, 199, 36, 0.05);
    border: 1px solid rgba(247, 199, 36, 0.15);
    border-radius: 12px;
    padding: 15px 20px;
}

.offer-type-badge {
    background: var(--brand-golden);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(247, 199, 36, 0.3);
}

.info-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.text-teal {
    color: var(--brand-teal) !important;
}

.tiny-header {
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.bg-glass-golden {
    background: rgba(247, 199, 36, 0.15);
    border: 1px solid rgba(247, 199, 36, 0.2);
    color: var(--brand-golden);
}

/* Info Display (Read Only fields) */
.info-display {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.uppercase {
    text-transform: uppercase;
}

/* Animations */
.animate__infinite {
    animation-iteration-count: infinite;
}

/* ============================================================
   FLATPICKR - Custom Dark Glass Theme
   ============================================================ */
.flatpickr-calendar {
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--shadow-elevated) !important;
    border-radius: var(--radius-lg) !important;
    /* Removed padding: 10px to fix width calculation issue */
    width: auto !important; /* Allow it to fit content */
}

.flatpickr-innerContainer {
    padding: 10px !important; /* Move padding inside so it doesn't break width */
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: var(--glass-border) !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
    border-top-color: var(--glass-border) !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
    height: 40px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: var(--text-muted) !important;
    fill: var(--text-muted) !important;
    top: 5px !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--brand-teal) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--bg-surface) !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.flatpickr-current-month input.cur-year {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

.flatpickr-weekdays {
    background: transparent !important;
    margin-bottom: 5px !important;
}

span.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

.flatpickr-day {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid transparent !important;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day:focus {
    background: var(--bg-hover) !important;
    border-color: var(--glass-border-hover) !important;
    color: var(--text-primary) !important;
}

.flatpickr-day.today {
    background: rgba(247, 199, 36, 0.15) !important;
    border-color: transparent !important;
    color: var(--brand-golden) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        var(--brand-teal-dark) 100%
    ) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: var(--shadow-soft) !important;
}

.flatpickr-day.inRange {
    background: rgba(59, 180, 193, 0.15) !important;
    border-color: transparent !important;
    box-shadow:
        -5px 0 0 rgba(59, 180, 193, 0.15),
        5px 0 0 rgba(59, 180, 193, 0.15) !important;
}

/* Fix input height to match Select2 and text inputs */
.flatpickr-input {
    background-color: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    color: Var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    transition: var(--transition) !important;
    height: 38px !important; /* Standard bootstrap sm input height usually */
}

/* Ensure read-only input looks interactive */
.flatpickr-input[readonly] {
    background-color: var(--glass-bg-light) !important;
    cursor: pointer !important;
}

.flatpickr-input:focus {
    background-color: var(--bg-hover) !important;
    border-color: rgba(59, 180, 193, 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 180, 193, 0.15) !important;
    outline: 0 !important;
}

/* ============================================================
   ROLE BADGES (GLASS EFFECT) - ACCOUNTS
   ============================================================ */
.badge-glass-secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.1) !important;
    border-radius: var(--radius-sm);
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
}

/* ============================================================
   SELECT2 - Dark Glass Theme
   ============================================================ */

/* Container */
.select2-container--default .select2-selection--single {
    background-color: var(--glass-bg-light) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    height: 34px !important;
    padding: 2px 8px !important;
    transition: var(--transition) !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: rgba(59, 180, 193, 0.3) !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-size: 0.82rem !important;
    line-height: 28px !important;
    padding-left: 0 !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__placeholder {
    color: var(--text-muted) !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 32px !important;
    top: 0 !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: var(--text-muted) transparent transparent transparent !important;
}

.select2-container--default.select2-container--open
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: transparent transparent var(--text-muted) transparent !important;
}

/* Clear button */
.select2-container--default
    .select2-selection--single
    .select2-selection__clear {
    color: var(--text-muted) !important;
    font-size: 1.1rem !important;
    margin-right: 4px !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__clear:hover {
    color: #f87171 !important;
}

/* Focus state */
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus
    .select2-selection--single {
    border-color: rgba(59, 180, 193, 0.5) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 180, 193, 0.12) !important;
    outline: 0 !important;
}

/* Dropdown */
.select2-dropdown-dark,
.select2-dropdown {
    background-color: var(--bg-elevated) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-elevated) !important;
    z-index: 9999 !important;
}

/* Search field inside dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field,
.select2-dropdown-dark .select2-search--dropdown .select2-search__field {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    padding: 6px 10px !important;
    font-size: 0.82rem !important;
    outline: none !important;
}

.select2-container--default
    .select2-search--dropdown
    .select2-search__field:focus,
.select2-dropdown-dark .select2-search--dropdown .select2-search__field:focus {
    border-color: rgba(59, 180, 193, 0.5) !important;
    box-shadow: 0 0 0 0.15rem rgba(59, 180, 193, 0.1) !important;
}

/* Results list */
.select2-container--default .select2-results__option,
.select2-dropdown-dark .select2-results__option {
    padding: 10px 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.15s ease !important;
    border-left: 3px solid transparent !important;
}

/* Hover (Highlighted) */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted,
.select2-dropdown-dark .select2-results__option--highlighted[aria-selected] {
    background: rgba(45, 212, 191, 0.12) !important;
    border-left: 3px solid #2DD4BF !important;
    color: #ffffff !important;
}

/* Selected */
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-dropdown-dark .select2-results__option[aria-selected="true"] {
    background: rgba(96, 165, 250, 0.18) !important;
    border-left: 3px solid #60A5FA !important;
    color: #ffffff !important;
}

/* No results message */
.select2-container--default .select2-results__message,
.select2-dropdown-dark .select2-results__message {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
}

/* Stock In table Select2 - compact sizing */
#itemsTable .select2-container {
    min-width: 90px !important;
}

#itemsTable .select2-container--default .select2-selection--single {
    height: 31px !important;
    padding: 1px 6px !important;
}

#itemsTable
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    line-height: 26px !important;
    font-size: 0.8rem !important;
}

#itemsTable
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 28px !important;
}

/* ============================================================ */
/* DATATABLES HEADER LAYOUT FIX - 2026-02-12 */
/* ============================================================ */
/* When wrapped in d-flex, remove floats */
.dataTables_wrapper .d-flex > .dataTables_filter {
    float: none !important;
    text-align: right !important;
    margin-bottom: 0 !important;
}
.dataTables_wrapper .d-flex > .dt-buttons {
    float: none !important;
    margin-bottom: 0 !important;
}
/* Ensure search input aligns vertically */
.dataTables_wrapper .dataTables_filter label {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* ============================================================
   PRODUCT TRACEABILITY - Scan & Track
   ============================================================ */
.scan-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.scan-bar input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 1.1rem;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.scan-bar input:focus {
    border-color: var(--brand-teal, #00d4aa);
}

.scan-bar input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.scan-bar button {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 8px;
    white-space: nowrap;
}

/* â”€â”€â”€ Loader â”€â”€â”€ */
.scan-loader {
    display: none;
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted, #aaa);
}

.scan-loader .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* â”€â”€â”€ Not Found â”€â”€â”€ */
.scan-not-found {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.scan-not-found i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 12px;
}

.scan-not-found h5 {
    color: #ef4444;
    margin-bottom: 4px;
}

.scan-not-found p {
    color: var(--text-muted, #aaa);
    font-size: 0.9rem;
}

/* â”€â”€â”€ Result Area â”€â”€â”€ */
#scanResult {
    display: none;
}

/* Section Cards */
.trace-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.trace-card .card-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-teal, #00d4aa);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info rows */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.info-item label {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
    display: block;
}

.info-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    word-break: break-word;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item.double-width {
    grid-column: span 2;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.in_warehouse {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.in_store {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.status-badge.in_transit {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.status-badge.sold {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-badge.returned {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.status-badge.received {
    background: rgba(45, 212, 191, 0.15);
    color: #2dd4bf;
}

/* â”€â”€â”€ Timeline â”€â”€â”€ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding: 12px 0 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 16px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
}

.timeline-date {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    margin-bottom: 2px;
}

.timeline-action {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary, #fff);
}

.timeline-detail {
    font-size: 0.82rem;
    color: var(--text-secondary, #ccc);
    margin-top: 2px;
}

.timeline-meta {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

.timeline-meta i {
    margin-right: 4px;
}

/* â”€â”€â”€ Horizontal Timeline Mod â”€â”€â”€ */
.timeline.timeline-horizontal {
    display: flex;
    overflow-x: auto;
    padding: 30px 0;
    padding-left: 0;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-teal) rgba(255, 255, 255, 0.05);
}

.timeline.timeline-horizontal::-webkit-scrollbar {
    height: 6px;
}

.timeline.timeline-horizontal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.timeline.timeline-horizontal::-webkit-scrollbar-thumb {
    background: var(--brand-teal);
    border-radius: 10px;
}

.timeline.timeline-horizontal::before {
    display: none;
}

.timeline.timeline-horizontal .timeline-item {
    flex: 0 0 260px;
    padding: 45px 16px 0 16px;
    text-align: center;
    border: none !important;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline.timeline-horizontal .timeline-item:hover {
    transform: translateY(-5px);
}

.timeline.timeline-horizontal .timeline-item::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(0, 212, 170, 0.3) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    z-index: 0;
}

.timeline.timeline-horizontal .timeline-item:first-child::before {
    left: 50%;
    width: 50%;
}

.timeline.timeline-horizontal .timeline-item:last-child::before {
    width: 50%;
    left: 0;
}

.timeline.timeline-horizontal .timeline-dot {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline.timeline-horizontal .timeline-date {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--brand-teal);
    font-size: 0.85rem;
}

.timeline.timeline-horizontal .timeline-action {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #fff;
}

.timeline.timeline-horizontal .timeline-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline.timeline-horizontal .timeline-meta {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
}

.timeline.timeline-horizontal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.timeline.timeline-horizontal::-webkit-scrollbar-thumb {
    background: rgba(247, 199, 36, 0.2);
    border-radius: 4px;
}

.timeline.timeline-horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(247, 199, 36, 0.4);
}

/* Financial highlight */
.fin-highlight {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brand-teal, #00d4aa);
}

.fin-label {
    font-size: 0.72rem;
    color: var(--text-muted, #888);
    text-transform: uppercase;
}

.payment-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.payment-badge.Paid {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.payment-badge.Partial {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.payment-badge.Pending {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* =========================================
   STOCK OUT PRINT STYLES
   ========================================= */
.master-barcode-card {
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
}

.master-barcode-card .store-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary, #fff);
}

.master-barcode-card .shipment-info {
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
    margin-bottom: 16px;
}

.master-barcode-card .barcode-svg-wrap {
    background: #fff;
    border-radius: 8px;
    padding: 16px 12px 6px;
    display: inline-block;
    margin-bottom: 10px;
}

.master-barcode-card .barcode-svg-wrap svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.master-barcode-card .barcode-text {
    font-family: "Courier New", monospace;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 6px;
    color: var(--text-primary, #fff);
}

.master-barcode-card .barcode-meta {
    font-size: 0.85rem;
    color: var(--text-muted, #aaa);
}

/* Print styles (Stock Out) */
@media print {
    @page {
        size: 4in 6in;
        margin: 0;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 4in !important;
        height: 6in !important;
        overflow: hidden !important;
        background: #fff !important;
    }

    body.stockout-print-page {
        width: 4in !important;
        height: 6in !important;
    }

    /* Hide everything except label wrapper */
    body.stockout-print-page > *:not(.stockout-label-wrapper) {
        display: none !important;
    }

    .stockout-label-wrapper {
        width: 4in !important;
        height: 6in !important;
        position: fixed;
        top: 0;
        left: 0;
        background: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    /* Additional safety: ensure wrapper children are visible */
    .stockout-label-wrapper * {
        visibility: visible !important;
    }

    .print-layout-container {
        width: 100%;
        height: 100%;
        padding: 10px;
        box-sizing: border-box;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* --- INDUSTRIAL COURIER LABEL DESIGN --- */
    .master-barcode-card {
        width: 100%;
        border: 3px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 12px !important;
        background: #fff !important;
        font-family: Arial, sans-serif;
        text-align: left !important;
        page-break-inside: avoid !important;
    }

    .master-barcode-card .store-name {
        font-size: 18px !important;
        font-weight: bold !important;
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 6px;
        margin-bottom: 8px;
        color: #000 !important;
        text-transform: uppercase;
    }

    .master-barcode-card .shipment-info {
        font-size: 13px !important;
        border-bottom: 1px solid #000;
        padding-bottom: 6px;
        margin-bottom: 10px;
        color: #000 !important;
    }

    .master-barcode-card .barcode-svg-wrap {
        border-top: 2px solid #000;
        padding-top: 15px;
        margin-top: 10px;
        text-align: center;
        background: #fff !important;
    }

    .barcode-svg-wrap svg {
        width: 100% !important;
        height: 100px !important;
    }

    .master-barcode-card .barcode-text {
        font-size: 18px !important;
        font-weight: bold !important;
        letter-spacing: 3px;
        text-align: center;
        margin-top: 8px;
        color: #000 !important;
        font-family: "Courier New", monospace;
    }

    .master-barcode-card .barcode-meta {
        font-size: 11px !important;
        text-align: center;
        margin-top: 4px;
        color: #000 !important;
    }
}

/* Master Barcode Styling - Premium Tracking Look */
.master-barcode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 180, 193, 0.1);
    border: 1px solid rgba(59, 180, 193, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--brand-teal);
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-transform: uppercase;
    cursor: pointer;
}

.master-barcode-pill:hover {
    background: rgba(59, 180, 193, 0.2);
    border-color: var(--brand-teal);
    transform: translateY(-1px);
    box-shadow: var(--glow-teal);
}

.master-barcode-pill i {
    font-size: 1rem;
    opacity: 0.8;
}

.master-barcode-pill .barcode-text {
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 1.5px;
}

/* Inventory UI Utilities */
.loading-opacity {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.badge-glass-teal {
    background: rgba(13, 148, 136, 0.1);
    color: #0d9488;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.badge-glass-golden {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.badge-glass-success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.badge-glass-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.2);
}

.custom-table {
    color: #e2e8f0;
}

.custom-table thead th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px;
}

.custom-table tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

/* ============================================================
   MODULE: MATERIAL INVENTORY
   ============================================================ */
.inventory-search-group {
    width: 250px;
}

.inventory-stat-card {
    padding: 12px !important;
}

.inventory-stat-value {
    font-size: 1.2rem !important;
}

.inventory-stat-label {
    font-size: 0.75rem !important;
}

.inventory-modal-section-title {
    color: var(--brand-teal);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.inventory-breakdown-item {
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

.inventory-breakdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

#inventoryDetailContent .trace-card {
    margin-bottom: 0;
}

.badge-min-width {
    min-width: 35px;
    padding: 6px 10px;
}
/* ============================================================
   UTILITIES
   ============================================================ */

.bg-glass-card {
    background: var(--glass-bg-card) !important;
}

.letter-spacing-1 {
    letter-spacing: 1px !important;
}
.opacity-3 {
    opacity: 0.3 !important;
}
.opacity-5 {
    opacity: 0.5 !important;
}
.opacity-7 {
    opacity: 0.7 !important;
}

/* ============================================================
   CASHIER MODULE STYLES
   ============================================================ */

.welcome-card {
    background: linear-gradient(
        135deg,
        var(--glass-bg-card) 0%,
        rgba(13, 163, 153, 0.05) 100%
    ) !important;
}

.welcome-card-body {
    padding: 28px !important;
}

.user-avatar-lg {
    width: 64px !important;
    height: 64px !important;
    font-size: 1.3rem !important;
    background: linear-gradient(
        135deg,
        var(--brand-teal) 0%,
        #0d6e66 100%
    ) !important;
    box-shadow: 0 6px 20px rgba(13, 163, 153, 0.25) !important;
}

.alert-card-warning {
    border-left: 4px solid var(--brand-golden) !important;
}

.pos-tab-container {
    padding: 2px !important;
}

.pos-billing-summary {
    border-top: 1px solid var(--glass-border);
}

.pos-grand-total {
    font-size: 1.3rem;
    color: var(--brand-teal);
}

.denomination-row {
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 8px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.denomination-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border-hover);
}

.denomination-label {
    font-weight: 600;
    color: var(--brand-golden);
    width: 60px;
}

.denomination-total {
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    min-width: 100px;
}

.pos-bill-tab.active {
    box-shadow: 0 0 15px rgba(59, 180, 193, 0.2);
    border-bottom: 3px solid var(--brand-teal) !important;
}

/* Thermal Invoice specific styles */
.thermal-invoice {
    width: 80mm;
    margin: 0 auto;
    padding: 10px;
    background: #fff;
    color: #000;
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
}

.thermal-invoice * {
    color: #000 !important;
}

.thermal-invoice-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.thermal-invoice-table {
    width: 100%;
    margin-bottom: 10px;
}

.thermal-invoice-table th,
.thermal-invoice-table td {
    text-align: left;
    padding: 2px 0;
}

.thermal-invoice-table .text-end {
    text-align: right;
}

.thermal-invoice-footer {
    text-align: center;
    border-top: 1px dashed #000;
    padding-top: 10px;
    margin-top: 10px;
}
/* ============================================================
   CASHIER SCAN & TRACK / PRODUCT ENQUIRY
   ============================================================ */
.bg-glass-golden {
    background: rgba(255, 184, 0, 0.15) !important;
    backdrop-filter: blur(8px);
    color: #ffb800 !important;
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-glass-teal {
    background: rgba(0, 212, 170, 0.1) !important;
    backdrop-filter: blur(8px);
    color: #00d4aa !important;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.bg-glass-white {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
}

.tiny-header {
    font-size: 0.65rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.pos-search-wrapper .input-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.pos-search-wrapper .input-group:focus-within {
    border-color: var(--brand-teal);
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

#cashierScanInput:focus {
    box-shadow: none;
}

/* Custom Pagination for Modal (Matching Reference Image) */
.pagination-custom {
    display: flex;
    gap: 3px;
    padding: 0;
    margin: 0;
}

.pagination-custom .page-item .page-link {
    background: #252131;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    transition: all 0.2s var(--ease);
}

.pagination-custom .page-item.active .page-link {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #000; /* Dark text for high contrast on teal */
    font-weight: 600;
    box-shadow: 0 0 15px rgba(59, 180, 193, 0.2);
}

.pagination-custom .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #342d42;
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.pagination-custom .page-item.disabled .page-link {
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
    cursor: not-allowed;
}

.pagination-info {
    letter-spacing: 0.3px;
}

/* Force separation of text and buttons in Laravel's nav */
#siDetailProductsPagination nav,
#soDetailProductsPagination nav {
    width: 100%;
}

#siDetailProductsPagination nav > div:first-child,
#soDetailProductsPagination nav > div:first-child {
    display: none !important; /* Hide the mobile-only simple links */
}

#siDetailProductsPagination nav > div:last-child,
#soDetailProductsPagination nav > div:last-child {
    display: flex !important; /* Force show the desktop split layout */
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
}

#siDetailProductsPagination .pagination-custom,
#soDetailProductsPagination .pagination-custom {
    margin-left: auto;
}

#siDetailProductsPagination p,
#soDetailProductsPagination p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.88rem;
    white-space: nowrap;
}

#siDetailProductsPagination p span,
#siDetailProductsPagination p b,
#siDetailProductsPagination p .fw-semibold,
#soDetailProductsPagination p span,
#soDetailProductsPagination p b,
#soDetailProductsPagination p .fw-semibold {
    color: #fff !important;
    font-weight: 600 !important;
}

/* Ensure the arrows look consistent with our custom icons */
.pagination-custom .page-item a[aria-label="Previous"]::before,
.pagination-custom .page-item a[aria-label="Next"]::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Master Barcode Pill Style */
.master-barcode-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(59, 180, 193, 0.1);
    border: 1px solid rgba(59, 180, 193, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--brand-teal);
    font-family: "Courier New", Courier, monospace;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.master-barcode-pill:hover {
    background: rgba(59, 180, 193, 0.2);
    border-color: var(--brand-teal);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.master-barcode-pill i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.master-barcode-pill .barcode-text {
    letter-spacing: 0.5px;
}

/* POS Terminal - Remove Item Hover Effect */
.pos-remove-item {
    transition: all 0.25s var(--ease) !important;
}

.pos-remove-item:hover {
    color: #ffffff !important;
    background-color: red;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.4);
}
/* ============================================================
   QUICK CALCULATOR
   ============================================================ */
.calculator-modal {
    position: fixed;
    top: 80px;
    right: 100px;
    width: 320px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, top, left;
    overflow: hidden;
}

.calculator-modal.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.calculator-header {
    cursor: move;
    user-select: none;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.text-brand-teal {
    color: #3bb4c1;
}

.btn-close-calc {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-calc:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.calculator-display {
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 120px;
}

.calc-history {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    min-height: 20px;
    margin-bottom: 4px;
    font-family: "Courier New", monospace;
}

.calc-input {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-all;
}

.calc-temp-result {
    color: #3bb4c1;
    font-size: 0.9rem;
    height: 20px;
    font-weight: 500;
}

.calculator-body {
    padding: 16px;
}

.calc-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.btn-calc-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-calc-action:hover {
    background: rgba(59, 180, 193, 0.15);
    border-color: rgba(59, 180, 193, 0.3);
    color: #3bb4c1;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn-calc {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: white;
    border-radius: 10px;
    height: 48px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-calc:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-calc:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.05);
}

.btn-calc-op {
    background: rgba(59, 180, 193, 0.1);
    color: #3bb4c1;
}

.btn-calc-op:hover {
    background: rgba(59, 180, 193, 0.2);
}

.btn-calc-eq {
    background: linear-gradient(135deg, #3bb4c1 0%, #2a9aa6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 180, 193, 0.4);
}

.btn-calc-eq:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 16px rgba(59, 180, 193, 0.6);
}

.calc-moving {
    cursor: grabbing !important;
}

@media (max-width: 768px) {
    .calculator-modal {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        max-width: none;
    }
}

/* POS Terminal Enhancements */
.pos-brand-icon {
    color: var(--brand-teal);
}
.pos-golden-icon {
    color: var(--brand-golden);
}
.pos-addl-disc-group {
    width: 120px;
}
.pos-grand-total-val {
    letter-spacing: -1px;
}
.pos-grand-total-note {
    font-size: 0.7rem;
}
.pos-payment-input-custom {
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
.pos-remaining-box {
    background: rgba(255, 255, 255, 0.03);
}

/* DataTable Premium Button Styling */
.btn-excel {
    background: rgba(52, 211, 153, 0.1) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
    transition: all 0.3s ease;
}
.btn-excel:hover {
    background: #34d399 !important;
    color: #ffffff !important;
}
.btn-pdf {
    background: rgba(248, 113, 113, 0.1) !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
    color: #f87171 !important;
    transition: all 0.3s ease;
}
.btn-pdf:hover {
    background: #f87171 !important;
    color: #ffffff !important;
}

/* ============================================================
   POS DYNAMIC BILL TABS
   ============================================================ */
.pos-add-bill-btn {
    min-width: 36px;
    padding: 4px 10px;
    border-style: dashed;
    border-color: rgba(59, 180, 193, 0.4);
    color: var(--brand-teal, #3bb4c1);
    transition: all 0.25s ease;
}

.pos-add-bill-btn:hover {
    background: rgba(59, 180, 193, 0.15);
    border-color: var(--brand-teal, #3bb4c1);
    color: #fff;
    transform: scale(1.08);
}

.pos-bill-tab {
    min-width: 80px;
    transition: all 0.2s ease;
}

.pos-bill-tab.active {
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.pos-bill-tab.btn-warning {
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.25);
}

/* Tab close (X) button */
.pos-tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.pos-tab-close:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.2);
}

/* â”€â”€ Combo Offer Badges â”€â”€ */
.combo-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.combo-badge.combo-partial {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.combo-badge.combo-met {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ============================================================
   QUILL RICH TEXT EDITOR STYLES
   ============================================================ */
#quill-terms-editor {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: none;
    border-radius: 0 0 10px 10px;
    height: 250px;
    overflow-y: auto;
}

#quill-terms-editor .ql-editor {
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 15px;
    min-height: 100%;
}

#quill-terms-editor .ql-editor.ql-blank::before {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

.ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px 10px 0 0;
    margin-top: 5px;
}

.ql-toolbar .ql-stroke {
    stroke: #ccc;
}
.ql-toolbar .ql-fill {
    fill: #ccc;
}
.ql-toolbar .ql-picker-label {
    color: #ccc;
}

.ql-toolbar button:hover .ql-stroke,
.ql-toolbar .ql-picker-label:hover {
    stroke: #00d4aa;
    color: #00d4aa;
}

.ql-snow .ql-picker-options {
    background-color: #1c1e3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* List Numbers & Bullets Visibility */
#quill-terms-editor .ql-editor ol,
#quill-terms-editor .ql-editor ul {
    padding-left: 1.5rem;
    color: inherit;
}

#quill-terms-editor .ql-editor li {
    margin-bottom: 5px;
    color: inherit;
}

#quill-terms-editor .ql-editor li::before {
    color: #e0e0e0 !important;
}
/* ============================================================
   MOVEMENT TIMELINE & TRACEABILITY MODALS
   ============================================================ */
.timeline-item {
    position: relative;
}
.timeline-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: -10px;
    width: 2px;
    background: rgba(0, 255, 255, 0.1);
}
.timeline-icon {
    width: 16px;
    margin-top: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}
.timeline-scroll {
    overflow-y: auto;
    padding-right: 10px;
}
.timeline-scroll::-webkit-scrollbar {
    width: 4px;
}
.timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.timeline-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.15);
    border-radius: 10px;
}
.timeline-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.25);
}

.badge-glass-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.2);
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
}

.glass-modal {
    background: rgba(26, 22, 37, 0.9) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.transition-opacity {
    transition: opacity 0.3s ease;
}
/* ============================================================
   CASH SESSION HISTORY & MODAL
   ============================================================ */
.avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-teal);
    text-transform: uppercase;
}

.bg-white-5 {
    background: rgba(255, 255, 255, 0.05);
}

.denomination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.denom-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.denom-item:hover {
    background: rgba(59, 180, 193, 0.08);
    border-color: rgba(59, 180, 193, 0.2);
}

.denom-label {
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.denom-multiply {
    color: var(--text-subtle);
    font-size: 0.75rem;
}

.denom-count {
    color: var(--brand-golden);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ============================================================
   EXPENSES MODULE
   ============================================================ */
.btn-add-category {
    font-size: 0.65rem;
    padding: 2px 10px;
    background: rgba(45, 212, 191, 0.1);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.5);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-category:hover {
    background: #2dd4bf;
    color: #0f172a;
    transform: scale(1.2) translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 212, 191, 0.4);
    border-color: #2dd4bf;
}

/* ============================================================
   STOCK AUDIT MODULE
   ============================================================ */

/* --- Filter Form Inputs --- */
.filter-form .form-control,
.filter-form .btn {
    height: 42px !important;
    background: rgba(42, 36, 56, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

/* Multi-select container: auto height to allow tag wrapping */
.filter-form .select2-container--default .select2-selection--multiple {
    min-height: 42px !important;
    height: auto !important;
    background: rgba(42, 36, 56, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 4px 6px !important;
    gap: 4px !important;
}

.filter-form .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
}

/* Tag / Pill styling */
.filter-form .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(59, 180, 193, 0.2) !important;
    border: 1px solid rgba(59, 180, 193, 0.4) !important;
    color: white !important;
    border-radius: 20px !important;
    padding: 3px 10px 3px 12px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Remove (Ã—) button â€” positioned on right of each tag */
.filter-form .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    order: 2 !important;
    position: relative !important;
    float: none !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin-left: 2px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    border: none !important;
    cursor: pointer !important;
}

.filter-form .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff6b6b !important;
    background: transparent !important;
}

/* Search field inside multi-select */
.filter-form .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin-top: 0 !important;
    height: 28px !important;
}

.filter-form .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-teal) !important;
    box-shadow: 0 0 10px rgba(59, 180, 193, 0.2);
}

.audit-formula-badge {
    font-size: 0.9rem;
    padding: 12px 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md) !important;
}

.stat-card .stat-value .badge {
    font-size: 1.4rem;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    display: inline-block;
}

/* Select2 Dropdown Overrides for Dark Mode */
.select2-dropdown {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-teal-dark) !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: var(--text-primary) !important;
}

/* ============================================================
   PAGE: PERFORMANCE REPORT
   ============================================================ */
.filter-form .select2-container--default .select2-selection--single,
.filter-form .form-control,
.filter-form .btn {
    height: 40px !important;
    display: flex;
    align-items: center;
}

.filter-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.revenue-item {
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-value {
    font-size: 1.8rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1400px) {
    .stat-value {
        font-size: 1.5rem !important;
    }
}

.text-blue {
    color: #60A5FA; /* Card */
}

/* ==========================================================================
   PERFORMANCE DASHBOARD STYLES
   ========================================================================== */
.performance-chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}
.low-stock-badge {
    background: rgba(214, 48, 49, 0.1);
    color: #d63031;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================================
   MODULE: BUG REPORTING
   ============================================================ */
.ql-editor {
    color: white !important;
}
.ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px 5px 0 0;
}
#bug_description_editor {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: none !important;
    border-radius: 0 0 5px 5px;
}
.ql-snow .ql-stroke { stroke: #fff !important; }
.ql-snow .ql-fill { fill: #fff !important; }
.ql-snow .ql-picker { color: #fff !important; }

#screenshot_loader {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}
.bug-details-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

/* ============================================================
   BRANDING & UTILITY CLASSES
   ============================================================ */
.text-brand-teal { color: var(--brand-teal) !important; }
.text-brand-golden { color: var(--brand-golden) !important; }
.text-brand-purple { color: var(--brand-purple) !important; }

.h-350 { height: 350px !important; }
.h-200 { height: 200px !important; }
.min-w-120 { min-width: 120px !important; }

.items-column-width {
    min-width: 200px !important;
    max-width: 300px !important;
    white-space: normal !important;
}

.modal-scrollable-area {
    max-height: 80vh !important;
    overflow-y: auto !important;
    scroll-behavior: smooth !important;
}

.invoice-terms-area {
    white-space: pre-line !important;
    scroll-behavior: smooth !important;
    color: var(--text-muted) !important;
}

/* Brand Text Utilities */
.text-teal-brand { color: var(--brand-teal) !important; }
.text-golden-brand { color: var(--brand-golden) !important; }
.text-purple-brand { color: var(--brand-purple) !important; }
.text-blue-brand { color: #3498db !important; }

/* Accounts Reports */
.note-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
}

.note-box .note-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 0;
    font-style: italic;
}


/* ============================================================
   ACCOUNTS MODULE - PREMIUM COMPONENTS
   ============================================================ */

/* Premium Stat Card (Expenses) */
.premium-stat-card {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.15) 0%, rgba(32, 201, 151, 0.05) 100%);
    border: 1px solid rgba(32, 201, 151, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.premium-stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(32, 201, 151, 0.4);
    box-shadow: 0 15px 35px rgba(32, 201, 151, 0.1);
}
.premium-stat-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(32, 201, 151, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--brand-teal) 0%, #17a2b8 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(32, 201, 151, 0.2);
}
.stat-amount-lg {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: white;
    margin-bottom: 4px;
    line-height: 1.2;
}
.stat-label-muted {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.rupee-symbol {
    font-size: 1.25rem;
    vertical-align: super;
    margin-right: 4px;
    opacity: 0.7;
}

/* Dashboard Headers (Performance & Inventory) */
.header-purple {
    background: linear-gradient(135deg, var(--glass-bg-card) 0%, rgba(102, 16, 242, 0.03) 100%) !important;
}
.header-teal {
    background: linear-gradient(135deg, var(--glass-bg-card) 0%, rgba(32, 201, 151, 0.03) 100%) !important;
}
.avatar-purple {
    background: linear-gradient(135deg, #6610f2 0%, #6f42c1 100%) !important;
}
.avatar-teal {
    background: linear-gradient(135deg, var(--brand-teal) 0%, #0dcaf0 100%) !important;
}
