/* -------- GLOBAL RESET & BASE -------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --brand-primary: #0f172a;
    --brand-accent: #2563eb;
    --brand-accent-soft: #e5edff;
    --bg-body: #f5f5f7;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
    --radius-card: 16px;
    --radius-soft: 10px;
    --max-width: 1200px;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
}

/* -------- HERO HEADER -------- */
.hero-header {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-logo {
    position: absolute;
    top: 22px;
    left: 40px;
    height: 62px;
    z-index: 10;
}

/* -------- MAIN NAV -------- */
.main-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 0;
}

.main-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover {
    color: var(--text-main);
}

.main-nav a.active {
    color: var(--text-main);
    border-bottom-color: var(--brand-accent);
}

/* -------- LAYOUT WRAPPER -------- */
.page-wrapper {
    max-width: var(--max-width);
    margin: 32px auto 48px;
    padding: 0 20px;
}

/* -------- TYPOGRAPHY -------- */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-intro {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 700px;
}

/* -------- BUTTONS -------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
    background: #020617;
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

/* -------- FOOTER -------- */
footer {
    text-align: center;
    padding: 24px 16px 32px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =======================================
   CAR CARDS (HOME + INVENTORY)
======================================= */
/* Hero image wrapper */
.vehicle-hero-wrapper {
    background: #f5f5f5;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 460px;
}

/* Hero image – no cropping, no black bars */
.vehicle-hero {
    max-width: 100%;
    max-height: 460px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Thumbnails */
.vehicle-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.vehicle-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
}

.vehicle-thumb {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;
}

.vehicle-thumb img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

.vehicle-thumb.active {
    border-color: #1a3b6b; /* highlight colour */
}

/* Thumb arrows */
.thumb-arrow {
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

/* -------- Fullscreen lightbox -------- */

body.no-scroll {
    overflow: hidden;
}

.vehicle-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.vehicle-lightbox.open {
    display: flex;
}

.vehicle-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.vehicle-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Lightbox controls */
.vehicle-lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #000;
    font-size: 20px;
    cursor: pointer;
}

.vehicle-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    font-size: 22px;
    cursor: pointer;
}

.vehicle-lightbox-arrow.left {
    left: -50px;
}

.vehicle-lightbox-arrow.right {
    right: -50px;
}

@media (max-width: 768px) {
    .vehicle-lightbox-arrow.left {
        left: 10px;
    }
    .vehicle-lightbox-arrow.right {
        right: 10px;
    }
}


.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.car-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
}

.car-card-img-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.car-card img {
    width: 100%;
    aspect-ratio: 4 / 3;          /* CHANGED from 16/10 to 4/3 for less aggressive cropping */
    object-fit: cover;
    border-radius: 10px;
}

.car-card:hover img {
    transform: scale(1.06);
}

.car-card-body {
    padding: 16px 18px 18px;
}

.car-card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 4px;
}

.car-card h3 {
    font-size: 1.05rem;
    margin: 0;
}

.car-card-price {
    font-weight: 700;
    font-size: 1rem;
}

.car-card-reg {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.car-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =======================================
   VEHICLE DETAIL PAGE
======================================= */
.vehicle-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 32px;
}

