/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    --black: #1e3a5f;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e3a5f;
    --gray-900: #0f172a;
    --success: #22c55e;
    --danger: #ef4444;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 16px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

body.driver-page {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Container */
.container {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.admin-container,
.driver-container {
    max-width: 1200px;
}

/* Typography */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Site Banners */
.site-banner {
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.top-banner {
    width: 100%;
}

.top-banner.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Add padding when sticky top banner is shown */
body.has-sticky-top {
    padding-top: 2.5rem;
}

.footer-banner {
    width: 100%;
    margin-top: auto;
}

.footer-banner.sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* Add padding when sticky footer banner is shown */
body.has-sticky-footer {
    padding-bottom: 3rem;
}

/* Banner Styles */
.banner-info {
    background: #dbeafe;
    color: #1e40af;
}

.banner-info a { color: #1e40af; }

.banner-success {
    background: #dcfce7;
    color: #166534;
}

.banner-success a { color: #166534; }

.banner-warning {
    background: #fef3c7;
    color: #92400e;
}

.banner-warning a { color: #92400e; }

.banner-urgent {
    background: #fee2e2;
    color: #991b1b;
}

.banner-urgent a { color: #991b1b; }

.banner-dark {
    background: var(--black);
    color: var(--white);
}

.banner-dark a { color: var(--white); }

.banner-white {
    background: var(--white);
    color: var(--black);
    border-bottom: 1px solid var(--gray-200);
}

.banner-white a { color: var(--black); }

.banner-light {
    background: var(--gray-50);
    color: var(--black);
    border-bottom: 1px solid var(--gray-200);
}

.banner-light a { color: var(--black); }

.banner-shadow {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.banner-shadow a { color: var(--black); }

.banner-outline {
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--black);
}

.banner-outline a { color: var(--black); }

.banner-gradient {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: var(--white);
}

.banner-gradient a { color: var(--white); }

.site-banner a {
    text-decoration: underline;
    font-weight: 600;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-brand .header-hebrew {
    font-size: 1.75rem;
    margin: 0;
    line-height: 1.2;
}

.header-tagline {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: color 0.15s ease;
    border-radius: var(--radius);
}

.nav-link:hover {
    color: var(--black);
    background: var(--gray-100);
}

header h1 {
    margin-bottom: 0;
}

/* Hebrew font for all Hebrew text */
.hebrew {
    font-family: 'Times New Roman', 'David', 'Noto Serif Hebrew', serif;
}

.header-hebrew {
    font-family: 'Times New Roman', 'David', 'Noto Serif Hebrew', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-tagline {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0.25rem 0 0 0;
    font-style: italic;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #059669;
    margin: 0.5rem 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Header Buttons (Info & Hashgacha) */
header {
    position: relative;
}

.info-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.info-btn:hover {
    color: var(--black);
}

.hashgacha-btn {
    right: auto;
    left: 0;
    font-family: 'David Libre', 'Times New Roman', serif;
    font-size: 0.9375rem;
}

/* Header Actions - Shaimos Style */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.header-pill-btn {
    background: var(--black);
    color: var(--white);
    border: 2px solid var(--black);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-pill-btn:hover {
    background: var(--gray-700);
    border-color: var(--gray-700);
}

.header-pill-btn.header-pill-outline {
    background: transparent;
    color: var(--black);
    min-width: 42px;
    padding: 0.5rem 0.75rem;
}

.header-pill-btn.header-pill-outline:hover {
    background: var(--gray-100);
}

/* Slide Modal - Shaimos Style */
.slide-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 3rem 1rem 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-modal.hidden {
    display: none;
}

.slide-modal-content {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.25s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.slide-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
}

.slide-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.slide-close:hover {
    background: var(--gray-200);
    color: var(--black);
}

.slide-modal-body {
    padding: 1.25rem;
}

.slide-modal-body ol {
    margin: 0;
    padding-left: 1.25rem;
}

.slide-modal-body ol li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: var(--gray-700);
}

.slide-modal-body ol li:last-child {
    margin-bottom: 0;
}

.hashgacha-body {
    text-align: center;
}

.hashgacha-body .hashgacha-logo {
    max-width: 150px;
    max-height: 150px;
    margin: 0 auto 1rem;
}

.hashgacha-body p {
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* Info Modal Sections */
.info-section {
    margin-bottom: 1.5rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section + .info-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.hashgacha-logo {
    display: block;
    max-width: 120px;
    max-height: 120px;
    margin: 1rem auto;
    object-fit: contain;
}

/* Help Modal */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.help-modal.hidden {
    display: none;
}

.help-modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
    position: relative;
}

.help-modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.help-modal-content ol {
    padding-left: 1.25rem;
}

.help-modal-content li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.help-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    line-height: 1;
}

.help-close:hover {
    color: var(--black);
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

footer p {
    margin-bottom: 0.5rem;
}

.contact-info {
    font-size: 0.8125rem;
}

.contact-info a {
    color: var(--gray-600);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--black);
    text-decoration: underline;
}

/* Form Styles */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.form-section:last-of-type {
    border-bottom: 1px solid var(--gray-200);
}

/* Section Header with Number */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-header > label,
.section-header > div {
    flex: 1;
}

.section-header > label {
    margin-bottom: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--black);
}

.section-header .field-hint {
    margin-top: 0.125rem;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--black);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--black);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group-half {
    flex: 1;
}

.form-group-quarter {
    flex: 0 0 25%;
}

.form-group-threequarter {
    flex: 1;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--gray-500);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: var(--white);
    color: var(--black);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgb(0 0 0 / 0.1);
}

input::placeholder {
    color: var(--gray-400);
}

input:disabled,
select:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

.field-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.field-hint.error {
    color: #dc2626;
}

/* ZIP Message */
.zip-message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    animation: slideDown var(--transition-base) ease-out;
}

.zip-message.error {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.zip-message.success {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
    font-weight: 500;
}

.zip-message.pulse {
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ZIP Entry Section */
.zip-entry-section {
    text-align: center;
}

.zip-entry-section label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.zip-entry-section input {
    max-width: 180px;
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    margin: 0 auto;
    display: block;
}

.zip-display {
    background: var(--gray-100) !important;
    color: var(--gray-600) !important;
    cursor: not-allowed;
}

/* Order Form Body (disabled until ZIP validation) */
.order-form-body {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.order-form-body.form-disabled {
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
    filter: grayscale(30%);
}

.order-form-body:not(.form-disabled) {
    animation: fadeInSlide 0.3s ease-out;
}

/* Stepper Control */
.stepper-section label {
    display: block;
    margin-bottom: 0.75rem;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
}

.stepper-btn {
    width: 3.5rem;
    height: 3rem;
    flex-shrink: 0;
    border: none;
    background-color: var(--gray-100);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    color: var(--gray-700);
}

.stepper-btn:hover {
    background-color: var(--gray-200);
}

.stepper-btn:active {
    background-color: var(--gray-300);
}

.stepper input[type="number"] {
    flex: 1;
    height: 3rem;
    border: none;
    border-left: 1px solid var(--gray-300);
    border-right: 1px solid var(--gray-300);
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Checkout Footer */
/* Checkout Block */
.checkout-block {
    background: linear-gradient(to bottom, var(--gray-100), var(--gray-50));
    margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    padding: 1.5rem;
    border-top: 2px solid var(--black);
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#order-summary-text {
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.checkout-total {
    padding: 1rem 0;
    border-top: 1px dashed var(--gray-300);
    margin-bottom: 1.25rem;
}

.checkout-total span:first-child {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.total-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--black);
}

.card-wrapper {
    margin-bottom: 1rem;
}

.lock-icon {
    width: 12px;
    height: 12px;
}

.card-element {
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: var(--white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card-element.StripeElement--focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgb(0 0 0 / 0.1);
}

.card-errors {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    min-height: 1rem;
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Buttons */
.submit-btn,
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background-color: var(--black);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.submit-btn:hover:not(:disabled),
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active:not(:disabled),
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled,
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--black);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    color: var(--black);
    border-color: var(--gray-600);
}

.btn-danger:hover {
    background-color: var(--gray-100);
}

/* How It Works Section */
.how-it-works {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.how-it-works summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-700);
}

.how-it-works summary:hover {
    background-color: var(--gray-50);
}

.how-it-works ol {
    padding: 0 1rem 1rem 2.5rem;
    margin: 0;
    color: var(--gray-600);
    line-height: 1.8;
}

.how-it-works li {
    padding-left: 0.5rem;
}

/* Confirmation */
.confirmation {
    text-align: center;
    padding: 2rem 1.5rem;
}

.confirmation-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.confirmation-steps {
    background-color: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.confirmation-steps h3 {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-instruction {
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 600;
    margin: 0;
    line-height: 1.5;
}

.step-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-500);
}

#pickup-instruction {
    color: var(--gray-800);
    font-weight: 500;
    margin-bottom: 0;
}

.confirmation-content > p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.confirmation-details {
    text-align: left;
    background-color: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.confirmation-details p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.confirmation-details p:last-child {
    margin-bottom: 0;
}

.confirmation-details strong {
    color: var(--gray-500);
    font-weight: 500;
}

.confirmation-details span {
    text-align: right;
    font-weight: 600;
}

.order-id-small {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 1rem !important;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.order-id-small strong,
.order-id-small span {
    font-weight: 400;
    color: var(--gray-400);
}

.confirmation-note {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Loading State */
.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -0.625rem 0 0 -0.625rem;
    border: 2px solid var(--gray-300);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* System Message */
.system-message {
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    font-size: 0.9375rem;
}

.error-message {
    color: var(--gray-800);
    background-color: var(--gray-100);
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ================================
   ADMIN STYLES
   ================================ */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-header h1 {
    margin-bottom: 0;
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
    overflow-x: auto;
}

.nav-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--gray-600);
    background-color: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-btn:hover {
    color: var(--black);
    background-color: var(--gray-100);
}

.nav-btn.active {
    color: var(--black);
    background-color: var(--gray-100);
    font-weight: 600;
}

/* Admin Tabs */
.admin-tab {
    animation: fadeIn var(--transition-base) ease-out;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-header h2 {
    margin-bottom: 0;
}

.tab-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-select,
.filter-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 140px;
    height: 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
}

.filter-input:focus {
    outline: none;
    border-color: var(--black);
}

/* Orders Filters */
.orders-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: flex-end;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-shrink: 0;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Date Filter Multi-Select */
.filter-group-date {
    position: relative;
}

.date-filter-wrapper {
    position: relative;
}

.date-filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    text-align: left;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 140px;
    font-family: inherit;
    color: var(--black);
    line-height: normal;
}

.date-filter-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.date-filter-btn.open svg {
    transform: rotate(180deg);
}

.date-filter-dropdown {
    position: fixed;
    z-index: 1000;
    min-width: 220px;
    max-height: 320px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.date-filter-header {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.date-action-btn {
    flex: 1;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.date-action-btn:hover {
    background: var(--gray-100);
}

.date-filter-options {
    overflow-y: auto;
    max-height: 220px;
}

.date-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.date-filter-option:hover {
    background: var(--gray-50);
}

.date-filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.date-filter-option label {
    font-size: 0.875rem;
    cursor: pointer;
    flex: 1;
    text-transform: none;
    font-weight: 400;
    color: var(--gray-700);
}

.order-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.order-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.order-stat strong {
    color: var(--black);
}

/* Order Sub-Tabs */
.order-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
}

.order-subtab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s ease;
}

.order-subtab:hover {
    color: var(--gray-700);
}

.order-subtab.active {
    color: var(--black);
    border-bottom-color: var(--black);
}

.subtab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    background: var(--gray-100);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-subtab.active .subtab-count {
    background: var(--black);
    color: var(--white);
}

.order-subtab[data-subtab="needs-assignment"] .subtab-count {
    background: #fef3c7;
    color: #92400e;
}

.order-subtab[data-subtab="needs-assignment"].active .subtab-count {
    background: #f59e0b;
    color: white;
}

/* Bulk Action Bar */
.bulk-action-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.bulk-action-bar span {
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
    padding: 0 0.25rem;
}

.bulk-action-bar .filter-select {
    min-width: 140px;
    height: 32px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.bulk-action-bar .btn-sm {
    height: 32px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
}

/* Search Filter Group */
.filter-group-search {
    flex: 0 0 auto;
}

/* Checkbox Column */
.checkbox-col {
    width: 40px;
    text-align: center;
}

.orders-table .row-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Pickup Info (for picked up tab) */
.pickup-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pickup-info .driver-name {
    font-weight: 600;
    color: var(--black);
}

.pickup-info .pickup-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Reports Styles */
.reports-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.report-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.report-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.report-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--black);
}

.report-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.report-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.report-table th,
.report-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.report-table th {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.report-table tbody tr:hover {
    background: var(--gray-50);
}

.report-date-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Action Queue - CRM Style */
.action-queue {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.action-item:hover {
    border-color: var(--gray-300);
}

.action-needs-driver {
    border-left: 4px solid #f59e0b;
}

.action-ready-pickup {
    border-left: 4px solid #10b981;
}

.action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.action-needs-driver .action-icon {
    background: #fef3c7;
    color: #d97706;
}

.action-ready-pickup .action-icon {
    background: #d1fae5;
    color: #059669;
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
}

.action-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--gray-200);
}

/* Highlight row needing action */
.orders-table tr.needs-action {
    background: #fffbeb;
}

.orders-table tr.needs-action:hover {
    background: #fef3c7;
}

.driver-select.pulse-highlight {
    border-color: #f59e0b;
    background: #fef9c3;
}

.pickup-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.orders-table,
.zip-table,
.driver-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.orders-table th,
.orders-table td,
.zip-table th,
.zip-table td,
.driver-table th,
.driver-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.orders-table th,
.zip-table th,
.driver-table th {
    font-weight: 600;
    color: var(--gray-600);
    background-color: var(--gray-50);
    white-space: nowrap;
}

.orders-table tbody tr,
.zip-table tbody tr,
.driver-table tbody tr {
    transition: background-color var(--transition-fast);
}

.orders-table tbody tr:hover,
.zip-table tbody tr:hover,
.driver-table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Driver Add Form */
.driver-add-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 600px;
}

.driver-add-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.driver-add-form .form-row.single {
    grid-template-columns: 1fr;
}

.driver-add-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.driver-add-form input:focus {
    outline: none;
    border-color: var(--black);
}

.driver-add-form button {
    white-space: nowrap;
}

@media (max-width: 500px) {
    .driver-add-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .site-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-brand {
        align-items: center;
    }
}

/* Driver Table Enhancements */
.driver-url {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    display: inline-block;
}

.driver-actions {
    display: flex;
    gap: 0.25rem;
}

.status-badge.checked-in {
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Driver Details Modal - Clean Layout */
.driver-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.driver-contact {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.8125rem;
}

.contact-link:hover {
    color: var(--black);
}

.contact-link svg {
    flex-shrink: 0;
}

/* Money Summary */
.money-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.money-item {
    text-align: center;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.money-item.balance.owed {
    background: #fffbeb;
}

.money-label {
    display: block;
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

.money-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.money-item.balance.owed .money-value {
    color: #d97706;
}

/* Quick Pay */
.quick-pay {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pay-input {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding-left: 0.5rem;
}

.pay-input span {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pay-input input {
    width: 70px;
    border: none;
    padding: 0.5rem 0.5rem 0.5rem 0.25rem;
    font-size: 0.875rem;
    outline: none;
}

.pay-note {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.pay-btn {
    padding: 0.5rem 1rem;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
}

.pay-btn:hover {
    background: var(--gray-800);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-box {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.stat-box.active {
    background: #dcfce7;
}

.stat-num {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-box.active .stat-num {
    color: #16a34a;
}

.stat-txt {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--gray-500);
    letter-spacing: 0.3px;
}

/* Info Row */
.info-row {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.info-item strong {
    color: var(--gray-800);
}

/* Tabs */
.driver-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--black);
    border-bottom-color: var(--black);
}

.tab-content {
    max-height: 200px;
    overflow-y: auto;
}

.list-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.8125rem;
}

.list-row:last-child {
    border-bottom: none;
}

.row-date {
    width: 60px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.row-time, .row-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-value {
    font-weight: 600;
    margin-left: auto;
    padding-left: 0.5rem;
}

.empty-msg {
    padding: 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8125rem;
}

/* Pickup Row - Detailed */
.pickup-row {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.pickup-row:last-child {
    border-bottom: none;
}

.pickup-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.pickup-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.pickup-info {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.pickup-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pickup-addr {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pickup-proof {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.pickup-proof:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 480px) {
    .money-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-pay {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .pay-input {
        grid-column: 1;
    }
    
    .pay-note {
        grid-column: 2;
    }
    
    .pay-btn {
        grid-column: 1 / -1;
    }
    
    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .pickup-details {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .pickup-addr {
        white-space: normal;
    }
}

/* Legacy - keep for backward compatibility */
.driver-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.driver-history-table th,
.driver-history-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.driver-history-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
}

.empty-message {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-style: italic;
}

.loading-cell {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem !important;
}

.actions-cell {
    white-space: nowrap;
    display: flex;
    gap: 0.25rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.icon-btn.danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
}

.orders-table td a {
    color: var(--black);
}

.orders-table td a:hover {
    color: var(--gray-600);
}

.driver-select {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--white);
    min-width: 100px;
}

.driver-select option.driver-match {
    background: #dcfce7;
    font-weight: 600;
}

/* ZIP Cards */
.zip-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.zip-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    background: var(--white);
}

.zip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.zip-card-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.zip-card-price {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.zip-card-actions {
    display: flex;
    gap: 0.5rem;
}

.zip-card-pickups {
    margin-bottom: 1rem;
}

.zip-card-pickups h5 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin: 0 0 0.5rem 0;
}

.pickup-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

.pickup-slot:last-child {
    border-bottom: none;
}

.pickup-slot-date {
    font-weight: 500;
}

.pickup-slot-times {
    color: var(--gray-600);
    font-size: 0.8125rem;
}

.pickup-slot-delete {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-600);
}

.pickup-slot-delete:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.no-pickups {
    font-size: 0.875rem;
    color: var(--gray-400);
    font-style: italic;
}

.btn-add-pickup {
    width: 100%;
    padding: 0.5rem;
    background: var(--gray-100);
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.btn-add-pickup:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

/* Pickup Schedule Modal */
.pickup-form {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.pickup-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pickup-form .form-group {
    flex: 1;
}

.pickup-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pickup-form input[type="date"],
.pickup-form input[type="time"] {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--black);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pickup-form input[type="date"]:hover,
.pickup-form input[type="time"]:hover {
    border-color: var(--gray-300);
}

.pickup-form input[type="date"]:focus,
.pickup-form input[type="time"]:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.pickup-form .btn-primary {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

/* ZIP Settings Modal */
.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    margin: 0 0 1rem 0;
}

.settings-section h5 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 1.5rem 0 0.75rem 0;
}

.pricing-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.radio-option input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.inline-input {
    width: 5rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.9375rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    text-align: right;
}

.copy-pickups {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.copy-pickups select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Add ZIP Form */
.add-zip-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.add-zip-form input[type="text"] {
    width: 10rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

.add-zip-form select {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    width: auto;
    min-width: 10rem;
}

.add-zip-form .btn-primary {
    width: auto;
    padding: 0.625rem 1.25rem;
}

.scheduled-pickups h5 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 1rem 0;
}

.scheduled-pickups #pickup-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: var(--radius);
    background-color: var(--gray-100);
    color: var(--gray-700);
}

.status-badge.authorized {
    background-color: var(--gray-200);
}

.status-badge.paid {
    background-color: var(--gray-300);
}

.status-badge.picked_up {
    background-color: var(--gray-800);
    color: var(--white);
}

.status-badge.capture_failed,
.status-badge.refunded {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-400);
}

/* Settings Form */
.settings-form {
    max-width: 600px;
}

.settings-form .submit-btn {
    width: auto;
    padding: 0.75rem 2rem;
    margin-top: 1.5rem;
}

.settings-group {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.settings-group:first-child {
    padding-top: 0;
}

.settings-group h3 {
    margin-bottom: 1rem;
}

/* Item Types Editor */
#item-types-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#item-types-editor .item-type-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

#item-types-editor input {
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

#item-types-editor .remove-item-type {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
}

.info-subsection {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.info-subsection h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--gray-700);
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.toggle-label input {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: var(--gray-300);
    border-radius: 12px;
    transition: background-color var(--transition-fast);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.toggle-label input:checked + .toggle-switch {
    background-color: var(--black);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(20px);
}

/* Compact toggle for tables */
.toggle-label.compact {
    gap: 0;
    justify-content: center;
}

.toggle-label.compact .toggle-switch {
    width: 36px;
    height: 20px;
}

.toggle-label.compact .toggle-switch::after {
    width: 16px;
    height: 16px;
}

.toggle-label.compact input:checked + .toggle-switch::after {
    transform: translateX(16px);
}

/* Image Upload */
.image-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.image-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
}

.remove-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: var(--gray-800);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image-btn:hover {
    background: var(--black);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--black);
}

/* Checkbox Form Styles */
.checkbox-group {
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--black);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-text {
    line-height: 1.4;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.privacy-note .lock-icon {
    width: 16px;
    height: 16px;
}

/* Field hint inline */
.field-hint-inline {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Date input fix */
.date-input {
    cursor: pointer;
}

/* Zelle field styling */
.zelle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zelle-logo {
    height: 20px;
    width: auto;
    background: #6d1ed4;
    padding: 3px 6px;
    border-radius: 4px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: var(--success);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-message h2 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.success-message p {
    color: var(--text-muted);
}

/* Closed Message */
.closed-message {
    text-align: center;
    padding: 4rem 2rem;
}

.closed-message h2 {
    margin-bottom: 0.75rem;
    color: var(--text);
}

.closed-message p {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Driver Applications */
.applications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.application-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
}

.application-info {
    flex: 1;
}

.application-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.application-contact {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.application-details {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.application-details span {
    display: inline-block;
    margin-right: 1rem;
}

.application-notes {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.application-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
}

.btn-approve {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 1;
    visibility: visible;
}

.btn-approve:hover {
    background: #16a34a;
}

.btn-dismiss {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--gray-200);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-dismiss:hover {
    background: var(--gray-100);
    color: var(--text);
}

.no-applications,
.loading-text {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* ZIP Management */
.zip-management,
.driver-management {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.zip-section,
.driver-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

/* Driver Management Layout */
.driver-list-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin: 0;
}

.driver-management-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.driver-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
}

.btn-text {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.85rem;
}

.btn-text:hover {
    color: var(--black);
}

.driver-panel .applications-list {
    max-height: 400px;
    overflow-y: auto;
}

.driver-panel .application-card {
    flex-direction: column;
    gap: 0.75rem;
    background: var(--white);
}

.driver-panel .application-actions {
    align-self: flex-start;
}

@media (max-width: 900px) {
    .driver-management-row {
        grid-template-columns: 1fr;
    }
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.inline-form input {
    flex: 1;
    min-width: 100px;
}

.inline-form input[type="text"][placeholder="ZIP Code"] {
    flex: 0 0 100px;
}

.inline-form button {
    flex-shrink: 0;
    width: auto;
    padding: 0.75rem 1.5rem;
}

.zip-list,
.driver-list {
    overflow-x: auto;
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
    animation: fadeIn var(--transition-fast);
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp var(--transition-base) ease-out;
}

.modal-content.modal-lg {
    max-width: 800px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--black);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.modal-footer button {
    width: auto;
    min-width: 100px;
}

.modal-sm {
    max-width: 400px;
}

.modal-sm .modal-body {
    padding: 1.5rem;
}

.modal-sm .modal-footer {
    padding: 1rem 1.5rem;
}

.confirm-message {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--black);
    margin: 0;
    text-align: center;
}

/* ================================
   MARKETING / FLYER STYLES  
   ================================ */

.flyer-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.flyer-controls span {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.flyer-controls .btn-primary {
    width: auto;
    padding: 0.625rem 1.25rem;
}

.flyer-preview-container {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    justify-content: center;
    overflow: visible;
    /* Container sized to fit scaled preview (11in * 0.5 = 5.5in + padding) */
    height: calc(5.5in + 2rem);
}

/* Exact 8.5x11 ratio preview (scaled down to fit screen) */
.flyer-preview {
    position: relative;
    width: 8.5in;
    height: 11in;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border: 4px solid var(--black);
    padding: 0.5in;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    transform: scale(0.5);
    transform-origin: top center;
    /* Compensate for transform scaling: original height (11in) - scaled height (5.5in) = 5.5in negative margin */
    margin-bottom: -5.5in;
}

.flyer-preview [contenteditable]:hover {
    outline: 2px dashed var(--gray-400);
    outline-offset: 4px;
}

.flyer-preview [contenteditable]:focus {
    outline: 3px solid var(--black);
    outline-offset: 4px;
}

/* Classic professional flyer styles */
.flyer-tagline {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
    color: var(--gray-600);
}

.flyer-title-section {
    text-align: center;
    margin-top: 0.3in;
}

.flyer-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
}

.flyer-title-line {
    width: 2in;
    height: 2px;
    background: var(--black);
    margin: 0.15in auto;
}

.flyer-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.1em;
}

.flyer-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.3in 0;
}

.flyer-price-amount {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
}

.flyer-price-label {
    font-size: 1.25rem;
    font-weight: 400;
    margin-top: 0.1in;
}

.flyer-cta-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    width: 100%;
    border-top: 2px solid var(--black);
    border-bottom: 2px solid var(--black);
    padding: 0.35in 0;
}

.flyer-cta-col {
    flex: 1;
    text-align: center;
    padding: 0 0.5in;
}

.flyer-cta-divider {
    width: 2px;
    background: var(--black);
}

.flyer-cta-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 0.1in 0;
    color: var(--gray-600);
}

.flyer-cta-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.flyer-cta-hint {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0.08in 0 0 0;
}

.flyer-hashgacha {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1in;
}

.flyer-hashgacha p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.flyer-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

/* Print: 8.5x11 Letter size */
@media print {
    @page {
        size: letter;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    .flyer-preview,
    .flyer-preview * {
        visibility: visible;
    }
    
    .flyer-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 8.5in;
        height: 11in;
        box-shadow: none;
        border: 4px solid black;
        padding: 0.5in;
        transform: none; /* Remove scaling for print */
        margin-bottom: 0;
    }
    
    .flyer-preview [contenteditable]:hover,
    .flyer-preview [contenteditable]:focus {
        outline: none;
    }
}

/* Flyer mobile responsiveness */
@media (max-width: 500px) {
    .flyer-preview-container {
        height: calc(3.3in + 2rem);
    }
    
    .flyer-preview {
        transform: scale(0.3);
        margin-bottom: -7.7in;
    }
}

/* ================================
   DRIVER PAGE STYLES
   ================================ */

/* Full-page driver layout */
.driver-page {
    background: var(--white);
}

.driver-page-content {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Search stays sticky at top when scrolling */
.driver-search-bar {
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

/* Error state */
.driver-error-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    text-align: center;
    color: var(--gray-400);
}

.error-content svg {
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.25rem;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.error-content p {
    color: var(--gray-500);
    margin: 0;
}

/* Driver header */
.driver-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
}

.driver-greeting {
    display: flex;
    flex-direction: column;
}

.driver-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.driver-greeting h1 {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.3;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.header-icon-btn:active {
    transform: scale(0.95);
}

/* Compact status row */
.driver-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    gap: 0.75rem;
}

.compact-clock-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.compact-clock-btn:hover:not(:disabled) {
    background: #15803d;
}

.compact-clock-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.compact-clock-btn.clocked-in {
    background: #dc2626;
}

.compact-clock-btn.clocked-in:hover:not(:disabled) {
    background: #b91c1c;
}

.compact-clock-btn .clock-state {
    font-weight: 600;
}

.compact-clock-btn .clock-time {
    font-weight: 400;
    opacity: 0.9;
}

.compact-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.compact-stat strong {
    font-weight: 700;
    color: var(--black);
}

.stat-dot {
    color: var(--gray-400);
}

/* Legacy stats bar - kept for fallback */
.driver-stats-bar {
    display: none;
}

/* Driver Export Bar - now in header */
.driver-export-bar {
    display: none;
}

.export-csv-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.export-csv-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.export-csv-btn:active {
    transform: scale(0.98);
}

.export-csv-btn svg {
    flex-shrink: 0;
}

/* Driver Search Bar */
.driver-search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.driver-search-bar svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.driver-search-bar input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    outline: none;
}

.driver-search-bar input::placeholder {
    color: var(--gray-400);
}

.clear-search-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
}

.clear-search-btn:active {
    background: var(--gray-200);
}

/* Pickup list */
.driver-pickup-list {
    padding: 0.75rem;
}

.driver-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.driver-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-400);
}

.driver-empty svg {
    margin-bottom: 0.75rem;
}

.no-search-results {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
}

.no-search-results p {
    margin: 0;
}

/* Work History Section */
.driver-history-section {
    padding: 0.75rem;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.history-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-toggle:hover {
    background: var(--gray-100);
}

.history-toggle .chevron {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.history-toggle.expanded .chevron {
    transform: rotate(180deg);
}

.history-content {
    margin-top: 0.75rem;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.history-stat {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
}

.history-stat .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black);
}

.history-stat .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Driver Earnings Stats */
.earnings-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.earnings-stat {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.earnings-stat.balance {
    background: #fffbeb;
    border-color: #fbbf24;
}

.earnings-stat .stat-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 0.125rem;
}

.earnings-stat .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-700);
}

.earnings-stat .stat-value.owed-positive {
    color: #d97706;
}

.history-shifts {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.shift-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

.shift-row:last-child {
    border-bottom: none;
}

.shift-date {
    font-weight: 500;
    color: var(--gray-700);
}

.shift-times {
    color: var(--gray-500);
}

.shift-hours {
    font-weight: 600;
    color: var(--black);
}

.no-shifts {
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Pickup cards - mobile optimized */
.driver-pickup-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.driver-pickup-card:last-child {
    margin-bottom: 0;
}

.driver-pickup-card.done {
    opacity: 0.5;
}

.pickup-card-main {
    padding: 1rem;
}

.pickup-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.pickup-address-line {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
    margin-right: 0.75rem;
}

.pickup-items-badge {
    background: var(--black);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.pickup-apt-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    border: 2px solid #f59e0b;
}

.pickup-city-line {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Action buttons row */
.pickup-card-actions {
    display: flex;
    border-top: 1px solid var(--gray-100);
}

.pickup-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: none;
    background: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.pickup-action-btn:hover {
    background: var(--gray-50);
    color: var(--black);
}

.pickup-action-btn:active {
    background: var(--gray-100);
}

.pickup-action-btn + .pickup-action-btn {
    border-left: 1px solid var(--gray-100);
}

.pickup-action-btn.primary-action {
    background: var(--black);
    color: var(--white);
}

.pickup-action-btn.primary-action:hover {
    background: var(--gray-800);
    color: var(--white);
}

.pickup-action-btn.primary-action:active {
    background: var(--gray-700);
}

/* Driver confirmation modal */
.driver-modal {
    max-width: 400px;
}

.driver-confirm-details {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.driver-confirm-details p {
    margin: 0;
    font-size: 0.9375rem;
}

.driver-confirm-details p + p {
    margin-top: 0.375rem;
}

/* Photo capture */
.driver-photo-section {
    text-align: center;
}

.photo-prompt {
    padding: 1rem 0;
}

.photo-capture-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.photo-capture-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.photo-capture-btn span {
    font-size: 0.9375rem;
    font-weight: 500;
}

.photo-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

.driver-image-preview {
    position: relative;
    display: inline-block;
}

.driver-image-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.retake-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.retake-btn:hover {
    background: var(--white);
}

/* Processing overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.processing-content {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.driver-loading {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem;
}

/* ================================
   CAMERA SCREEN STYLES
   ================================ */

.camera-screen,
.preview-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

/* Camera Header */
.camera-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 10;
}

.camera-close-btn {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}

.camera-close-btn:active {
    background: rgba(255,255,255,0.25);
}

.camera-order-info {
    flex: 1;
    text-align: center;
    color: white;
    padding-right: 44px;
}

.camera-order-info span {
    display: block;
}

.camera-order-info span:first-child {
    font-weight: 600;
    font-size: 0.9375rem;
}

.camera-order-info span:last-child {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Camera Viewfinder */
.camera-viewfinder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#camera-canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Camera Fallback */
.camera-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.camera-fallback svg {
    margin-bottom: 1rem;
}

.camera-fallback p {
    margin-bottom: 1.5rem;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: white;
    color: black;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.upload-btn:active {
    background: var(--gray-200);
}

/* Camera Controls */
.camera-controls {
    padding: 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.camera-capture-ring {
    width: 80px;
    height: 80px;
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-btn {
    width: 64px;
    height: 64px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.capture-btn:active {
    transform: scale(0.92);
}

.skip-photo-btn {
    position: absolute;
    left: 2rem;
    bottom: max(2rem, env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.skip-photo-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Preview Screen */
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(0,0,0,0.8);
}

.preview-header span {
    color: white;
    font-weight: 500;
}

.preview-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    text-align: center;
}

.preview-overlay-info span {
    display: block;
}

.preview-overlay-info span:first-child {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.preview-overlay-info span:last-child {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.9);
}

.preview-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.preview-btn.secondary {
    background: rgba(255,255,255,0.15);
    color: white;
}

.preview-btn.secondary:active {
    background: rgba(255,255,255,0.25);
}

.preview-btn.primary {
    background: white;
    color: black;
}

.preview-btn.primary:active {
    background: var(--gray-200);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group-half,
    .form-group-quarter {
        flex: 1;
    }

    .admin-header,
    .driver-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .order-stats {
        flex-wrap: wrap;
    }
    
    .action-queue {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-item {
        padding: 0.75rem 1rem;
    }
    
    .action-count {
        font-size: 1.25rem;
    }
    
    .order-subtabs {
        overflow-x: auto;
        gap: 0;
    }
    
    .order-subtab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .subtab-count {
        min-width: 1.25rem;
        height: 1.25rem;
        font-size: 0.7rem;
    }

    .tab-actions {
        width: 100%;
    }
    
    .orders-filters {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .filter-group label {
        display: none;
    }
    
    .filter-select {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
        min-width: 110px;
    }
    
    .filter-actions {
        gap: 0.375rem;
    }
    
    .filter-actions button {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .filter-select {
        flex: 1;
    }

    .inline-form {
        flex-direction: column;
    }

    .inline-form input,
    .inline-form button {
        width: 100%;
    }

    .pickup-stats {
        grid-template-columns: 1fr;
    }

    .pickup-meta {
        flex-direction: column;
        gap: 0.375rem;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }
    
    /* Mobile Orders Table - Horizontal Scroll */
    .orders-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .orders-table {
        min-width: 600px;
        font-size: 0.8125rem;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 0.5rem 0.375rem;
        white-space: nowrap;
    }
    
    /* Truncate address */
    .orders-table td:nth-child(2) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .driver-select {
        font-size: 0.75rem;
        padding: 0.25rem 0.375rem;
        min-width: 80px;
    }
    
    .icon-btn {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    /* Bulk action bar mobile */
    .bulk-action-bar {
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
    }
    
    .bulk-action-bar .filter-select {
        flex: 1;
        min-width: 100px;
    }
    
    .bulk-action-bar .btn-sm {
        flex: 0 0 auto;
        padding: 0 0.5rem;
    }
    
    #bulk-clear-btn {
        display: none;
    }

    .orders-table,
    .zip-table,
    .driver-table {
        font-size: 0.8125rem;
    }

    .orders-table th,
    .orders-table td,
    .zip-table th,
    .zip-table td,
    .driver-table th,
    .driver-table td {
        padding: 0.625rem 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .admin-nav,
    .tab-actions,
    .btn-secondary,
    .modal {
        display: none !important;
    }

    .orders-table-wrapper {
        overflow: visible;
    }
}

/* ================================
   SHAIMOS PICKUPS - ITEM SELECTION
   ================================ */

.header-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.item-types-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-type-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.item-type-row:hover {
    border-color: var(--gray-400);
}

.item-type-row.selected {
    border-color: var(--black);
    background: var(--white);
    box-shadow: inset 0 0 0 1px var(--black);
}

.item-type-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--black);
}

.item-type-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.item-type-name {
    font-weight: 600;
    font-size: 1rem;
}

.item-type-price {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.item-type-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.3;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.item-type-row.selected .item-type-quantity {
    opacity: 1;
    pointer-events: auto;
}

.item-qty-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.item-qty-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.item-qty-btn:active {
    background: var(--gray-200);
}

.item-qty-input {
    width: 3rem;
    height: 2rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

.item-qty-input:focus {
    outline: none;
    border-color: var(--black);
}

/* Order Summary */
.order-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.order-summary:empty {
    display: none;
}

.order-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.checkout-total {
    font-weight: 600;
    font-size: 1.125rem;
    padding-top: 0.5rem;
}

/* Notes textarea */
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

textarea:focus {
    outline: none;
    border-color: var(--black);
}

