/* assets/css/style.css - Mamma's Boutique High-End Haute Couture Theme */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --brand-plum: #58144b;
    --brand-plum-hover: #480f3d;
    --brand-plum-light: #f5eaf4;
    --brand-plum-subtle: #faf4f9;
    --text-heading: #30092c;
    --text-body: #553e53;
    --text-muted: #796677;
    --bg-page: #fcf8fa;
    --bg-sidebar: #fdfafc;
    --bg-card: #ffffff;
    --border-color: #efe3ee;
    --border-light: #f4ebf3;
    --alert-bg: #fdeef2;
    --alert-border: #fad3de;
    --alert-text: #8b1e3f;
    --radius-pill: 9999px;
    --radius-card: 18px;
    --radius-sm: 10px;
    --shadow-card: 0 2px 10px rgba(88, 20, 75, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 8px 24px rgba(88, 20, 75, 0.08);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-body);
    font-size: 14.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Zoomed & Sized with generous clarity */
.app-sidebar {
    width: 235px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 14px 16px 14px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.25s ease;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 18px 6px;
}

.brand-logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-heading);
    line-height: 1.1;
}

.brand-subtitle {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-heading);
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
}

.brand-flourish {
    height: 4px;
    width: 100%;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin-top: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-heading);
    font-weight: 500;
    font-size: 13.8px;
    transition: all 0.18s ease;
}

.nav-link svg {
    color: #634560;
    transition: color 0.18s ease;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nav-link:hover {
    background-color: var(--brand-plum-light);
    color: var(--brand-plum);
}

.nav-link:hover svg {
    color: var(--brand-plum);
}

.nav-item.active .nav-link {
    background-color: var(--brand-plum);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(88, 20, 75, 0.22);
}

.nav-item.active .nav-link svg {
    color: #ffffff;
}

.sidebar-bottom {
    position: relative;
    padding-top: 6px;
}

.sidebar-botanical {
    width: 100%;
    height: auto;
    opacity: 0.85;
    pointer-events: none;
}

/* Main Content Area */
.app-main {
    margin-left: 235px;
    flex: 1;
    padding: 22px 28px 40px 28px;
    max-width: 1600px;
}

/* Split-Panel Grid System for rich details views */
.split-layout-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    align-items: start;
}
.split-layout-grid > * {
    min-width: 0;
}

.split-layout-3col {
    display: grid;
    grid-template-columns: 240px 1fr 340px;
    gap: 18px;
    align-items: start;
}
.split-layout-3col > * {
    min-width: 0;
}

@media (max-width: 1280px) {
    .split-layout-grid {
        grid-template-columns: 1fr 320px;
        gap: 16px;
    }
    .split-layout-3col {
        grid-template-columns: 220px 1fr 310px;
        gap: 14px;
    }
}

@media (max-width: 1024px) {
    .split-layout-grid {
        grid-template-columns: 1fr;
    }
    .split-layout-3col {
        grid-template-columns: 1fr;
    }
}

/* Top Bar / Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: none;
    background: transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--brand-plum);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(88, 20, 75, 0.18);
}

.btn-primary:hover {
    background-color: var(--brand-plum-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 20, 75, 0.25);
}

.btn-outline {
    background-color: #ffffff;
    border: 1px solid #d8c2d5;
    color: var(--text-heading);
}

.btn-outline:hover {
    background-color: var(--brand-plum-light);
    border-color: #c9acc5;
    color: var(--brand-plum);
}

.dropdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #ffffff;
    border: 1px solid #d8c2d5;
    color: var(--text-heading);
    border-radius: var(--radius-pill);
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--alert-bg);
    border: 1px solid var(--alert-border);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    color: var(--alert-text);
    font-size: 13px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.alert-banner:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(139, 30, 63, 0.1);
}

.alert-bell {
    color: #e22d5a;
    display: flex;
    align-items: center;
}

.alert-banner strong {
    font-weight: 700;
}

/* Primary KPI Grid (4 Large Cards) */
.kpi-large-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.kpi-card-large {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.kpi-card-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #dfccd9;
}

