/* =============================================================================
   KPE-OSS — UNIFIED UI (redesign)
   Single design system shared by every page. Brand: deep navy + warm gold,
   matching the KingPhil Enterprises mark. Only visual rules live here —
   no markup, PHP or JS behaviour is implied by this file.
   ============================================================================= */

:root {
    /* Brand */
    --primary: #0B3D62;
    --primary-dark: #082C47;
    --primary-light: #14567F;
    --secondary: #64748B;
    --accent: #F0A93B;
    --accent-dark: #D68A1D;

    /* Status */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #0EA5E9;

    /* Surfaces */
    --background: #F3F6FA;
    --surface: #FFFFFF;
    --card-bg: #FFFFFF;
    --surface-muted: #EEF2F7;

    /* Text */
    --text-primary: #17233A;
    --text-secondary: #5B6B80;

    /* Strong compact sizing for the whole KPE-OSS system */
    --base-font-size: 12px;
    --base-line-height: 1.4;
    --sidebar-width: 210px;
    --header-height: 54px;
    --btn-height-sm: 30px;
    --btn-height-md: 36px;
    --btn-height-lg: 40px;
    --card-padding: 0.9rem 1rem;
    --table-padding-y: 0.65rem;
    --form-control-height: 36px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;

    /* Structure */
    --border: #E4E9F1;
    --shadow-sm: 0 2px 10px rgba(11, 35, 60, 0.06);
    --shadow: 0 12px 28px rgba(11, 35, 60, 0.08);
    --shadow-lg: 0 20px 48px rgba(11, 35, 60, 0.12);

    /* Legacy / compatibility aliases — kept so every existing page,
       inline style block, and component still resolves correctly. */
    --primary-color: var(--primary);
    --secondary-color: var(--secondary);
    --accent-color: var(--accent);
    --danger-color: var(--danger);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --info-color: var(--info);
    --card-shadow: var(--shadow);
    --border-radius: var(--radius);
    --border-color: var(--border);
    --surface-color: var(--surface);
    --text-color: var(--text-primary);
}

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

html {
    scroll-behavior: smooth;
    font-size: var(--base-font-size);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    line-height: var(--base-line-height);
    color: var(--text-primary);
    background-color: var(--background);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.01em;
}

body,
button, input, select, textarea,
.btn, .form-control, .form-select, .dropdown-menu,
.table, .card, .modal-content, .nav-link, .badge,
.alert, .dropdown-item, .list-group-item, .pagination,
.accordion-button {
    font-size: 0.92rem;
}

body.sidebar-open {
    overflow: hidden;
}

.btn, .form-control, .form-select, .input-group-text {
    min-height: var(--btn-height-md);
}

.form-control, .form-select, .input-group-text {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.table td, .table th {
    padding: var(--table-padding-y) 0.8rem;
}

.card, .dashboard-section, .panel, .modal-content {
    padding: var(--card-padding);
    border-radius: var(--radius);
}

.sidebar {
    width: var(--sidebar-width) !important;
}

.main-content {
    margin-left: var(--sidebar-width) !important;
}

.top-navbar, .top-bar, .admin-header {
    min-height: var(--header-height);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.25rem; }
h4, h5, h6 { font-size: 1.05rem; }

.pagination .page-link,
.badge,
.alert,
.nav-link,
.dropdown-item,
.list-group-item,
.form-label,
.card-title,
.table th,
.table td {
    font-size: 0.88rem;
}

img, svg {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--primary);
}

button, input, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: rgba(240, 169, 59, 0.28);
}

hr {
    border-color: var(--border);
    opacity: 1;
}

/* -----------------------------------------------------------------------
   Typography
   ----------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

small, .text-muted {
    color: var(--text-secondary) !important;
}

.section-title,
.page-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i,
.page-header-title i {
    color: var(--accent-dark);
}

/* -----------------------------------------------------------------------
   Sidebar
   ----------------------------------------------------------------------- */
