
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/inter-v20-latin-300.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-v20-latin-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-v20-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-v20-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-v20-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/inter-v20-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =============================================================================
   DESIGN SYSTEM — PREMIUM SAAS TOKENS
   ============================================================================= */

:root {
    /* ── Surface / Backgrounds ── */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #f8fafc;

    /* ── Text ── */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    /* ── Accent Colors (Soft Pastel Modern) ── */
    --accent-primary: #4f6ef7;
    --accent-primary-hover: #3b5de7;
    --accent-primary-light: rgba(79, 110, 247, 0.08);
    --accent-primary-border: rgba(79, 110, 247, 0.2);
    --accent-secondary: #38bdf8;
    --accent-secondary-hover: #0ea5e9;
    --accent-success: #34d399;
    --accent-success-hover: #10b981;
    --accent-warning: #fbbf24;
    --accent-warning-hover: #f59e0b;
    --accent-danger: #f87171;
    --accent-danger-hover: #ef4444;

    /* ── Borders ── */
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* ── Table Headers ── */
    --table-header-bg: rgba(241, 245, 249, 0.92);

    /* ── Glass ── */
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(226, 232, 240, 0.6);

    /* ── Typography ── */
    --font-outfit: 'Outfit', 'Inter', sans-serif;
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Shadows (Ultra Subtle) ── */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(79, 110, 247, 0.12);
    --shadow-btn-primary: 0 4px 14px -2px rgba(79, 110, 247, 0.35);

    /* ── Radii ── */
    --border-radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-pill: 100px;

    /* ── Transitions ── */
    --transition-speed: 0.2s;
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}


/* =============================================================================
   GLOBAL RESET & BASE
   ============================================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-inter);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}


/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-outfit);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.3;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}


/* =============================================================================
   CUSTOM SCROLLBAR
   ============================================================================= */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-pill);
}

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


/* =============================================================================
   HEADER / NAVIGATION
   ============================================================================= */

.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1.75rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow var(--transition-speed) ease;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(79, 110, 247, 0.25);
}

.logo-text {
    font-family: var(--font-outfit);
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-inter);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-speed) var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-primary);
    background-color: var(--accent-primary-light);
}

.nav-link.active {
    color: var(--accent-primary);
    background-color: var(--accent-primary-light);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: var(--radius-pill);
}

/* Navigation Dropdown Menu Styling */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    font-family: var(--font-inter);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-speed) var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active {
    color: var(--accent-primary);
    background-color: var(--accent-primary-light);
    font-weight: 600;
}

.nav-dropdown-toggle .chevron-icon {
    font-size: 0.95rem;
    transition: transform var(--transition-speed) ease;
}

.nav-dropdown:hover .nav-dropdown-toggle .chevron-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 195px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    padding: 0.4rem;
    z-index: 1050;
    margin-top: 0.25rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInDropdown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
}

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

.nav-dropdown-item.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    font-weight: 700;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.user-badge:hover {
    border-color: var(--accent-primary-border);
}

.btn-logout {
    color: var(--accent-danger);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.btn-logout:hover {
    background: rgba(248, 113, 113, 0.08);
}


/* =============================================================================
   MAIN LAYOUT CONTAINER
   ============================================================================= */

.container {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
    animation: pageIn 0.35s var(--transition-smooth);
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-speed) var(--transition-smooth);
}

.card:hover {
    border-color: var(--accent-primary-border);
    box-shadow: var(--shadow-card-hover);
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
}


/* =============================================================================
   INPUTS & FORMS
   ============================================================================= */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 0.92rem;
    transition: all var(--transition-speed) var(--transition-smooth);
    line-height: 1.5;
}

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

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
    background-color: var(--bg-secondary);
}

.form-control:hover:not(:focus) {
    border-color: #cbd5e1;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}


/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font-inter);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) var(--transition-smooth);
    position: relative;
    letter-spacing: 0.01em;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #6366f1);
    color: white;
    box-shadow: var(--shadow-btn-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), #4f46e5);
    box-shadow: 0 6px 20px -2px rgba(79, 110, 247, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), #ef4444);
    color: white;
    box-shadow: 0 4px 14px -2px rgba(248, 113, 113, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--accent-danger-hover), #dc2626);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #10b981);
    color: white;
    box-shadow: 0 4px 14px -2px rgba(52, 211, 153, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--accent-success-hover), #059669);
    transform: translateY(-1px);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all var(--transition-speed) var(--transition-smooth);
}