.kpi-card-large .card-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-box.lavender {
    background-color: #f4ecfa;
    color: var(--brand-plum);
}

.kpi-icon-box.rose {
    background-color: #fdedf2;
    color: #a82e5b;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    margin-top: 2px;
    letter-spacing: -0.3px;
}

/* Wave Glow Backgrounds for KPI cards */
.kpi-card-large::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 100px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.kpi-card-large.wave-purple::after {
    background: radial-gradient(circle, rgba(235, 215, 250, 0.7) 0%, rgba(235, 215, 250, 0) 70%);
}

.kpi-card-large.wave-pink::after {
    background: radial-gradient(circle, rgba(254, 222, 234, 0.7) 0%, rgba(254, 222, 234, 0) 70%);
}

.mannequin-art {
    position: absolute;
    right: 0;
    bottom: -6px;
    height: 95px;
    width: auto;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
}

/* Secondary KPI Grid (5 Small Row Cards) */
.kpi-small-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.kpi-card-small {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.kpi-card-small:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #dfccd9;
}

.kpi-small-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-small-icon.purple {
    background-color: #f4ecfa;
    color: var(--brand-plum);
}

.kpi-small-icon.pink {
    background-color: #fdedf2;
    color: #a82e5b;
}

.kpi-small-icon.red {
    background-color: #feeaed;
    color: #c7254e;
}

.kpi-small-text {
    display: flex;
    flex-direction: column;
}

.kpi-small-label {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.kpi-small-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.2;
}

.kpi-small-value.highlight-red {
    color: #c7254e;
}

/* Orders Table Card */
.content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 18px 22px;
    box-shadow: var(--shadow-card);
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-group svg {
    color: var(--brand-plum);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
}

.card-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 12px;
    color: #8b7588;
    pointer-events: none;
}

.search-input {
    background-color: #ffffff;
    border: 1px solid #dcc4d8;
    border-radius: var(--radius-sm);
    padding: 7px 12px 7px 34px;
    font-size: 12.5px;
    width: 275px;
    color: var(--text-heading);
    outline: none;
    transition: border-color 0.18s ease;
}

.search-input:focus {
    border-color: var(--brand-plum);
}

.filter-select {
    background-color: #ffffff;
    border: 1px solid #dcc4d8;
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 12.5px;
    color: var(--text-heading);
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--brand-plum);
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
}

.boutique-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.boutique-table thead th {
    background-color: #f9f2f8;
    color: var(--text-heading);
    font-size: 12.5px;
    font-weight: 600;
    padding: 10px 14px;
    border: none;
}

.boutique-table thead th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.boutique-table thead th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.boutique-table tbody td {
    padding: 13px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

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

.boutique-table tbody tr:hover {
    background-color: #faf5f9;
}

.order-id {
    font-weight: 700;
    color: var(--brand-plum);
}

.customer-name {
    font-weight: 500;
    color: var(--text-heading);
}

.garment-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.garment-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.date-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-body);
}

.date-cell svg {
    color: #8f798d;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.badge-in-stitching {
    background-color: #ede4f5;
    color: #5e1c75;
}

.badge-trial-pending {
    background-color: #fbeadb;
    color: #9c4b18;
}

.badge-cutting {
    background-color: #e5effd;
    color: #175ea6;
}

.badge-ready {
    background-color: #ddf6e8;
    color: #187740;
}

.badge-delivered {
    background-color: #e9e5eb;
    color: #5d4f5c;
}

.amount-cell {
    font-weight: 700;
    color: var(--text-heading);
    font-size: 13.5px;
}

.action-menu-btn {
    background: transparent;
    border: none;
    color: #8b7588;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.action-menu-btn:hover {
    background-color: #f1e4ef;
    color: var(--brand-plum);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(46, 11, 40, 0.45);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.modal-box {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(46, 11, 40, 0.2);
    border: 1px solid var(--border-color);
}

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

.modal-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #796677;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 22px 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #faf5f9;
    border-bottom-left-radius: var(--radius-card);
    border-bottom-right-radius: var(--radius-card);
}

/* Large modal modifier */
.modal-box-lg {
    max-width: 680px;
}

