/* ============================================
   EV Truck Route Planner - India
   EIM (Energy in Motion) Theme
   ============================================ */

:root {
    --primary: #01363F;
    --primary-dark: #012a32;
    --primary-light: #e7f1f1;
    --accent: #38e0cf;
    --green: #0d7d2f;
    --green-light: #e7f1e9;
    --orange: #fd7e14;
    --orange-light: #fff3e0;
    --red: #dc3545;
    --red-light: #f8d7da;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e0e0e0;
    --gray-300: #d0d0d0;
    --gray-400: #b0b0b0;
    --gray-500: #898989;
    --gray-600: #6a6a6a;
    --gray-700: #4a4a4a;
    --gray-800: #2a2a2a;
    --gray-900: #000000;
    --shadow-1: 0 1px 2px rgba(0,0,0,0.08);
    --shadow-2: 0 1px 4px rgba(0,0,0,0.1);
    --shadow-3: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 0;
    --radius-lg: 0;
    --sidebar-width: 400px;
    --header-height: 56px;
    --elevation-height: 200px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-900);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.hidden { display: none !important; }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-overlay.hidden { display: none; }

.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 460px;
    width: 90%;
    box-shadow: var(--shadow-3);
}

.modal-icon {
    width: 180px;
    margin: 0 auto 24px;
    background: var(--primary);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon .material-icons-outlined {
    font-size: 36px;
    color: var(--primary-light);
}

.modal h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.modal p {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 12px;
}

.modal ol {
    font-size: 13px;
    color: var(--gray-700);
    padding-left: 20px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.modal ol a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.modal input[type="text"],
.modal input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 16px;
    color: #000;
}

.modal input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(1, 54, 63, 0.2);
}

.modal-note {
    font-size: 12px !important;
    color: var(--gray-500) !important;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0 !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Settings Modal */
.settings-modal {
    max-width: 420px;
}

.settings-form .form-group {
    margin-bottom: 16px;
}

.settings-form label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000000;
    margin-bottom: 6px;
}

.settings-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    color: #000;
}

.settings-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(1, 54, 63, 0.2);
}

/* ---- Buttons ---- */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--primary-light);
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s;
}

.btn-primary:hover { background: #034852; }
.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 10px 20px;
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--gray-200);
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
}

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

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 0;
    transition: background 0.15s;
}

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

.btn-text .material-icons-outlined { font-size: 18px; }

.icon-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.icon-btn:hover { background: rgba(255,255,255,0.15); }