/* Action button variations (Celeste/Ver, Rojo/Eliminar, Crema/Editar) */
.btn-action-view,
.btn-icon[title*="Ver"], 
.btn-icon[title*="ver"],
.btn-icon[title*="Detalle"],
.btn-icon[title*="detalle"] {
    background-color: #f0f9ff !important;
    color: #0369a1 !important;
    border: 1.5px solid #e0f2fe !important;
}
.btn-action-view:hover,
.btn-icon[title*="Ver"]:hover, 
.btn-icon[title*="ver"]:hover,
.btn-icon[title*="Detalle"]:hover,
.btn-icon[title*="detalle"]:hover {
    background-color: #e0f2fe !important;
    border-color: #bae6fd !important;
    transform: translateY(-1px);
}

.btn-action-edit,
.btn-icon[title*="Editar"], 
.btn-icon[title*="editar"] {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1.5px solid #fef3c7 !important;
}
.btn-action-edit:hover,
.btn-icon[title*="Editar"]:hover, 
.btn-icon[title*="editar"]:hover {
    background-color: #fef3c7 !important;
    border-color: #fde68a !important;
    transform: translateY(-1px);
}

.btn-action-delete,
.btn-icon[title*="Eliminar"], 
.btn-icon[title*="eliminar"],
.btn-icon[title*="Descartar"],
.btn-icon[title*="descartar"] {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1.5px solid #fee2e2 !important;
}
.btn-action-delete:hover,
.btn-icon[title*="Eliminar"]:hover, 
.btn-icon[title*="eliminar"]:hover,
.btn-icon[title*="Descartar"]:hover,
.btn-icon[title*="descartar"]:hover {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    transform: translateY(-1px);
}

.btn-action-print,
.btn-icon[title*="Imprimir"], 
.btn-icon[title*="imprimir"] {
    background-color: #faf5ff !important;
    color: #6b21a8 !important;
    border: 1.5px solid #f3e8ff !important;
}
.btn-action-print:hover,
.btn-icon[title*="Imprimir"]:hover, 
.btn-icon[title*="imprimir"]:hover {
    background-color: #f3e8ff !important;
    border-color: #e9d5ff !important;
    transform: translateY(-1px);
}

.btn-action-success,
.btn-icon[title*="Registrar"], 
.btn-icon[title*="registrar"],
.btn-icon[title*="Vincular"],
.btn-icon[title*="vincular"] {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1.5px solid #d1fae5 !important;
}
.btn-action-success:hover,
.btn-icon[title*="Registrar"]:hover, 
.btn-icon[title*="registrar"]:hover,
.btn-icon[title*="Vincular"]:hover,
.btn-icon[title*="vincular"]:hover {
    background-color: #d1fae5 !important;
    border-color: #a7f3d0 !important;
    transform: translateY(-1px);
}



/* =============================================================================
   STATUS BADGES (PILL STYLE)
   ============================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 0.3rem;
}

.badge-pending {
    background-color: rgba(251, 191, 36, 0.12);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-paid {
    background-color: rgba(52, 211, 153, 0.12);
    color: #059669;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.badge-cancelled {
    background-color: rgba(248, 113, 113, 0.12);
    color: #dc2626;
    border: 1px solid rgba(248, 113, 113, 0.25);
}

.badge-packed {
    background-color: rgba(56, 189, 248, 0.12);
    color: #0284c7;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-registered {
    background-color: rgba(79, 110, 247, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(79, 110, 247, 0.25);
}

.badge-shipped {
    background-color: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.25);
}


/* =============================================================================
   DASHBOARD GRID & KPI CARDS
   ============================================================================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1.5rem 1.75rem;
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-purple {
    background: linear-gradient(135deg, rgba(79, 110, 247, 0.12), rgba(99, 102, 241, 0.08));
    color: var(--accent-primary);
    border: 1px solid rgba(79, 110, 247, 0.15);
}

.kpi-cyan {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(6, 182, 212, 0.08));
    color: #0ea5e9;
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.kpi-green {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(16, 185, 129, 0.08));
    color: #059669;
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.kpi-orange {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.08));
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    font-family: var(--font-outfit);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.2rem;
}


/* =============================================================================
   POS SALES LAYOUT
   ============================================================================= */