html body .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(190deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #E7ECF3;
    border-right: none;
    padding: 0 0 18px;
    overflow-y: auto;
    box-shadow: 18px 0 45px rgba(8, 25, 43, 0.18);
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 169, 59, 0.35) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(240, 169, 59, 0.35);
    border-radius: 4px;
}

html body .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(240, 169, 59, 0.18);
    background: rgba(0, 0, 0, 0.14);
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

html body .sidebar-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 0% 0%, rgba(240, 169, 59, 0.16) 0%, transparent 60%);
    pointer-events: none;
}

html body .sidebar-brand,
html body .sidebar .navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #FFFFFF;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    white-space: nowrap;
}

html body .sidebar-brand:hover,
html body .sidebar .navbar-brand:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.sidebar-brand img,
.sidebar .navbar-brand img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center;
    border: 2px solid rgba(240, 169, 59, 0.45);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-brand:hover img {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 12px;
}

.sidebar .nav-item {
    width: 100%;
}

html body .sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: rgba(231, 236, 243, 0.82);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    color: inherit;
    font-size: 1.02rem;
}

html body .sidebar .nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.07);
    border-left-color: rgba(240, 169, 59, 0.5);
}

html body .sidebar .nav-link.active {
    color: #12233A;
    background: linear-gradient(90deg, var(--accent) 0%, #F7C065 100%);
    border-left-color: #FFFFFF;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

html body .sidebar .nav-link.active i {
    color: #12233A;
}

html body .sidebar .navbar-brand,
html body .sidebar .navbar-brand:hover {
    color: inherit;
}

/* -----------------------------------------------------------------------
   Sidebar toggle (mobile) + overlay
   ----------------------------------------------------------------------- */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #FFFFFF;
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--surface-muted);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 25, 43, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* -----------------------------------------------------------------------
   Main content / top navbar
   ----------------------------------------------------------------------- */
html body .main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    background: var(--background);
    transition: margin-left 0.25s ease;
}

html body .top-navbar {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 950;
    box-shadow: 0 6px 20px rgba(11, 35, 60, 0.05);
    gap: 12px;
    min-width: 0;
}

.top-navbar-title {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body .top-navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 700;
    min-width: 0;
}

html body .top-navbar-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-search-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(8px);
    transition: width 0.28s ease, opacity 0.18s ease, transform 0.25s ease;
}

.admin-header-search.is-open .admin-search-panel {
    width: clamp(260px, 36vw, 420px);
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.admin-search-input {
    min-width: 0;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    box-shadow: inset 0 1px 2px rgba(11, 35, 60, 0.08);
}

.admin-search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.15rem rgba(11, 61, 98, 0.18);
}

.admin-search-close {
    width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 50%;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-search-close:hover {
    background: #E4EBF3;
    border-color: var(--primary-light);
}

.admin-search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: clamp(290px, 44vw, 480px);
    max-height: 380px;
    overflow-y: auto;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 1040;
    display: none;
}

.admin-search-suggestions.is-visible {
    display: block;
}

.admin-search-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
}

.admin-search-suggestion:hover,
.admin-search-suggestion.is-active {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.admin-search-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-dark);
    background: rgba(11, 61, 98, 0.1);
    border-radius: 999px;
    padding: 3px 8px;
    flex-shrink: 0;
    margin-top: 1px;
}

