/* ===============================================
   WPPPL - Premium Modern Warehouse & POS Styles
   =============================================== */

/* CSS Variables - Premium Design System */
:root {
    /* Primary — Indigo/Violet gradient family */
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-primary-subtle: #eef2ff;

    /* Secondary */
    --color-secondary: #64748b;
    --color-secondary-dark: #475569;
    --color-secondary-light: #94a3b8;

    /* Status Colors */
    --color-success: #10b981;
    --color-success-subtle: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-subtle: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-subtle: #fee2e2;
    --color-info: #06b6d4;
    --color-info-subtle: #cffafe;
    --color-discount: #f43f5e;
    --color-discount-subtle: #ffe4e6;

    /* Neutral Palette */
    --color-dark: #0f172a;
    --color-gray-900: #0f172a;
    --color-gray-800: #1e293b;
    --color-gray-700: #334155;
    --color-gray-600: #475569;
    --color-gray-500: #64748b;
    --color-gray-400: #94a3b8;
    --color-gray-300: #cbd5e1;
    --color-gray-200: #e2e8f0;
    --color-gray-100: #f1f5f9;
    --color-gray-50: #f8fafc;
    --color-white: #ffffff;

    /* Backgrounds */
    --bg-primary: #f5f7ff;
    --bg-secondary: #ffffff;
    --bg-dark: #0f172a;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    /* Shadows — color-tinted for depth */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.15), 0 8px 16px rgba(15, 23, 42, 0.07);
    --shadow-2xl: 0 32px 64px rgba(15, 23, 42, 0.2);
    --shadow-primary: 0 8px 24px rgba(99, 102, 241, 0.3);
    --shadow-success: 0 8px 24px rgba(16, 185, 129, 0.3);
    --shadow-danger: 0 8px 24px rgba(239, 68, 68, 0.3);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.75rem;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9375rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Utility Classes */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-white) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-info { color: var(--color-info) !important; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }
.fw-normal { font-weight: 400; }

.d-none  { display: none !important; }
.d-block { display: block !important; }
.d-flex  { display: flex !important; }
.d-grid  { display: grid !important; }

.w-100 { width: 100%; }
.w-auto { width: auto; }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-md) * -0.5);
    gap: var(--spacing-md) 0;
}

.col {
    flex: 1;
    padding: 0 calc(var(--spacing-md) * 0.5);
}

/* Base column sizes */
.col-1  { flex: 0 0 8.333333%;  max-width: 8.333333%;  padding: 0 calc(var(--spacing-md) * 0.5); }
.col-2  { flex: 0 0 16.666667%; max-width: 16.666667%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-3  { flex: 0 0 25%;        max-width: 25%;        padding: 0 calc(var(--spacing-md) * 0.5); }
.col-4  { flex: 0 0 33.333333%; max-width: 33.333333%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-5  { flex: 0 0 41.666667%; max-width: 41.666667%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-6  { flex: 0 0 50%;        max-width: 50%;        padding: 0 calc(var(--spacing-md) * 0.5); }
.col-7  { flex: 0 0 58.333333%; max-width: 58.333333%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-8  { flex: 0 0 66.666667%; max-width: 66.666667%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-9  { flex: 0 0 75%;        max-width: 75%;        padding: 0 calc(var(--spacing-md) * 0.5); }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; padding: 0 calc(var(--spacing-md) * 0.5); }
.col-12 { flex: 0 0 100%;       max-width: 100%;       padding: 0 calc(var(--spacing-md) * 0.5); }

/* Mobile-first: col-md-* default to 100% on small screens */
.col-md-1, .col-md-2, .col-md-3, .col-md-4,
.col-md-5, .col-md-6, .col-md-7, .col-md-8,
.col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 calc(var(--spacing-md) * 0.5);
}

/* Medium breakpoint (≥768px) */
@media (min-width: 768px) {
    .col-md-1  { flex: 0 0 8.333333%;  max-width: 8.333333%;  }
    .col-md-2  { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3  { flex: 0 0 25%;        max-width: 25%;        }
    .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6  { flex: 0 0 50%;        max-width: 50%;        }
    .col-md-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9  { flex: 0 0 75%;        max-width: 75%;        }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%;       max-width: 100%;       }
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-gray-200);
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: var(--spacing-xl);
}

.card-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--color-gray-200);
    background: var(--color-gray-50);
}

/* Gradient Cards - Now using minimal solid colors */
.card-gradient-primary {
    background: var(--color-primary);
    color: var(--text-white);
}

.card-gradient-secondary {
    background: var(--color-gray-700);
    color: var(--text-white);
}

.card-gradient-success {
    background: var(--color-success);
    color: var(--text-white);
}

.card-gradient-danger {
    background: var(--color-danger);
    color: var(--text-white);
}

