/* ============================================================================
   SERVICING SYSTEM - Light Theme (Apple-inspired)
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Light Theme Colors */
    --white: #ffffff;
    --off-white: #fbfbfd;
    --gray-50: #f5f5f7;
    --gray-100: #e8e8ed;
    --gray-200: #d2d2d7;
    --gray-300: #b0b0b5;
    --gray-400: #86868b;
    --gray-500: #6e6e73;
    --gray-600: #515154;
    --gray-700: #3a3a3c;
    --gray-800: #2c2c2e;
    --gray-900: #1d1d1f;
    --black: #000000;

    /* Base semantic colors */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--off-white);
    --bg-card: var(--white);
    --bg-card-hover: var(--gray-50);

    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-500);
    --text-muted: var(--gray-400);

    --border: var(--gray-200);
    --border-light: var(--gray-100);
    --border-hover: var(--gray-300);

    /* Accent colors */
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: rgba(0, 113, 227, 0.08);

    /* Status colors */
    --success: #34c759;
    --success-bg: rgba(52, 199, 89, 0.1);
    --danger: #ff3b30;
    --danger-bg: rgba(255, 59, 48, 0.1);
    --warning: #ff9500;
    --warning-bg: rgba(255, 149, 0, 0.1);
    --info: #5ac8fa;
    --info-bg: rgba(90, 200, 250, 0.1);

    /* Queue status colors */
    --status-waiting: var(--gray-400);
    --status-waiting-bg: var(--gray-100);
    --status-in-progress: var(--accent);
    --status-in-progress-bg: var(--accent-light);
    --status-completed: var(--success);
    --status-completed-bg: var(--success-bg);
    --status-cancelled: var(--gray-400);
    --status-cancelled-bg: var(--gray-100);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* ============================================================================
   HEADER
   ============================================================================ */
.header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(251, 251, 253, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header h1 .icon {
    font-size: 1.1em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-actions #user-info {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.menu-close-btn {
    display: none;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 101;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    /* Only cover the area OUTSIDE the menu (280px menu width) */
    width: calc(100% - 280px);
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */
.main {
    padding: 1.25rem;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================================================
   TABS
   ============================================================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
}

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

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

.tab-icon {
    margin-right: 0.35rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

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

.btn:active {
    transform: scale(0.98);
}

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

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-light);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

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

.btn-danger:hover {
    background: #e6352b;
}

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

.btn-success:hover {
    background: #2db550;
}

/* ============================================================================
   CARDS & CONTAINERS
   ============================================================================ */
.card, .form-section, .data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

.cards-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.section-title, .data-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================================
   FORMS
   ============================================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

/* Checkbox & Toggle */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-200);
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

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

/* ============================================================================
   TABLES
   ============================================================================ */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

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

tr:hover td {
    background: var(--bg-secondary);
}

/* ============================================================================
   QUEUE ITEMS
   ============================================================================ */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-height: 700px;
    overflow-y: auto;
    padding-right: 4px;
}

.queue-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.queue-item:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.queue-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.queue-info {
    flex: 1;
    min-width: 0;
}

.queue-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.queue-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.queue-status {
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.queue-status.waiting {
    background: var(--status-waiting-bg);
    color: var(--status-waiting);
}

.queue-status.in-progress {
    background: var(--status-in-progress-bg);
    color: var(--status-in-progress);
}

.queue-status.completed {
    background: var(--status-completed-bg);
    color: var(--status-completed);
}

.queue-status.cancelled {
    background: var(--status-cancelled-bg);
    color: var(--status-cancelled);
}

.queue-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

/* ============================================================================
   STATS CARDS
   ============================================================================ */
.stats-grid, .stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-item, .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.25rem;
}

