:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f3f4f6;
    --card: #ffffff;
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --border: #e2e8f0;
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

body { font-family: -apple-system, sans-serif; background: var(--bg); padding: 15px; margin: 0; color: var(--text-main); }
.container { max-width: 450px; margin: 0 auto; }
.card { background: var(--card); padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

/* Header Styling */
.app-header {
    text-align: center;
    margin: 15px 0 20px;
}
.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
}
.tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 4px 0 0;
    font-weight: 500;
}

h3 { margin: 15px 0 10px; font-size: 1.05rem; border-bottom: 2px solid #e5e7eb; padding-bottom: 5px; color: var(--text-main); }
label { display: block; margin-top: 15px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }

/* Promo Banner */
.promo-banner {
    background: #eff6ff;
    border: 1px dashed var(--primary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.promo-badge {
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.promo-text {
    margin: 0;
    font-size: 0.8rem;
    color: #1e40af;
    line-height: 1.3;
}

/* Calendar Grid */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 10px; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; cursor: pointer; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 2px solid transparent; }
.calendar-day span { font-size: 10px; font-weight: bold; }
.calendar-day.selected { border-color: var(--primary); background: #eff6ff; }
.day-available { border-bottom: 4px solid var(--green); }
.day-fast { border-bottom: 4px solid var(--yellow); }
.day-full { border-bottom: 4px solid var(--red); pointer-events: none; opacity: 0.5; }

/* Location Grouping Styles */
.location-group {
    margin-top: 25px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    position: relative;
    background: #fafafa;
}
.group-header {
    position: absolute;
    top: -10px;
    left: 15px;
    background: #fafafa;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--primary);
    text-transform: uppercase;
}

/* Spinner Roller */
.secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}
.divider span {
    padding: 0 10px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: bold;
}

input, select, textarea, .primary-btn, .secondary-btn { 
    width: 100%; padding: 12px; margin-top: 8px; border-radius: 8px; 
    border: 1px solid #d1d5db; font-size: 16px; box-sizing: border-box; 
    font-family: inherit;
}
textarea { resize: vertical; }
select:disabled { background: #f1f5f9; color: #94a3b8; }
button:disabled { cursor: not-allowed; opacity: 0.8; }

.primary-btn { background: var(--primary); color: white; border: none; font-weight: bold; margin-top: 20px; cursor: pointer; transition: background 0.2s; }
.primary-btn:active { background: var(--primary-dark); }
.secondary-btn { background: #fff; color: var(--primary); border: 1px solid var(--primary); cursor: pointer; }

.availability-legend { display: flex; gap: 12px; margin-bottom: 10px; font-size: 11px; }
.legend-item { display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.green { background: var(--green); } .yellow { background: var(--yellow); } .red { background: var(--red); }

.order-item { background: white; padding: 12px; border-radius: 8px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; border-left: 5px solid var(--primary); font-size: 14px; }
.order-item.canceled { border-left-color: #9ca3af; opacity: 0.6; }
.order-item button { background: #fee2e2; color: #dc2626; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.hidden { display: none; }