/* --- Variables & Reset --- */
:root {
    --bg-dark: #0b0e14;
    --panel-bg: #151a23;
    --primary: #00f2ea;       /* Cyan */
    --secondary: #00ff9d;     /* Green */
    --danger: #ff4757;        /* Red */
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
}

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

body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; display: flex; flex-direction: column; }

/* --- Navbar --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; background: #0b0e14; border-bottom: 1px solid #1f2937;
}
.logo { font-size: 1.5rem; font-weight: 700; }
.highlight { color: var(--primary); }

.btn-primary {
    background: var(--primary); color: #000; border: none;
    padding: 0.6rem 1.2rem; border-radius: 50px; font-weight: 700; cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.2);
}

/* --- Stats Bar --- */
.stats-bar {
    display: flex; justify-content: space-around; padding: 1rem;
    background: #10151d; border-bottom: 1px solid #1f2937;
}
.stat-box { text-align: center; }
.stat-box h3 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; }
.stat-box p { font-size: 1.5rem; font-weight: 700; }
.text-green { color: var(--secondary); }

/* --- Controls --- */
.controls { padding: 1rem 2rem; display: flex; gap: 1rem; background: var(--bg-dark); }
.search-bar, .filter-dropdown {
    width: 100%; padding: 0.8rem; background: var(--panel-bg);
    border: 1px solid #2d3748; color: white; border-radius: 8px; outline: none;
}
.search-bar:focus { border-color: var(--primary); }

/* --- MAIN DASHBOARD (Split View) --- */
.dashboard-container {
    display: flex;
    flex: 1; /* Takes remaining height */
    overflow: hidden; /* Prevents double scrollbars */
    border-top: 1px solid #1f2937;
}

/* List Side */
.list-sidebar {
    width: 40%;
    overflow-y: auto;
    padding: 1rem;
    background: #0b0e14;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Map Side */
#map {
    width: 60%;
    height: 100%;
    background: #1e293b; /* Placeholder color */
}

/* --- Cards --- */
.station-card {
    background: var(--panel-bg); border: 1px solid #1f2937;
    padding: 1rem; border-radius: 12px; cursor: pointer;
    transition: 0.2s;
}
.station-card:hover { border-color: var(--primary); transform: translateX(5px); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.station-title h3 { font-size: 1.1rem; }
.location { font-size: 0.85rem; color: var(--text-muted); }

.status-badge {
    padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.status-available { background: rgba(0, 255, 157, 0.1); color: var(--secondary); border: 1px solid var(--secondary); }
.status-charging { background: rgba(255, 71, 87, 0.1); color: var(--danger); border: 1px solid var(--danger); }

.specs { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 10px; margin-top: 5px; }

/* --- Modal --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 9999; justify-content: center; align-items: center;
}
.modal-content {
    background: var(--panel-bg); padding: 2rem; border-radius: 16px; width: 90%; max-width: 400px;
    border: 1px solid #2d3748; position: relative;
}
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; cursor: pointer; }
.row { display: flex; gap: 10px; }
input, select { width: 100%; padding: 12px; margin: 8px 0; background: #0b0e14; border: 1px solid #2d3748; color: white; border-radius: 8px; }
.btn-submit { width: 100%; background: var(--primary); padding: 12px; border: none; border-radius: 8px; font-weight: 700; margin-top: 10px; cursor: pointer; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .dashboard-container { flex-direction: column-reverse; } /* List bottom, Map top */
    .list-sidebar { width: 100%; height: 50%; }
    #map { width: 100%; height: 50%; }
    .controls { flex-direction: column; padding: 1rem; }
}
/* --- Action Button Styles for Booking/Toggle --- */
.btn-action {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, transform 0.1s;
}

/* Style for when the station is Available */
.btn-available {
    background: var(--secondary); /* Green */
    color: #000;
}
.btn-available:hover {
    background: #00e68f;
}

/* Style for when the station is Occupied (and you can free it) */
.btn-occupied {
    background: var(--danger); /* Red */
    color: white;
}
.btn-occupied:hover {
    background: #e63e4e;
}

.btn-action:active {
    transform: scale(0.98);
}
/* --- New Reserved Status Styling --- */
.status-reserved { 
    background: rgba(255, 193, 7, 0.15); /* Light Amber */
    color: #ffc107; /* Amber Text */
    border: 1px solid #ffc107; 
}
/* The button when Reserved or Charging */
.btn-occupied.status-reserved {
    background: #ffc107; /* Amber button */
    color: black;
}
.btn-occupied.status-reserved:hover {
    background: #e0a800;
}
