:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --success-hover: #059669;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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);
    --yellow-accent: #facc15;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.date-badge {
    background: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
}

input[type="text"],
input[type="number"] {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.highlight-input input {
    background-color: #fefce8;
    border-color: #fde047;
    font-weight: 600;
}

.price-input-wrapper small {
    display: block;
    margin-top: 0.2rem;
    color: var(--success);
    font-size: 0.8rem;
}

/* Locations */
.locations-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.location-input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
}

.location-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.location-dot.origin { background-color: var(--primary); }
.location-dot.destination { background-color: #ef4444; }

.location-input {
    flex: 1;
}

.routing-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-color);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

.shadow { box-shadow: var(--shadow); }

.action-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

/* Map */
.map-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-card .card-title {
    padding: 1rem 1.5rem 0;
}

#map {
    height: 350px;
    width: 100%;
    margin-top: 1rem;
    background-color: #e5e7eb;
}

/* Summary */
.summary-card {
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
    border-top: 4px solid var(--yellow-accent);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: var(--secondary);
}

.summary-value {
    font-weight: 600;
    color: var(--text-main);
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.total-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.total-price {
    font-size: 2.5rem;
    color: var(--primary);
    background: var(--yellow-accent);
    padding: 0 0.8rem;
    border-radius: 8px;
}

.status-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #ef4444;
}

/* Print Styles */
@media print {
    body { padding: 0; background: white; }
    .container { box-shadow: none; max-width: 100%; padding: 0; }
    .no-print { display: none !important; }
    .card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
    #map { height: 400px; }
}