.pos-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - 120px);
}

@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.pos-catalog-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.pos-cart-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-card);
}


/* =============================================================================
   AUTOCOMPLETE / SEARCH
   ============================================================================= */

.search-container {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-elevated);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color var(--transition-speed);
    font-size: 0.9rem;
}

.autocomplete-item:hover {
    background-color: var(--accent-primary-light);
}

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


/* =============================================================================
   VARIANT SELECTORS
   ============================================================================= */

.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.variant-btn {
    border: 1.5px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-smooth);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.variant-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary-light);
    transform: translateY(-1px);
}

.variant-btn.active {
    border-color: var(--accent-primary);
    background-color: rgba(79, 110, 247, 0.1);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
}

.variant-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background-color: var(--bg-tertiary);
}

.variant-stock {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stock-low {
    color: var(--accent-warning-hover);
}

.stock-out {
    color: var(--accent-danger);
}


/* =============================================================================
   QUICK QTY MODIFIERS
   ============================================================================= */

.qty-selectors {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-qty {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-speed) var(--transition-smooth);
    font-weight: 600;
}

.btn-qty:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}


/* =============================================================================
   POS CART
   ============================================================================= */

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    margin: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0.25rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 0.5fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color var(--transition-speed);
}

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

.cart-item:hover {
    background-color: var(--accent-primary-light);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.cart-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-variant {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-item-qty input {
    width: 45px;
    padding: 0.3rem;
    text-align: center;
    background-color: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-weight: 600;
    transition: border-color var(--transition-speed);
}

.cart-item-qty input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.1);
}

.cart-item-price {
    font-size: 0.88rem;
    font-weight: 700;
    text-align: right;
    font-family: var(--font-outfit);
    color: var(--text-primary);
}

.cart-totals {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.cart-total-row.grand-total {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--font-outfit);
    border-top: 2px solid var(--border-color);
    padding-top: 0.85rem;
    color: var(--text-primary);
}


/* =============================================================================
   MODALS
   ============================================================================= */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--transition-smooth);
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 1.75rem;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s var(--transition-bounce);
    box-shadow: var(--shadow-elevated);
}

.modal-backdrop.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-tertiary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.modal-close:hover {
    color: var(--accent-danger);
    background-color: rgba(248, 113, 113, 0.08);
}


/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-elevated);
    min-width: 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: toastSlideIn 0.4s var(--transition-bounce) forwards;
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-success {
    border-left-color: var(--accent-success);
}

.toast-error {
    border-left-color: var(--accent-danger);
}

.toast-info {
    border-left-color: var(--accent-secondary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* =============================================================================
   TABLES
   ============================================================================= */

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-secondary);
}

.table th,
.table td {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
}

.table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--table-header-bg) !important;
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-inter);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all var(--transition-speed);
}

.table th:hover {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary);
}

/* Icons inside headers */
.table th i,
.products-table-modern thead th i,
.orders-table-modern thead th i,
.customers-table-modern thead th i,
.dashboard-orders-table-modern thead th i,
.reports-products-table-modern thead th i,
.reports-summary-table-modern thead th i {
    font-size: 0.88rem;
    margin-right: 0.35rem;
    vertical-align: middle;
    color: var(--accent-primary);
    transition: transform var(--transition-speed);
    display: inline-block;
}

/* Header hover effect to pop icons slightly */
.table th:hover i,
.products-table-modern thead th:hover i,
.orders-table-modern thead th:hover i,
.customers-table-modern thead th:hover i,
.dashboard-orders-table-modern thead th:hover i,
.reports-products-table-modern thead th:hover i,
.reports-summary-table-modern thead th:hover i {
    transform: translateY(-1px) scale(1.1);
}



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

.table tbody tr {
    transition: background-color var(--transition-speed);
}

.table tbody tr:hover {
    background-color: var(--accent-primary-light);
}
.actions-cell {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    align-items: center;
}

