/* =========================================================================
   BEAUTY PLATFORM — Admin & auth styles
   Reuses tokens from app.css. Calmer, utilitarian dashboard.
   ========================================================================= */

.admin-body { background: #F1E8DA; }

/* ---- Shell ---- */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.admin-side {
    background: var(--ink); color: rgba(255,255,255,0.8);
    display: flex; flex-direction: column; padding: 26px 18px;
    position: sticky; top: 0; height: 100vh;
}
.admin-logo {
    font-family: var(--serif); font-size: 24px; color: #fff; font-weight: 600;
    padding: 0 10px 22px; display: flex; align-items: baseline; gap: 8px;
}
.admin-logo span {
    font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--brass-soft); font-weight: 600;
}
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    padding: 12px 14px; border-radius: 6px; font-size: 14px; font-weight: 500;
    color: rgba(255,255,255,0.72); transition: all 0.15s ease;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav a.is-active { background: var(--wine); color: #fff; }
.admin-side-foot { margin-top: auto; padding: 14px 14px 0; border-top: 1px solid rgba(255,255,255,0.1); }
.admin-side-foot a { font-size: 13px; color: rgba(255,255,255,0.55); }
.admin-side-foot a:hover { color: var(--brass-soft); }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 34px; background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 10;
}
.admin-top-title { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); margin: 0; }
.admin-user { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.link-btn { background: none; border: none; color: var(--wine); font-weight: 600; font-size: 14px; cursor: pointer; font-family: var(--sans); padding: 0; }
.link-btn:hover { color: var(--brass); }

.admin-content { padding: 30px 34px 60px; }
.admin-main > .alert { margin: 20px 34px 0; }

/* ---- KPI cards ---- */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.kpi {
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px;
    display: flex; flex-direction: column; gap: 6px;
}
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-family: var(--serif); font-size: 42px; font-weight: 600; color: var(--ink); line-height: 1; }
.kpi-link { font-size: 13px; font-weight: 600; color: var(--wine); margin-top: 6px; }
.kpi-link:hover { color: var(--brass); }

/* ---- Panels ---- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 24px; overflow: hidden; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 16px; flex-wrap: wrap;
}
.panel-head h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted); font-weight: 600; padding: 14px 22px; border-bottom: 1px solid var(--line);
}
.table td { padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table strong { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }

.thumb-cell { width: 56px; }
.thumb { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.thumb-empty {
    display: grid; place-items: center; background: var(--blush);
    color: var(--wine); font-family: var(--serif); font-size: 18px; font-weight: 600;
}
.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }

/* ---- Tags & statuses ---- */
.tag {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px;
    border-radius: 999px; background: var(--mist); color: var(--wine); margin-left: 4px;
}
.tag-brass { background: rgba(176,134,60,0.16); color: #8A6522; }
.status {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.status-active, .status-approved { background: #E4F3EA; color: #1E6B44; }
.status-pending { background: #FBF0DD; color: #9A6B15; }
.status-draft { background: #ECE7EA; color: #6C5A62; }
.status-archived { background: #ECE7EA; color: #6C5A62; }
.status-rejected { background: #FBE7EA; color: #A02338; }
.status-suspended { background: #F6E7DA; color: #9A5520; }

/* ---- Small buttons ---- */
.btn-sm { padding: 8px 16px; font-size: 13px; background: #fff; border-color: var(--line); color: var(--text); }
.btn-sm:hover { border-color: var(--wine); color: var(--wine); }
.btn-primary.btn-sm { background: var(--wine); color: #fff; border-color: var(--wine); }
.btn-primary.btn-sm:hover { background: var(--wine-deep); color: #fff; }
.btn-danger { background: #fff; border-color: #E7BEC6; color: #A02338; }
.btn-danger:hover { background: #A02338; color: #fff; border-color: #A02338; }
.btn-success { background: #1E6B44; color: #fff; }
.btn-success:hover { background: #17583A; }

/* ---- Admin forms ---- */
.admin-form { padding: 22px; }
.checkbox-field { justify-content: flex-start; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); font-weight: 400; cursor: pointer; }
.switch input { width: auto; }
.form-preview { margin: 6px 22px 22px; max-width: 160px; border-radius: 8px; border: 1px solid var(--line); }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.field-hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 20px; line-height: 1.5; }
.field-hint code { background: var(--mist); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* ---- Detail view ---- */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.detail-list { margin: 0; padding: 8px 22px 22px; }
.detail-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: none; }
.detail-list dt { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0; }
.detail-list dd { font-size: 14px; color: var(--text); margin: 0; }
.detail-list .full { grid-template-columns: 1fr; gap: 4px; }

/* ---- Auth ---- */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: radial-gradient(800px 500px at 50% -10%, var(--blush), transparent 60%), #F1E8DA;
}
.auth-card {
    width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; padding: 40px; box-shadow: 0 30px 70px -40px rgba(74,24,42,0.4);
}
.auth-brand { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink); text-align: center; margin-bottom: 26px; }
.auth-title { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 4px; text-align: center; }
.auth-sub { font-size: 14px; color: var(--muted); margin: 0 0 24px; text-align: center; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .btn-block { margin-top: 6px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side {
        position: static; height: auto; flex-direction: row; align-items: center;
        flex-wrap: wrap; gap: 10px; padding: 14px 18px;
    }
    .admin-logo { padding: 0; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-side-foot { margin: 0 0 0 auto; padding: 0; border: none; }
    .kpi-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .admin-content { padding: 20px; }
    .admin-main > .alert { margin: 16px 20px 0; }
    .admin-top { padding: 16px 20px; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
}
