/* ==========================================================================
   STYLE.CSS - The Bridal Suite Design System
   Highly customized luxury styling matching www.sarahstoutebespoke.com
   ========================================================================== */

/* 1. CUSTOM FONT LOADERS */
@font-face {
    font-family: 'Maginia';
    src: url('Fonts/Maginia.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url('Fonts/Graphik-Font-Family/GraphikRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url('Fonts/Graphik-Font-Family/GraphikLight.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url('Fonts/Graphik-Font-Family/GraphikMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url('Fonts/Graphik-Font-Family/GraphikSemibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Graphik';
    src: url('Fonts/Graphik-Font-Family/GraphikBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* 2. DESIGN TOKENS & SYSTEM VARIABLES */
:root {
    /* Brand Color Swatches */
    --bg-luxe-ivory: #FAF6F0;
    --surface-alabaster: #FFFFFF;
    --text-charcoal: #231F20;
    --text-taupe: #706E6B;
    --accent-gold: #C5A880;
    --accent-gold-hover: #A3875B;
    --accent-gold-light: #F4EFEB;
    --border-gold-light: #E5D9C4;
    --border-light: #EAE6E2;
    --text-muted: #9C9A96;
    
    /* Muted desaturated workflow colors */
    --status-1-bg: #EAECEE; --status-1-text: #566573; /* First Fitting */
    --status-2-bg: #FCF3CF; --status-2-text: #B7950B; /* Quote Process */
    --status-3-bg: #E3ECE1; --status-3-text: #4D6D45; /* Ready to Sew */
    --status-ip-bg: #F5EAE6; --status-ip-text: #966E5A; /* In Progress */
    --status-4-bg: #E2EEF5; --status-4-text: #3D7296; /* Ready to Email */
    --status-5-bg: #F4EFEB; --status-5-text: #A08365; /* Follow-up Fitting */
    --status-6-bg: #F5E8E8; --status-6-text: #9A5858; /* Final Fitting */
    --status-7-bg: #EBDEF0; --status-7-text: #7D3C98; /* Ready to Email Final Fitting */
    --status-8-bg: #EBEAE6; --status-8-text: #63615F; /* Archived/Completed */

    /* Typography scale */
    --font-primary: 'Maginia', serif;
    --font-secondary: 'Graphik', sans-serif;

    /* Shadows & Borders */
    --shadow-subtle: 0 8px 30px rgba(35, 31, 32, 0.03);
    --shadow-card: 0 4px 16px rgba(35, 31, 32, 0.02);
    --shadow-card-hover: 0 12px 28px rgba(197, 168, 128, 0.12);
    --shadow-modal: 0 24px 80px rgba(35, 31, 32, 0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 3. RESET & BASE LAYOUT */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-luxe-ivory);
    color: var(--text-charcoal);
    font-family: var(--font-secondary);
    font-size: 14px;
    height: 100vh;
    overflow: hidden;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-gold-light);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* 4. SPLASH LOADING SCREEN */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-luxe-ivory);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
    animation: splash-pulse 2.2s infinite ease-in-out;
}

.splash-text {
    font-family: var(--font-primary);
    font-size: 32px;
    color: var(--text-charcoal);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fade-in-up 1.2s forwards 0.4s ease-out;
}

@keyframes splash-pulse {
    0% { transform: scale(0.96); opacity: 0.85; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(0.96); opacity: 0.85; }
}

@keyframes fade-in-up {
    to { opacity: 1; transform: translateY(0); }
    from { opacity: 0; transform: translateY(15px); }
}

/* 5. APP SHELL LAYOUT */
#app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 6. HEADER DESIGN */
.app-header {
    background-color: var(--surface-alabaster);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-subtle);
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    height: 48px;
}

.search-container {
    flex: 1;
    max-width: 480px;
    margin: 0 40px;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: var(--bg-luxe-ivory);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 10px 16px 10px 42px;
    font-family: var(--font-secondary);
    color: var(--text-charcoal);
    font-size: 13.5px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--accent-gold);
    background-color: var(--surface-alabaster);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-taupe);
    pointer-events: none;
}

/* User & Google Drive Section */
.meta-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.gdrive-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gdrive-indicator.connected {
    background-color: #E8F8F5;
    color: #117864;
    border-color: #A3E4D7;
}