.btn-danger i,
.btn-danger i.bx {
    color: #ffffff !important;
}


/* Centrado global de todas las columnas en tablas del sistema */
.orders-table-modern th, .orders-table-modern td,
.products-table-modern th, .products-table-modern td,
.customers-table-modern th, .customers-table-modern td,
.dashboard-orders-table-modern th, .dashboard-orders-table-modern td,
.reports-products-table-modern th, .reports-products-table-modern td,
.reports-summary-table-modern th, .reports-summary-table-modern td,
.table th, .table td {
    text-align: center !important;
}

/* Centrado de elementos Flexbox/divs dentro de celdas */
.orders-table-modern td div, .orders-table-modern th div,
.products-table-modern td div, .products-table-modern th div,
.customers-table-modern td div, .customers-table-modern th div,
.dashboard-orders-table-modern td div, .dashboard-orders-table-modern th div,
.reports-products-table-modern td div, .reports-products-table-modern th div,
.reports-summary-table-modern td div, .reports-summary-table-modern th div,
.table td div, .table th div,
.orders-table-modern td form, .orders-table-modern th form {
    justify-content: center !important;
    text-align: center !important;
}

/* Centrado de celdas de cabeceras en las tablas Grid Modernas */
.orders-table-modern thead th,
.products-table-modern thead th,
.customers-table-modern thead th,
.dashboard-orders-table-modern thead th,
.reports-products-table-modern thead th,
.reports-summary-table-modern thead th {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
}


/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    body.printing-invoice * {
        visibility: hidden;
    }

    body.printing-invoice #invoice-print-area,
    body.printing-invoice #invoice-print-area * {
        visibility: visible;
    }

    body.printing-invoice #invoice-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: black !important;
        background: white !important;
        padding: 20px;
    }

    .no-print {
        display: none !important;
    }
}


/* =============================================================================
   POS INTERACTIVE CATALOG CARDS
   ============================================================================= */

.product-item-card {
    transition: all var(--transition-speed) var(--transition-smooth);
}

.product-item-card:hover {
    border-color: var(--accent-primary) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover) !important;
    background-color: var(--bg-secondary) !important;
}


/* =============================================================================
   CALENDAR MODULE
   ============================================================================= */

.calendar-page {
    animation: calPageIn 0.4s var(--transition-smooth);
}

@keyframes calPageIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.calendar-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-icon-wrap {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 110, 247, 0.25);
}

.calendar-main-title {
    font-size: 1.6rem;
    font-family: var(--font-outfit);
    color: var(--text-primary);
}

.calendar-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.calendar-actions-bar {
    display: flex;
    gap: 0.75rem;
}

/* Calendar Layout: Grid + Sidebar */
.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}

.calendar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

/* Month Navigation */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.cal-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) var(--transition-smooth);
}

.cal-nav-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-btn-primary);
    transform: scale(1.05);
}