.admin-search-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.admin-search-text strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-search-text small {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-search-link-icon {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 2px;
}

.admin-search-empty {
    padding: 14px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

html body .user-dropdown .btn,
html body .notification-bell,
html body .cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

html body .user-dropdown .btn .bi,
html body .user-dropdown .btn i {
    font-size: 1.3rem;
    color: var(--primary);
}

.user-dropdown small {
    color: var(--text-secondary);
    display: block;
}

html body .user-dropdown .btn:hover,
html body .notification-bell:hover,
html body .cart-badge:hover {
    background: #E4EBF3;
    border-color: var(--primary-light);
}

.notification-badge,
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    background: var(--danger);
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.cart-count {
    position: static;
    display: inline-flex;
    border: none;
    background: var(--accent-dark);
    color: #12233A;
}

.dropdown-menu-end {
    min-width: 190px;
}

html body .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    max-width: calc(100vw - 2rem);
    white-space: normal;
    overflow-wrap: anywhere;
}

html body .top-navbar .dropdown-menu {
    min-width: min(320px, calc(100vw - 2rem)) !important;
}

html body .dropdown-item {
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

html body .dropdown-item:hover,
html body .dropdown-item:focus {
    background: var(--surface-muted);
    color: var(--text-primary);
}

html body .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* -----------------------------------------------------------------------
   Page header / content wrapper
   ----------------------------------------------------------------------- */
html body .content-area {
    padding: clamp(16px, 2.2vw, 30px) clamp(12px, 2.2vw, 30px) clamp(24px, 3vw, 36px);
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

html body .content-area > *,
html body .content-area .row,
html body .content-area [class*='col-'] {
    min-width: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* -----------------------------------------------------------------------
   Cards
   ----------------------------------------------------------------------- */
html body .card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

html body .card:hover {
    box-shadow: var(--shadow-lg);
    /* transform intentionally omitted: CSS transforms on ancestors break
       position:fixed in descendant Bootstrap modals (CSS containing-block spec) */
}

html body .card.clickable-card,
html body .card.card-hover {
    cursor: pointer;
}

html body .card.card-hover:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(240, 169, 59, 0.4);
}

html body .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 700;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cards that keep Bootstrap's colored header utility (bg-primary etc.)
   still get the refined radius/spacing/typography. */
.card-header.bg-primary,
.card-header.bg-secondary,
.card-header.bg-success,
.card-header.bg-warning,
.card-header.bg-danger,
.card-header.bg-info {
    border-bottom: none;
    color: #fff;
}

.card-header.bg-warning {
    color: #4A3200;
}

html body .card-body {
    padding: 22px;
}

html body .card-body.p-0 {
    padding: 0;
}

html body .card-body.p-0 .table-responsive {
    border: none;
    border-radius: 0;
}

html body .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* Dashboard stat cards (bg-primary/bg-info/etc. utility cards used on the
   dashboards) get consistent depth, spacing and number styling regardless
   of which Bootstrap contextual color they use. */
html body .card[class*="bg-"] {
    border: none;
    position: relative;
}

html body .card[class*="bg-"] .card-title {
    color: rgba(255, 255, 255, 0.88);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

html body .card.bg-warning .card-title,
html body .card.text-dark .card-title {
    color: rgba(30, 20, 0, 0.75);
}

html body .card[class*="bg-"] .display-6 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.clickable-card {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Generic dashboard stat card component */
html body .dashboard-card {
    min-height: 152px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
}

html body .dashboard-card .card-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    color: var(--secondary);
    font-weight: 700;
}

.dashboard-card .stat-value {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dashboard-card .card-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(11, 61, 98, 0.1);
    color: var(--primary);
    font-size: 1.2rem;
}

html body .stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow);
}

html body .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

html body .dashboard-section,
html body .order-section,
html body .offcut-section,
html body .card-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(16px, 2vw, 26px);
}

.dashboard-chart-body {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dashboard-chart-body canvas {
    width: 100% !important;
    max-width: 380px;
    height: 220px !important;
}

/* Collapsible cards */
html body .collapsible-card {
    margin-bottom: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
    border: 1px solid var(--border);
}

html body .collapsible-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 16px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: filter 0.2s ease;
}

.collapsible-card-header:hover {
    filter: brightness(1.08);
}

.collapsible-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.collapsible-card-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.collapsible-card-toggle.collapsed {
    transform: rotate(-90deg);
}

.collapsible-card-content {
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    background: var(--card-bg);
}

.collapsible-card-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.collapsible-card-body {
    padding: 24px;
}

/* Product picker cards */
html body .product-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border-radius: var(--radius);
}