/* Modal Nav Tabs */
.modal-nav-tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fdfafc;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-nav-tab {
    padding: 11px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.18s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modal-nav-tab:hover {
    color: var(--brand-plum);
}

.modal-nav-tab.active {
    color: var(--brand-plum);
    border-bottom-color: var(--brand-plum);
    font-weight: 700;
}

/* Photo Upload Components */
.photo-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #fcf8fa;
    border: 1.5px dashed #ddc2d8;
    border-radius: 14px;
    margin-bottom: 16px;
}

.photo-preview-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #f5e6f2;
    color: var(--brand-plum);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(88, 20, 75, 0.12);
    overflow: hidden;
    flex-shrink: 0;
}

.photo-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.extra-photos-dropzone {
    padding: 14px;
    border: 1.5px dashed #ddc2d8;
    background: #fdfafd;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.extra-photos-dropzone:hover {
    border-color: var(--brand-plum);
    background: var(--brand-plum-subtle);
}

.extra-photos-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.extra-photo-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Style Pill Checkbox */
.style-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-pill-item input[type="checkbox"] {
    display: none;
}

.style-pill-item label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-heading);
    background: #ffffff;
    border: 1px solid #dcc4d8;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.style-pill-item input[type="checkbox"]:checked + label {
    background: var(--brand-plum);
    color: #ffffff;
    border-color: var(--brand-plum);
    box-shadow: 0 2px 8px rgba(88, 20, 75, 0.2);
}

/* Customer Dossier Photo Strip */
.dossier-photos-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 8px;
    -webkit-overflow-scrolling: touch;
}

.dossier-photos-strip img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.dossier-photos-strip img:hover {
    transform: scale(1.05);
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #dcc4d8;
    border-radius: 10px;
    background-color: #ffffff;
    color: var(--text-heading);
    font-size: 13px;
    outline: none;
    transition: border-color 0.18s ease;
}

.form-control:focus {
    border-color: var(--brand-plum);
    box-shadow: 0 0 0 3px rgba(88, 20, 75, 0.1);
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-group {
    flex: 1;
}

.settings-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

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

/* Mobile Toggle Button */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--brand-plum);
    cursor: pointer;
    padding: 6px;
}

/* Mobile Top Bar (Hidden on Desktop) */
.mobile-top-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 14px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 95;
    box-shadow: 0 1px 4px rgba(88, 20, 75, 0.04);
}

.mobile-bar-btn {
    background: transparent;
    border: none;
    color: var(--brand-plum);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.mobile-bar-btn:active {
    background-color: var(--brand-plum-light);
}

.mobile-bar-btn-primary {
    background-color: var(--brand-plum);
    color: #ffffff;
    border-radius: var(--radius-pill);
    width: 34px;
    height: 34px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(88, 20, 75, 0.2);
}

.mobile-bar-btn-primary:active {
    background-color: var(--brand-plum-hover);
}

.mobile-bar-logo {
    display: flex;
    align-items: center;
}

.sidebar-top-row {
    display: none;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--brand-plum);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

/* Mobile Bottom Navigation Bar (App-Style) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 2px 4px calc(2px + env(safe-area-inset-bottom, 0px)) 4px;
    box-shadow: 0 -3px 12px rgba(88, 20, 75, 0.06);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    color: #7d6b7b;
    font-size: 10px;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0 2px;
}

.mobile-nav-item span {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-nav-item svg {
    color: inherit;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.mobile-nav-item:active {
    transform: scale(0.92);
}

.mobile-nav-item.active {
    color: var(--brand-plum);
    font-weight: 700;
}

.mobile-nav-item.active svg {
    color: var(--brand-plum);
    stroke-width: 2.2;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(48, 9, 44, 0.45);
    backdrop-filter: blur(2px);
    z-index: 105;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* =========================================
   APPOINTMENTS & TRIALS (Matching Image 5)
   ========================================= */
.mini-calendar-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    margin-bottom: 14px;
}

.mini-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-heading);
    font-size: 13.5px;
}

.mini-cal-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.15s ease;
}