.gdrive-indicator.disconnected {
    background-color: #FDEDEC;
    color: #922B21;
    border-color: #F5C6CB;
}

.user-selector-wrapper {
    position: relative;
}

.user-selector-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background-color: var(--accent-gold-light);
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--text-charcoal);
    transition: var(--transition-smooth);
}

.user-selector-btn:hover {
    background-color: var(--accent-gold);
    color: white;
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    width: 200px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bg-luxe-ivory);
}

.dropdown-item.active {
    color: var(--accent-gold);
}

/* 7. NAVIGATION BAR */
.navigation-bar {
    background-color: var(--surface-alabaster);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    padding: 0 32px;
    flex-shrink: 0;
    gap: 24px;
}

.nav-tab {
    padding: 16px 8px;
    font-family: var(--font-secondary);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-taupe);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.nav-tab:hover {
    color: var(--text-charcoal);
}

.nav-tab.active {
    color: var(--text-charcoal);
    border-bottom-color: var(--accent-gold);
    font-weight: 600;
}

/* 8. MAIN CONTENT VIEWS Container */
.main-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.app-view {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    padding: 24px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.app-view.active {
    display: block;
}

/* 9. KANBAN BOARD VIEW */
#kanban-view {
    padding: 20px 24px;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

#kanban-view.active {
    display: flex;
}

#kanban-view.list-layout-active {
    overflow: hidden !important; /* Keep controls bar pinned at top, let table scroll */
}

#archive-view {
    overflow: hidden; /* Keep filters pinned at top, let table scroll */
}

.kanban-board {
    display: flex;
    gap: 16px;
    flex: 1;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden; /* Ensure no vertical scrolling on the board itself */
    padding-bottom: 24px;
    align-items: stretch;
}

.kanban-column {
    flex: 0 0 280px;
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    height: calc(100% - 12px);
    max-height: calc(100% - 12px);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.kanban-column.drag-over {
    border-color: var(--accent-gold);
    background-color: var(--accent-gold-light);
    box-shadow: 0 0 15px rgba(197, 168, 128, 0.15);
}

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

.column-title {
    font-family: var(--font-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-charcoal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-count {
    font-size: 11.5px;
    font-weight: 600;
    background-color: var(--bg-luxe-ivory);
    color: var(--text-taupe);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.cards-container {
    flex: 1;
    padding: 12px 12px 48px 12px; /* Increase bottom padding to 48px to prevent bottom cards from being cut off or overlapped by scrollbars */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

/* Prevent browser from collapsing padding-bottom inside flex scroll containers */
.cards-container::after {
    content: "";
    display: block;
    height: 48px;
    flex-shrink: 0;
    pointer-events: none;
}

/* KANBAN CARDS */
.kanban-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: grab;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.kanban-card:active {
    cursor: grabbing;
}

/* Sync warning banner (cloud writes failing / working offline) */
.sync-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #FBE9E7;
    color: #8E3B2E;
    border-bottom: 1px solid #E8B5A8;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
}

.sync-banner i {
    font-size: 15px;
}

.sync-banner.hidden {
    display: none;
}

/* Live cloud-sync status chip in the header (synced / syncing / offline) */
.sync-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.sync-status.hidden {
    display: none;
}

.sync-status[data-state="synced"] {
    background-color: #E8F8F5;
    color: #117864;
    border-color: #A3E4D7;
}

.sync-status[data-state="syncing"] {
    background-color: #FEF9E7;
    color: #9A7D0A;
    border-color: #F7DC6F;
}

.sync-status[data-state="syncing"] i {
    animation: sync-pulse 1.1s ease-in-out infinite;
}

.sync-status[data-state="offline"] {
    background-color: #FDEDEC;
    color: #922B21;
    border-color: #F5C6CB;
}

@keyframes sync-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Leave room at top-right of each card for the Move button */
.kanban-card .card-title {
    padding-right: 40px;
}

/* "Move" button on each kanban card (tablet-friendly alternative to dragging) */
.card-move-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background-color: var(--surface-alabaster);
    color: var(--text-taupe);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    z-index: 2;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.card-move-btn:hover {
    background-color: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
}

/* Stage picker list inside the Move popup */
.move-stage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

.move-stage-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--surface-alabaster);
    color: var(--text-charcoal);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.move-stage-option:hover {
    background-color: var(--accent-gold-light);
    border-color: var(--accent-gold);
}

.move-stage-option.current {
    opacity: 0.6;
    cursor: default;
}

.move-current-tag {
    margin-left: auto;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-taupe);
}

/* Staff guide modal */
.guide-modal-box {
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

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

.guide-content {
    overflow-y: auto;
    padding-right: 6px;
    line-height: 1.55;
    color: var(--text-charcoal);
    font-size: 14px;
}

.guide-content .guide-h {
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--text-charcoal);
    margin: 18px 0 6px;
}

.guide-content .guide-h:first-child {
    margin-top: 0;
}

.guide-content p {
    margin: 6px 0;
}

.guide-list {
    margin: 6px 0 6px 4px;
    padding-left: 20px;
}

.guide-list li {
    margin: 4px 0;
}

.kanban-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-gold-light);
    box-shadow: var(--shadow-card-hover);
}

