/* Custom styles to override Tailwind and enhance aesthetics */
html {
    scroll-behavior: smooth;
}

/* --- FIX: GLOBAL HIDDEN CLASS --- */
.hidden {
    display: none !important;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(to bottom, #2F4327, #000);
    color: #333;
}

/* --- HEADER STYLES --- */
header {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    gap: 15px;
}

.logo {
    height: 50px; 
    width: 100px;  
    border-radius: 50%;
    margin-right: 10px;
    object-fit: contain;
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-left span {
    font-weight: 900;
    font-size: 24px;
    color: #2F4327;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #2F4327;
    font-weight: bold;
}

/* --- MOBILE MENU BUTTON --- */
.mobile-menu-btn {
    display: none; 
    background: none;
    border: none;
    font-size: 24px;
    color: #2F4327;
    cursor: pointer;
}

/* NOTIFICATION STYLES */
.notification-container {
    position: relative;
    cursor: pointer;
}

#notification-bell {
    font-size: 22px;
    color: #2F4327;
}

#notification-dot {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 9px;
    height: 9px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 1.5px solid white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid #eee;
}
.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}
.notification-item:hover {
    background-color: #f9fafb;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item.unread {
    background-color: #f0f5ff;
    font-weight: 500;
}
.notification-item p { margin: 0; font-size: 14px; line-height: 1.4; }
.notification-item small { font-size: 12px; color: #718096; margin-top: 4px; display: block; }

/* --- NAVIGATION STYLES --- */
nav.desktop-nav {
    display: none; 
    flex-wrap: nowrap; 
    justify-content: flex-start; 
    gap: 25px;
    margin: 0 20px; 
    flex-grow: 1;
}

nav.desktop-nav a {
    padding: 5px;
    text-decoration: none;
    color: #2F4327;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
    background-color: transparent;
}

nav.desktop-nav a:hover { color: #3b5d33; background-color: transparent; }
nav.desktop-nav a.active-nav-link { border-bottom: 3px solid #2F4327; }

/* Mobile Nav Menu */
nav.mobile-nav {
    display: flex;
    flex-direction: column;
    background-color: white;
    position: sticky;
    top: 70px;
    z-index: 998;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

nav.mobile-nav.hidden { display: none; }

nav.mobile-nav a {
    padding: 15px 20px;
    text-decoration: none;
    color: #2F4327;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
nav.mobile-nav a:hover { background-color: #f9fafb; }

@media (min-width: 1024px) {
    nav.desktop-nav { display: flex; }
    .mobile-menu-btn { display: none; }
    nav.mobile-nav { display: none; }
}

@media (max-width: 1023px) {
    nav.desktop-nav { display: none; }
    .mobile-menu-btn { display: block; }
}

/* MAIN CONTENT & FORM STYLES */
.main {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    gap: 30px;
    flex-wrap: wrap;
}

.info { flex: 1 1 300px; }
.info h1 { color: #2F4327; }
.info p { line-height: 1.6; color: #666; }

.promo-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.promo-actions .btn-primary, .promo-actions .btn-secondary {
    padding: 12px 20px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.car-image {
    flex: 1 1 300px;
    width: 100%;
    max-width: 400px;
    height: 250px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: 10px;
}
.carousel-slide.active { opacity: 1; }

.form-section {
    max-width: 800px;
    margin: 40px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.form-section h2 { margin-bottom: 20px; text-align: center; color: #2F4327; }

input, label, select, textarea {
    width: 100%;
    display: block;
    margin: 10px 0 5px;
}
input, select, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
textarea { min-height: 100px; }

/* BUTTON STYLES */
.btn-primary {
    background-color: #2F4327;
    color: white;
    padding: 12px; 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-primary:hover {
    background-color: #3b5d33;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}
.btn-primary:disabled { background-color: #ccc; cursor: not-allowed; }

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-secondary:hover {
    background-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.contact-links { text-align: center; margin-top: 20px; }
.contact-links a { margin: 0 15px; text-decoration: none; color: #2F4327; display: inline-flex; align-items: center; gap: 5px; }

/* TAB STYLES */
.tabs {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 10px;
}
.tabs button, .tabs a.tab-link {
    background-color: #2F4327;
    color: #ffffff;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}
.tabs button.active, .tabs a.tab-link.active {
    background-color: #3b5d33;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.tabs button:hover, .tabs a.tab-link:hover {
    background-color: #3b5d33;
    transform: translateY(-2px);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

footer {
    text-align: center;
    color: #E7DCC6;
    padding: 20px;
    background-color: #2F4327;
    font-size: 14px;
}

/* MAP STYLES */
#map-container {
    width: 100%;
    height: 50vh;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}
#map { width: 100%; height: 100%; z-index: 10; }

.controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    gap: 0.5rem;
}
.controls button { box-shadow: none; }
.controls button.active {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    background-color: #3b82f6;
}

#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* MODALS */
.message-box {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 3000;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px 0;
}
.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
    margin: auto;
}
.modal-content-large {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    text-align: left;
    margin: auto;
}

/* DASHBOARD & ADMIN SPECIFIC */
.dashboard-section { display: none; }
.dashboard-section.active { display: block; }

.dashboard-menu, .admin-menu {
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dashboard-menu a, .admin-menu a {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 6px;
    font-weight: 500;
    color: #374151;
}
.dashboard-menu a:hover, .admin-menu a:hover { background-color: #f0f0f0; }
.dashboard-menu a.active, .admin-menu a.active {
    background-color: #2F4327;
    color: white;
    font-weight: bold;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

/* --- NEW: ADDED FOR GRAPHIC BUTTONS --- */
.admin-actions {
    display: flex;
    gap: 10px;
}
.admin-actions button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: transform 0.2s;
}
.admin-actions button:hover { transform: scale(1.1); }
.admin-actions .approve { color: #22c55e; } /* Green Check */
.admin-actions .delete { color: #ef4444; }  /* Red Trash */

/* --- ADDED FOR TABLE LAYOUT --- */
.admin-table-container { overflow-x: auto; }
.admin-table {
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.admin-table th {
    background-color: #f9fafb;
    font-weight: bold;
    color: #374151;
}
.admin-table td img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-image-container {
    width: 150px; height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #2F4327;
    margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: #ddd;
}
.profile-image-container img { width: 100%; height: 100%; object-fit: cover; }

/* PAGE CARDS (Rentals & IT) */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.page-card {
    background-color: #f9fafb;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.page-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}
.page-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.page-card-content h3 { font-size: 1.5rem; font-weight: 900; color: #2F4327; }
.page-card-content .price {
    font-size: 1.25rem; font-weight: bold; color: #333; margin: 0.5rem 0;
}
.status-badge {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: bold; color: white;
    z-index: 5;
}
.status-badge.available { background-color: #22c55e; }
.status-badge.booked { background-color: #ef4444; }

/* SEARCH BAR */
#map-search-container {
    margin-bottom: 15px;
    position: relative;
    z-index: 1001;
}
.location-selection {
    text-align: center; margin: 15px 0; font-weight: bold; color: #3b5d33;
}

.password-wrapper { position: relative; margin: 10px 0 5px; }
.password-wrapper input { padding-right: 40px; }
.password-toggle-icon {
    position: absolute; top: 50%; right: 15px; transform: translateY(-50%);
    cursor: pointer; color: #6b7280;
}

.fadeable {
    transition: opacity 0.4s;
    opacity: 1;
    visibility: visible;
}
.fadeable.hidden {
    opacity: 0;
    visibility: hidden;
    display: none !important;
}