.mini-cal-btn:hover {
    background: var(--brand-plum-subtle);
    color: var(--brand-plum);
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.mini-cal-head {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    padding-bottom: 4px;
    text-align: center;
}

.mini-cal-day {
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-body);
    text-align: center;
    box-sizing: border-box;
}
    font-size: 12px;
    font-weight: 500;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-body);
}

.mini-cal-day:hover {
    background: var(--brand-plum-subtle);
    color: var(--brand-plum);
}

.mini-cal-day.active {
    background: var(--brand-plum);
    color: #ffffff !important;
    font-weight: 700;
}

.quick-actions-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.quick-actions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.quick-action-item {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.quick-action-item:last-child {
    margin-bottom: 0;
}

.quick-action-item:hover {
    border-color: var(--brand-plum);
    color: var(--brand-plum);
    background: var(--brand-plum-subtle);
}

/* Timeline center card */
.view-switch-tabs {
    display: inline-flex;
    background: #f7eff6;
    padding: 3px;
    border-radius: 9999px;
    gap: 2px;
}

.view-tab-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-body);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-tab-btn.active {
    background: var(--brand-plum);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(88,20,75,0.18);
}

.day-navigator {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-heading);
    background: #ffffff;
}

.day-navigator button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 700;
    padding: 2px 4px;
}

.day-navigator button:hover {
    color: var(--brand-plum);
}

.apt-timeline {
    position: relative;
    padding-left: 18px;
    margin-top: 14px;
}

.apt-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 20px;
    bottom: 24px;
    width: 2px;
    background: #eddceb;
}

.apt-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    cursor: pointer;
}

.apt-timeline-dot {
    position: absolute;
    left: -18px;
    top: 24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #caa6c2;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #eddceb;
    transition: all 0.2s ease;
}

.apt-timeline-item.active .apt-timeline-dot {
    background: var(--brand-plum);
    box-shadow: 0 0 0 3px #dac2d5;
}

.apt-card {
    flex: 1;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.18s ease;
}

.apt-timeline-item.active .apt-card {
    border-color: var(--brand-plum);
    background: #fdfafd;
    box-shadow: 0 3px 12px rgba(88, 20, 75, 0.08);
}

.apt-card:hover {
    border-color: var(--brand-plum);
}

.apt-time-badge {
    background: #f8eff7;
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center;
    min-width: 82px;
    flex-shrink: 0;
}

.apt-time-badge .start {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-plum);
}

.apt-time-badge .end {
    font-size: 10px;
    color: var(--text-muted);
}

.badge-checked-in {
    background: #e5effd;
    color: #175ea6;
}

/* Selected Appointment Details panel */
.apt-dossier-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 14px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.apt-dossier-watermark {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 110px;
    height: 110px;
    opacity: 0.12;
    pointer-events: none;
}

.ios-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.ios-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5d8e4;
    transition: .25s;
    border-radius: 20px;
}

.ios-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.ios-toggle input:checked + .ios-toggle-slider {
    background-color: var(--brand-plum);
}

.ios-toggle input:checked + .ios-toggle-slider:before {
    transform: translateX(16px);
}

/* =========================================
   RESPONSIVE & MOBILE-FIRST BREAKPOINTS
   ========================================= */