.card-title {
    font-family: var(--font-primary);
    font-size: 17.5px;
    color: var(--text-charcoal);
    line-height: 1.2;
}

.card-date {
    font-size: 12px;
    color: var(--text-taupe);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-date i {
    color: var(--accent-gold);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-light);
    padding-top: 8px;
    margin-top: 2px;
}

.card-badges {
    display: flex;
    gap: 6px;
}

.badge {
    font-size: 10.5px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-paid {
    background-color: #E8F8F5;
    color: #117864;
}

.badge-unpaid {
    background-color: #FDEDEC;
    color: #C0392B;
}

.badge-quote {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold-hover);
    border: 1px solid var(--border-gold-light);
}

.card-assignee {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--text-taupe);
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.card-assignee.sarah {
    background-color: var(--accent-gold);
}

.card-assignee.annabel {
    background-color: #5D6D7E;
}

/* Floating Action Button (New Bride) */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: var(--text-charcoal);
    color: var(--bg-luxe-ivory);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 8px 24px rgba(35, 31, 32, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 500;
}

.fab:hover {
    background-color: var(--accent-gold);
    transform: scale(1.08);
}

/* 10. DETAIL MODAL (SLIDE-IN DRAWER) */
.detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 31, 32, 0.25);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    justify-content: flex-end;
    transition: opacity 0.4s ease;
}

.detail-modal-overlay.show {
    display: flex;
}

.detail-modal {
    width: 820px;
    max-width: 90%;
    height: 100%;
    background-color: var(--bg-luxe-ivory);
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.detail-modal-overlay.show .detail-modal {
    transform: translateX(0);
}

.modal-header {
    background-color: var(--surface-alabaster);
    border-bottom: 1px solid var(--border-light);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-taupe);
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 28px;
    color: var(--text-charcoal);
}

.close-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-taupe);
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: var(--text-charcoal);
    transform: scale(1.1);
}

/* Modal Body Layout */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

/* Left Form Section */
.modal-form-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

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

.form-label {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-taupe);
}

.form-input, .form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-secondary);
    font-size: 13.5px;
    color: var(--text-charcoal);
    transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-gold);
    outline: none;
}

/* Luxury Custom Date Picker styling with clickable wrapper */
.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-date-input {
    padding-right: 36px; /* leave room for calendar icon */
    cursor: pointer;
}

/* Hide native browser calendar icon to prevent duplicate icons */
.custom-date-input::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
}

.date-input-icon {
    position: absolute;
    right: 12px;
    color: var(--accent-gold); /* elegant gold brand color */
    pointer-events: none; /* allows clicks to pass directly to input */
    font-size: 15px;
    transition: var(--transition-smooth);
}

.custom-date-input:focus + .date-input-icon {
    color: var(--accent-gold-hover);
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-gold);
}

/* Right Tabs & Details Section */
.modal-details-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.details-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
    margin-bottom: 20px;
}

.detail-tab {
    padding: 10px 4px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-taupe);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.detail-tab.active {
    color: var(--text-charcoal);
    border-bottom-color: var(--accent-gold);
}

