:root {
    --black: #0a0a0c;
    --panel: #16151a;
    --panel-2: #1e1c22;
    --line: #2c2a31;
    --text: #f2efe9;
    --text-dim: #9d9aa4;
    --fuchsia: #ff2eae;
    --fuchsia-dim: #6b1d55;
    --amber: #ffb02e;
    --lime: #c8ff4d;
    --sky: #4fd8ff;
    --teal: #35e6a8;
    --violet: #b07bff;
    --danger: #ff5c5c;
    --ok: var(--teal);

    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Sora', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- buttons (from index.html) ---------- */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border: none;
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--text-dim);
}

.btn-fuchsia {
    background: var(--fuchsia);
    color: #1a0313;
}

.btn-fuchsia:hover {
    background: #ff4dbe;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12.5px;
}

/* ---------- tag chips (from index.html) ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px 4px 8px;
    border-radius: 100px;
    border: 1px solid var(--line);
    color: var(--text-dim);
}

.tag .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

/* ---------- logo ---------- */
.bo-logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    color: var(--fuchsia);
    letter-spacing: -0.01em;
}

/* ---------- shell layout ---------- */
.bo-shell {
    display: flex;
    min-height: 100vh;
}

.bo-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    gap: 28px;
}

.bo-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.bo-sidebar-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 10px 14px;
    border-radius: 10px;
}

.bo-sidebar-nav a:hover {
    background: var(--panel-2);
    color: var(--text);
}

.bo-sidebar-nav a.active {
    background: var(--panel-2);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--fuchsia);
}

.bo-sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.bo-sidebar-dealer {
    font-size: 13px;
    color: var(--text-dim);
}

.bo-sidebar-dealer b {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.bo-main {
    flex: 1;
    min-width: 0;
    padding: 32px 36px 60px;
}

.bo-topbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.bo-topbar h1 {
    font-size: 24px;
}

.bo-topbar p {
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 4px;
}

/* ---------- KPI cards ---------- */
.bo-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.bo-kpi-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
}

.bo-kpi-card .label {
    font-size: 12.5px;
    color: var(--text-dim);
    font-weight: 600;
}

.bo-kpi-card .value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 28px;
    margin-top: 8px;
}

.bo-kpi-card .delta {
    font-size: 12px;
    margin-top: 6px;
    color: var(--ok);
}

/* ---------- panel (generic card container) ---------- */
.bo-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
}

.bo-panel + .bo-panel {
    margin-top: 20px;
}

.bo-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.bo-panel-head h2 {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
}

.bo-panel-head h3 {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
}

/* ---------- table ---------- */
.bo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.bo-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.bo-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.bo-table tbody tr:hover {
    background: var(--panel-2);
}

.bo-table tbody tr:last-child td {
    border-bottom: none;
}

.bo-table .actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bo-empty {
    color: var(--text-dim);
    font-size: 13.5px;
    padding: 20px 0;
    text-align: center;
}

/* ---------- forms ---------- */
.bo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.bo-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.bo-field input,
.bo-field select,
.bo-field textarea {
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
}

.bo-field textarea {
    resize: vertical;
    line-height: 1.5;
}

.bo-field input:focus,
.bo-field select:focus,
.bo-field textarea:focus {
    outline: none;
    border-color: var(--fuchsia);
}

.bo-field input[readonly] {
    color: var(--text-dim);
    background: var(--panel);
}

.bo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- foto gallery (upload multiplo auto) ---------- */
.foto-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.foto-thumb {
    position: relative;
    width: 140px;
    border: 2px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel-2);
}

.foto-thumb.is-default {
    border-color: var(--fuchsia);
}

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

.foto-thumb-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
}

.foto-thumb-default-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--fuchsia);
    color: #1a0313;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
}

.foto-thumb-link {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    padding: 2px 0;
}

.foto-thumb-link:hover {
    color: var(--text);
}

.foto-thumb-link.danger:hover {
    color: var(--danger);
}

.bo-hint {
    font-size: 12px;
    color: var(--text-dim);
}

.bo-badge-override {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--amber);
    color: var(--amber);
}

.bo-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

/* ---------- login page ---------- */
.bo-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bo-login-box {
    width: 100%;
    max-width: 400px;
}

.bo-login-box .bo-logo {
    display: block;
    text-align: center;
    font-size: 26px;
    margin-bottom: 24px;
}

.bo-login-box .bo-panel h1 {
    font-size: 20px;
    margin-bottom: 6px;
}

.bo-login-box .bo-panel > p {
    color: var(--text-dim);
    font-size: 13.5px;
    margin-bottom: 22px;
}

.bo-demo-hint {
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 18px;
}

.bo-demo-hint b {
    color: var(--text);
}

.bo-error {
    color: var(--danger);
    font-size: 13px;
    background: rgba(255, 92, 92, 0.1);
    border: 1px solid rgba(255, 92, 92, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: none;
}

.bo-error.show {
    display: block;
}

.bo-back-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-dim);
}

.bo-back-link:hover {
    color: var(--text);
}

@media (max-width: 900px) {
    .bo-shell {
        flex-direction: column;
    }

    .bo-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 14px 18px;
    }

    .bo-sidebar-nav {
        flex-direction: row;
        flex: none;
    }

    .bo-sidebar-foot {
        border-top: none;
        padding-top: 0;
        margin-left: auto;
    }

    .bo-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bo-field-row {
        grid-template-columns: 1fr;
    }
}
