﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 35px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
}

.login-box h1 {
    margin-top: 0;
    margin-bottom: 5px;
}

.login-box h2 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: normal;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd2d8;
    border-radius: 6px;
    font-size: 16px;
}

.login-button {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.alert {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 6px;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
}

.admin-header {
    min-height: 65px;
    padding: 15px 25px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.admin-header a {
    margin-left: 20px;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 65px);
}

.admin-sidebar {
    width: 240px;
    padding: 25px 15px;
    background: #222;
}

.admin-sidebar a {
    display: block;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.admin-sidebar a:hover {
    background: rgba(255, 255, 255, .1);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
}

.dashboard-card strong {
    display: block;
    margin-bottom: 15px;
}

.dashboard-card span {
    font-size: 30px;
}

@media (max-width: 800px) {

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-header {
        display: block;
    }
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-page-header h1 {
    margin-bottom: 5px;
}

.admin-button {
    display: inline-block;
    padding: 12px 18px;
    background: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.admin-button:hover {
    opacity: .9;
}

.admin-table-wrapper {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f5f6f8;
    font-size: 14px;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

.admin-actions a {
    margin-right: 10px;
}

.admin-empty {
    padding: 30px;
    background: #fff;
    border-radius: 8px;
}

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 12px;
    background: #eee;
}

.status-active {
    background: #d1e7dd;
}

.status-pending {
    background: #fff3cd;
}

.status-rejected,
.status-inactive {
    background: #f8d7da;
}

.status-sold {
    background: #cff4fc;
}

.status-draft {
    background: #e2e3e5;
}

@media (max-width: 800px) {

    .admin-page-header {
        display: block;
    }

    .admin-page-header .admin-button {
        margin-top: 15px;
    }
}


.admin-form {
    max-width: 1100px;
}

.form-section {
    margin-bottom: 25px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
}

.form-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-form .form-group {
    margin-bottom: 0;
}

.admin-form label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccd2d8;
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

.admin-form textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.admin-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.admin-button-secondary {
    background: #6c757d;
}

.alert ul {
    margin-bottom: 0;
}

@media (max-width: 800px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        display: block;
    }

    .form-actions .admin-button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
}


.delete-confirm-box {
    max-width: 700px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
}

.delete-confirm-box h2 {
    margin-top: 0;
}

.delete-warning {
    margin: 25px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    font-weight: bold;
}

.admin-button-danger {
    background: #b42318;
    color: #fff;
}


.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.vehicle-image-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.vehicle-image-card {
    position: relative;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.vehicle-image-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 6px;
}

.primary-image-label {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 10px;
    background: #222;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
}

.vehicle-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vehicle-image-actions form {
    margin: 0;
}

.vehicle-image-actions .admin-button {
    font-size: 13px;
    padding: 8px 10px;
}


.vehicle-thumbnail-cell {
    width: 120px;
}

.vehicle-thumbnail {
    display: block !important;
    width: 100px !important;
    height: 70px !important;
    max-width: 100px !important;
    object-fit: cover !important;
    border-radius: 6px;
}

.vehicle-thumbnail-placeholder {
    width: 100px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f2;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    text-align: center;
}


.feature-group {
    margin-bottom: 25px;
}

.feature-group h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.feature-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f6f7f8;
    border-radius: 6px;
    cursor: pointer;
}

.feature-checkbox input {
    width: auto;
    margin: 0;
}


