:root {
    --bg-color: #f8fafc;
    --sidebar-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --success-color: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; /* Prevent full page scroll, let map take over */
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 400px;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow-y: auto;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Form */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

input, select {
    background-color: #334155; /* Slate 700 */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button#optimize-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

button#optimize-btn:hover {
    background-color: var(--accent-hover);
}

/* Results */
.hidden {
    display: none;
}

.summary-card {
    background-color: rgba(255,255,255,0.05);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}


.stat .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.stat .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
}

.stops-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Adjusted for Light Mode */
input, select {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.summary-card {
    background-color: #f1f5f9; /* Slate 100 */
    border: 1px solid var(--border-color);
}

.stop-item {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stop-info {
    display: flex;
    flex-direction: column;
}

.stop-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.stop-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Map */
.map-container {
    flex-grow: 1;
    height: 100%;
}

/* Custom Marker */
.custom-pin {
    background-color: white;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transform: translate(-50%, -100%); /* Center bottom */
    width: max-content !important;
    height: auto !important;
}

.custom-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--accent-color) transparent transparent transparent;
}

.pin-brand {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.pin-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