.detail-tab-pane {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.detail-tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* TAB: MANUAL NOTES */
.notes-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.note-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-md);
    background-color: var(--surface-alabaster);
    font-family: var(--font-secondary);
    font-size: 13.5px;
    resize: vertical;
}

.note-textarea:focus {
    border-color: var(--accent-gold);
    outline: none;
}

.btn-primary {
    background-color: var(--text-charcoal);
    color: var(--bg-luxe-ivory);
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-family: var(--font-secondary);
    font-weight: 500;
    cursor: pointer;
    align-self: flex-end;
    transition: var(--transition-smooth);
}

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

.notes-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.note-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-taupe);
    margin-bottom: 6px;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 4px;
}

.note-content {
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* TAB: PHOTOS */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.photo-card {
    aspect-ratio: 1;
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.photo-card:hover img {
    transform: scale(1.06);
}

.photo-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(35, 31, 32, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition-smooth);
}

.photo-card:hover .photo-delete-btn {
    opacity: 1;
}

.file-dropzone {
    border: 2px dashed var(--border-gold-light);
    background-color: var(--accent-gold-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-dropzone:hover {
    border-color: var(--accent-gold);
    background-color: var(--surface-alabaster);
}

.file-dropzone-icon {
    font-size: 28px;
    color: var(--accent-gold);
}

/* TAB: CONSENT */
.consent-status-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.consent-status-icon {
    font-size: 24px;
}

.consent-status-icon.active { color: #117864; }
.consent-status-icon.missing { color: #C0392B; }

.consent-details-title {
    font-weight: 600;
}

.consent-details-text {
    font-size: 12px;
    color: var(--text-taupe);
}

/* TAB: AUDIT LOG TIMELINE */
.timeline-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 12px;
    border-left: 2px solid var(--border-gold-light);
    margin-top: 10px;
}

.timeline-item {
    position: relative;
    font-size: 12.5px;
    line-height: 1.4;
}

.timeline-node {
    position: absolute;
    left: -19px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    border: 2px solid var(--bg-luxe-ivory);
}

.timeline-meta {
    font-size: 11px;
    color: var(--text-taupe);
    margin-bottom: 2px;
}

.timeline-actor {
    font-weight: 600;
    color: var(--text-charcoal);
}

.timeline-body {
    color: var(--text-charcoal);
}

.timeline-comment {
    font-style: italic;
    color: var(--text-taupe);
    background-color: var(--surface-alabaster);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    border-left: 2px solid var(--accent-gold);
    font-size: 11.5px;
}

/* Modal Footer Buttons */
.modal-footer {
    background-color: var(--surface-alabaster);
    border-top: 1px solid var(--border-light);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
}

.btn-secondary {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-taupe);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-family: var(--font-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.btn-danger {
    background-color: #FDEDEC;
    color: #C0392B;
    border: 1px solid #F5C6CB;
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-family: var(--font-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

/* 11. AUDIT COMMENT TRIGGER MODAL */
.audit-comment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 31, 32, 0.4);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.audit-comment-modal-box {
    background-color: var(--bg-luxe-ivory);
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 440px;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 12. ARCHIVE VIEW LIST */
.archive-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.archive-title {
    font-family: var(--font-primary);
    font-size: 28px;
}

.table-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
}

/* Premium Scrollable Table Container */
.table-container {
    overflow-y: auto;
    overflow-x: auto;
    max-height: calc(100vh - 250px);
    -webkit-overflow-scrolling: touch;
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.archive-table th {
    background-color: var(--bg-luxe-ivory);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 20px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-taupe);
    position: sticky;
    top: 0;
    z-index: 10;
}

.archive-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13.5px;
}

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

.archive-table tr {
    cursor: pointer;
    transition: var(--transition-smooth);
}

.archive-table tr:hover {
    background-color: var(--bg-luxe-ivory);
}

/* 13. ANALYTICS VIEW */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.analytics-widget {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-taupe);
}

.widget-value {
    font-family: var(--font-primary);
    font-size: 32px;
    color: var(--text-charcoal);
}

.widget-trend {
    font-size: 11.5px;
    color: #117864;
}

/* Charts Wrapper */
.charts-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.chart-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    min-height: 280px;
}

/* 14. ADMIN SETTINGS */
.settings-section-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    margin-top: 24px;
}

.settings-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-heading {
    font-family: var(--font-primary);
    font-size: 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.staff-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.staff-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

/* PIN overlay modal for admin functions */
#pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 31, 32, 0.4);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pin-modal-box {
    background-color: var(--bg-luxe-ivory);
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 320px;
    text-align: center;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pin-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    display: inline-block;
    transition: var(--transition-smooth);
}

.pin-dot.filled {
    background-color: var(--accent-gold);
}

/* Full Lightbox View overlay */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 31, 32, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

#lightbox-overlay img {
    max-width: 90vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    transition: opacity 0.25s ease;
}

#lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: color 0.2s;
}