html body .product-card:hover,
html body .product-card.selected:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

html body .product-card.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.06);
}

/* -----------------------------------------------------------------------
   Tables
   ----------------------------------------------------------------------- */
.table {
    background: var(--card-bg);
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9rem;
    table-layout: auto;
}

html body .table th,
html body .table td {
    border-bottom: 1px solid var(--border);
    padding: 13px 16px;
    vertical-align: middle;
    white-space: normal;
    text-align: left;
    overflow-wrap: anywhere;
}

.table thead th {
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.table.table-light thead,
.table thead.table-light {
    background: var(--surface-muted);
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background: var(--surface-muted);
}

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

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table-responsive table {
    width: 100%;
    min-width: 100%;
    margin-bottom: 0;
    border: none;
}

.table-responsive table th:first-child,
.table-responsive table td:first-child {
    padding-left: 18px;
}

/* -----------------------------------------------------------------------
   Badges / status pills
   ----------------------------------------------------------------------- */
.badge {
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.badge-processing,
.badge-approved,
.badge-fabrication {
    background: rgba(11, 61, 98, 0.12);
    color: var(--primary);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

.badge-warning {
    background: rgba(249, 115, 22, 0.14);
    color: #b45309;
}

html body .order-status-badge,
html body .status-pill,
html body .badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pill.pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

.status-pill.processing {
    background: rgba(11, 61, 98, 0.12);
    color: var(--primary);
}

.status-pill.completed {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.status-pill.cancelled {
    background: rgba(239, 68, 68, 0.14);
    color: #b91c1c;
}

/* Bootstrap contextual alerts, refined */
html body .alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 0.9rem;
}

html body .alert-info {
    background-color: rgba(14, 165, 233, 0.12);
    color: #075985;
}

html body .alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #065f46;
}

html body .alert-warning {
    background-color: rgba(245, 158, 11, 0.14);
    color: #92400e;
}

html body .alert-danger {
    background-color: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

/* -----------------------------------------------------------------------
   Buttons
   ----------------------------------------------------------------------- */
html body .btn {
    border-radius: 999px;
    transition: all 0.2s ease;
    min-height: 42px;
    padding: 0.68rem 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    white-space: nowrap;
}

html body .btn:hover {
    transform: translateY(-1px);
}

html body .btn:active {
    transform: translateY(0);
}

html body .btn-sm {
    min-height: 36px;
    padding: 0.48rem 0.9rem;
    font-size: 0.82rem;
}

html body .btn-group .btn {
    margin-right: 4px;
}

html body .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}

html body .btn-primary:hover,
html body .btn-primary:focus {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 10px 24px rgba(11, 61, 98, 0.25);
}

html body .btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #FFFFFF;
}

html body .btn-success:hover,
html body .btn-success:focus {
    background: #0f9d7a;
    border-color: #0f9d7a;
}

html body .btn-warning {
    background: var(--accent);
    border-color: var(--accent);
    color: #3A2600;
}

html body .btn-warning:hover,
html body .btn-warning:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

html body .btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #FFFFFF;
}

html body .btn-danger:hover,
html body .btn-danger:focus {
    background: #dc2626;
    border-color: #dc2626;
}

html body .btn-info {
    background: var(--info);
    border-color: var(--info);
    color: #FFFFFF;
}

html body .btn-outline-secondary {
    color: var(--text-primary);
    border-color: var(--border);
    background: #FFFFFF;
}

html body .btn-outline-secondary:hover {
    background: var(--surface-muted);
    border-color: var(--secondary);
}

html body .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

html body .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

html body .page-header-actions .btn,
html body .page-header-actions button,
html body .page-header-actions a,
html body .btn-group .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clerk-quick-actions .btn {
    min-height: 56px;
    white-space: normal;
    text-align: center;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
}