.cal-month-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cal-month-text {
    font-family: var(--font-outfit);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cal-year-badge {
    font-family: var(--font-outfit);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border-radius: 6px;
    border: 1px solid var(--accent-primary-border);
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-header-grid {
    margin-bottom: 6px;
}

.cal-day-header {
    text-align: center;
    font-family: var(--font-inter);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-day-header.cal-weekend {
    color: var(--accent-primary);
    opacity: 0.6;
}

/* Day Cells */
.cal-day {
    aspect-ratio: 1 / 1;
    min-height: 80px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.cal-day:hover {
    border-color: var(--accent-primary-border);
    background: var(--accent-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.cal-day.cal-other-month {
    opacity: 0.3;
}

.cal-day.cal-other-month:hover {
    opacity: 0.5;
}

.cal-day.cal-today {
    border-color: var(--accent-primary);
    background: var(--accent-primary-light);
}

.cal-day.cal-today .cal-day-number {
    background: var(--accent-primary);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cal-day.cal-selected {
    border-color: var(--accent-secondary);
    background: rgba(56, 189, 248, 0.06);
}

.cal-day.cal-has-orders {
    background: var(--bg-tertiary);
}

.cal-day.cal-has-orders::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.6;
}

.cal-day-number {
    font-family: var(--font-outfit);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

/* Status Dots */
.cal-day-indicators {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: auto;
}

.cal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.2); }
}

/* Day Meta Info */
.cal-day-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.15rem;
}

.cal-meta-count {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.2;
}

.cal-meta-amount {
    font-size: 0.6rem;
    color: var(--accent-success-hover);
    font-weight: 600;
    line-height: 1.2;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-pending  { background: var(--accent-warning); }
.legend-paid     { background: var(--accent-success); }
.legend-packed   { background: var(--accent-secondary); }
.legend-registered { background: var(--accent-primary); }
.legend-shipped  { background: #8b5cf6; }

/* Fade Animations */
.cal-fade-out {
    opacity: 0;
    transform: scale(0.98);
    transition: all 0.15s ease;
}

.cal-fade-in {
    animation: calFadeIn 0.3s ease;
}

@keyframes calFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}


/* =============================================================================
   CALENDAR SIDEBAR PANEL
   ============================================================================= */

.calendar-sidebar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 400px;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-card);
}

.calendar-sidebar.sidebar-active {
    border-color: var(--accent-primary-border);
    box-shadow: var(--shadow-card-hover);
}

/* Placeholder */
.sidebar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    flex: 1;
    gap: 1rem;
    color: var(--text-secondary);
}

.sidebar-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--accent-primary-light);
    border: 1px solid var(--accent-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-primary);
}

.sidebar-placeholder p {
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 240px;
}

/* Sidebar Content */
.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    animation: sidebarSlideIn 0.3s ease;
}

@keyframes sidebarSlideIn {
    from { opacity: 0; transform: translateX(15px); }
    to   { opacity: 1; transform: translateX(0); }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.75rem;
}

.sidebar-date {
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
    line-height: 1.3;
}

.sidebar-count {
    font-size: 0.78rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-top: 0.2rem;
    display: inline-block;
}

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--accent-danger);
}

/* Sidebar Orders List */
.sidebar-orders-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.sidebar-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Order Cards in Sidebar */
.sidebar-order-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    transition: all 0.2s var(--transition-smooth);
    border-left: 3px solid var(--status-accent, var(--accent-primary));
    animation: cardSlideIn 0.3s ease forwards;
    opacity: 0;
}

