/* 
 * STYLE.CSS - MINIMALIST DESIGN
 * 
 * Clean, simple, and functional styles.
 * No fancy animations. Easy to understand structure.
 */

/* 1. RESET & DEFAULTS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Ensures padding doesn't affect width */
    font-family: Arial, sans-serif;
    /* Standard, readable font */
}

body {
    background-color: #f4f4f4;
    /* Light grey background */
    color: #333;
    /* Dark grey text (easier on eyes than black) */
}

/* 2. UTILITY CLASSES */
.container {
    padding: 20px;
}

.btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: #e9ecef;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    /* Slight rounded corners */
}

.btn:hover {
    background: #dbe0e5;
}

.btn-primary {
    background-color: #007bff;
    /* Standard Blue */
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #0069d9;
    /* Darker Blue on Hover */
}

.btn-danger {
    background-color: #dc3545;
    /* Red */
    color: white;
    border: none;
}

.hidden {
    display: none !important;
}

/* 3. LOGIN PAGE STYLES */
.login-wrapper {
    height: 100vh;
    /* Full screen height */
    display: flex;
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    background-color: #e9ecef;
}

.login-box {
    background: white;
    padding: 40px;
    width: 350px;
    border: 1px solid #ccc;
    /* Simple grey border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Very subtle shadow */
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #0056b3;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.error-message {
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
    text-align: center;
    height: 15px;
    /* Keeps space so layout doesn't jump */
}

.login-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

/* 4. DASHBOARD - SIDEBAR & LAYOUT */
.dashboard-layout {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 250px;
    background-color: #343a40;
    /* Dark grey sidebar */
    color: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background-color: #212529;
    /* Darker header */
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    /* Remove bullet points */
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #4b545c;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #c2c7d0;
    text-decoration: none;
    transition: background 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #007bff;
    color: white;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    /* Takes remaining width */
    overflow-y: auto;
    /* Allows scrolling */
    padding: 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

/* 5. DASHBOARD WIDGETS */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 20px;
    border: 1px solid #ccc;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* GAUGE COLORS */
.stat-card.blue {
    border-top: 4px solid #007bff;
}

.stat-card.green {
    border-top: 4px solid #28a745;
}

.stat-card.grey {
    border-top: 4px solid #6c757d;
}

.stat-card.red {
    border-top: 4px solid #dc3545;
}

/* MAP */
.map-section {
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
    height: 400px;
}

.map-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* TABLE STYLES */
.table-panel {
    background: white;
    padding: 20px;
    border: 1px solid #ccc;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    /* Removes spaces between borders */
    margin-top: 10px;
    font-size: 14px;
}

table th,
table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #f8f9fa;
    /* Light grey header */
}

/* Status Badges in Table */
.status {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: white;
}

.status.active {
    background-color: #28a745;
}

.status.inactive {
    background-color: #6c757d;
}

.status.error {
    background-color: #dc3545;
}

/* Action Buttons */
.action-btn {
    padding: 4px 8px;
    margin-right: 5px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
}

.action-btn:hover {
    background: #eee;
}

/* 6. MODAL STYLES */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Dim background */
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 5px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 7. TOAST NOTIFICATIONS */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 250px;
    padding: 15px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background-color: #28a745;
    /* Green */
}

.toast.error {
    background-color: #dc3545;
    /* Red */
}