/* General Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #000; /* Text color set to BLACK */
    line-height: 1.6;
    background-color: #f4f7f6; 
    
    /* --- COMMON BACKGROUND STYLES (Images must be present in /images folder) --- */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; 
}

h1, h2, h3 {
    /* PRIMARY COLOR: Deep Blue */
    color: #004d99; 
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.2); 
}

/* --- INTERFACE SPECIFIC BACKGROUNDS (Image references) --- */
.login-page { background-image: url('assets/images/showroom_exterior_1.jpg'); }
.admin-page { background-image: url('assets/images/admin_glow.jpg'); }
.customer-page { background-image: url('assets/images/showroom_night.jpg'); }

/* --- GLASS EFFECT BASE STYLES (78% Transparent) --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.22); /* 22% Opaque White */
    border-radius: 15px;
    backdrop-filter: blur(6px); 
    -webkit-backdrop-filter: blur(6px); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); 
    border: 1px solid rgba(255, 255, 255, 0.5); 
}
.login-container, .register-container {
    max-width: 450px;
    margin: 100px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Header and Visibility Fix */
.header {
    background-color: #004d99; 
    color: white; 
    padding: 15px 5%;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 0;
}
.header h2 {
    color: white; 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); 
}

/* Catalog Heading Fix */
.container h3 {
    font-size: 1.8em; 
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9); 
    margin-bottom: 25px;
    font-weight: 700;
}


/* --- INPUTS & FORMS (High Contrast Text) --- */

.form-group label {
    font-weight: bold;
    color: #000; 
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8); 
}

input[type="text"], input[type="password"], input[type="number"], input[type="email"], select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.45); 
    border: 1px solid #ccc; 
    border-radius: 8px;
    font-size: 1em;
    color: #000; 
}

.password-container {
    position: relative;
}
.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 1.2em;
    padding: 0 5px;
}


input::placeholder, select { color: #555; }
.form-card { background: rgba(249, 249, 249, 0.35); padding: 20px; border-radius: 10px; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, 0.7); }

/* --- BUTTONS (Size and Appearance) --- */
.btn {
    padding: 14px 25px; 
    font-size: 1.05em; 
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s;
    margin-right: 5px;
    text-shadow: none; 
}

.btn.primary { background-color: #007bff; color: white; }
.btn.primary:hover { background-color: #0056b3; }

.btn.danger { background-color: #dc3545; color: white; }
.btn.secondary { background-color: #6c757d; color: white; }
.btn.info { background-color: #17a2b8; color: white; }


/* --- TABLES (General Glass Structure) --- */
/* Target all four tables */
#vehicleTable, #userTable, #bookingsTable, #soldTable { 
    background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    width: 100%;
    border-collapse: collapse; /* Essential for grid lines */
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

/* --- TABLE CELL AND HEADER STYLING (Applies to all tables) --- */
/* Target all four table's headers and cells */
#vehicleTable th, #vehicleTable td, 
#userTable th, #userTable td, 
#bookingsTable th, #bookingsTable td,
#soldTable th, #soldTable td { 
    padding: 12px 18px; 
    /* FIX: Clearer border for better definition and spacing */
    border: 1px solid rgba(0, 0, 0, 0.3); 
    text-align: left;
    color: #000; 
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8); 
    background: transparent; 
}

/* Target all four table headers */
#vehicleTable th, #userTable th, #bookingsTable th, #soldTable th { 
    background-color: #004d99; 
    color: white; 
    font-weight: bold;
    text-shadow: none; 
}

/* Target all four table even rows */
#vehicleTable tr:nth-child(even), #userTable tr:nth-child(even),
#bookingsTable tr:nth-child(even), #soldTable tr:nth-child(even) { 
    background-color: rgba(255, 255, 255, 0.05); 
}


/* --- STATUS BAR TEXT COLOR FIX --- */
.status-available { 
    color: black; 
    background-color: rgba(40, 167, 69, 0.8); 
    padding: 5px 8px; 
    border-radius: 4px; 
    font-size: 0.9em;
}
.status-booked { 
    color: black; 
    background-color: rgba(255, 193, 7, 0.8); 
    padding: 5px 8px; 
    border-radius: 4px; 
    font-size: 0.9em;
}
.status-sold { 
    color: black; 
    background-color: rgba(220, 53, 69, 0.8); 
    padding: 5px 8px; 
    border-radius: 4px; 
    font-size: 0.9em;
}

/* --- ADMIN TAB BUTTONS COLOR FIX --- */
.tab-button { 
    color: white; 
    background-color: rgba(0, 123, 255, 0.8); 
    border: none;
    border-bottom: 3px solid transparent; 
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.tab-button:hover {
    background-color: rgba(0, 86, 179, 0.9); 
}
.tab-button.active { 
    color: white; 
    background-color: #004d99; 
    border-bottom: 3px solid white; 
}


/* --- OTHER ELEMENTS --- */

.vehicle-card {
    background: rgba(255, 255, 255, 0.3); 
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
    border-radius: 8px;
}
.vehicle-card h4, .vehicle-card p { color: #333; text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8); }
.vehicle-card .price { color: #28a745; }
.details-info .price-tag { color: #28a745; }
a { color: #007bff; text-shadow: none; }