#lightbox-close:hover {
    color: var(--accent-gold);
}

/* Lightbox Content & Caption */
#lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

#lightbox-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    font-family: var(--font-primary);
    text-align: center;
    margin-top: 15px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Lightbox Navigation Buttons */
.lightbox-nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 72px;
    font-weight: 100;
    cursor: pointer;
    padding: 24px;
    z-index: 10000;
    transition: color 0.2s, transform 0.2s;
    user-select: none;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.lightbox-nav-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.15);
}

.lightbox-nav-btn:active {
    transform: scale(0.92);
}

#lightbox-prev {
    position: absolute;
    left: 24px;
}

#lightbox-next {
    position: absolute;
    right: 24px;
}

@media (max-width: 768px) {
    .lightbox-nav-btn {
        font-size: 48px;
        padding: 12px;
    }
    #lightbox-prev { left: 8px; }
    #lightbox-next { right: 8px; }
}

/* 15. DIGITAL SIGNATURE OVERLAY & CANVAS CONTRACT */
#signature-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 31, 32, 0.4);
    backdrop-filter: blur(4px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.signature-modal-box {
    background-color: var(--bg-luxe-ivory);
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-lg);
    width: 650px;
    max-width: 95%;
    max-height: 90vh;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.signature-modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-text-container {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 12.5px;
    line-height: 1.5;
    max-height: 250px;
    overflow-y: auto;
    color: var(--text-charcoal);
}

.contract-clause {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.contract-clause:last-child {
    margin-bottom: 0;
}

.signature-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.signature-canvas-wrapper {
    background-color: var(--surface-alabaster);
    border: 2px dashed var(--border-gold-light);
    border-radius: var(--radius-md);
    position: relative;
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#signature-canvas {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    cursor: crosshair;
    touch-action: none;
}

.signature-canvas-label {
    position: absolute;
    bottom: 8px;
    left: 12px;
    font-size: 11px;
    color: var(--text-taupe);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signature-modal-footer {
    padding: 16px 24px;
    background-color: var(--surface-alabaster);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 16. KANBAN COLUMN SPECIFIC BORDERS */
.kanban-column[data-status="First Fitting"] .column-header {
    border-bottom: 3px solid var(--status-1-text);
}
.kanban-column[data-status="First Fitting"] .column-title i {
    color: var(--status-1-text);
}
.kanban-column[data-status="Quote Process"] .column-header {
    border-bottom: 3px solid var(--status-2-text);
}
.kanban-column[data-status="Quote Process"] .column-title i {
    color: var(--status-2-text);
}
.kanban-column[data-status="Ready to Sew"] .column-header {
    border-bottom: 3px solid var(--status-3-text);
}
.kanban-column[data-status="Ready to Sew"] .column-title i {
    color: var(--status-3-text);
}
.kanban-column[data-status="In Progress"] .column-header {
    border-bottom: 3px solid var(--status-ip-text);
}
.kanban-column[data-status="In Progress"] .column-title i {
    color: var(--status-ip-text);
}
.kanban-column[data-status="Ready to Email"] .column-header {
    border-bottom: 3px solid var(--status-4-text);
}
.kanban-column[data-status="Ready to Email"] .column-title i {
    color: var(--status-4-text);
}
.kanban-column[data-status="Follow-up Fitting"] .column-header {
    border-bottom: 3px solid var(--status-5-text);
}
.kanban-column[data-status="Follow-up Fitting"] .column-title i {
    color: var(--status-5-text);
}
.kanban-column[data-status="Final Fitting"] .column-header {
    border-bottom: 3px solid var(--status-6-text);
}
.kanban-column[data-status="Final Fitting"] .column-title i {
    color: var(--status-6-text);
}
.kanban-column[data-status="Ready to Email Final Fitting"] .column-header {
    border-bottom: 3px solid var(--status-7-text);
}
.kanban-column[data-status="Ready to Email Final Fitting"] .column-title i {
    color: var(--status-7-text);
}

/* 17. UTILITY CLASSES */
.hidden {
    display: none !important;
}

.btn-sign-tablet {
    background-color: var(--accent-gold);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-family: var(--font-secondary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
    width: 100%;
    margin-bottom: 16px;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(197, 168, 128, 0.2);
}

.btn-sign-tablet:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 168, 128, 0.3);
}

.btn-sign-tablet:active {
    transform: translateY(0);
}

/* Dashboard Controls Bar & Navigation Elements */
.dashboard-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background-color: var(--surface-alabaster);
    padding: 12px 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
}

.workflow-tabs {
    display: flex;
    gap: 12px;
}

.workflow-tab-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-family: var(--font-secondary);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-taupe);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.workflow-tab-btn:hover {
    color: var(--text-charcoal);
    background-color: rgba(197, 168, 128, 0.08);
}

.workflow-tab-btn.active {
    background-color: var(--text-charcoal);
    color: var(--bg-luxe-ivory);
    border-color: var(--text-charcoal);
}

.workflow-tab-btn.active:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.layout-toggle-pills {
    display: flex;
    background-color: var(--bg-luxe-ivory);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 4px;
}

.layout-pill-btn {
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-family: var(--font-secondary);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-taupe);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.layout-pill-btn:hover {
    color: var(--text-charcoal);
}

.layout-pill-btn.active {
    background-color: var(--accent-gold-light);
    color: var(--accent-gold);
    font-weight: 600;
}

/* Clause Checkbox List styling */
.clause-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    cursor: pointer;
}

