/* La Tour Candles - Admin Panel v5.0 - Clean & Minimal */

:root {
    --primary: #8B7355;
    --primary-dark: #6B5742;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --sidebar-width: 240px;
    --header-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
}

.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.sidebar-section { margin-bottom: 1.5rem; }

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0 0.75rem 0.5rem;
}

.sidebar-menu { list-style: none; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.sidebar-menu a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.sidebar-menu a.active {
    background: var(--bg-tertiary);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.sidebar-user-name {
    font-size: 0.8125rem;
    font-weight: 500;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* Main */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
}

/* Header */
.admin-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile-toggle { display: none; }

.header-search { position: relative; width: 320px; }

.header-search input {
    width: 100%;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.header-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.header-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.header-action:hover {
    background: var(--bg-secondary);
}

.header-action-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
}

.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
}

.header-right { display: flex; gap: 0.5rem; }
.header-left { display: flex; gap: 1rem; }

/* Content */
.admin-content {
    padding: 1.5rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header { margin-bottom: 1.5rem; }

.page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

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

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--primary);
}

.stat-card-icon.success { background: var(--success); }
.stat-card-icon.warning { background: var(--warning); }
.stat-card-icon.danger { background: var(--danger); }
.stat-card-icon.info { background: var(--info); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat-card-footer {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body { padding: 1.25rem; }
.card-body-no-padding { padding: 0; }

.card-footer {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.table thead { background: var(--bg-secondary); }

.table thead th {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
}

.table-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.table-empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-light);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }
.btn-outline-primary { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; }
.btn-outline-secondary { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline-secondary:hover { background: var(--bg-secondary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-secondary); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-group { display: flex; gap: 0.25rem; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary { background: rgba(139, 115, 85, 0.1); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

.badge-dot::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

/* Forms */
.form-group { margin-bottom: 0.875rem; }

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label-required::after {
    content: '*';
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 0.5rem center;
    background-size: 1rem;
    padding-right: 2rem;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: block;
}

textarea.form-control {
    min-height: 70px;
    resize: vertical;
}

/* Compact forms in modals */
.modal-body .form-group {
    margin-bottom: 0.75rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .row {
    margin: -0.375rem;
}

.modal-body .row .col,
.modal-body .row [class*="col-"] {
    padding: 0.375rem;
}

.modal-body textarea.form-control {
    min-height: 60px;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.modal-overlay.active { display: block; }

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
    padding: 0.75rem;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.modal-dialog {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.modal-dialog-lg {
    max-width: 700px;
}

.modal-dialog-xl {
    max-width: 900px;
}

/* Auto-adjust modal width based on content */
@media (min-width: 992px) {
    .modal-dialog {
        max-width: 520px;
    }

    .modal-dialog-lg {
        max-width: 760px;
    }

    .modal-dialog-xl {
        max-width: 960px;
    }
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

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

.modal-title {
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-title i {
    font-size: 1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Alerts */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    border: 1px solid;
    font-size: 0.875rem;
}

.alert-success { background: rgba(16, 185, 129, 0.1); border-color: var(--success); color: #065F46; }
.alert-danger { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); color: #991B1B; }

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

.row { display: flex; flex-wrap: wrap; margin: -0.5rem; }
.col { flex: 1; padding: 0.5rem; }
.col-md-3 { padding: 0.5rem; }
.col-md-4 { padding: 0.5rem; }
.col-md-5 { padding: 0.5rem; }
.col-md-6 { padding: 0.5rem; }
.col-md-8 { padding: 0.5rem; }

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-5 { flex: 0 0 41.667%; max-width: 41.667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.667%; max-width: 66.667%; }
}

/* Utilities */
.alert-content { flex: 1; }

/* Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        color: var(--text-secondary);
        font-size: 1.25rem;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .admin-main { margin-left: 0; }

    .header-search { display: none; }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .page-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        width: 100%;
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .table-container {
        border: none;
    }

    .table {
        font-size: 0.8125rem;
    }

    .table thead th {
        padding: 0.5rem 0.625rem;
        font-size: 0.7rem;
    }

    .table tbody td {
        padding: 0.625rem;
    }

    .table-image {
        width: 32px;
        height: 32px;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        padding: 0.5rem;
    }

    .modal-dialog {
        max-width: 100%;
    }

    .card {
        border-radius: 6px;
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 0.9375rem;
    }

    .card-body {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .row {
        margin: -0.375rem;
    }

    .col,
    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-8 {
        padding: 0.375rem;
    }

    /* Hide less important columns on mobile */
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }

    .admin-header {
        padding: 0 1rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .container {
        padding: 0;
    }

    /* Better mobile table experience */
    .table tbody td {
        font-size: 0.8125rem;
    }

    .table tbody td strong {
        font-size: 0.875rem;
    }

    /* Adjust badge sizes */
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    /* Stack buttons vertically in btn-group */
    .btn-group {
        gap: 0.375rem;
    }

    .btn-group .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Modal improvements */
    .modal {
        padding: 0.5rem;
    }

    .modal.active {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .modal-dialog {
        max-height: calc(100vh - 2rem);
    }

    .modal-header {
        padding: 0.75rem 0.875rem;
    }

    .modal-title {
        font-size: 0.875rem;
    }

    .modal-body {
        padding: 0.875rem;
    }

    .modal-footer {
        padding: 0.75rem 0.875rem;
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
        padding: 0.5rem 0.75rem;
    }

    /* Form improvements */
    .form-group {
        margin-bottom: 0.875rem;
    }

    .form-label {
        font-size: 0.8125rem;
    }

    .form-control,
    .form-select {
        font-size: 0.875rem;
    }

    /* Page header mobile */
    .page-title {
        font-size: 1.25rem;
    }

    .page-subtitle {
        font-size: 0.8125rem;
    }

    /* Sidebar on mobile */
    .sidebar-header {
        padding: 1rem;
    }

    .sidebar-brand-name {
        font-size: 0.9375rem;
    }

    .sidebar-menu a {
        font-size: 0.8125rem;
        padding: 0.5rem;
    }

    /* Header actions */
    .header-action {
        padding: 0.375rem;
        font-size: 1rem;
    }

    .header-action-badge {
        font-size: 0.625rem;
        padding: 0.1rem 0.3rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card-value {
        font-size: 1.25rem;
    }

    .stat-card-label {
        font-size: 0.8125rem;
    }

    .stat-card-footer {
        font-size: 0.75rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .table thead th {
        font-size: 0.65rem;
        padding: 0.5rem 0.375rem;
    }

    .table tbody td {
        padding: 0.5rem 0.375rem;
    }

    .table-image {
        width: 28px;
        height: 28px;
    }

    .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .page-title {
        font-size: 1.125rem;
    }

    .card-title {
        font-size: 0.875rem;
    }

    /* Extra compact modals */
    .modal {
        padding: 0.25rem;
    }

    .modal.active {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .modal-dialog {
        max-width: 100%;
        max-height: calc(100vh - 1rem);
    }

    .modal-header {
        padding: 0.625rem 0.75rem;
    }

    .modal-title {
        font-size: 0.8125rem;
    }

    .modal-body {
        padding: 0.75rem;
    }

    .modal-body .form-group {
        margin-bottom: 0.625rem;
    }

    .modal-footer {
        padding: 0.625rem 0.75rem;
    }

    .modal-footer .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 0.625rem;
    }

    .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .form-control,
    .form-select {
        font-size: 0.8125rem;
        padding: 0.5rem 0.625rem;
    }

    .form-help {
        font-size: 0.7rem;
    }

    textarea.form-control {
        min-height: 50px;
    }

    /* Mobile-only restrictions - Hide desktop-only pages/sections */
    .mobile-hide {
        display: none !important;
    }

    /* Show only on mobile */
    .mobile-only {
        display: flex !important;
    }

    /* Simplify sidebar for mobile */
    .sidebar-section.products-section,
    .sidebar-section.system-section {
        display: none;
    }

    /* Mobile Dashboard Stats - Simplified with horizontal layout */
    .stat-card {
        padding: 1rem;
    }

    .stat-card-header {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .stat-card-body {
        text-align: left;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card-label {
        font-size: 0.8125rem;
    }

    /* Horizontal layout for stat cards on mobile */
    .stat-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .stat-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .stat-card-footer {
        display: none;
    }

    /* Mobile Orders - Full width tables */
    .table {
        font-size: 0.75rem;
    }

    .table thead th {
        padding: 0.5rem 0.375rem;
        font-size: 0.625rem;
    }

    .table tbody td {
        padding: 0.5rem 0.375rem;
    }

    /* Hide some columns on mobile */
    .mobile-hide-column {
        display: none;
    }

    /* Full width content on mobile */
    .col-md-8,
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Sales by Category - Full width on mobile */
    .row {
        flex-direction: column;
    }

    /* Mobile Orders Page */
    /* Hide desktop table on mobile */
    .desktop-only {
        display: none !important;
    }

    /* Show mobile order list */
    .mobile-order-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .mobile-order-item {
        display: block;
        padding: 0.75rem;
        background: var(--bg-primary);
        border: 1px solid var(--border);
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-order-item:hover,
    .mobile-order-item:active {
        background: var(--bg-secondary);
        border-color: var(--primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

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

    .mobile-order-number {
        font-family: monospace;
        font-weight: 700;
        font-size: 0.9375rem;
        color: var(--primary);
    }

    .mobile-order-customer {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.375rem;
    }

    .mobile-order-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.375rem;
        border-top: 1px solid var(--border-light);
    }

    .mobile-order-date {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    .mobile-order-total {
        font-size: 0.9375rem;
        font-weight: 700;
        color: var(--success);
    }

    /* Mobile filter buttons - Make them easier to tap */
    .card-body div[style*="display: flex"] .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
        flex: 1;
        justify-content: center;
    }

    .card-body div[style*="display: flex"] {
        gap: 0.375rem !important;
    }
}

/* Desktop - Hide mobile order list and mobile-only elements */
@media (min-width: 769px) {
    .mobile-order-list {
        display: none !important;
    }

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

    .desktop-only {
        display: block !important;
    }
}