/* Glassmorphism Card */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--text-primary);
    border: 1px solid var(--color-gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-gray-100);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--text-white);
    box-shadow: var(--shadow-success);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--gradient-danger);
    color: var(--text-white);
    box-shadow: var(--shadow-danger);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--color-warning);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-info {
    background: var(--color-info);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--color-primary);
    color: var(--text-white);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: var(--radius-full);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    background-clip: padding-box;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    appearance: none;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    flex: 1;
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    background-color: var(--color-gray-100);
    border: 1px solid var(--color-gray-300);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    /* Removed max-height — let page scroll naturally */
}

.table-modern {
    width: 100%;
    min-width: 600px; /* ensures table is side-scrollable on mobile */
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-modern thead {
    background: var(--gradient-dark);
    color: var(--text-white);
}

.table-modern thead th {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--color-gray-200);
    transition: background var(--transition-fast);
}

.table-modern tbody tr:hover {
    background: var(--color-gray-50);
}

.table-modern tbody tr:last-child {
    border-bottom: none;
}

.table-modern tbody td {
    padding: 1.125rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Action buttons inside table cells */
.table-modern tbody td .btn + .btn {
    margin-left: 0.375rem;
}

.table-modern tbody td > .btn,
.table-modern tbody td > form {
    display: inline-flex;
}

/* Table footer */
.table-modern tfoot tr {
    background: var(--color-gray-100);
    border-top: 2px solid var(--color-gray-300);
}

.table-modern tfoot th,
.table-modern tfoot td {
    padding: 0.875rem 1.125rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: var(--color-primary-subtle);
    color: var(--color-primary-dark);
}

.badge-success {
    background: var(--color-success-subtle);
    color: #065f46;
}

.badge-danger {
    background: var(--color-danger-subtle);
    color: #991b1b;
}

.badge-warning {
    background: var(--color-warning-subtle);
    color: #92400e;
}

.badge-discount {
    background: var(--color-discount-subtle);
    color: var(--color-discount);
    font-weight: 700;
    gap: 0.2rem;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--color-success);
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: var(--color-danger);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--color-warning);
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--color-info);
    color: #1e40af;
}

.alert-dismissible {
    padding-right: 3rem;
}

.btn-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background-color: var(--bg-secondary);
    margin: auto;
    padding: 0;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-2xl);
    animation: slideDown var(--transition-slow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--color-gray-200);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu Toggle — hidden on desktop, shown via media query */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
}

/* Lucide Icon Styling */
.lucide {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2px;
    vertical-align: middle;
}

.nav-icon .lucide {
    width: 1.5rem;
    height: 1.5rem;
}

.widget-icon .lucide {
    width: 2rem;
    height: 2rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn var(--transition-base);
}

.slide-down {
    animation: slideDown var(--transition-slow);
}

.slide-in-right {
    animation: slideInRight var(--transition-slow);
}

/* Responsive */
@media (max-width: 768px) {
    .col,
    [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 1rem;
    }
}

/* ===============================================
   Skeleton Loading System
   =============================================== */

@keyframes skeletonShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-gray-200) 25%,
        var(--color-gray-100) 50%,
        var(--color-gray-200) 75%
    );
    background-size: 1200px 100%;
    animation: skeletonShimmer 1.5s infinite linear;
    border-radius: var(--radius-md);
    display: block;
}

/* Variants */
.skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.skeleton-text.sm  { height: 0.75rem; }
.skeleton-text.lg  { height: 1.125rem; }
.skeleton-text.xl  { height: 1.5rem; }

.skeleton-title {
    height: 1.5rem;
    width: 55%;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
}

.skeleton-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.skeleton-btn {
    height: 2.25rem;
    width: 7rem;
    border-radius: var(--radius-md);
    display: inline-block;
}

/* Skeleton Card */
.skeleton-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

/* Skeleton Table Row */
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-gray-200);
}

.skeleton-row .skeleton-avatar { width: 2rem; height: 2rem; }
.skeleton-row .skeleton-cell   { flex: 1; height: 0.75rem; border-radius: var(--radius-sm); }
.skeleton-row .skeleton-badge  { width: 3.5rem; height: 1.25rem; border-radius: var(--radius-full); }

/* Skeleton Widget (dashboard stat cards) */
.skeleton-widget {
    background: var(--bg-secondary);
    border: 1px solid rgba(99,102,241,0.06);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

/* Skeleton Product Grid */
.skeleton-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.skeleton-product-card {
    background: var(--bg-secondary);
    border: 1.5px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===============================================
   Page Transition Progress Bar
   =============================================== */

#page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
    z-index: 99999;
    width: 0%;
    transition: width 0.3s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

#page-progress.active {
    opacity: 1;
}

/* Page-level skeleton content overlay */
#skeleton-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#skeleton-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* Content fade-in on load */
.page-fade-in {
    animation: pageFadeIn 0.35s ease-out forwards;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
