
/* 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;
}

:root {
    --bg-primary: #0f172a;
    /* Deep Slate 900 */
    --bg-secondary: #1e293b;
    /* Slate 800 */
    --bg-tertiary: #0f172a;
    /* Deep Slate 900 */
    --text-primary: #f8fafc;
    /* Very light slate */
    --text-secondary: #94a3b8;
    /* Blue-grey slate */
    --accent-primary: #3b82f6;
    /* Electric soft blue */
    --accent-primary-hover: #2563eb;
    --accent-secondary: #0ea5e9;
    --accent-secondary-hover: #0284c7;
    --accent-success: #10b981;
    --accent-warning: #d97706;
    --accent-danger: #ef4444;
    --border-color: #334155;
    /* Slate 700 */
    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --shadow-glow: none;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --border-radius: 6px;
    --transition-speed: 0.15s;
}

* {
    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;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-outfit);
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

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

/* App Header / Navigation */
.main-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.logo-text {
    font-family: var(--font-outfit);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
}

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

.nav-link {
    font-family: var(--font-inter);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover {
    color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.04);
}

.nav-link.active {
    color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn-logout {
    color: var(--accent-danger);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

/* Layout Main Container */
.container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    box-sizing: border-box;
}

/* Card Design (Flat, Subtle Border) */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-speed) ease;
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Inputs & Form Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 0.95rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

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

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

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-success {
    background-color: var(--accent-success);
    color: white;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-paid {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cancelled {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-packed {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-shipped {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

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

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.kpi-purple {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.kpi-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.kpi-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.kpi-orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-outfit);
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 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.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

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

.autocomplete-item:hover {
    background-color: var(--bg-tertiary);
}

.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: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.variant-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.variant-btn.active {
    border-color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.15);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.variant-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #0f172a;
}

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

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

.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-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-speed);
    font-weight: 600;
}

.btn-qty:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* POS Cart Styling */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    margin: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    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.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.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.25rem;
    text-align: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 4px;
}

.cart-item-price {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.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.95rem;
}

.cart-total-row.grand-total {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-outfit);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

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

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 1.5rem;
    transform: scale(1);
    transition: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

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

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

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: white;
}

/* 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: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    min-width: 280px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease forwards;
}

.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 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);
}

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

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

.table th {
    background-color: #182235;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-inter);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.03);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* Print Invoice Styling */
@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) ease;
}

.product-item-card:hover {
    border-color: var(--accent-primary) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15) !important;
    background-color: var(--bg-secondary) !important;
}

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

/* Page Layout */
.calendar-page {
    animation: calPageIn 0.4s ease;
}

@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.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.calendar-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.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 */
.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: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.cal-nav-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
    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.6rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-primary);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* 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-outfit);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cal-day-header.cal-weekend {
    color: rgba(59, 130, 246, 0.6);
}

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

.cal-day:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.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: rgba(59, 130, 246, 0.05);
}

.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(2, 132, 199, 0.05);
}

.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: var(--accent-primary);
    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);
    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-color);
    flex-wrap: wrap;
}

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

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

.legend-pending { background: #f59e0b; }
.legend-paid { background: #10b981; }
.legend-packed { background: #06b6d4; }
.legend-shipped { background: #2563eb; }

/* 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); }
}

/* =============================================
   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 ease;
    position: sticky;
    top: 90px;
}

.calendar-sidebar.sidebar-active {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.08);
}

/* 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: 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    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-color);
    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-secondary);
    font-weight: 500;
    margin-top: 0.2rem;
    display: inline-block;
}

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    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: var(--accent-danger);
    border-color: var(--accent-danger);
    color: white;
}

/* 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-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    transition: all 0.2s ease;
    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: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    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-secondary);
    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-secondary);
    opacity: 0.7;
}

.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-color);
}

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

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

.btn-card-action {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.btn-card-action:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: scale(1.08);
}

.btn-card-reschedule:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.btn-card-unschedule:hover {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* 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-color);
    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-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.schedule-order-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.03);
}

.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-secondary);
    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);
    font-weight: 600;
}

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

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

.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.7;
}

.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-color);
}

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

/* =============================================
   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: 16px 0 0 16px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }

    .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: 16px 16px 0 0;
    }

    .calendar-legend {
        gap: 0.75rem;
    }

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

/* Multi-Variant and Batch Form Custom Styles */
.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: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.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;
}
/* ============================================================
   PAGINACI�N � Motor client-side reutilizable (pagination.js)
   ============================================================ */
.pag-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.85rem 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: 32px;
    height: 32px;
    padding: 0 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
    font-family: inherit;
}
.pag-btn:hover:not(.pag-disabled):not(.pag-active) {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.pag-btn.pag-active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    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: 32px;
    color: var(--text-secondary);
    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: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
}
.pag-per-page-wrap select:focus {
    outline: none;
    border-color: var(--accent-primary);
}


/* ============================================================
   IMPRESI�N DE M�LTIPLES R�TULOS (2 Columnas)
   ============================================================ */
@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 APP NAVIGATION REDESIGN
   ============================================================ */

/* 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.25rem;
    border-radius: 4px;
}
.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Base styles for bottom nav bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    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-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    gap: 0.2rem;
    transition: color 0.15s ease;
    text-align: center;
}

.bottom-nav-link i {
    font-size: 1.35rem;
    transition: transform 0.15s ease;
}

.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);
}

/* Sidebar styling */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hidden initially */
    width: 280px;
    height: 100%;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.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-color);
}

.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.25rem;
    border-radius: 4px;
}

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

.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-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.sidebar-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.4rem;
    margin-left: 0.4rem;
}

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

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

.sidebar-link:hover, .sidebar-link.active {
    color: var(--text-primary);
    background-color: rgba(59, 130, 246, 0.08);
}

.sidebar-link.active {
    color: var(--accent-primary);
    background-color: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

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

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

.sidebar-logout-btn:hover {
    background-color: var(--accent-danger);
    color: white;
}

/* 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: 60px;
    }
    .logo-text {
        font-size: 1.15rem;
    }
    
    /* Layout space adjustments for mobile bottom nav */
    body {
        padding-bottom: 64px; /* Ensure main content is not blocked by bottom nav */
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .container {
        padding: 1rem;
    }
}

/* Further UX optimization for tiny screens */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem 0.5rem;
    }
    .card {
        padding: 1rem 0.75rem;
    }
    .bottom-nav-link span {
        font-size: 0.65rem;
    }
    .bottom-nav-link i {
        font-size: 1.2rem;
    }
}

/* ============================================================
   RESPONSIVE UTILITY GRIDS (MOBILE RESOLUTION FIXES)
   ============================================================ */

.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;
    }
}

/* ============================================================
   MOBILE OVERFLOW & GRID WRAPPING OPTIMIZATIONS
   ============================================================ */

/* Prevent horizontal page overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent cards from stretching grid tracks */
.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;
}

/* Hide specific elements on mobile screens */
@media (max-width: 576px) {
    .mobile-hide {
        display: none !important;
    }
    
    /* Table optimizations for mobile */
    .table th,
    .table td {
        padding: 0.6rem 0.4rem !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;
    }
    
    /* Prevent icon button squishing */
    .btn i {
        flex-shrink: 0;
    }
}