.icon-btn-sm {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.icon-btn-sm:hover { background: var(--gray-100); }
.icon-btn-sm .material-icons-outlined { font-size: 20px; }

/* ---- App Layout ---- */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* ---- Header ---- */
.header {
    height: var(--header-height);
    background: var(--primary);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 0 20px;
    z-index: 1000;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 32px;
    display: block;
}

.header-icon {
    font-size: 24px;
    color: var(--accent);
}

.header h1 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-badge {
    background: rgba(255,255,255,0.15);
    color: var(--primary-light);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gcw-badge {
    background: var(--accent);
    color: var(--primary);
}

/* ---- Sidebar ---- */
.sidebar {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    z-index: 900;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    border-right: 1px solid var(--gray-200);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* ---- Panels ---- */
.panel {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.panel-header .material-icons-outlined {
    font-size: 18px;
    color: var(--accent);
}

/* ---- Route Input ---- */
.route-inputs {
    display: flex;
    flex-direction: column;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.input-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 32px;
    flex-shrink: 0;
}

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

.origin-dot {
    border-color: var(--accent);
    background: var(--primary-light);
}

.destination-dot {
    border-color: var(--red);
    background: var(--red-light);
}

.stop-dot {
    border-color: var(--primary);
    background: var(--primary-light);
    width: 10px;
    height: 10px;
}

.marker-line {
    width: 2px;
    height: 16px;
    background: var(--gray-400);
    margin: 2px 0;
}

.input-wrapper {
    flex: 1;
    position: relative;
    margin-bottom: 4px;
}

.location-input {
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    background: #ffffff;
    color: #000000;
}

.location-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(1, 54, 63, 0.2);
}

.location-input.has-value {
    background: #fff;
    border-color: var(--gray-300);
}

.input-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.input-clear:hover { color: var(--gray-800); }

.stop-row {
    display: flex;
    align-items: center;
}

.stop-row .input-marker .marker-line {
    height: 12px;
}

.remove-stop {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    margin-left: 2px;
    border-radius: 50%;
    display: flex;
    transition: all 0.2s;
}

.remove-stop:hover {
    color: var(--red);
    background: var(--red-light);
}

.remove-stop .material-icons-outlined { font-size: 18px; }

.route-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 12px;
}

.calculate-btn {
    margin-top: 4px;
}

.calculate-btn .material-icons-outlined {
    font-size: 20px;
}

/* ---- Loading ---- */
.loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
}

.loader {
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-panel p {
    font-size: 14px;
    color: var(--gray-600);
}

/* ---- Results Panel ---- */
.results-panel {
    padding: 0;
}

.result-section {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.result-section:last-of-type {
    border-bottom: none;
}

.summary-section {
    background: var(--primary);
    border-radius: 0;
    padding: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.summary-item .material-icons-outlined {
    font-size: 22px;
    opacity: 0.8;
}

.summary-value {
    font-size: 18px;
    font-weight: 700;
}

.summary-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.section-title .material-icons-outlined {
    font-size: 18px;
    color: var(--gray-500);
}

.section-title.collapsible {
    cursor: pointer;
    user-select: none;
}

.section-title.collapsible:hover {
    color: var(--primary);
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.2s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

/* Consumption Cards */
.consumption-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.consumption-card {
    text-align: center;
    padding: 14px 8px;
    border-radius: 0;
    border: 1px solid;
}

.consumption-card.low {
    border-color: var(--green);
    background: var(--green-light);
}

.consumption-card.expected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.consumption-card.high {
    border-color: var(--orange);
    background: var(--orange-light);
}

.card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.consumption-card.low .card-label { color: var(--green); }
.consumption-card.expected .card-label { color: var(--primary); }
.consumption-card.high .card-label { color: var(--orange); }

.card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.card-unit {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.card-rate {
    font-size: 11px;
    color: var(--gray-500);
}

/* Breakdown */
.breakdown {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 12px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray-700);
    padding: 6px 0;
}

.breakdown-row.regen span:last-child {
    color: var(--green);
    font-weight: 500;
}

.breakdown-row.total {
    font-weight: 600;
    color: var(--gray-900);
}

.breakdown-divider {
    height: 1px;
    background: var(--gray-300);
    margin: 6px 0;
}

/* Tolls */
.toll-summary {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 12px;
}

.toll-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--gray-300);
}

.toll-amount {
    color: var(--primary);
    font-size: 18px;
}

.toll-detail .breakdown-row {
    padding: 4px 0;
}

/* Segments */
.segment-list {
    max-height: 300px;
    overflow-y: auto;
}

.segment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

.segment-item:last-child { border-bottom: none; }

.segment-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.segment-info {
    flex: 1;
}

.segment-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.segment-details {
    font-size: 12px;
    color: var(--gray-500);
}

.result-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.share-btn:hover {
    background: #2bc9b9;
}

/* ---- Map ---- */
.map-container {
    position: absolute;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    z-index: 1;
}

.map-container.with-elevation {
    bottom: var(--elevation-height);
}

#map {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    right: 16px;
    bottom: 24px;
    z-index: 800;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0;
    box-shadow: var(--shadow-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.map-control-btn:hover { background: var(--gray-100); }
.map-control-btn .material-icons-outlined { font-size: 22px; color: var(--gray-700); }

/* Map click banner */
.map-click-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    border-radius: 0;
    padding: 8px 20px;
    box-shadow: var(--shadow-2);
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-light);
    pointer-events: none;
    transition: opacity 0.3s;
}

.map-click-banner .material-icons-outlined {
    font-size: 18px;
    color: var(--accent);
}

.map-click-banner.hidden { opacity: 0; pointer-events: none; }

/* Source badge in autocomplete */
.source-badge {
    display: inline-block;
    font-size: 10px;
    background: var(--gray-200);
    color: var(--gray-600);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Custom Leaflet markers */
.custom-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-icon-origin,
.marker-icon-destination,
.marker-icon-stop {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.marker-icon-origin { background: var(--primary); }
.marker-icon-destination { background: var(--red); }
.marker-icon-stop { background: var(--accent); width: 22px; height: 22px; }

.marker-icon-origin::after,
.marker-icon-destination::after,
.marker-icon-stop::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: rotate(45deg);
}

.marker-icon-stop::after {
    width: 6px;
    height: 6px;
}

/* Elevation hover marker */
.elevation-hover-marker {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ---- Elevation Panel ---- */
.elevation-panel {
    position: absolute;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--elevation-height);
    background: #fff;
    border-top: 1px solid var(--gray-200);
    z-index: 800;
    display: flex;
    flex-direction: column;
}

.elevation-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.elevation-header .material-icons-outlined {
    font-size: 18px;
    color: var(--gray-500);
}

.elevation-header .icon-btn-sm {
    margin-left: auto;
}

.elevation-chart-container {
    flex: 1;
    padding: 8px 16px;
    min-height: 0;
}

.elevation-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.elevation-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 16px;
    font-size: 11px;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 12px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.flat { background: #34a853; }
.legend-color.mild { background: #fbbc04; }
.legend-color.steep { background: #ea4335; }
.legend-color.downhill { background: #38e0cf; }
.legend-color.consumption { background: #ff6d01; height: 2px; border-top: 1px dashed #ff6d01; }

/* ---- Resize Handles ---- */
.resize-handle {
    position: absolute;
    z-index: 1000;
    transition: background 0.15s;
}

.resize-handle:hover,
.resize-handle.active {
    background: var(--primary);
    opacity: 0.3;
}

.resize-handle-vertical {
    top: var(--header-height);
    left: var(--sidebar-width);
    width: 6px;
    height: calc(100vh - var(--header-height));
    cursor: col-resize;
    transform: translateX(-3px);
}

.resize-handle-horizontal {
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    cursor: row-resize;
    transform: translateY(-3px);
}

body.resizing-sidebar,
body.resizing-sidebar * {
    cursor: col-resize !important;
    user-select: none !important;
}

body.resizing-elevation,
body.resizing-elevation * {
    cursor: row-resize !important;
    user-select: none !important;
}

/* Satellite toggle active state */
.map-control-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.map-control-btn.active .material-icons-outlined {
    color: #fff;
}

/* ---- Autocomplete ---- */
.autocomplete-dropdown {
    position: fixed;
    background: #fff;
    border-radius: 0;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-3);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
    min-width: 300px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--gray-100);
}

.autocomplete-item .material-icons-outlined {
    font-size: 20px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.autocomplete-text {
    flex: 1;
    min-width: 0;
}

.autocomplete-name {
    font-size: 14px;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-desc {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
}

/* ---- Error Toast ---- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: var(--shadow-3);
    z-index: 99999;
    animation: slideUp 0.3s ease;
    max-width: 500px;
    text-align: center;
}

.toast.error { background: var(--red); }

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
        --elevation-height: 160px;
    }

    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        max-height: 50vh;
        overflow-y: auto;
    }

    .map-container {
        position: relative;
        left: 0;
        height: 50vh;
    }

    .elevation-panel {
        left: 0;
    }

    .app {
        overflow-y: auto;
    }
}

/* ============================================
   Login Page (matches EIM Vehicle Dashboard)
   ============================================ */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.login-card {
    width: 400px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 40px 32px;
    text-align: center;
}

.login-logo {
    width: 180px;
    margin: 0 auto 24px;
    background: #01363F;
    padding: 16px 24px;
    border-radius: 0;
}

.login-logo img {
    width: 100%;
    display: block;
}

.login-subtitle {
    font-size: 12px;
    color: #898989;
    font-weight: 600;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-card form {
    text-align: left;
}

.login-input-group {
    margin-bottom: 16px;
}

.login-input-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000000;
    margin-bottom: 6px;
}

.login-input-group input {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    color: #000000;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.login-input-group input::placeholder {
    color: #b0b0b0;
}

.login-input-group input:focus {
    border-color: #01363F;
    box-shadow: 0 0 0 2px rgba(1, 54, 63, 0.2);
}

.login-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 0;
    margin-bottom: 16px;
}

.login-card button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #01363F;
    color: #e7f1f1;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 8px;
}

.login-card button[type="submit"]:hover {
    background: #034852;
}

.login-card button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .login-card {
        width: 100%;
        margin: 0 16px;
        padding: 32px 20px;
    }

    .login-logo {
        width: 140px;
        padding: 12px 20px;
    }
}