@media (max-width: 1180px) {
    .kpi-large-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kpi-small-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet & Mobile Screens (< 860px) */
@media (max-width: 860px) {
    .mobile-top-bar {
        display: flex;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .sidebar-top-row {
        display: flex;
    }
    .sidebar-close-btn {
        display: inline-flex;
    }

    /* Hide desktop inline burger toggle in page content */
    .mobile-nav-toggle {
        display: none !important;
    }

    /* Off-Canvas Slide Drawer */
    .app-sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 110;
        background-color: #ffffff;
        box-shadow: none;
        transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(46, 11, 40, 0.18);
    }

    .app-main {
        margin-left: 0 !important;
        padding: 16px 14px calc(76px + env(safe-area-inset-bottom, 0px)) 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    .dashboard-header {
        margin-bottom: 14px;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    /* Swipeable horizontal pill chips for action buttons */
    .header-actions {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        padding-bottom: 4px;
        gap: 8px;
    }

    .header-actions::-webkit-scrollbar {
        display: none;
    }

    .header-actions .btn,
    .header-actions .dropdown-pill {
        flex-shrink: 0;
        font-size: 12px;
        padding: 7px 14px;
    }

    /* Form rows collapse to clean vertical stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Inputs prevent iOS auto-zoom */
    .form-control,
    .search-input,
    .filter-select {
        font-size: 15px !important;
    }
}

/* Phone Screen Specifically (< 640px) */
@media (max-width: 640px) {
    /* 4 Large KPI Cards: Sleek 2x2 Phone App Grid */
    .kpi-large-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    .kpi-card-large {
        padding: 10px 8px !important;
        border-radius: 14px !important;
        min-height: 74px;
        min-width: 0 !important;
    }

    .kpi-info {
        min-width: 0 !important;
    }

    .kpi-card-large .card-inner {
        gap: 8px !important;
        min-width: 0 !important;
    }

    .kpi-icon-box {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }

    .kpi-icon-box svg {
        width: 17px !important;
        height: 17px !important;
    }

    .kpi-label {
        font-size: 10px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .kpi-value {
        font-size: 16px !important;
    }

    .mannequin-art {
        height: 68px !important;
        opacity: 0.75 !important;
    }

    /* 5 Small Metric Cards: 2-column Phone Grid */
    .kpi-small-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }

    .kpi-card-small {
        padding: 9px 10px !important;
        border-radius: 12px !important;
        gap: 8px !important;
    }

    .kpi-card-small:last-child {
        grid-column: span 2;
    }

    .kpi-small-icon {
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
    }

    .kpi-small-icon svg {
        width: 15px !important;
        height: 15px !important;
    }

    .kpi-small-label {
        font-size: 10.5px !important;
    }

    .kpi-small-value {
        font-size: 14.5px !important;
    }

    /* Alert Banner Phone Polish */
    .alert-banner {
        font-size: 11.5px !important;
        padding: 8px 12px !important;
        margin-bottom: 14px !important;
    }

    /* Recent Orders & Content Cards */
    .content-card {
        padding: 14px 12px !important;
        border-radius: 16px !important;
    }

    .content-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-filters {
        width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .search-box {
        width: 100% !important;
    }

    .search-input {
        width: 100% !important;
    }

    .filter-select {
        width: 100% !important;
    }

    /* Table Horizontal Scroll with Touch */
    .table-responsive {
        margin: 0 -12px;
        padding: 0 12px;
        -webkit-overflow-scrolling: touch;
    }

    .boutique-table th,
    .boutique-table td {
        padding: 10px 10px !important;
        white-space: nowrap !important;
        font-size: 12px !important;
    }

    /* Bottom Sheet Style Modals on Mobile Phones */
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-box {
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 88vh !important;
        animation: slideUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-header {
        padding: 14px 18px !important;
        position: sticky;
        top: 0;
        background: #ffffff;
        z-index: 10;
    }

    .modal-body {
        padding: 16px 18px !important;
    }

    .modal-footer {
        padding: 12px 18px !important;
        position: sticky;
        bottom: 0;
        background: #ffffff;
        z-index: 10;
    }

    .modal-footer .btn {
        flex: 1;
        padding: 10px 14px !important;
    }

    /* Appointments Mobile Polish */
    .apt-card {
        flex-wrap: wrap;
        gap: 8px !important;
        padding: 10px !important;
    }
    .apt-time-badge {
        min-width: 68px !important;
        padding: 4px 6px !important;
    }
    .mini-calendar-box {
        padding: 10px 8px !important;
    }
    .mini-cal-day {
        font-size: 11px !important;
        padding: 4px 0 !important;
    }
    .day-navigator {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
    .view-tab-btn {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .order-cart-item-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ==========================================================================
   Order Creation Modal: Customer Search, Garment Cart & Calculations
   ========================================================================== */
.cust-search-wrapper {
    position: relative;
    width: 100%;
}
.cust-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(88, 20, 75, 0.16);
    border: 1px solid var(--border-color);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}
.cust-search-dropdown.active {
    display: block;
}
.cust-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f6edf4;
    transition: background 0.15s ease;
}
.cust-search-item:last-child {
    border-bottom: none;
}
.cust-search-item:hover {
    background: #faf2f8;
}
.cust-search-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cust-search-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee0ec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-plum);
}
.cust-search-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-heading);
}
.cust-search-phone {
    font-size: 11.5px;
    color: var(--text-muted);
}
.cust-search-badge {
    font-size: 11px;
    background: #f4e9f3;
    color: var(--brand-plum);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

/* Linked Customer Card inside Modal */
.linked-cust-card {
    background: linear-gradient(135deg, #fdf8fc 0%, #faedf7 100%);
    border: 1px solid #e8cfe3;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.linked-cust-details {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.linked-cust-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(88, 20, 75, 0.15);
    background: #f0e1ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--brand-plum);
    font-size: 14px;
    flex-shrink: 0;
}
.linked-cust-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand-plum-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.linked-cust-meta {
    font-size: 11.5px;
    color: #6a4a64;
    margin-top: 3px;
}
.linked-measure-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e3cde0;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-plum);
    margin-top: 4px;
    margin-right: 4px;
}

/* Garment Cart Builder */
.order-cart-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}
.order-cart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.order-cart-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}
.order-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.order-cart-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f0e3ee;
    background: #fdfafc;
}
.order-cart-table td {
    padding: 10px;
    font-size: 12.5px;
    border-bottom: 1px solid #f4eaf2;
    vertical-align: middle;
}
.order-cart-table tr:last-child td {
    border-bottom: none;
}
.cart-price-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fdf8fc;
    border: 1px solid #ebd4e7;
    border-radius: 8px;
    padding: 4px 8px;
    width: 120px;
}
.cart-price-input {
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-plum);
    width: 100%;
    text-align: right;
    outline: none;
}
.cart-del-btn {
    background: #faebee;
    border: none;
    color: #c7254e;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease;
}
.cart-del-btn:hover {
    background: #f5d3d9;
}
.cart-empty-state {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    background: #fdfafc;
    border-radius: 8px;
    border: 1px dashed #e6d3e3;
    margin-top: 8px;
}