.clause-checkbox {
    margin-top: 2px;
    width: 20px;
    height: 20px;
    accent-color: var(--accent-gold);
    flex-shrink: 0;
    cursor: pointer;
}

.clause-number {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.clause-text {
    font-family: var(--font-secondary);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-charcoal);
}

/* ==========================================================================
   18. RESPONSIVE DESIGN & MEDIA QUERIES (TABLETS & MOBILE PHONES)
   ========================================================================== */

/* A. TABLET VIEWPORTS (Portrait/Landscape - 1024px and down) */
@media (max-width: 1024px) {
    /* Reset body and shell layout for proper touch vertical scrolling on tablets/mobile */
    body {
        position: relative;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #app-shell {
        height: auto;
        min-height: 100vh;
    }

    .main-viewport {
        overflow: visible;
    }

    .app-view {
        position: relative;
        height: auto;
        overflow-y: visible;
        padding: 20px 24px;
    }

    #kanban-view {
        overflow: visible;
    }

    #kanban-view.list-layout-active {
        overflow: visible !important;
    }

    #archive-view {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Header modifications */
    .search-container {
        margin: 0 20px;
        max-width: 360px;
    }

    /* Modal Layout - stack form and tabs vertically */
    .modal-body {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .modal-form-pane {
        max-width: 100%;
    }

    .modal-details-pane {
        height: auto;
        overflow: visible;
    }

    .detail-tab-pane {
        overflow-y: visible;
        height: auto;
    }

    /* Settings section - stack staff list and cloud sync card */
    .settings-section-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Analytics elements - stack side-by-side components */
    .charts-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* B. MOBILE VIEWPORTS (Phones - 768px and down) */
@media (max-width: 768px) {

    /* Header layout - beautiful 2-row layout */
    .app-header {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }

    .brand-section {
        order: 1;
    }

    .brand-logo {
        height: 38px;
    }

    .meta-controls {
        order: 2;
        gap: 8px;
    }

    .gdrive-indicator {
        font-size: 11px;
        padding: 4px 8px;
        gap: 4px;
    }

    .user-selector-btn {
        padding: 4px 10px;
        font-size: 12px;
        gap: 6px;
    }

    .search-container {
        order: 3;
        flex: 1 0 100%;
        max-width: 100%;
        margin: 4px 0 0 0;
    }

    .search-input {
        padding: 8px 12px 8px 36px;
        font-size: 13px;
    }

    .search-icon {
        left: 12px;
    }

    /* Navigation - smooth horizontally scrollable tab list */
    .navigation-bar {
        padding: 0 16px;
        gap: 16px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .navigation-bar::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .nav-tab {
        padding: 14px 4px;
        font-size: 12.5px;
        flex-shrink: 0;
    }

    /* Active view general padding */
    .app-view {
        padding: 16px;
    }

    /* Dashboard controls - make easy to tap stacks */
    .dashboard-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .workflow-tabs {
        flex-direction: column;
        gap: 8px;
    }

    .workflow-tab-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 13px;
    }

    .layout-toggle-pills {
        justify-content: center;
        width: 100%;
    }

    .layout-pill-btn {
        flex: 1;
        justify-content: center;
        padding: 8px;
    }

    /* Kanban Board Layout - scroll snapping with swipe peek */
    #kanban-view {
        padding: 12px;
    }

    .kanban-board {
        gap: 12px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        height: auto;
        min-height: 300px;
        max-height: 65vh;
    }

    .kanban-column {
        flex: 0 0 85vw; /* peek of the next column */
        max-height: none;
        scroll-snap-align: center;
    }

    /* Slide-in modal drawer full screen experience */
    .detail-modal {
        width: 100%;
        max-width: 100%;
    }

    .modal-header {
        padding: 16px 20px;
    }

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

    .modal-body {
        padding: 16px;
        gap: 16px;
    }

    .details-tab-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        margin-bottom: 16px;
        scrollbar-width: none;
    }

    .details-tab-nav::-webkit-scrollbar {
        display: none;
    }

    .detail-tab {
        flex-shrink: 0;
        padding: 8px 2px;
        font-size: 12px;
    }

    .modal-footer {
        padding: 12px 20px;
    }

    /* Tables horizontal responsiveness */
    .table-card {
        overflow: hidden; /* Prevent double scrollbars, table-container handles scroll */
    }

    .table-container {
        max-height: 60vh; /* Proportional height for mobile stacked controls */
    }

    .archive-table {
        min-width: 750px;
    }

    /* Floating Action Button (FAB) adjustments */
    .fab {
        bottom: 24px;
        right: 24px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* C. EXTRA SMALL VIEWS (Phones under 480px) */
@media (max-width: 480px) {
    /* Photos Grid - 2 columns instead of 3 */
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Analytics Grid - single column widgets stack */
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .analytics-widget {
        padding: 16px;
    }

    .widget-value {
        font-size: 28px;
    }

    /* PIN entry max size */
    .pin-modal-box {
        max-width: 90%;
    }

    /* Consent tablet agreement popup - full screen scroll */
    .signature-modal-box {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .signature-modal-header {
        padding: 12px 16px;
    }

    .signature-modal-body {
        padding: 16px;
        gap: 12px;
    }

    .signature-inputs-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .signature-canvas-wrapper {
        height: 150px;
    }

    .signature-modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .signature-modal-footer button {
        width: 100%;
    }
}

/* ==========================================================================
   D. LUXURY AUTHENTICATION & GOOGLE SSO LOGIN DESIGN
   ========================================================================== */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #FFFFFF 0%, var(--bg-luxe-ivory) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.login-card {
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-gold-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
    animation: fade-in-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.login-brand-logo {
    height: 60px;
    margin-bottom: 8px;
}

.login-title {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: normal;
    color: var(--text-charcoal);
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.login-subtitle {
    font-family: var(--font-secondary);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 0.15em;
    font-weight: 500;
}

.login-instruction {
    font-family: var(--font-secondary);
    font-size: 13.5px;
    color: var(--text-taupe);
    line-height: 1.6;
    margin-bottom: 12px;
}

#google-signin-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

/* Authorized profile menu styling */
.user-dropdown-profile {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: var(--bg-luxe-ivory);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.profile-email {
    font-family: var(--font-secondary);
    font-size: 12px;
    color: var(--text-charcoal);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.profile-role {
    font-family: var(--font-secondary);
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--accent-gold);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 0;
}

.dropdown-item.sign-out {
    color: #9A5858;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    transition: var(--transition-smooth);
}

.dropdown-item.sign-out:hover {
    background-color: #FDF2F2;
    color: #C0392B;
}

/* Elegant login error alerts */
.login-error-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #FDF2F2;
    border: 1px solid #F5C6CB;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: left;
    margin-top: 16px;
    animation: shake-error 0.5s ease;
}

.login-error-icon {
    color: #C0392B;
    font-size: 16px;
    margin-top: 2px;
}

.login-error-title {
    font-weight: 600;
    color: #721C24;
    font-size: 13px;
    margin-bottom: 2px;
}

.login-error-desc {
    color: #721C24;
    font-size: 12px;
    line-height: 1.4;
}

@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Seamstress Directory dynamic list adjustments */
.staff-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background-color: var(--surface-alabaster);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.staff-member-item:hover {
    border-color: var(--border-gold-light);
    box-shadow: var(--shadow-card);
}

.staff-email-display {
    font-family: var(--font-secondary);
    font-size: 11.5px;
    color: var(--text-taupe);
    margin-top: 2px;
}

.hidden {
    display: none !important;
}

/* 16. NOTIFICATIONS BELL & FLYOUT SYSTEM */
.notification-bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-taupe);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0;
}

.notification-bell-btn:hover {
    background-color: var(--surface-alabaster);
    color: var(--text-charcoal);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--accent-gold, #C5A880);
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(197, 168, 128, 0.6);
    border: 1px solid var(--bg-luxe-ivory, #FAF6F0);
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    width: 380px;
    max-height: 480px;
    background-color: #FAF6F0;
    border: 1px solid var(--border-gold-light, #E6DEC9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slide-down-fade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down-fade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-dropdown-header {
    padding: 14px 18px;
    background-color: var(--surface-alabaster);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-header h3 {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-charcoal);
    margin: 0;
}

.mark-all-read-btn {
    background: none;
    border: none;
    font-family: var(--font-secondary);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent-gold);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.mark-all-read-btn:hover {
    color: var(--text-charcoal);
    text-decoration: underline;
}

.notification-list {
    overflow-y: auto;
    flex: 1;
    background-color: #FAF6F0;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
    background-color: var(--border-gold-light);
    border-radius: var(--radius-sm);
}

.notification-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition-smooth);
    text-align: left;
    position: relative;
    background-color: #FAF6F0;
}

.notification-item:hover {
    background-color: var(--surface-alabaster);
}

.notification-item.unread {
    border-left: 3px solid var(--accent-gold);
    background-color: #FCFAF6;
}

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

.notification-item-sender {
    font-family: var(--font-secondary);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notification-item-text {
    font-family: var(--font-secondary);
    font-size: 12px;
    color: var(--text-charcoal);
    line-height: 1.45;
}

.notification-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: var(--text-taupe);
    margin-top: 2px;
}

.notification-item-bride {
    font-weight: 500;
    color: var(--text-charcoal);
}

.notification-empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-taupe);
    font-family: var(--font-secondary);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.notification-empty-icon {
    font-size: 28px;
    color: var(--border-gold-light);
}

/* 17. LUXURY FLOATING TOASTS */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.luxe-toast {
    pointer-events: auto;
    background-color: #FAF6F0;
    border: 1px solid var(--border-gold-light);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    width: 320px;
    box-shadow: var(--shadow-modal);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toast-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: var(--transition-smooth);
}

.luxe-toast.fade-out {
    animation: toast-fade-out 0.3s ease forwards;
}

.luxe-toast-icon {
    color: var(--accent-gold);
    font-size: 16px;
    margin-top: 2px;
}

.luxe-toast-content {
    flex: 1;
}

.luxe-toast-title {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text-charcoal);
    margin-bottom: 2px;
}

.luxe-toast-desc {
    font-family: var(--font-secondary);
    font-size: 11.5px;
    color: var(--text-taupe);
    line-height: 1.4;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toast-fade-out {
    to {
        opacity: 0;
        transform: translateY(12px) scale(0.9);
    }
}