@media (max-width: 900px) {
    .vehicle-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.vehicle-media {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

/* Hero image */
.vehicle-hero-wrapper {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
}

.vehicle-hero {
    width: 100%;
    height: 0;
    padding-bottom: 62.5%; /* ~16:10 ratio */
    object-fit: cover;
    display: block;
}

/* Thumbnail rail */
.vehicle-thumbs-wrapper {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thumb-arrow {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.4rem;
    padding: 0 6px;
    transition: color 0.15s ease;
}

.thumb-arrow:hover {
    color: var(--text-main);
}

.vehicle-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
}

.vehicle-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #e5e7eb;
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vehicle-thumb.active {
    border-color: var(--brand-accent);
}

/* Info column */
.vehicle-info {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 22px 22px 24px;
    box-shadow: var(--shadow-soft);
}

.vehicle-title {
    font-size: 1.6rem;
    margin: 0 0 4px;
}

.vehicle-reg {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.vehicle-price {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.vehicle-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 18px;
    margin-bottom: 18px;
}

.vehicle-spec-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.vehicle-spec-item span {
    font-weight: 600;
}

.vehicle-description {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 20px;
}

.enquire-btn {
    margin-top: 4px;
}

/* =======================================
   CONTACT FORM
======================================= */
.contact-layout {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: 24px 24px 26px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form label {
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    font-family: inherit;
    font-size: 0.95rem;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* =======================================
   ADMIN LOGIN MODAL (PUBLIC PAGES)
======================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    padding: 26px 26px 24px;
    width: 340px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--text-muted);
}

.modal-content h2 {
    margin-top: 4px;
    margin-bottom: 18px;
    font-size: 1.1rem;
}

.modal-content input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 0.9rem;
}

.modal-login-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}

.modal-error {
    display: none;
    margin-top: 8px;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* =======================================
   ADMIN DASHBOARD (LIGHT THEME)
======================================= */
.admin-wrapper {
    max-width: 1300px;
    margin: 32px auto 40px;
    padding: 0 20px;
}

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

.admin-header h1 {
    font-size: 1.4rem;
    margin: 0;
}

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

.admin-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-btn.primary {
    background: var(--brand-primary);
    color: #fff;
}

.admin-btn.secondary {
    background: #e5e7eb;
    color: var(--text-main);
}

.admin-table-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 16px;
    overflow-x: auto;
}

.admin-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

.admin-table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-table img.photo-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.admin-table input[type="text"],
.admin-table input[type="number"],
.admin-table input[type="date"],
.admin-table select {
    width: 140px;
    max-width: 100%;
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    font-size: 0.86rem;
}

.admin-table textarea {
    width: 220px;
    max-width: 100%;
    min-height: 52px;
    max-height: 160px;
    padding: 6px 7px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    resize: vertical;
    font-size: 0.86rem;
}

/* Small screens */
@media (max-width: 768px) {
    .page-wrapper {
        margin-top: 24px;
    }
    .hero-logo {
        height: 56px;
        bottom: 22px;
    }
    .vehicle-layout {
        gap: 20px;
    }
}

/* --- FIX HERO IMAGE NOT SHOWING --- */
.vehicle-hero {
    width: 100%;
    height: auto !important;
    max-height: 450px;
    padding-bottom: 0 !important;
    object-fit: contain;
    background: #f5f5f5;

}
/* ─────────────────────────────────────────────
   Admin Dashboard – BMW-Style Premium
   ───────────────────────────────────────────── */

:root {
    --p55-admin-bg: #f3f5f8;
    --p55-admin-surface: #ffffff;
    --p55-admin-border: #dde2eb;
    --p55-admin-border-strong: #c2cad8;
    --p55-admin-text: #22252a;
    --p55-admin-muted: #707888;
    --p55-admin-accent: #2a5da8;
    --p55-admin-accent-soft: #e0e7f5;
    --p55-admin-danger: #b00020;
    --p55-admin-success: #0d8c4e;
    --p55-admin-shadow-soft: 0 18px 35px rgba(0, 0, 0, 0.08);
}

body.admin-dashboard {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top, #eef1f7 0, #f3f5f8 40%, #eef1f7 100%);
    color: var(--p55-admin-text);
}

/* Header shell */

.admin-shell-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: linear-gradient(
        to bottom,
        rgba(248, 250, 253, 0.96),
        rgba(248, 250, 253, 0.88),
        rgba(248, 250, 253, 0.92)
    );
    border-bottom: 1px solid rgba(190, 198, 213, 0.7);
}

.admin-shell-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.admin-brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c7ceda);
    box-shadow: 0 0 0 1px #b5bfd1, 0 6px 14px rgba(0, 0, 0, 0.15);
}

.admin-brand-text {
    display: flex;
    flex-direction: column;
}

.admin-brand-name {
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 13px;
}

.admin-brand-tagline {
    font-size: 11px;
    color: var(--p55-admin-muted);
}

/* Header actions / buttons */

.admin-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-btn {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 6px 14px;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef1f7;
    color: var(--p55-admin-text);
    transition:
        background 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease,
        transform 80ms ease;
}

.admin-btn:hover {
    background: #e1e6f1;
    transform: translateY(-0.5px);
}

.admin-btn:active {
    transform: translateY(0.5px);
    box-shadow: none;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #235190, #2a5da8);
    color: #ffffff;
    border-color: #1d4a88;
    box-shadow: 0 10px 20px rgba(16, 50, 96, 0.35);
}

.admin-btn-primary:hover {
    background: linear-gradient(135deg, #214a84, #26569b);
}

.admin-btn-danger {
    background: #ffffff;
    color: var(--p55-admin-danger);
    border-color: rgba(176, 0, 32, 0.35);
}

.admin-btn-danger:hover {
    background: #ffeef1;
}

.admin-btn-ghost {
    background: transparent;
    border-color: var(--p55-admin-border-strong);
}

.admin-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.6);
}

.admin-btn-icon {
    padding-inline: 8px;
    min-width: 0;
}

/* Main layout */

.admin-main {
    max-width: 1200px;
    margin: 18px auto 40px;
    padding: 0 18px;
}

.admin-panel {
    background: var(--p55-admin-surface);
    border-radius: 18px;
    border: 1px solid var(--p55-admin-border);
    box-shadow: var(--p55-admin-shadow-soft);
    padding: 18px 18px 16px;
}

.admin-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.admin-panel-header h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.admin-panel-subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--p55-admin-muted);
}

.admin-panel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Table shell */