/* Lining Option Card */
.lining-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fcf6fa;
    border: 1px solid #edd5e8;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    gap: 12px;
    cursor: pointer;
}
.lining-option-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lining-option-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-plum);
    cursor: pointer;
}
.lining-option-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-plum);
}

/* Order Totals Summary Strip */
.order-totals-strip {
    background: #faf4f9;
    border: 1px solid #ebd6e8;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.order-totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    align-items: center;
}
.order-total-col {
    display: flex;
    flex-direction: column;
}
.order-total-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.order-total-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
}
.order-balance-badge {
    background: #eaf7ed;
    color: #1a753c;
    border: 1px solid #cce8d3;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-block;
    text-align: center;
}
.order-balance-badge.due {
    background: #fdf0f2;
    color: #c7254e;
    border-color: #f7d1d8;
}

/* ==========================================================================
   Universal View Mode Switcher: Cards vs Table
   ========================================================================== */
.view-mode-toggle {
    display: inline-flex;
    align-items: center;
    background: #f8eff6;
    border: 1px solid #ebd4e7;
    border-radius: 999px;
    padding: 3px;
    gap: 3px;
    flex-shrink: 0;
}
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 11.5px;
    font-weight: 600;
    color: #796677;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    line-height: 1;
}
.view-toggle-btn:hover {
    color: var(--brand-plum);
}
.view-toggle-btn.active {
    background: var(--brand-plum);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(88, 20, 75, 0.28);
}
.view-toggle-btn svg {
    flex-shrink: 0;
}

/* View Mode Container Switching */
.view-mode-container.view-active-card .view-table-section {
    display: none !important;
}
.view-mode-container.view-active-card .view-cards-section {
    display: grid !important;
}

.view-mode-container.view-active-table .view-table-section {
    display: block !important;
}
.view-mode-container.view-active-table .view-cards-section {
    display: none !important;
}

