/* STEGIC Custom Design Phase 1: Global Aesthetic Upgrade */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --stegic-primary: #2563eb;
    --stegic-primary-hover: #1d4ed8;
    --stegic-bg: #f8fafc;
    --stegic-card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --stegic-radius: 12px;
}

/* Global Font & Background */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    background-color: #f1f5f9 !important; /* Slightly darker gray for better white-input contrast */
    color: #1e293b !important;
}

/* Card Modernization */
.card {
    border: none !important;
    border-radius: var(--stegic-radius) !important;
    box-shadow: var(--stegic-card-shadow) !important;
    background: #ffffff !important;
    margin-bottom: 0.75rem !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.25rem !important;
}

.card-body {
    padding: 1.25rem !important;
}

/* Button Upgrades */
.btn-primary {
    background-color: var(--stegic-primary) !important;
    border-color: var(--stegic-primary) !important;
    border-radius: 8px !important;
    padding: 0.6rem 1.25rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.btn-primary:hover {
    background-color: var(--stegic-primary-hover) !important;
    border-color: var(--stegic-primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
}

/* Soft Status Badges */
.badge {
    padding: 0.5em 0.8em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-transform: capitalize !important;
}

/* Success */
.badge-success, .alert-success {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: none !important;
}

/* Danger */
.badge-danger, .alert-danger {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: none !important;
}

/* Warning */
.badge-warning, .alert-warning {
    background-color: #fef9c3 !important;
    color: #a16207 !important;
    border: none !important;
    border-radius: 6px !important;
}

/* Info */
.badge-info, .alert-info, .badge-soft-primary {
    background-color: #e0f2fe !important;
    color: var(--stegic-primary) !important;
    border: none !important;
}

/* Navbar & Sidebar Subtle Enhancements */
.navbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.sidebar {
    border-right: 1px solid #f1f5f9 !important;
}

.sidebar .sidebar-header {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* --- Phase 3: Premium Data Tables --- */
.table-responsive {
    border-radius: 12px;
    overflow-x: auto !important;
    box-shadow: var(--stegic-card-shadow);
    -webkit-overflow-scrolling: touch;
}

.table {
    color: #1e293b !important;
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table thead th {
    background: rgba(248, 250, 252, 0.9) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-transform: uppercase !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    color: #475569 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 1.1rem 1rem !important;
}

.table tbody td {
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1rem !important;
    font-weight: 500;
    transition: background-color 0.2s;
}

.table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* Gradient Status Badges */
.badge-premium {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 80px !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.badge-premium-success {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
    color: #ffffff !important;
}

.badge-premium-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

/* Neon Status Chips */
.badge-neon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    border-radius: 20px !important;
    background: rgba(15, 23, 42, 0.05) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    transition: all 0.3s ease !important;
}

.badge-neon::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge-neon-success {
    color: #059669 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1) !important;
}

.badge-neon-success::before {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-green 2s infinite;
}

.badge-neon-danger {
    color: #dc2626 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.badge-neon-danger::before {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Modern Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #64748b !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-action i {
    font-size: 1.1rem !important;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-action-edit:hover {
    color: var(--stegic-primary) !important;
    border-color: var(--stegic-primary) !important;
    background: rgba(37, 99, 235, 0.05) !important;
}

.btn-action-delete:hover {
    color: #ef4444 !important;
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

/* ============================================================
   Sidebar Width: 260px (up from 240px theme default)
   Targets only the expanded state so folded icon-only mode is unaffected.
   ============================================================ */

/* Expanded sidebar */
body:not(.sidebar-folded) .sidebar,
body:not(.sidebar-folded) .sidebar .sidebar-header {
    width: 260px !important;
}
body:not(.sidebar-folded) .page-wrapper {
    margin-left: 260px !important;
}
body:not(.sidebar-folded) .navbar:not(.top-navbar) {
    left: 260px !important;
}

/* Hover-expanded folded sidebar (open-sidebar-folded) */
body.sidebar-folded.open-sidebar-folded .sidebar,
body.sidebar-folded.open-sidebar-folded .sidebar .sidebar-header {
    width: 260px !important;
}

/* Show logo in sidebar header when sidebar hover-expands.
   Theme hides it for ALL sidebar-folded states; we re-show it on hover. */
body.sidebar-folded.open-sidebar-folded .sidebar .sidebar-header .sidebar-brand {
    display: flex !important;
    align-items: center !important;
    opacity: 0;
    visibility: visible !important;
    width: auto !important;
    animation: sidebar-logo-fadein 0.25s ease forwards;
    animation-delay: 0.08s;
}
body.sidebar-folded.open-sidebar-folded .sidebar .sidebar-header .sidebar-brand img {
    height: 30px !important;
    width: auto !important;
}
@keyframes sidebar-logo-fadein {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Clean Room: Sidebar & Topbar — enterprise blue polish
   ============================================================ */

/* Section category labels */
.sidebar .sidebar-body .nav .nav-item.nav-category {
    color: #94a3b8 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding: 22px 20px 10px !important;
}

/* Reduce theme's excessive nav padding (25px top / 50px bottom) */
.sidebar .sidebar-body .nav {
    padding-top: 12px !important;
    padding-bottom: 16px !important;
}

/* Top-level nav link: pill shape — add border-radius + margin so active bg floats */
.sidebar .sidebar-body .nav > .nav-item > .nav-link {
    border-radius: 6px !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
    color: #475569 !important;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s !important;
    overflow: visible !important;
}
.sidebar .sidebar-body .nav > .nav-item > .nav-link:hover {
    background: #f1f5f9 !important;
    color: #2563eb !important;
}
.sidebar .sidebar-body .nav > .nav-item.active > .nav-link {
    background: #eff6ff !important;
    color: #1e40af !important;
    font-weight: 500 !important;
}

/* Icon colors */
.sidebar .sidebar-body .nav .nav-link .link-icon {
    color: #94a3b8 !important;
    transition: color 0.15s !important;
}
.sidebar .sidebar-body .nav .nav-item.active > .nav-link .link-icon,
.sidebar .sidebar-body .nav .nav-item > .nav-link:hover .link-icon {
    color: #2563eb !important;
}

/* Sub-menu first-level items: muted by default, blue on hover/active */
.sidebar .sidebar-body .nav.sub-menu > .nav-item > .nav-link {
    color: #64748b !important;
    transition: color 0.15s !important;
}
.sidebar .sidebar-body .nav.sub-menu > .nav-item > .nav-link:hover {
    color: #2563eb !important;
}
.sidebar .sidebar-body .nav.sub-menu > .nav-item > .nav-link.active {
    color: #1e40af !important;
    font-weight: 600 !important;
}

/* Topbar: force flex so all siblings (toggler, logo, content) sit on one centred row */
.navbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    height: 60px !important;
    padding: 0 !important;
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    border-bottom: 1px solid #e8ecf4 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

/* Logo in topbar — shown only when sidebar is folded (icon-only) */
.navbar-fold-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    /* Hidden by default: opacity 0 keeps space reserved so layout doesn't jump */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-left: 25px;   /* aligns logo left-edge with page-content padding */
    margin-right: 16px;
}
/* Folded sidebar (icon-only) — show logo */
body.sidebar-folded:not(.open-sidebar-folded) .navbar-fold-logo {
    opacity: 1;
    pointer-events: auto;
}

/* navbar-content stretches to fill remaining space; items pushed right via margin-left: auto on navbar-nav */
.navbar .navbar-content {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 100% !important;
    padding-left: 0 !important;
    padding-right: 24px !important;
}

/* navbar-nav row: all items vertically centred, gap between them */
.navbar .navbar-content .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-left: auto !important;
    gap: 4px !important;
    height: 100% !important;
}

/* Sidebar Text Wrapping for Long Labels */
.sidebar .sidebar-body .nav .nav-item .nav-link {
    white-space: normal !important;
    line-height: 1.4 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Folded (icon-only) state — tighten nav-links and centre icons */
.sidebar-folded:not(.open-sidebar-folded) .sidebar .sidebar-body .nav .nav-item .nav-link {
    height: 32px !important;
    white-space: nowrap !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
/* Remove pill margins so icons sit centred in the 70px strip */
.sidebar-folded:not(.open-sidebar-folded) .sidebar .sidebar-body .nav > .nav-item > .nav-link {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
}
/* Hide tree-branch connector and toggle pip — no sub-menus visible when folded */
.sidebar-folded:not(.open-sidebar-folded) .sidebar .sidebar-body .nav.sub-menu .collapse {
    border-left: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.sidebar-folded:not(.open-sidebar-folded) .sidebar .sidebar-body .nav.sub-menu .nav-link.nested-group-toggle {
    border-left: none !important;
}

/* Restore wrapping when minimized sidebar is expanded on hover — match click-open padding */
.sidebar-folded.open-sidebar-folded .sidebar .sidebar-body .nav .nav-item .nav-link {
    white-space: normal !important;
    height: auto !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Hide section labels in purely folded (icon-only) state — they render as
   misaligned dots with no readable text. They reappear on sidebar hover. */
.sidebar-folded:not(.open-sidebar-folded) .sidebar .sidebar-body .nav .nav-item.nav-category {
    display: none !important;
}

.sidebar .sidebar-body .nav .nav-item .nav-link .link-icon {
    flex-shrink: 0 !important;
}

/* --- Phase 2: Authentication Experience --- */

/* Login Page Background - Modern Mesh Gradient */
.page-content.d-flex.align-items-center.justify-content-center {
    background-color: #f1f5f9;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(29, 78, 216, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%);
    min-height: 100vh;
}

/* Auth Card Refinement - Glassmorphism */
.auth-page .card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
    animation: fadeInSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Auth Form Styling */
.auth-form-wrapper {
    background: rgba(255, 255, 255, 0.6);
}

.auth-form-wrapper .form-label {
    font-weight: 700 !important; /* Significantly bolder as requested */
    color: #1e293b !important;
    font-size: 0.875rem;
    margin-bottom: 0.6rem;
}

/* Icon-Integrated Inputs */
.auth-input-group {
    position: relative;
    width: 100%;
}

.auth-input-group i,
.auth-input-group svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.2s;
    width: 18px;
    height: 18px;
    z-index: 10;
    pointer-events: none;
}

.auth-input-group .form-control {
    padding-left: 2.75rem !important;
    text-align: left !important;
    height: 3.2rem;
    background-color: #ffffff !important; /* Pure white for high contrast */
    border: 1.5px solid #cbd5e1 !important; /* Defined border */
    border-radius: 10px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.auth-input-group .form-control:focus {
    background-color: #ffffff !important;
    border-color: var(--stegic-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.auth-input-group .form-control:focus + i,
.auth-input-group .form-control:focus ~ svg {
    color: var(--stegic-primary);
}

/* Error States for Custom Inputs */
.auth-input-group .form-control.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.auth-input-group .form-control.is-invalid + i,
.auth-input-group .form-control.is-invalid ~ svg {
    color: #ef4444;
}

/* Login Button Premium Look */
.auth-form-wrapper .btn-primary {
    width: 100%;
    height: 3.2rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--stegic-primary) 0%, #1d4ed8 100%) !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1) !important;
}

.auth-form-wrapper .btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.2) !important;
    transform: translateY(-1px);
}

/* Responsive Image Handling */
@media (max-width: 767px) {
    .auth-page .card .noble-ui-logo img {
        height: auto !important; /* Prevent logo skewing */
        width: 140px !important; /* Slightly smaller for mobile if needed, or keep 160 */
    }
    
    /* Only apply height to decorative/side images if they are visible */
    .auth-page .card img:not([alt="logo"]) {
        height: 200px !important;
        object-fit: cover;
    }
}
/* --- Phase 4: Premium Form System --- */
body .stegic-form .form-label {
    font-weight: 700 !important;
    color: #6b7280 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

body .stegic-form .form-control, 
body .stegic-form .form-select {
    height: 42px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important; /* Slightly thicker for visibility */
    border-radius: 8px !important;
    color: #0f172a !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

body .stegic-form .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 0.7 !important;
}

body .stegic-form .form-control:focus, 
body .stegic-form .form-select:focus {
    border-color: var(--stegic-primary) !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Merged Premium Input Group */
.input-group-premium {
    display: flex !important;
    align-items: stretch !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.input-group-premium:focus-within {
    border-color: var(--stegic-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.input-group-premium .form-control {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    flex-grow: 1 !important;
}

.input-group-premium .form-select {
    border: none !important;
    border-left: 1px solid #f1f5f9 !important;
    box-shadow: none !important;
    background-color: #f8fafc !important;
    width: auto !important;
    max-width: 100px !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
    color: #64748b !important;
    font-size: 0.75rem !important;
}

.input-group-premium .input-group-text {
    background-color: #f8fafc !important;
    border: none !important;
    border-right: 1px solid #f1f5f9 !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

/* Custom Textarea styling */
.stegic-form textarea.form-control {
    height: auto !important;
    padding-top: 10px !important;
}


/* Warehouse & Stock Management Premium Components */
.btn-stegic-outline {
    background-color: #ffffff;
    border: 1.5px solid #4a6cf7;
    color: #4a6cf7;
    transition: all 0.25s ease;
    font-weight: 600;
}

.btn-stegic-outline:hover {
    background-color: #4a6cf7 !important;
    color: #ffffff !important;
    border-color: #4a6cf7;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.25);
    transform: translateY(-1px);
}

.btn-stegic-outline i {
    transition: transform 0.25s ease;
}

.btn-stegic-outline:hover i {
    transform: rotate(15deg);
    color: #ffffff !important;
}

.badge-neon-success {
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    border: 1px solid rgba(40, 167, 69, 0.4) !important;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.2);
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.65rem !important;
}

/* Premium Custom Switch for Security Controls */
.custom-switch-premium {
    padding-left: 3rem !important;
    min-height: 24px;
}

.custom-switch-premium .form-check-input {
    width: 3rem !important;
    height: 1.5rem !important;
    margin-left: -3rem !important;
    background-image: none !important;
    background-color: #cbd5e1 !important;
    border: none !important;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
}

.custom-switch-premium .form-check-input:checked {
    background-color: var(--stegic-primary) !important;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4) !important;
}

.custom-switch-premium .form-check-input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-switch-premium .form-check-input:checked::after {
    transform: translateX(1.5rem) !important;
}

.custom-switch-premium .form-check-label {
    padding-top: 2px;
    cursor: pointer;
    font-size: 0.85rem !important;
    color: #475569 !important;
}

.custom-switch-premium .form-check-input:checked + .form-check-label {
    color: var(--stegic-primary) !important;
}

/* Animation utilities */
.animate__animated {
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate__fadeIn {
    animation-name: fadeIn;
}

/* --- Mobile Responsiveness Enhancements --- */
@media (max-width: 768px) {
    /* Enable horizontal scroll for any tab-line navigation */
    .nav-tabs-line, .nav-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .nav-tabs-line .nav-item, .nav-tabs .nav-item {
        flex: 0 0 auto !important;
    }

    /* Hide scrollbars for cleaner tab UI */
    .nav-tabs-line::-webkit-scrollbar, .nav-tabs::-webkit-scrollbar {
        height: 0px;
        background: transparent;
    }

    /* Adjust padding for mobile to save space */
    .card-body {
        padding: 1rem !important;
    }

    .table td, .table th {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    /* Reset sidebar spacing on mobile to prevent empty left column */
    .page-wrapper, .main-wrapper, .navbar {
        margin-left: 0 !important;
        padding-left: 0 !important;
        left: 0 !important;
        width: 100% !important;
    }

    .sidebar {
        z-index: 1001 !important; /* Ensure sidebar is above content when opened */
    }
}

/* --- Phase 5: Production Profile Micro-Layout --- */
.production-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem 0.8rem;
    padding: 0.45rem 0.75rem;
    background: rgba(248, 250, 252, 0.7) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    min-width: 240px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #475569 !important;
}

.profile-item i {
    font-size: 0.95rem !important;
    width: 16px;
    text-align: center;
}

.profile-item span {
    white-space: nowrap;
}

/* Stock Master — inline on/off toggle switch */
.stock-toggle {
    display: inline-flex;
    align-items: center;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    padding: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}
.stock-toggle-on {
    background-color: var(--stegic-primary);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.35);
    justify-content: flex-end;
}
.stock-toggle-off {
    background-color: #cbd5e1;
    justify-content: flex-start;
}
.stock-toggle-knob {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    pointer-events: none;
}