/* -----------------------------------------------------------------------
   Forms
   ----------------------------------------------------------------------- */
html body .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}

html body .form-control,
html body .form-select,
html body textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    color: var(--text-primary);
    padding: 0.75rem 0.95rem;
    min-height: 44px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-shadow: none;
    font-size: 0.92rem;
}

html body .form-control:focus,
html body .form-select:focus,
html body textarea:focus {
    box-shadow: 0 0 0 3px rgba(11, 61, 98, 0.14);
    border-color: var(--primary);
    outline: none;
}

.form-control::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

input[type=date],
input[type=time],
input[type=datetime-local] {
    background: #FFFFFF;
}

html body .form-group-header {
    background: var(--surface-muted);
    padding: 14px 18px;
    border-left: 4px solid var(--primary);
    margin: 20px 0 16px 0;
    border-radius: 0.75rem;
    font-weight: 600;
}

html body .dimension-input {
    max-width: 140px;
}

html body .glass-preview {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 20px;
    background: linear-gradient(45deg, #f4f6fa 25%, transparent 25%),
                linear-gradient(-45deg, #f4f6fa 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #f4f6fa 75%),
                linear-gradient(-45deg, transparent 75%, #f4f6fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* -----------------------------------------------------------------------
   Modals / dropdown surfaces
   ----------------------------------------------------------------------- */
html body .modal-content,
html body .dropdown-menu,
html body .toast-notification,
html body .custom-alert {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-dialog {
    width: calc(100% - 1rem);
    max-width: 960px;
    margin: 0.75rem auto;
}

.modal-content {
    border: 1px solid var(--border);
    overflow: hidden;
}

.modal-body .row + .row,
.modal-body .card + .card {
    margin-top: 1rem;
}

.modal-body {
    max-height: min(70vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-content,
.modal-header,
.modal-body,
.modal-footer {
    min-width: 0;
    max-width: 100%;
}

.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
    background-color: rgba(8, 25, 43, 0.55);
}

.dropdown-menu {
    z-index: 2100;
}

.modal-open .dropdown-menu.show {
    display: none !important;
}

/* Bootstrap 5 manages modal display and dialog transforms via its own CSS/JS.
   Custom transform overrides are removed to prevent animation race conditions.
   The backdrop must keep a CSS transition so transitionend fires reliably. */
.modal-backdrop.fade {
    transition: opacity 0.15s linear;
}
.modal-backdrop.show {
    opacity: 0.55;
}

.modal-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    padding: 18px 24px;
}

.modal-title,
.custom-alert-title {
    color: var(--primary);
    font-weight: 700;
}

.modal-body,
.custom-alert-content {
    color: var(--text-secondary);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

.custom-modal-close {
    background: transparent;
    border: none;
    color: var(--secondary);
}

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

/* -----------------------------------------------------------------------
   Toasts / custom alert system
   ----------------------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toast-notification {
    width: 360px;
    background: #FFFFFF;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    opacity: 0;
    transform: translateX(30px);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.success { border-left-color: var(--success); }
.toast-notification.error { border-left-color: var(--danger); }
.toast-notification.warning { border-left-color: var(--warning); }
.toast-notification.info { border-left-color: var(--info); }

.toast-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(11, 61, 98, 0.1);
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-icon.success { background: rgba(16, 185, 129, 0.14); color: #047857; }
.toast-icon.error { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.toast-icon.warning { background: rgba(245, 158, 11, 0.14); color: #92400e; }
.toast-icon.info { background: rgba(14, 165, 233, 0.14); color: #075985; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.toast-text {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

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

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 25, 43, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 12000;
}

.custom-alert-overlay.show {
    display: flex;
}

.custom-alert {
    width: min(100%, 480px);
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.custom-alert-header {
    padding: 24px 28px 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.custom-alert-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.custom-alert-icon.success { background: rgba(16, 185, 129, 0.14); color: #047857; }
.custom-alert-icon.error { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.custom-alert-icon.warning { background: rgba(245, 158, 11, 0.14); color: #92400e; }
.custom-alert-icon.info { background: rgba(14, 165, 233, 0.14); color: #075985; }
.custom-alert-icon.question { background: rgba(11, 61, 98, 0.1); color: var(--primary); }

.custom-alert-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.custom-alert-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.custom-alert-content {
    padding: 0 28px 22px;
}

.custom-alert-footer {
    padding: 16px 28px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-alert-btn {
    border: none;
    border-radius: 999px;
    padding: 11px 22px;
    min-width: 110px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.custom-alert-btn.confirm {
    background: var(--primary);
    color: #FFFFFF;
}

.custom-alert-btn.confirm:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.custom-alert-btn.cancel {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.custom-alert-btn.cancel:hover {
    background: #E2E8F0;
}

.custom-alert-btn.danger {
    background: var(--danger);
    color: #fff;
}

.custom-alert-btn.danger:hover {
    background: #dc2626;
}

/* -----------------------------------------------------------------------
   Order tabs
   ----------------------------------------------------------------------- */
html body .order-tabs {
    margin-bottom: 24px;
}

html body .order-tabs .nav-link {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 0.75rem 0.75rem 0 0;
    font-weight: 600;
    background: var(--surface-muted);
}

html body .order-tabs .nav-link.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

/* -----------------------------------------------------------------------
   Auth pages (login / register)
   ----------------------------------------------------------------------- */
html body .auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(60% 60% at 15% 10%, rgba(240, 169, 59, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(8, 25, 43, 0.35);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 40px 32px 30px;
    text-align: center;
    color: #fff;
}

.auth-header img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(240, 169, 59, 0.5);
    margin-bottom: 14px;
}

.auth-header h1 {
    margin: 0;
    font-size: 1.7rem;
    color: #fff;
}

.auth-header p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
}

.auth-body {
    padding: 32px;
}

.auth-footer {
    background: var(--surface-muted);
    padding: 22px 32px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--secondary);
    margin: 0;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
}

.auth-field input,
.auth-field textarea,
.auth-field select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    background: #FFFFFF;
    color: var(--text-primary);
}

.auth-field input:focus,
.auth-field textarea:focus,
.auth-field select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(11, 61, 98, 0.12);
}

.auth-btn {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #FFFFFF;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(11, 61, 98, 0.28);
}

/* -----------------------------------------------------------------------
   Landing page
   ----------------------------------------------------------------------- */
html body .landing-page {
    min-height: 100vh;
}

/* -----------------------------------------------------------------------
   Cart, schedule, and misc components
   ----------------------------------------------------------------------- */
.cart-toolbar,
.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cart-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0.75rem 0;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(243, 246, 250, 0.7), rgba(255, 255, 255, 0.98));
}