.sidebar-order-card:nth-child(1) { animation-delay: 0.05s; }
.sidebar-order-card:nth-child(2) { animation-delay: 0.1s; }
.sidebar-order-card:nth-child(3) { animation-delay: 0.15s; }
.sidebar-order-card:nth-child(4) { animation-delay: 0.2s; }
.sidebar-order-card:nth-child(5) { animation-delay: 0.25s; }
.sidebar-order-card:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sidebar-order-card:hover {
    border-color: var(--accent-primary-border);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-1px);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.order-card-id {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.order-card-customer {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.order-card-customer i {
    font-size: 0.9rem;
}

.order-card-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.order-card-details {
    display: flex;
    gap: 0.85rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.order-card-detail {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.order-card-detail i {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.order-card-total {
    font-family: var(--font-outfit);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-success-hover);
}

.order-card-actions {
    display: flex;
    gap: 0.35rem;
}

.btn-card-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) var(--transition-smooth);
}

/* Sidebar action button styles */
.btn-card-action[title*="Ver"] {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1.5px solid #e0f2fe;
}
.btn-card-action[title*="Ver"]:hover {
    background-color: #e0f2fe;
    border-color: #bae6fd;
    transform: scale(1.08);
}

.btn-card-action.btn-card-reschedule {
    background-color: #fffbeb;
    color: #b45309;
    border: 1.5px solid #fef3c7;
}
.btn-card-action.btn-card-reschedule:hover {
    background-color: #fef3c7;
    border-color: #fde68a;
    transform: scale(1.08);
}

.btn-card-action.btn-card-unschedule {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1.5px solid #fee2e2;
}
.btn-card-action.btn-card-unschedule:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    transform: scale(1.08);
}

/* Reschedule Row */
.order-card-reschedule-row {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    align-items: center;
    animation: calFadeIn 0.2s ease;
}

.order-card-reschedule-row .form-control {
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    flex: 1;
}

/* Small Buttons */
.btn-xs {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

.btn-sm {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
}

.form-control-sm {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
}


/* =============================================================================
   SCHEDULE MODAL
   ============================================================================= */

.schedule-modal-list {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-loading,
.schedule-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.schedule-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s var(--transition-smooth);
    gap: 0.75rem;
}

.schedule-order-item:hover {
    border-color: var(--accent-primary-border);
    background: var(--accent-primary-light);
}

.schedule-order-info {
    flex: 1;
    min-width: 0;
}

.schedule-order-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.schedule-order-id {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 0.9rem;
}

.schedule-order-customer {
    font-size: 0.78rem;
    color: var(--accent-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-order-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.schedule-order-amount {
    color: var(--accent-success-hover);
    font-weight: 600;
}


/* =============================================================================
   ORDER DETAIL MODAL (Calendar)
   ============================================================================= */

.cal-detail-section {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.cal-detail-section:last-of-type {
    border-bottom: none;
}

.cal-detail-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cal-detail-section-title i {
    color: var(--accent-primary);
}

.cal-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
}

.cal-detail-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cal-detail-label i {
    font-size: 0.9rem;
    color: var(--accent-primary);
    opacity: 0.6;
}

.cal-detail-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cal-detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.cal-detail-total {
    font-family: var(--font-outfit);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-success-hover);
}


/* =============================================================================
   RESPONSIVE CALENDAR
   ============================================================================= */

@media (max-width: 1100px) {
    .calendar-sidebar {
        position: fixed;
        top: 0;
        right: -420px;
        width: 380px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1001;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
        transition: right 0.35s var(--transition-smooth);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
    }

    .calendar-sidebar.sidebar-active {
        right: 0;
    }
}

@media (max-width: 640px) {
    .calendar-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-actions-bar {
        width: 100%;
    }

    .calendar-actions-bar .btn {
        flex: 1;
    }

    .calendar-card {
        padding: 1rem;
    }

    .cal-day {
        min-height: 55px;
        padding: 0.25rem;
        border-radius: 6px;
    }

    .cal-day-number {
        font-size: 0.75rem;
    }

    .cal-dot {
        width: 5px;
        height: 5px;
    }

    .cal-meta-count,
    .cal-meta-amount {
        font-size: 0.5rem;
    }

    .cal-month-text {
        font-size: 1.1rem;
    }

    .calendar-sidebar {
        width: 100%;
        right: -100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .calendar-legend {
        gap: 0.75rem;
    }

    .legend-item {
        font-size: 0.7rem;
    }
}


/* =============================================================================
   MULTI-VARIANT / BATCH FORM
   ============================================================================= */

.product-variants-details summary::-webkit-details-marker {
    display: none;
}
.product-variants-details summary {
    list-style: none;
}
.product-variants-details[open] summary i {
    transform: rotate(180deg);
}

.variant-color-group {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.variant-color-group:hover {
    box-shadow: var(--shadow-card-hover);
}

.matrix-qty-input::-webkit-outer-spin-button,
.matrix-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.matrix-qty-input {
    -moz-appearance: textfield;
}


/* =============================================================================
   PAGINATION
   ============================================================================= */

.pag-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0 0.25rem;
    flex-wrap: wrap;
}

.pag-info {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.pag-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.4rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s var(--transition-smooth);
    font-family: inherit;
}

.pag-btn:hover:not(.pag-disabled):not(.pag-active) {
    background: var(--accent-primary-light);
    border-color: var(--accent-primary-border);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.pag-btn.pag-active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: var(--shadow-btn-primary);
    cursor: default;
}

.pag-btn.pag-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pag-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 34px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.pag-per-page-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pag-per-page-wrap select {
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

.pag-per-page-wrap select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.1);
}


/* =============================================================================
   MULTI-LABEL PRINT
   ============================================================================= */

@media print {
    body.printing-multi-labels * {
        visibility: hidden !important;
    }
    body.printing-multi-labels #multi-rotulos-print-area,
    body.printing-multi-labels #multi-rotulos-print-area * {
        visibility: visible !important;
    }
    body.printing-multi-labels #multi-rotulos-print-area {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8mm !important;
        padding: 5mm !important;
        background: white !important;
    }
    body.printing-multi-labels .rotulo-card {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        border: 2px dashed #333 !important;
        background: white !important;
        padding: 15px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        color: #000 !important;
    }
    body.printing-multi-labels .rotulo-card * {
        color: #000 !important;
        visibility: visible !important;
    }
    body.printing-multi-labels .rotulo-card i {
        display: none !important;
    }
}


/* =============================================================================
   RESPONSIVE LAYOUT & MOBILE NAVIGATION
   ============================================================================= */

/* Helper utility classes for responsive visibility */
.desktop-only {
    display: flex !important;
}

.mobile-only {
    display: none !important;
}

.hamburger-btn {
    display: none !important;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-speed);
}