/* Boutique Systematic Cards Grid */
.boutique-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 15px;
    margin-top: 14px;
    align-items: stretch;
}
.boutique-entity-card {
    background: #ffffff;
    border: 1px solid #ebd8e8;
    border-radius: 14px;
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 11px;
    min-height: 172px;
    box-sizing: border-box;
    box-shadow: 0 2px 7px rgba(88, 20, 75, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    position: relative;
    user-select: none;
    overflow: hidden;
}
.boutique-entity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 20, 75, 0.12);
    border-color: #d8b7cf;
}
.entity-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.entity-card-badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.entity-card-id-pill {
    font-family: monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-plum);
    background: #faf2f8;
    border: 1px solid #e8cfe2;
    padding: 2.5px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}
.entity-card-amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.2px;
}
.entity-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.order-card-customer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.order-card-customer-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.entity-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-card-phone {
    font-size: 11.5px;
    color: #796578;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-card-garment-box {
    background: #faf4f9;
    border: 1px solid #f0e1ee;
    border-radius: 9px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.boutique-entity-card:hover .order-card-garment-box {
    background: #f7edf5;
    border-color: #e5cde0;
}
.entity-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}
.entity-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed #f2e3ee;
    font-size: 11.5px;
    color: var(--text-muted);
    overflow: hidden;
}
.entity-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.order-tailor-meta {
    color: var(--brand-plum);
    font-weight: 600;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-content: flex-end;
}
.order-tailor-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   Mobile Dossier Navigation & Smooth Highlight Pulse
   ========================================================================== */
@keyframes dossierHighlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(88, 20, 75, 0.45); }
    50% { box-shadow: 0 0 0 12px rgba(88, 20, 75, 0); }
    100% { box-shadow: 0 0 0 0 rgba(88, 20, 75, 0); }
}
.panel-highlight-pulse {
    animation: dossierHighlightPulse 1.2s ease-out;
    border-radius: 16px;
}
.mobile-dossier-nav-bar {
    display: none;
}
@media (max-width: 1024px) {
    #customerDossierPanel, #customersViewContainer { scroll-margin-top: 72px; }
    .mobile-dossier-nav-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        background: #ffffff;
        border: 1px solid #ebd3e6;
        border-radius: 12px;
        padding: 10px 14px;
        margin-bottom: 10px;
        box-shadow: 0 2px 8px rgba(88, 20, 75, 0.06);
        position: sticky;
        top: 60px;
        z-index: 20;
    }
    .mobile-back-to-list-btn {
        font-size: 12px;
        font-weight: 600;
        padding: 6px 12px;
        color: var(--brand-plum);
        border-color: #dfbdd8;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
}

/* ==========================================================================
   Uniform Compact Garments Display (Card & Table Format)
   ========================================================================== */
.garment-compact-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
}
.garment-main-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}
.garment-more-badge {
    display: inline-flex;
    align-items: center;
    padding: 1.5px 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--brand-plum);
    background: #faf0f8;
    border: 1px solid #ebd3e6;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    line-height: 1.35;
    transition: all 0.15s ease;
}
.garment-more-badge:hover {
    background: #f4dbeee0;
    border-color: #dfb2d4;
    color: #4a0d3e;
}

/* Itemized Garments List in Modal */
.order-garments-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.order-garment-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4a2d45;
    line-height: 1.35;
}
.order-garment-bullet {
    color: var(--brand-plum);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

/* Modal Job Card Itemized Table / List Box */
.modal-order-items-box {
    background: #fdfafc;
    border: 1px solid #ebd8e7;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.modal-order-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid #ebd8e7;
    padding-bottom: 8px;
    margin-bottom: 6px;
}
.modal-order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #f2e3ee;
    font-size: 12.5px;
    gap: 12px;
}
.modal-order-item-row:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}
.modal-order-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-heading);
    flex: 1;
}
.modal-order-item-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f4e4f1;
    color: var(--brand-plum);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.modal-order-item-price {
    font-weight: 700;
    color: var(--brand-plum);
    font-size: 13px;
    background: #ffffff;
    border: 1px solid #ebd4e7;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}




/* Keep completed order actions hidden even when button styles set display. */
#orderCompletionForm [hidden] { display: none !important; }