.admin-table-shell {
    position: relative;
    margin-top: 6px;
    border-radius: 14px;
    border: 1px solid var(--p55-admin-border);
    background: #f7f8fb;
    overflow: hidden;
}

.admin-table-shell.loading::after {
    content: "Loading…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 247, 252, 0.85);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p55-admin-muted);
    z-index: 5;
}

.admin-table-scroll {
    max-height: 520px;
    overflow: auto;
}

/* Scroll shadows */

.admin-scroll-shadow {
    position: absolute;
    left: 0;
    right: 0;
    height: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 120ms ease;
}

.admin-scroll-shadow.top {
    top: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.17),
        transparent
    );
}

.admin-scroll-shadow.bottom {
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.16),
        transparent
    );
}

.admin-scroll-shadow.visible {
    opacity: 1;
}

/* Table */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 960px;
}

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ebeff7;
    box-shadow: 0 1px 0 rgba(190, 198, 213, 0.75);
}

.admin-table th,
.admin-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #dde3f0;
    vertical-align: top;
}

.admin-table th {
    font-weight: 600;
    color: var(--p55-admin-muted);
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.admin-table tbody tr:nth-child(even) {
    background: #f9fbff;
}

.admin-table tbody tr.row-dirty {
    background: #fff7e8;
}

.admin-table img.photo-thumb {
    width: 70px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

/* Column widths */

.col-photo   { width: 80px; }
.col-make    { width: 180px; }
.col-reg     { width: 100px; }
.col-price   { width: 90px;  }
.col-miles   { width: 100px; }
.col-mot     { width: 110px; }
.col-status  { width: 110px; }
.col-short   { width: 220px; }
.col-full    { width: 260px; }
.col-actions { width: 140px; }

/* Inputs */

.admin-table input[type="text"],
.admin-table input[type="number"],
.admin-table input[type="date"],
.admin-table select,
.admin-table textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid var(--p55-admin-border-strong);
    padding: 5px 7px;
    font-size: 12px;
    font-family: inherit;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        border-color 120ms ease,
        box-shadow 120ms ease,
        background 120ms ease;
}

.admin-table input:focus,
.admin-table select:focus,
.admin-table textarea:focus {
    outline: none;
    border-color: var(--p55-admin-accent);
    box-shadow:
        0 0 0 1px rgba(42, 93, 168, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.7);
    background: #fdfefe;
}

.admin-table textarea {
    min-height: 40px;
    resize: none;
}

/* Actions cell */

.admin-table td.enhanced-actions {
    white-space: nowrap;
}

.admin-table td.enhanced-actions .btn {
    margin-bottom: 3px;
}

.row-order-controls {
    margin-top: 4px;
    display: flex;
    gap: 4px;
}

/* Footnote */

.admin-footnote {
    margin-top: 10px;
    font-size: 11px;
    color: var(--p55-admin-muted);
}

/* Login Modal */

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(18px);
    background: radial-gradient(circle at top, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.7));
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.admin-modal-backdrop.visible {
    display: flex;
}

.admin-modal {
    width: 100%;
    max-width: 380px;
    background: #fbfcff;
    border-radius: 18px;
    padding: 20px 20px 18px;
    border: 1px solid rgba(210, 218, 233, 0.95);
    box-shadow:
        0 22px 45px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.6);
}

.admin-modal h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-modal-subtitle {
    margin: 6px 0 14px;
    font-size: 12px;
    color: var(--p55-admin-muted);
}

.admin-form-group {
    margin-bottom: 12px;
}

.admin-form-group label {
    display: block;
    font-size: 11px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--p55-admin-muted);
}

.admin-form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--p55-admin-border-strong);
    font-size: 13px;
    box-sizing: border-box;
}

.admin-form-group input:focus {
    outline: none;
    border-color: var(--p55-admin-accent);
    box-shadow: 0 0 0 1px rgba(42, 93, 168, 0.35);
}

.admin-form-message {
    min-height: 16px;
    font-size: 11px;
    margin-bottom: 10px;
    color: var(--p55-admin-muted);
}

.admin-form-message.error {
    color: var(--p55-admin-danger);
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Toast */

.admin-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    min-width: 120px;
    max-width: 280px;
    padding: 9px 14px;
    background: rgba(22, 27, 33, 0.96);
    color: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition:
        opacity 160ms ease,
        transform 160ms ease;
    z-index: 80;
}

.admin-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.admin-toast.error {
    background: rgba(176, 0, 32, 0.96);
}

/* Responsive */

@media (max-width: 900px) {
    .admin-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-panel-controls {
        align-self: stretch;
        justify-content: flex-end;
    }

    .admin-shell-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .admin-header-actions {
        align-self: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-table-scroll {
        max-height: 70vh;
    }
}

@media (max-width: 600px) {
    .admin-panel {
        padding: 14px 12px;
    }

    .admin-table {
        font-size: 11px;
        min-width: 860px;
    }

    .admin-shell-header-inner {
        padding-inline: 12px;
    }
}
