/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --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: 4px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
}

body.driver-page {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Container */
.container {
    max-width: 640px;
    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: sticky;
    top: 0;
    z-index: 100;
}

.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 */
header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

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: 2rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
    margin: 0;
}

.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); }
}

/* Info Button */
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);
}

/* 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);
}

/* 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: 2rem;
}

.form-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-100);
}

.form-section:last-of-type {
    border-bottom: none;
}

.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%;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

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);
    }
}

/* 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: var(--gray-50);
    margin: 1.5rem -1.5rem -1.5rem -1.5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.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);
}

.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: 0.5rem;
}

#pickup-instruction {
    color: var(--gray-800);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.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;
}

.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 {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 140px;
}

/* 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;
}

.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);
}

/* 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);
}

.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;
}

/* 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);
    min-width: 12rem;
}

.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;
}

.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);
}

/* 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);
}

/* 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);
}

.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;
}

@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-preview-container {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    justify-content: center;
}

/* Fixed 8.5x11 preview (scaled down) */
.flyer-preview {
    width: 340px;
    height: 440px;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border: 3px solid var(--black);
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.flyer-preview [contenteditable]:hover {
    outline: 1px dashed var(--gray-400);
    outline-offset: 2px;
}

.flyer-preview [contenteditable]:focus {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

.flyer-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.flyer-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.flyer-body {
    line-height: 1.8;
}

.flyer-body p {
    margin: 0.25rem 0;
    font-size: 1rem;
}

.flyer-website {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.flyer-hashgacha {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.flyer-hashgacha p {
    margin: 0;
}

.flyer-tagline {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    font-style: italic;
}

/* Print: 8.5x11 Letter size */
@media print {
    @page {
        size: letter;
        margin: 0;
    }
    
    body * {
        visibility: hidden;
    }
    
    .flyer-preview,
    .flyer-preview * {
        visibility: visible;
    }
    
    .flyer-preview {
        position: fixed;
        left: 0;
        top: 0;
        width: 8.5in;
        height: 11in;
        box-shadow: none;
        border: 4px solid black;
        padding: 0.5in;
    }
    
    .flyer-title { font-size: 3rem; }
    .flyer-price { font-size: 2.5rem; }
    .flyer-body p { font-size: 1.5rem; }
    .flyer-website { font-size: 2rem; }
    .flyer-hashgacha { font-size: 1.25rem; }
    .flyer-tagline { font-size: 1.25rem; }
    
    .flyer-preview [contenteditable]:hover,
    .flyer-preview [contenteditable]:focus {
        outline: none;
    }
}

/* ================================
   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;
}

.refresh-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.refresh-btn:hover {
    background: var(--gray-200);
}

.refresh-btn:active {
    background: var(--gray-300);
}

/* Stats bar */
.driver-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0 1rem;
}

.stat-num {
    font-size: 1.25rem;
    font-weight: 700;
}

.stat-txt {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat-divider {
    width: 1px;
    height: 1.25rem;
    background: var(--gray-300);
}

/* 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;
}

/* 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-pieces-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-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);
}

/* 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;
    }

    .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) {
    .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;
    }
}
