/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

:root {
    --primary-red: #E60012;
    --primary-red-dark: #CC0010;
    --dark-gray: #1a1a1a;
    --medium-gray: #333333;
    --light-gray: #666666;
    --border-gray: #e0e0e0;
    --bg-gray: #f5f5f5;
    --white: #ffffff;
    --success: #00C853;
    --warning: #FF9800;
    --error: #F44336;
    --font-primary: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-gray) 0%, #2d2d2d 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: var(--dark-gray);
    padding: 30px;
    text-align: center;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

.login-header h1 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-header p {
    color: #999;
    font-size: 0.9rem;
}

.login-form {
    padding: 30px;
}

.login-footer {
    padding: 0 30px 30px;
    text-align: center;
}

.back-link {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-red);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--dark-gray);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

.sidebar-title {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #999;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.nav-item.active {
    background: var(--primary-red);
    color: var(--white);
}

.nav-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.admin-name {
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
}

.admin-username {
    color: #666;
    font-size: 0.8rem;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #999;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--error);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 1.8rem;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.content-header p {
    color: var(--light-gray);
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light-gray);
}

.stat-success {
    border-left: 4px solid var(--success);
}

.stat-warning {
    border-left: 4px solid var(--warning);
}

/* ============================================
   QUICK ACTIONS & CARDS
   ============================================ */
.quick-actions,
.recent-bookings {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-actions h2,
.recent-bookings h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--dark-gray);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-gray);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary-red);
    color: var(--white);
}

.view-all-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.empty-message {
    color: var(--light-gray);
    font-style: italic;
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.data-table th {
    background: var(--bg-gray);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--light-gray);
    text-transform: uppercase;
}

.data-table td {
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.text-muted {
    color: var(--light-gray);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--medium-gray);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    padding: 12px 24px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-gray);
    color: var(--medium-gray);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--border-gray);
}

.btn-small {
    padding: 8px 16px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: var(--primary-red-dark);
}

.btn-outline {
    background: transparent;
    color: var(--medium-gray);
    border: 1px solid var(--border-gray);
}

.btn-outline:hover {
    background: var(--bg-gray);
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

/* ============================================
   CONFIG CARDS
   ============================================ */
.config-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.config-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.config-card h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.card-description {
    color: var(--light-gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.info-box {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.info-box h3 {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.info-box ul {
    list-style: none;
    font-size: 0.85rem;
}

.info-box li {
    margin-bottom: 6px;
}

.info-box code {
    background: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ============================================
   DEALER CARDS
   ============================================ */
.dealer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dealer-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dealer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dealer-header h3 {
    font-size: 1rem;
    color: var(--dark-gray);
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-gray);
    border-radius: 26px;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked+.slider {
    background: var(--success);
}

.switch input:checked+.slider:before {
    transform: translateX(24px);
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light-gray);
}

.filter-input {
    width: auto;
    min-width: 180px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .admin-layout {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        width: 100%;
    }
}