/* ============================================================================
   MODALS
   ============================================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    margin: 2rem auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 1.5rem;
}

.modal h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-lg {
    max-width: 550px;
}

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

.modal-header h2, .modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Form Groups inside Modals */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.modal .form-group .optional-label {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal .form-row .form-group {
    margin-bottom: 0;
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"],
.modal input[type="tel"],
.modal input[type="number"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.modal input::placeholder {
    color: var(--text-muted);
}

/* Toggle Row inside Modals */
.modal .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Form Help Text */
.modal .form-help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* ============================================================================
   BADGES & TAGS
   ============================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-info {
    background: var(--info-bg);
    color: var(--accent);
}

.badge-muted {
    background: var(--gray-100);
    color: var(--text-muted);
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================================================
   SEARCH BOX
   ============================================================================ */
.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    padding-left: 1rem;
}

/* ============================================================================
   BACK LINK
   ============================================================================ */
.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

/* ============================================================================
   ANALYTICS CARDS
   ============================================================================ */
.analytics-legend {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.analytics-legend .legend-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.analytics-legend .legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.analytics-legend .legend-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.analytics-legend .legend-term {
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
}

.analytics-legend .legend-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.analytics-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.analytics-card.today {
    border-left: 4px solid var(--accent);
}

.analytics-card.week {
    border-left: 4px solid #8b5cf6;
}

.analytics-card.month {
    border-left: 4px solid #f59e0b;
}

.analytics-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.analytics-card .analytics-icon {
    font-size: 1.25rem;
}

.analytics-card .analytics-period {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.analytics-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.analytics-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.analytics-card h4 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.analytics-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.analytics-card .sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Daily Chart */
.daily-chart {
    min-height: 300px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1rem;
}

/* Earnings Toggle */
.earnings-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

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

/* Profit Breakdown Grid */
.profit-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Chart Container */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chart-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-period-btn {
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.chart-period-btn:hover {
    background: var(--gray-100);
}

.chart-period-btn.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* ============================================================================
   ANALYTICS INFO LEGEND
   ============================================================================ */
.analytics-info-legend {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.analytics-info-legend .info-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.analytics-info-legend .legend-item {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.analytics-info-legend .legend-term {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.analytics-info-legend .legend-definition {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================================
   ITEM BREAKDOWN LIST
   ============================================================================ */
.item-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ============================================================================
   RECENT TRANSACTIONS / SALES LIST
   ============================================================================ */
.recent-transactions,
.recent-sales-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sale-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sale-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--border-medium);
}

.sale-info {
    flex: 1;
    min-width: 0;
}

.sale-customer {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sale-items {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sale-staff {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sale-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sale-amount {
    text-align: right;
    flex-shrink: 0;
    margin-left: 1rem;
}

.sale-total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.sale-profit {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
}

/* ============================================================================
   STAFF MANAGEMENT
   ============================================================================ */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.staff-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.staff-card:hover {
    border-color: var(--border);
}

.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

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

.staff-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.staff-badges {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.staff-contact {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.staff-branches {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

/* ============================================================================
   SEARCH DROPDOWN (Autocomplete)
   ============================================================================ */
.search-dropdown-container {
    position: relative;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown-group-label {
    padding: 0.625rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
}

.search-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

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

.search-dropdown-item:hover {
    background: var(--bg-secondary);
}

.search-dropdown-item .item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-dropdown-item .item-price {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================================================
   SELECTED STAFF DISPLAY
   ============================================================================ */
.selected-staff-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.selected-staff-display span {
    flex: 1;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

.clear-staff-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.clear-staff-btn:hover {
    opacity: 1;
}

/* ============================================================================
   CUSTOMER CART (Customer View)
   ============================================================================ */
.cart-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    z-index: 100;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    transform: translateY(calc(100% - 56px));
}

.cart-container.open {
    transform: translateY(0);
}

.cart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-toggle:hover {
    background: var(--accent-hover);
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: white;
    color: var(--accent);
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 700;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    max-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.cart-item .btn-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-total .amount {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 1.25rem;
}

/* ============================================================================
   CART EDIT LIST (Admin Panel)
   ============================================================================ */
.cart-edit-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.cart-edit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.cart-edit-item:hover {
    border-color: var(--border);
}

.cart-edit-item .item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.cart-edit-item .item-info .item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.cart-edit-item .item-info .item-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.cart-edit-item .item-qty {
    width: 70px;
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-primary);
    flex-shrink: 0;
}

.cart-edit-item .item-qty:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cart-edit-item .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-edit-item .remove-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Add cart item row */
.add-cart-item-qty-row {
    display: flex;
        gap: 0.5rem;
    margin-top: 0.5rem;
}

.add-cart-item-qty-row input[type="number"] {
    width: 80px;
    text-align: center;
}

.add-cart-item-qty-row .btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ============================================================================
   CALENDAR
   ============================================================================ */
.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    user-select: none;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.calendar-nav-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--gray-100);
}

.calendar-month-year {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 0.5rem 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    -webkit-user-select: none;
    user-select: none;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-primary);
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: var(--bg-secondary);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.4;
}

.calendar-day.today {
    border: 2px solid var(--accent);
}

.calendar-day.selected {
    background: var(--accent);
    color: var(--white);
}

.calendar-day.selected:hover {
    background: var(--accent-hover);
}

/* Multi-date selection summary */
.selected-dates-summary {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.selected-dates-summary h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.selected-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.date-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.date-tag button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.date-tag button:hover {
    color: var(--danger);
}

.btn-clear-dates {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

/* Salary Total Section */
.salary-total-section {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: 10px;
    text-align: center;
}

.salary-total-section h4 {
    font-size: 0.75rem;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}

.salary-total-section .total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

/* Salary History */
.salary-history-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.toast {
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    font-size: 1rem;
    padding: 0.25rem;
    margin-left: auto;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================================================
   BRANCH SELECTOR
   ============================================================================ */
.branch-selector {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 140px;
}

/* ============================================================================
   OWNER ONLY ELEMENTS
   ============================================================================ */
.owner-only {
    display: none;
}

body.is-owner .owner-only {
    display: inline-flex;
}

/* ============================================================================
   LOGIN FORM
   ============================================================================ */
#login-section {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}

#login-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

#login-section .login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ============================================================================
   INVENTORY & SERVICE ITEMS
   ============================================================================ */
.item-card, .service-card, .menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
}

.item-card:hover, .service-card:hover, .menu-card:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.item-name, .service-name, .menu-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.item-details, .service-details, .menu-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.item-price, .service-price, .menu-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.item-stock {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-stock.low {
    color: var(--danger);
}

.item-actions, .service-actions, .menu-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* ============================================================================
   RESPONSIVE MOBILE STYLES
   ============================================================================ */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    nav.header-actions {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--bg-primary);
    flex-direction: column;
        align-items: stretch;
        padding: 4rem 1.25rem 1.5rem;
        gap: 0.5rem;
        border-left: 1px solid var(--border-light);
        transition: transform 0.3s ease;
        z-index: 10001;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transform: translateX(100%);
    }

    nav.header-actions.open {
        transform: translateX(0);
    }

    nav.header-actions .btn,
    nav.header-actions a.btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.875rem 1rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        color: var(--text-primary);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        cursor: pointer;
        pointer-events: auto;
        position: relative;
        z-index: 10002;
    }

    nav.header-actions .btn:hover,
    nav.header-actions .btn:active,
    nav.header-actions a.btn:hover,
    nav.header-actions a.btn:active {
        background: var(--gray-100);
    }

    nav.header-actions .btn-danger {
        background: var(--danger-bg);
        border-color: transparent;
        color: var(--danger);
    }

    nav.header-actions #user-info {
        padding: 0.875rem 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
        color: var(--text-primary);
    }

    .menu-close-btn {
        display: flex;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-light);
        border-radius: 50%;
        color: var(--text-primary);
        font-size: 1.1rem;
        cursor: pointer;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Mobile tabs - 2 row grid */
    .tabs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        border-bottom: none;
        background: var(--bg-secondary);
        border-radius: 12px;
        padding: 6px;
        margin-bottom: 1rem;
    }

    .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.625rem 0.25rem;
        font-size: 0.65rem;
        text-align: center;
        border-bottom: none;
        border-radius: 8px;
        margin-bottom: 0;
        min-height: 52px;
        gap: 3px;
    }

    .tab-icon {
        font-size: 1.25rem;
        margin-right: 0;
        display: block;
    }

    .tab-text {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .tab.active {
        background: var(--bg-primary);
        border-bottom: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .main {
        padding: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid, .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .queue-item {
        flex-wrap: wrap;
    }

    .queue-actions {
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-light);
    }

    .analytics-overview {
        grid-template-columns: 1fr;
    }

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

    .analytics-card {
        padding: 1.25rem;
    }

    .analytics-value {
        font-size: 1.5rem;
    }

    .analytics-legend .legend-items {
        flex-direction: column;
        gap: 0.5rem;
    }

    .profit-breakdown-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .daily-chart {
        min-height: 250px;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    /* Mobile Modal Styles */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.25rem;
        animation: slideUp 0.3s ease;
    }

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

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

    .modal h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.625rem;
    }

    .modal .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal .form-row .form-group {
        margin-bottom: 1rem;
    }

    .modal input[type="text"],
    .modal input[type="email"],
    .modal input[type="password"],
    .modal input[type="tel"],
    .modal input[type="number"],
    .modal select,
    .modal textarea {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .modal-actions {
        margin-top: 1.25rem;
        padding-top: 0.875rem;
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        padding: 0.875rem 1rem;
    }

    .modal .toggle-row {
        flex-direction: column;
        align-items: flex-start;
    gap: 0.75rem;
}

    .modal .toggle-row > div {
    width: 100%;
    }

    /* Branch checkbox grid on mobile */
    .branch-checkbox-grid {
        grid-template-columns: 1fr !important;
    }

    .branch-checkbox-item {
        padding: 0.875rem !important;
    }

    /* Calendar on mobile */
    .salary-calendar {
        font-size: 0.85rem;
    }

    /* Customer cart on mobile */
    .cart-container {
        max-height: 70vh;
    }

    .cart-items {
        max-height: 180px;
    }

    .cart-item {
        padding: 0.625rem 0.75rem;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-item-price {
        font-size: 0.8rem;
    }

    .cart-item .btn-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 1.1rem;
    }

    /* Cart edit items on mobile */
    .cart-edit-item {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .cart-edit-item .item-info {
        flex: 1 1 calc(100% - 50px);
        min-width: 0;
    }

    .cart-edit-item .item-info .item-name {
        font-size: 0.9rem;
        word-break: break-word;
        white-space: normal;
    }

    .cart-edit-item .item-info .item-price {
        font-size: 0.8rem;
    }

    .cart-edit-item .item-qty {
        width: 60px;
        padding: 0.4rem;
        font-size: 0.9rem;
        order: 1;
    }

    .cart-edit-item .remove-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.9rem;
        order: 2;
    }
}

/* Tablet */
@media (min-width: 769px) {
    .header {
        padding: 0.875rem 1.5rem;
    }

    .main {
        padding: 1.5rem 2rem;
    }

    .tabs {
        border-bottom: 1px solid var(--border-light);
    display: flex;
    }

    .tab {
        flex-direction: row;
        gap: 0.35rem;
        min-height: auto;
        padding: 0.75rem 1.25rem;
        border-radius: 0;
    }

    .tab-icon {
        font-size: 1em;
        display: inline-block;
    }

    .tab-text {
        font-size: 0.9rem;
    }

    .tab.active {
        background: none;
        box-shadow: none;
        border-bottom: 2px solid var(--accent);
    }
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