.hamburger-btn:hover {
    background-color: var(--accent-primary-light);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 900;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    font-weight: 500;
    gap: 0.2rem;
    transition: color 0.2s var(--transition-smooth);
    text-align: center;
    position: relative;
}

.bottom-nav-link i {
    font-size: 1.35rem;
    transition: all 0.2s var(--transition-smooth);
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--accent-primary);
}

.bottom-nav-link.active i {
    transform: scale(1.1);
    color: var(--accent-primary);
}

.bottom-nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
}

/* Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--transition-smooth);
}

.sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s var(--transition-smooth);
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.close-sidebar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.close-sidebar-btn:hover {
    color: var(--accent-danger);
    background-color: rgba(248, 113, 113, 0.08);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-subtle);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-bottom: 0.4rem;
    margin-left: 0.5rem;
    margin-top: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s var(--transition-smooth);
}

.sidebar-link i {
    font-size: 1.15rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--text-primary);
    background-color: var(--accent-primary-light);
}

.sidebar-link.active {
    color: var(--accent-primary);
    background-color: rgba(79, 110, 247, 0.1);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(248, 113, 113, 0.06);
    color: var(--accent-danger);
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s var(--transition-smooth);
    text-align: center;
}

.sidebar-logout-btn:hover {
    background-color: var(--accent-danger);
    color: white;
    box-shadow: 0 4px 14px -2px rgba(248, 113, 113, 0.35);
}


/* =============================================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================================= */

@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-flex !important;
    }
    .hamburger-btn {
        display: inline-flex !important;
    }
    .main-header {
        padding: 0 1rem;
        height: 56px;
    }
    .logo-text {
        font-size: 1.1rem;
    }

    body {
        padding-bottom: 64px;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .container {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }
    .card {
        padding: 1.25rem 1rem;
        border-radius: 10px;
    }
    .bottom-nav-link span {
        font-size: 0.65rem;
    }
    .bottom-nav-link i {
        font-size: 1.2rem;
    }
}


/* =============================================================================
   RESPONSIVE UTILITY GRIDS
   ============================================================================= */

.dashboard-split-layout {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .dashboard-split-layout {
        grid-template-columns: 1fr !important;
    }
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .form-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .modal-meta-grid {
        grid-template-columns: 1fr !important;
    }
}

.header-actions-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 576px) {
    .header-actions-group {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        margin-top: 0.5rem;
    }
    .header-actions-group .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* =============================================================================
   OVERFLOW & MOBILE FIXES
   ============================================================================= */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.card {
    min-width: 0;
}

.dashboard-split-layout > * {
    min-width: 0;
}

.table-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 576px) {
    .mobile-hide {
        display: none !important;
    }

    .table th,
    .table td {
        padding: 0.65rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .table th {
        font-size: 0.72rem !important;
    }

    .badge {
        padding: 0.2rem 0.45rem !important;
        font-size: 0.68rem !important;
    }

    .btn i {
        flex-shrink: 0;
    }
}


/* =============================================================================
   MICRO-ANIMATIONS & ENHANCEMENTS
   ============================================================================= */

/* Smooth page transition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus ring for accessibility */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Selection color */
::selection {
    background-color: rgba(79, 110, 247, 0.15);
    color: var(--text-primary);
}

/* Smooth details/summary */
details summary {
    cursor: pointer;
    transition: color var(--transition-speed);
}

details summary:hover {
    color: var(--accent-primary);
}

details[open] summary {
    margin-bottom: 0.5rem;
}