.cart-item .quantity-stepper {
    max-width: 170px;
}

.cart-item .quantity-stepper .form-control {
    min-width: 54px;
    text-align: center;
}

.customer-products-actions {
    max-width: 100%;
}

.customer-products-search {
    width: 250px;
    max-width: 100%;
}

.summary-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.service-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FFFFFF;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.service-option:hover {
    border-color: var(--primary-light);
    background: var(--surface-muted);
}

.schedule-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.schedule-card.today { border-left: 4px solid var(--primary); }
.schedule-card.scheduled { border-left: 4px solid var(--accent); }
.schedule-card.ongoing { border-left: 4px solid var(--warning); }
.schedule-card.completed { border-left: 4px solid var(--success); }
.schedule-card.cancelled { border-left: 4px solid var(--danger); }

/* -----------------------------------------------------------------------
   Responsive layout
   ----------------------------------------------------------------------- */
@media (max-width: 1200px) {
    html body .content-area {
        padding: 22px;
    }
}

@media (max-width: 992px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(84vw, 288px);
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1001;
    }

    html body .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: min(84vw, 288px) !important;
        height: 100vh !important;
        padding-top: 0 !important;
        transform: translateX(-100%) !important;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    html body.sidebar-open .sidebar {
        transform: translateX(0) !important;
    }

    html body .sidebar-header {
        padding: 20px 22px;
        min-height: 88px;
    }

    .sidebar-brand img,
    .sidebar .navbar-brand img {
        width: 42px;
        height: 42px;
    }

    .top-navbar {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    html body .main-content {
        margin-left: 0 !important;
    }

    .content-area {
        padding: 20px;
    }

    .cart-item .row > [class*='col-'] {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .cart-item .col-md-2.text-md-end,
    .cart-item .col-md-2.text-md-end:last-child {
        text-align: left !important;
    }

    .customer-products-toolbar,
    .customer-products-actions {
        width: 100%;
    }

    .customer-products-search {
        flex: 1 1 220px;
    }

    .btn,
    .sidebar .nav-link,
    .notification-bell,
    .cart-badge {
        min-height: 40px;
    }
}

@media (max-width: 768px) {
    html body .sidebar-header {
        padding: 16px 20px;
        min-height: 78px;
    }

    .sidebar-brand {
        font-size: 1rem;
    }

    .sidebar-brand img {
        width: 40px;
        height: 40px;
    }

    .top-navbar {
        padding: 14px 18px;
    }

    .top-navbar-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-header-search {
        flex: 1 1 100%;
        order: 2;
    }

    .admin-header-search.is-open .admin-search-panel {
        width: min(420px, calc(100vw - 118px));
        max-width: 100%;
    }

    .admin-search-suggestions {
        left: 0;
        right: auto;
        width: min(100%, 560px);
    }

    .top-navbar-title {
        flex: 1 1 auto;
    }

    .top-navbar-title {
        font-size: 1.05rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn,
    .page-header-actions button,
    .page-header-actions a {
        width: 100%;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .toast-notification {
        width: calc(100vw - 48px);
    }

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

    .cart-item .row > [class*='col-'] {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .cart-item .quantity-stepper {
        max-width: 100%;
    }

    html body .card-body {
        padding: 16px;
    }

    .table {
        min-width: 0;
    }

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

    .table-responsive > .table {
        width: max-content;
        min-width: 100%;
    }

    .summary-row {
        flex-wrap: wrap;
        gap: 0.35rem 1rem;
    }

    .admin-search-suggestions {
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 32px 22px 24px;
    }

    .auth-body {
        padding: 22px;
    }

    .auth-footer {
        padding: 18px 22px;
    }

    html body .content-area {
        padding: 16px 12px 24px;
    }

    .top-navbar {
        padding: 12px;
    }

    .top-navbar-right {
        gap: 8px;
    }

    .btn,
    .form-control,
    .form-select {
        max-width: 100%;
    }

    .top-navbar-title {
        font-size: 0.98rem;
    }

    .admin-header-search.is-open .admin-search-panel {
        width: calc(100vw - 94px);
    }

    .admin-search-suggestion {
        padding: 9px 8px;
    }

    .admin-search-type {
        padding-inline: 6px;
        font-size: 0.64rem;
    }

    .table {
        font-size: 0.82rem;
    }

    .card-header,
    .card-body {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767.98px) and (orientation: landscape) {
    html body .sidebar {
        width: min(72vw, 300px) !important;
    }

    html body .sidebar-header {
        min-height: 64px;
        padding: 10px 16px;
    }

    .sidebar .nav {
        gap: 0;
        padding-block: 2px;
    }

    html body .sidebar .nav-link {
        padding-block: 8px;
    }

    .top-navbar {
        padding-block: 9px;
    }

    html body .content-area {
        padding-block: 12px 20px;
    }

    .modal-body {
        max-height: calc(100vh - 120px);
    }
}
