/* --- 1. GLOBAL VARIABLES & BODY --- */
:root {
    --primary-color: #0d6efd;
    --background-color: #f4f7fc;
    --card-background: #ffffff;
    --text-color: #212529;
    --subtle-text: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --border-radius: 12px;
}
body {
    background-color: var(--background-color) !important;
    font-family: 'Inter', sans-serif;
}
.main-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

/* --- 2. NEW HEADER STYLES --- */

/* Main header container */
.header {
    background-color: var(--card-background) !important; /* Use our card color */
    padding: 1rem 0; /* Add some vertical padding */
    border-bottom: 1px solid var(--border-color); /* Add a subtle bottom border */
}

/* Site Title (e.g., "Ferst") */
.navbar-brand .brand-text {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important; /* Make it bold */
    font-size: 24px !important;
    color: var(--text-color) !important;
}

/* Main Navigation Links (Home, Sign In, etc.) */
.navbar-nav .nav-link {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: var(--subtle-text) !important;
    transition: color 0.2s ease;
}

/* Style for the active/current page link and on hover */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Search Icon in the header */
.header-search-icon {
    color: var(--text-color) !important;
}

/* --- 3. NEW FOOTER STYLES --- */

/* Main footer container */
.footer {
    background-color: #343a40 !important; /* A dark grey for contrast */
    color: #f8f9fa !important; /* Light text color */
    padding: 2rem 0;
}

/* Copyright text in the footer */
.footer-bottom p {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #adb5bd !important; /* A subtle light grey */
}

/* --- 4. EXISTING APPLICATION STYLES (Unchanged) --- */

.card {
    background-color: var(--card-background); padding: 24px; border-radius: var(--border-radius);
    box-shadow: var(--shadow); margin-bottom: 24px;
}
.card h2 {
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 20px;
    border-bottom: 1px solid var(--border-color); padding-bottom: 12px;
    color: var(--text-color); margin-top: 0;
}
.card-header-flex {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color); padding-bottom: 12px; margin-bottom: 24px;
}
.card-header-flex h2 { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px; background-color: var(--primary-color);
    color: white; padding: 8px 16px; font-size: 14px; font-weight: 500;
    border-radius: 6px; text-decoration: none; transition: background-color 0.2s ease;
}
.btn-primary:hover { background-color: #0b5ed7; color: white; }
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
}
.filter-bar input, .filter-bar select {
    padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px;
    font-size: 13px; flex-grow: 1; min-width: 200px; 
}
table.table {
    width: 100%; border-collapse: collapse; margin-top: 16px;
}
table.table th, table.table td {
    padding: 10px 14px; text-align: left; border-bottom: 1px solid #e9ecef;
    font-size: 13px; color: #343a40;
}
table.table th {
    font-weight: 600; color: var(--subtle-text); font-size: 11px; text-transform: uppercase;
}
.sortable-header {
    cursor: pointer; user-select: none; position: relative;
}
.sortable-header:hover { background-color: #f8f9fa; }
.sort-icon {
    font-size: 10px; margin-left: 5px; color: var(--subtle-text);
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
}
.pagination-controls-container, #pagination-controls {
    display: flex; justify-content: space-between; align-items: center; 
    margin-top: 20px; font-size: 13px; color: var(--subtle-text);
    padding-top: 10px; border-top: 1px solid var(--border-color);
}
/* This is the fix for the homepage pagination spacing */
#pagination-controls {
    margin-top: -10px; margin-bottom: 24px; padding: 0 10px; border-top: none;
}
.pagination-btn {
    padding: 6px 14px; font-size: 13px; font-weight: 500; border-radius: 6px;
    border: 1px solid var(--border-color); background-color: white; color: var(--text-color);
    cursor: pointer; transition: background-color 0.2s ease;
}
.pagination-btn:hover:not(:disabled) { background-color: #f8f9fa; }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.spinner {
  border: 4px solid #f3f3f3; border-top: 4px solid var(--primary-color);
  border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#vehicle-tbody tr { cursor: pointer; }
#vehicle-tbody tr.selected-row { background-color: #e6f0ff !important; font-weight: 500; }
.details-grid {
    display: grid; grid-template-columns: 1fr 2fr; gap: 24px; margin-top: 16px;
}
.details-box-header { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 10px; }
.details-box-header h3 { margin: 0; }
.details-box h3 { margin-top: 0; font-weight: 600; font-size: 16px; color: var(--primary-color); }
.details-box p { margin: 8px 0; color: var(--subtle-text); font-size: 13px; }
.details-box strong { color: var(--text-color); font-weight: 500; }
.refresh-btn { background: none; border: none; padding: 5px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s ease; }
.refresh-btn:hover { background-color: #f0f0f0; }
.refresh-btn svg { width: 1.1em; height: 1.1em; color: #000000; opacity: 0.7; transition: opacity 0.2s ease; }
.refresh-btn:hover svg { opacity: 1; }
.modal-overlay {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: #fff; margin: 15% auto; padding: 20px; border: 1px solid #888;
    width: 80%; max-width: 500px; border-radius: var(--border-radius); box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px;
}
.modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.modal-close {
    color: #aaa; font-size: 28px; font-weight: bold; border: none; background: none; cursor: pointer;
}
.modal-body label { font-weight: 500; display: block; margin-bottom: 8px; }
.modal-body input, .modal-body select {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 14px;
}
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    border-top: 1px solid var(--border-color); padding-top: 20px; margin-top: 20px;
}
.modal-btn {
    padding: 8px 16px; font-size: 14px; font-weight: 500;
    border-radius: 6px; border: 1px solid transparent; cursor: pointer;
}
.modal-btn.save { background-color: var(--primary-color); color: white; }
.modal-btn.delete { background-color: #dc3545; color: white; }
.action-btn {
    padding: 4px 10px; font-size: 12px; border-radius: 4px;
    border: 1px solid var(--border-color); background: #fff; cursor: pointer;
}
.action-bar { display: flex; justify-content: center; gap: 16px; margin: 16px 0; }
.action-bar button {
    padding: 10px 24px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--border-color);
    border-radius: 8px; background-color: #fff; color: var(--text-color);
    transition: all 0.2s ease-in-out; display: inline-flex; align-items: center; gap: 8px;
}
.action-bar button:hover:not(:disabled) { background-color: #f8f9fa; transform: translateY(-2px); box-shadow: var(--shadow); }
.action-bar button:disabled { opacity: 0.5; cursor: not-allowed; }
.staging-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.action-form h3 { margin-top: 0; font-weight: 600; font-size: 18px; }
.action-form label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 13px; }
.action-form select, .action-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border-color);
    border-radius: 8px; margin-bottom: 16px; box-sizing: border-box;
    font-size: 13px; font-family: 'Inter', sans-serif;
}
.action-form button {
    width: 100%; padding: 14px; font-size: 16px; font-weight: 600;
    color: white; border: none; border-radius: 8px; cursor: pointer;
    transition: background-color 0.2s ease; display: inline-flex;
    align-items: center; justify-content: center; gap: 8px;
}
.action-form button:not(:disabled) { background-color: var(--success-color) !important; }
.action-form button:not(:disabled):hover { background-color: #157347 !important; }
.action-form button:disabled { background-color: #a3a3a3 !important; cursor: not-allowed; opacity: 1 !important; }