/* =========================================================
   dashboard.css — Staff portal: login + orders dashboard
   HarbourTech Restaurant Platform
   ========================================================= */

/* ----------------------------------------------------------
   Staff Login Page
   ---------------------------------------------------------- */
.staff-login {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--color-bg);
}

.staff-login__card {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--brand-secondary);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.staff-login__logo {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.staff-login__logo svg {
    width: 1.75rem;
    height: 1.75rem;
    stroke: #fff;
}

.staff-login__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.25rem;
}

.staff-login__subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 1.75rem;
}

.staff-login__form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ----------------------------------------------------------
   Shared form elements
   ---------------------------------------------------------- */
.staff-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.staff-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.staff-input {
    width: 100%;
    padding: 0.65rem 0.875rem;
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.staff-input:focus {
    outline: none;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-secondary) 15%, transparent);
}

/* ----------------------------------------------------------
   Alerts
   ---------------------------------------------------------- */
.staff-alert {
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: left;
    border-left: 4px solid transparent;
}
.staff-alert--error   { border-left-color: #991b1b; }
.staff-alert--success { border-left-color: #166534; }

.staff-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.staff-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Offline banner */
.offline-banner {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    color: #92400e;
    padding: .6rem 1rem;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.offline-banner__retry {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    padding: .2rem .6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
}
.offline-banner__retry:hover { background: rgba(0,0,0,.06); }

/* ----------------------------------------------------------
   Dashboard Layout
   ---------------------------------------------------------- */
.dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: calc(var(--nav-height, 4rem) + 1.5rem) var(--container-pad) 3rem;
}

.dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.dashboard__title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.dashboard__sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.dashboard__header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard__badge {
    padding: 0.25rem 0.75rem;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------
   Status Tab Bar — pill style
   ---------------------------------------------------------- */
.dashboard__tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
    padding: 0.25rem 0;
}

.dashboard__tabs::-webkit-scrollbar { display: none; }

.dashboard__tab {
    flex-shrink: 0;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-primary, #1B4D3E);
    background: transparent;
    border: 1.5px solid var(--brand-primary, #1B4D3E);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.dashboard__tab:hover {
    background: var(--brand-primary, #1B4D3E);
    color: #fff;
}

.dashboard__tab--active {
    background: var(--brand-primary, #1B4D3E);
    color: #fff;
    border-color: var(--brand-primary, #1B4D3E);
}

/* ----------------------------------------------------------
   Loading / Empty states
   ---------------------------------------------------------- */
.dashboard__loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    padding: 2rem 0;
    font-size: 0.95rem;
}

.dashboard__spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--color-border);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.dashboard__empty {
    text-align: center;
    padding: 3rem 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ----------------------------------------------------------
   Order Card
   ---------------------------------------------------------- */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.order-card:hover { box-shadow: var(--shadow-md); }

/* Status color accents */
.order-card--new        { border-left-color: #3b82f6; }
.order-card--accepted   { border-left-color: #f59e0b; }
.order-card--inprogress { border-left-color: #8b5cf6; }
.order-card--ready      { border-left-color: #10b981; }
.order-card--completed  { border-left-color: #6b7280; }
.order-card--cancelled  { border-left-color: #ef4444; opacity: 0.7; }

.order-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0.5rem;
    gap: 0.5rem;
}

.order-card__id-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-card__id {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text);
}

.order-card__status {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.order-card__body {
    padding: 0 1rem 0.75rem;
}

.order-card__customer {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.order-card__customer a {
    color: var(--brand-primary);
    font-weight: 400;
    text-decoration: none;
    font-size: 0.85rem;
}

.order-card__items {
    list-style: none;
    margin: 0.4rem 0 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-card__items li {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.order-card__notes {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
    font-style: italic;
}

.order-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 0.875rem;
}

.order-card__total {
    color: var(--color-text);
}

.order-card__total strong {
    color: var(--brand-primary);
    font-weight: 700;
}

.order-card__time {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.order-card__actions {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--color-border);
}

.order-card__actions .btn {
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
}

/* ----------------------------------------------------------
   Order status badge — filled pill
   ---------------------------------------------------------- */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.order-status-badge--pendingpayment { background: #e9ecef; color: #495057; }
.order-status-badge--new            { background: #cfe2ff; color: #084298; }
.order-status-badge--accepted       { background: #fff3cd; color: #664d03; }
.order-status-badge--inprogress     { background: #e8d5f5; color: #4a2070; }
.order-status-badge--ready          { background: #d2f4ea; color: #0a5940; }
.order-status-badge--completed      { background: #d1e7dd; color: #0f5132; }
.order-status-badge--cancelled      { background: #f8d7da; color: #842029; }
.order-status-badge--walkin         { background: #e0f2fe; color: #0c4a6e; }

/* ----------------------------------------------------------
   Walk-in summary card
   ---------------------------------------------------------- */
.walkin-summary-card {
    background: var(--color-surface-raised, #fff);
    border: 1px solid var(--color-border, #e5e5e5);
    border-top: 4px solid var(--brand-primary, #1B4D3E);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.walkin-summary-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.walkin-summary-card__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text, #1a1a1a);
}
.walkin-summary-card__hint {
    padding: 0 1.25rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted, #666);
    margin: 0;
}
.walkin-summary-card__body {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--color-border, #e5e5e5);
}
.walkin-summary-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    border-right: 1px solid var(--color-border, #e5e5e5);
}
.walkin-summary-stat:last-child { border-right: none; }
.walkin-summary-stat__value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand-primary, #1B4D3E);
    line-height: 1.2;
}
.walkin-summary-stat__value--warn { color: #c2410c; }
.walkin-summary-stat__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #666);
    margin-top: 0.2rem;
}

/* ----------------------------------------------------------
   Walk-in Tile Picker
   ---------------------------------------------------------- */
.walkin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.walkin-tab {
    padding: 0.35rem 0.875rem;
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 999px;
    background: var(--color-surface-raised, #fff);
    color: var(--color-text, #1a1a1a);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.walkin-tab:hover { background: var(--color-bg, #f5f5f5); }

.walkin-tab--active {
    background: var(--brand-primary, #1A6B9A);
    border-color: var(--brand-primary, #1A6B9A);
    color: #fff;
}

.walkin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.walkin-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--color-surface-raised, #fff);
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.12s, box-shadow 0.12s;
    overflow: hidden;
    min-height: 0;
}

.walkin-tile:hover:not(:disabled) {
    border-color: var(--brand-primary, #1A6B9A);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary, #1A6B9A) 15%, transparent);
}

.walkin-tile:active:not(:disabled) {
    background: color-mix(in srgb, var(--brand-primary, #1A6B9A) 8%, white);
}

.walkin-tile--disabled,
.walkin-tile:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.walkin-tile__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.walkin-tile__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.walkin-tile__photo-placeholder {
    font-size: 1.75rem;
    opacity: 0.4;
}

.walkin-tile__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    line-height: 1.3;
    padding: 0 .5rem;
    margin-top: .35rem;
}

.walkin-tile__price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-primary, #1A6B9A);
    padding: 0 .5rem;
    margin: .15rem 0 .5rem;
}

.walkin-tile__badge {
    position: absolute;
    top: 4px;
    right: 5px;
    font-size: 0.6rem;
    font-weight: 700;
    background: #f59e0b;
    color: #fff;
    border-radius: 3px;
    padding: 1px 4px;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .walkin-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------------------------------------
   Open Tabs
   ---------------------------------------------------------- */
.tab-group {
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.tab-group__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.tab-group__items {
    list-style: none;
    margin: 0;
    padding: 0.4rem 1rem;
}

.tab-group__items li {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.tab-group__items li:last-child { border-bottom: none; }

.tab-group__footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fafafa;
    border-top: 1px solid var(--color-border, #e5e5e5);
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Inventory — Summary Cards
   ---------------------------------------------------------- */
.inv-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.inv-summary-card {
    background: var(--color-surface-raised, #fff);
    border: 1px solid var(--color-border, #e5e5e5);
    border-top: 3px solid var(--brand-primary, #1A6B9A);
    border-radius: 0 0 6px 6px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.inv-summary-card--warn { border-top-color: #d97706; }
.inv-summary-card--danger { border-top-color: #dc2626; }

.inv-summary-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text, #1a1a1a);
    line-height: 1.1;
}

.inv-summary-card--warn  .inv-summary-card__value { color: #d97706; }
.inv-summary-card--danger .inv-summary-card__value { color: #dc2626; }

.inv-summary-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #666);
    text-align: center;
}

/* ----------------------------------------------------------
   Inventory — Category Health Chart
   ---------------------------------------------------------- */
.inv-chart {
    background: var(--color-surface-raised, #fff);
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.inv-chart__title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #666);
    margin: 0 0 0.875rem;
}

.inv-chart__row {
    display: grid;
    grid-template-columns: 140px 1fr 40px auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.inv-chart__cat {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-chart__track {
    height: 10px;
    background: var(--color-bg, #f5f5f5);
    border-radius: 999px;
    overflow: hidden;
}

.inv-chart__fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 3px;
}

.inv-chart__fill--good   { background: #16a34a; }
.inv-chart__fill--warn   { background: #d97706; }
.inv-chart__fill--danger { background: #dc2626; }

.inv-chart__pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted, #666);
    text-align: right;
    white-space: nowrap;
}

.inv-chart__meta {
    font-size: 0.72rem;
    color: var(--color-text-muted, #888);
    white-space: nowrap;
}

/* ----------------------------------------------------------
   Inventory — Search Row
   ---------------------------------------------------------- */
.inv-search-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Inventory — Accordion (Adjustments tab)
   ---------------------------------------------------------- */
.inv-accordion__item {
    border: 1px solid var(--color-border, #e5e5e5);
    border-radius: 6px;
    margin-bottom: 0.625rem;
    overflow: hidden;
}

.inv-accordion__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: var(--color-surface-raised, #fff);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    text-align: left;
    gap: 0.75rem;
    transition: background 0.15s;
}

.inv-accordion__header:hover,
.inv-accordion__header--open {
    background: var(--color-bg, #f8f8f8);
}

.inv-accordion__header--open {
    border-bottom: 1px solid var(--color-border, #e5e5e5);
}

.inv-accordion__chevron {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    color: var(--color-text-muted, #888);
    transition: transform 0.2s ease;
}

.inv-accordion__body {
    padding: 1.25rem;
    background: var(--color-surface-raised, #fff);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 520px) {
    .order-card__actions .btn { width: 100%; justify-content: center; }
    .inv-summary-cards { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .inv-summary-card { padding: 0.625rem 0.5rem; }
    .inv-summary-card__value { font-size: 1.25rem; }
    .inv-chart__row { grid-template-columns: 90px 1fr 36px; }
    .inv-chart__meta { display: none; }
}
@media (max-width: 480px) {
    .dashboard__header { flex-direction: column; align-items: flex-start; }
    .order-card__footer { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .walkin-summary-stat__value { font-size: 1.1rem; }
    .inv-search-row { flex-direction: column; }
}

/* Hide elements with x-cloak until Alpine initializes */
[x-cloak] { display: none !important; }

/* ----------------------------------------------------------
   Settlement Modal
   ---------------------------------------------------------- */
.settle-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1100; padding: 1rem;
}
.settle-modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.settle-modal__header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: space-between;
}
.settle-modal__header h3 { margin: 0; font-size: 1.1rem; color: #1a1a2e; }
.settle-modal__body { padding: 1.25rem 1.5rem; }
.settle-modal__footer {
    padding: 1rem 1.5rem; border-top: 1px solid #e5e7eb;
    display: flex; gap: .75rem; justify-content: flex-end;
}
.settle-modal__item-list { margin: 0 0 1rem; padding: 0; list-style: none; }
.settle-modal__item-list li {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: .35rem 0; border-bottom: 1px solid #f3f4f6; font-size: .875rem;
}
.settle-modal__item-list li:last-child { border-bottom: none; }
.settle-modal__totals { background: #f9fafb; border-radius: 8px; padding: .875rem 1rem; margin-bottom: 1rem; }
.settle-modal__totals-row {
    display: flex; justify-content: space-between;
    font-size: .875rem; color: #555; padding: .2rem 0;
}
.settle-modal__totals-row--total {
    font-weight: 700; font-size: 1.05rem; color: #1a1a2e;
    padding-top: .5rem; border-top: 1px solid #e5e7eb; margin-top: .35rem;
}
.settle-modal__payment-options { display: flex; gap: .75rem; margin-bottom: 1rem; }
.settle-modal__payment-btn {
    flex: 1; padding: .6rem; border: 2px solid #e5e7eb; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: .875rem; font-weight: 500;
    color: #444; transition: all .15s;
}
.settle-modal__payment-btn.active {
    border-color: var(--brand-primary, #0077B6); background: #f0f8ff; color: var(--brand-primary, #0077B6);
}
.settle-modal__cash-calc { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.settle-modal__change-display {
    background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 6px;
    padding: .5rem .875rem; font-size: .9rem; font-weight: 600; color: #065f46;
}

/* ----------------------------------------------------------
   Receipt Modal
   ---------------------------------------------------------- */
.receipt-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1200; padding: 1rem;
}
.receipt-modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 440px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.receipt-modal__header {
    padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; justify-content: space-between;
}
.receipt-modal__header h3 { margin: 0; font-size: 1rem; color: #1a1a2e; }
.receipt-modal__actions {
    padding: .875rem 1.25rem; border-top: 1px solid #e5e7eb;
    display: flex; gap: .5rem; flex-wrap: wrap;
}
.receipt-modal__email-row { display: flex; gap: .5rem; margin-top: .5rem; width: 100%; }
.receipt-modal__email-row input { flex: 1; }

/* ----------------------------------------------------------
   Receipt Preview (screen + print)
   ---------------------------------------------------------- */
#receipt-printable {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px; padding: 1.25rem; background: #fff;
    color: #111; max-width: 100%;
}
.receipt-printable__header { text-align: center; margin-bottom: .75rem; }
.receipt-printable__header h2 { font-size: 1rem; margin: 0 0 .2rem; }
.receipt-printable__header p  { margin: .1rem 0; font-size: .75rem; color: #555; }
.receipt-printable__divider {
    border: none; border-top: 1px dashed #999; margin: .5rem 0;
}
.receipt-printable__meta { font-size: .75rem; color: #555; margin-bottom: .5rem; }
.receipt-printable__row {
    display: flex; justify-content: space-between;
    font-size: .8rem; padding: .15rem 0;
}
.receipt-printable__row--total {
    font-weight: 700; font-size: .9rem; padding-top: .35rem;
    border-top: 1px dashed #999; margin-top: .2rem;
}
.receipt-printable__footer { text-align: center; font-size: .72rem; color: #888; margin-top: .75rem; }

/* ----------------------------------------------------------
   Print: iDT RP80-US thermal (80mm, 42 chars/line, ESC/POS)
   ---------------------------------------------------------- */
@media print {
    /* 80mm paper width, auto height so thermal cutter fires at end of content */
    @page {
        size: 80mm auto;
        margin: 2mm 3mm;
    }

    /* Hide everything; only the receipt container prints */
    body > *                        { display: none !important; }
    #receipt-print-container        {
        display: block !important;
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .receipt-modal                  {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: 74mm !important; /* printable width within 80mm roll */
        padding: 0 !important;
    }
    .receipt-modal__header,
    .receipt-modal__actions         { display: none !important; }

    /* Receipt content */
    #receipt-printable {
        max-width: 74mm !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 11px !important;    /* ~42 chars/line on 80mm roll */
        line-height: 1.4 !important;
        color: #000 !important;
        background: #fff !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .receipt-printable__header h2   { font-size: 13px !important; font-weight: bold !important; }
    .receipt-printable__header p    { color: #000 !important; font-size: 10px !important; }
    .receipt-printable__meta        { color: #000 !important; font-size: 10px !important; }
    .receipt-printable__divider     {
        border: none !important;
        border-top: 1px solid #000 !important;
        margin: 3px 0 !important;
    }
    .receipt-printable__row         { font-size: 11px !important; padding: 1px 0 !important; }
    .receipt-printable__row--total  { font-size: 13px !important; border-top: 1px solid #000 !important; }
    .receipt-printable__footer      { color: #000 !important; font-size: 9px !important; }

    button, .no-print               { display: none !important; }
}
