body.admin-body {
    margin: 0;
    background: #f3f5f7;
    color: #1f2937;
    font-family: "Segoe UI", Arial, sans-serif;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #111827;
    color: #fff;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: grid;
    gap: 6px;
}

.sidebar-brand small {
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.sidebar-brand strong {
    font-size: 1.3rem;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px;
}

.sidebar-card small {
    display: block;
    color: #9ca3af;
    margin-bottom: 6px;
}

.sidebar-btn,
.toolbar-btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.compact-btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-btn,
.btn-primary {
    background: #8f2d1f;
    color: #fff;
}

.btn-secondary,
.toolbar-btn {
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
}

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

.compact-btn {
    padding: 9px 12px;
    border-radius: 10px;
}

.thumb-preview,
.cover-preview {
    width: 100%;
    max-width: 220px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    object-fit: cover;
}

.thumb-preview {
    aspect-ratio: 1 / 1;
}

.cover-preview {
    aspect-ratio: 16 / 7;
}

.main-panel {
    padding: 30px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 24px;
}

.page-head h1,
.panel-card h2 {
    margin: 0;
}

.page-head p,
.muted-text {
    color: #6b7280;
}

.stats-grid,
.panel-grid,
.form-grid,
.gallery-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.stats-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel-grid {
    grid-template-columns: 1.4fr 1fr;
}

.panel-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 14px 35px rgba(17, 24, 39, 0.05);
}

.stat-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
}

.stat-box small {
    color: #6b7280;
}

.stat-box strong {
    display: block;
    margin-top: 12px;
    font-size: 1.8rem;
}

.table-wrap {
    overflow: auto;
}

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

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #edf0f2;
    vertical-align: middle;
}

th {
    font-size: 0.82rem;
    color: #6b7280;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.muted {
    background: #e5e7eb;
    color: #4b5563;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
}

.filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.filter-shell {
    margin-bottom: 18px;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.filter-shell-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 18px;
}

.filter-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #8f2d1f;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.filter-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-summary span {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 700;
}

.filters-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.filter-field label {
    color: #4b5563;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.filter-field input,
.filter-field select {
    background: #fff;
    border-color: #d8dee6;
    min-height: 48px;
}

.filter-search input {
    padding-left: 16px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

.input-help {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.86rem;
}

.list-stack {
    display: grid;
    gap: 14px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1px solid #edf0f2;
    border-radius: 18px;
    padding: 16px;
}

.vehicle-line strong,
.vehicle-line small {
    display: block;
}

.vehicle-line small {
    color: #6b7280;
    margin-top: 6px;
}

.gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
}

.gallery-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.gallery-card .card-body {
    padding: 12px;
}

.alert {
    margin-bottom: 18px;
    border-radius: 16px;
    padding: 15px 18px;
    font-weight: 600;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-promo {
    padding: 56px;
    background: linear-gradient(160deg, #8f2d1f 0%, #3d1d17 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-card {
    width: min(460px, 100%);
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 22px 48px rgba(17, 24, 39, 0.12);
}

@media (max-width: 1100px) {
    .admin-layout,
    .login-shell,
    .panel-grid,
    .stats-grid,
    .gallery-grid,
    .form-grid.two-col,
    .form-grid.three-col {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .filter-shell-head,
    .filters-bar {
        grid-template-columns: 1fr;
    }
}
