/* ============================================================
   Kasaya.ph — Admin Panel
   Desktop-only layout. Min-width 1024px.
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────────── */
.adm-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100svh;
    background: #F5F0E8;
    font-family: 'Jost', sans-serif;
    color: #1A0F0C;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.adm-sidebar {
    background: #1A0F0C;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100svh;
    overflow-y: auto;
}

/* Brand */
.adm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.adm-brand-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.adm-brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 18px;
    color: #FAF6F1;
    line-height: 1;
}
.adm-brand-sub {
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    margin-top: 2px;
}

/* Nav */
.adm-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    gap: 2px;
    flex: 1;
}

.adm-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.5);
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: all .15s;
    position: relative;
}
.adm-nav-btn:hover       { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav-btn--active     { background: rgba(196,139,159,.15); color: #C48B9F; }
.adm-nav-icon            { font-size: 16px; }
.adm-nav-badge {
    margin-left: auto;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.5);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
}

.adm-sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.adm-btn-editor {
    width: 100%;
    padding: 10px;
    background: #C48B9F;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: .1em;
    cursor: pointer;
    transition: background .2s;
}
.adm-btn-editor:hover { background: #A06070; }

/* ── Main ────────────────────────────────────────────────────── */
.adm-main {
    padding: 32px 36px;
    overflow-y: auto;
    min-height: 100svh;
}

/* Loading */
.adm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 300px;
    color: #9E8C87;
    font-size: 13px;
}
.adm-spinner {
    width: 20px; height: 20px;
    border: 2px solid #E8DDD4;
    border-top-color: #C48B9F;
    border-radius: 50%;
    animation: admSpin .8s linear infinite;
}
@keyframes admSpin { to { transform: rotate(360deg); } }

/* Header */
.adm-header { margin-bottom: 28px; }
.adm-title  {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 32px;
    margin: 0 0 4px;
    color: #1A0F0C;
}
.adm-sub    { font-size: 13px; color: #9E8C87; margin: 0; }

/* ── Stat cards ──────────────────────────────────────────────── */
.adm-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.adm-stat-card {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow .2s;
}
.adm-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.adm-stat-icon  { font-size: 24px; }
.adm-stat-value {
    font-size: 36px;
    font-weight: 600;
    color: #1A0F0C;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.adm-stat-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #9E8C87; }

/* ── Section ─────────────────────────────────────────────────── */
.adm-section       { margin-bottom: 32px; }
.adm-section-title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6B5B54;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E8DDD4;
}

/* ── Category bar chart ──────────────────────────────────────── */
.adm-category-list { display: flex; flex-direction: column; gap: 10px; }
.adm-category-row  { display: flex; align-items: center; gap: 12px; }
.adm-category-name { font-size: 12px; color: #3A3230; min-width: 90px; }
.adm-category-bar-wrap {
    flex: 1;
    height: 8px;
    background: #F0E8DC;
    border-radius: 4px;
    overflow: hidden;
}
.adm-category-bar {
    height: 100%;
    background: #C48B9F;
    border-radius: 4px;
    transition: width .4s ease;
}
.adm-category-count { font-size: 12px; color: #9E8C87; min-width: 20px; text-align: right; }

/* ── Filters ─────────────────────────────────────────────────── */
.adm-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.adm-search-input {
    padding: 8px 12px;
    border: 1px solid #D4C4B0;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #1A0F0C;
    background: #fff;
    outline: none;
    flex: 1;
    min-width: 200px;
    transition: border-color .2s;
}
.adm-search-input:focus { border-color: #C48B9F; }
.adm-select {
    padding: 8px 12px;
    border: 1px solid #D4C4B0;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #1A0F0C;
    background: #fff;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    min-width: 140px;
}

/* ── Table ───────────────────────────────────────────────────── */
.adm-table-wrap {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    overflow: hidden;
}
.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.adm-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9E8C87;
    background: #FAF6F1;
    border-bottom: 1px solid #E8DDD4;
}
.adm-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F0E8DC;
    color: #3A3230;
    vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td      { background: #FAF6F1; }

.adm-template-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.adm-color-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.adm-color-swatch {
    width: 28px; height: 28px;
    border-radius: 4px;
    flex-shrink: 0;
}
.adm-template-name { font-weight: 500; color: #1A0F0C; }
.adm-muted         { color: #9E8C87; }
.adm-mono          { font-family: 'Courier New', monospace; font-size: 12px; }

/* Tags and flags */
.adm-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #F0E8DC;
    border-radius: 2px;
    font-size: 11px;
    color: #6B5B54;
}
.adm-flag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .06em;
    margin-right: 4px;
}
.adm-flag-new     { background: rgba(143,175,138,.15); color: #5A8A55; }
.adm-flag-popular { background: rgba(196,139,159,.15); color: #A06070; }
.adm-flag-premium { background: rgba(201,169,110,.15); color: #8A6520; }

/* Action buttons */
.adm-btn-sm {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid #D4C4B0;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: #6B5B54;
    cursor: pointer;
    transition: all .15s;
}
.adm-btn-sm:hover        { border-color: #C48B9F; color: #C48B9F; }
.adm-btn-sm-danger:hover { border-color: #C0392B; color: #C0392B; }

/* ── Invitation search ───────────────────────────────────────── */
.adm-inv-search-wrap { max-width: 600px; margin-bottom: 28px; }
.adm-inv-search-row  { display: flex; gap: 10px; margin-bottom: 8px; }
.adm-search-input-lg { font-size: 14px; padding: 10px 14px; }
.adm-btn-search {
    padding: 10px 20px;
    background: #1A0F0C;
    color: #FAF6F1;
    border: none;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    letter-spacing: .1em;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.adm-btn-search:hover    { background: #C48B9F; }
.adm-btn-search:disabled { opacity: .5; cursor: default; }
.adm-hint { font-size: 11px; color: #9E8C87; margin: 0; }

/* Not found */
.adm-inv-not-found {
    text-align: center;
    padding: 48px;
    color: #9E8C87;
    font-size: 14px;
}
.adm-inv-nf-icon { font-size: 40px; margin-bottom: 12px; }

/* Result card */
.adm-inv-result {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    overflow: hidden;
    max-width: 640px;
}
.adm-inv-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #F0E8DC;
    background: #FAF6F1;
}
.adm-inv-result-type {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9E8C87;
    margin-bottom: 6px;
}
.adm-inv-result-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 24px;
    font-weight: 300;
    margin: 0;
    color: #1A0F0C;
}
.adm-btn-view {
    padding: 8px 16px;
    background: #1A0F0C;
    color: #FAF6F1;
    text-decoration: none;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: .1em;
    white-space: nowrap;
    transition: background .2s;
}
.adm-btn-view:hover { background: #C48B9F; }

.adm-inv-fields { padding: 8px 0; }
.adm-inv-field  {
    display: flex;
    align-items: baseline;
    padding: 10px 24px;
    border-bottom: 1px solid #F5F0E8;
    gap: 16px;
}
.adm-inv-field:last-child    { border-bottom: none; }
.adm-inv-field-label {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9E8C87;
    min-width: 100px;
    flex-shrink: 0;
}
.adm-inv-field-value { font-size: 13px; color: #1A0F0C; }

/* ── Delete modal ────────────────────────────────────────────── */
.adm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,15,12,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}
.adm-modal {
    background: #fff;
    border-radius: 6px;
    padding: 28px 32px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.adm-modal-title  {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-style: italic;
    margin: 0 0 12px;
}
.adm-modal-body   { font-size: 13px; color: #6B5B54; line-height: 1.6; margin: 0 0 24px; }
.adm-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.adm-btn-ghost {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #D4C4B0;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #9E8C87;
    cursor: pointer;
    transition: all .15s;
}
.adm-btn-ghost:hover { border-color: #3A3230; color: #3A3230; }

.adm-btn-danger-solid {
    padding: 8px 16px;
    background: #C0392B;
    border: none;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.adm-btn-danger-solid:hover { background: #A93226; }


/*-------------------------------------------------------------   Admin Analytics -------------*/
/* ── Analytics layout ────────────────────────────────────────── */
.adm-analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.adm-analytics-half {
    margin-bottom: 0;
}

/* ── Category row ─────────────────────────────────────────────── */
.adm-cat-emoji {
    font-size: 16px;
    width: 24px;
    flex-shrink: 0;
}

/* ── Top templates ───────────────────────────────────────────── */
.adm-top-template {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #F0E8DC;
}

    .adm-top-template:last-child {
        border-bottom: none;
    }

.adm-top-rank {
    font-size: 12px;
    font-weight: 600;
    color: #C48B9F;
    min-width: 20px;
    text-align: center;
}

.adm-top-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.adm-top-name {
    font-size: 13px;
    color: #1A0F0C;
    font-weight: 500;
}

.adm-top-bar-wrap {
    flex: 1;
    height: 6px;
    background: #F0E8DC;
    border-radius: 3px;
    overflow: hidden;
}

.adm-top-bar {
    height: 100%;
    background: #C48B9F;
    border-radius: 3px;
    transition: width .4s ease;
}

/* ── Daily growth chart ───────────────────────────────────────── */
.adm-chart {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 20px 16px 12px;
    overflow-x: auto;
}

.adm-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding-bottom: 24px;
    position: relative;
    min-width: 600px;
}

.adm-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    position: relative;
}

.adm-chart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.adm-chart-bar {
    width: 100%;
    background: #C48B9F;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: height .3s ease;
}

.adm-chart-count {
    font-size: 9px;
    color: #C48B9F;
    margin-bottom: 2px;
    font-family: 'Jost', sans-serif;
    font-variant-numeric: tabular-nums;
    height: 12px;
}

.adm-chart-count--zero {
    visibility: hidden;
}

.adm-chart-label {
    font-size: 8px;
    color: #9E8C87;
    letter-spacing: .04em;
    position: absolute;
    bottom: -20px;
    white-space: nowrap;
    font-family: 'Jost', sans-serif;
}

/* ── Email badge ─────────────────────────────────────────────── */
.adm-email-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(143,175,138,.15);
    color: #5A8A55;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
}

/* ── Refresh button ──────────────────────────────────────────── */
.adm-btn-refresh {
    width: 34px;
    height: 34px;
    border: 1px solid #D4C4B0;
    background: transparent;
    border-radius: 50%;
    font-size: 18px;
    color: #6B5B54;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

    .adm-btn-refresh:hover {
        border-color: #C48B9F;
        color: #C48B9F;
    }

.adm-btn-refresh--spin {
    animation: admSpin .8s linear infinite;
}

/* ── Header flex ─────────────────────────────────────────────── */
.adm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}


/* ── Maintenance panel ───────────────────────────────────────── */
.adm-open-count {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    background: rgba(192,57,43,.1);
    color: #E74C3C;
    border-radius: 10px;
    font-size: 11px;
}

/* ── Type tabs ───────────────────────────────────────────────── */
.adm-type-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.adm-type-tab {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid #D4C4B0;
    border-radius: 20px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #6B5B54;
    cursor: pointer;
    transition: all .15s;
}

    .adm-type-tab:hover {
        border-color: #C48B9F;
        color: #C48B9F;
    }

.adm-type-tab--active {
    background: #1A0F0C;
    color: #FAF6F1;
    border-color: #1A0F0C;
}

/* ── New report form ─────────────────────────────────────────── */
.adm-bug-form {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.adm-bug-form-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 20px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0;
}

.adm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adm-form-label {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9E8C87;
}

.adm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.adm-input {
    padding: 9px 12px;
    border: 1px solid #D4C4B0;
    border-radius: 4px;
    font-family: 'Jost',sans-serif;
    font-size: 13px;
    color: #1A0F0C;
    background: #FAF6F1;
    outline: none;
}

    .adm-input:focus {
        border-color: #C48B9F;
    }

.adm-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

.adm-mono-input {
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.adm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #3A3230;
    cursor: pointer;
}

.adm-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Filter buttons ──────────────────────────────────────────── */
.adm-bug-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.adm-filter-btn {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid #E8DDD4;
    border-radius: 20px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: #9E8C87;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

    .adm-filter-btn:hover {
        border-color: #C48B9F;
        color: #C48B9F;
    }

.adm-filter-btn--active {
    background: #1A0F0C;
    color: #FAF6F1;
    border-color: #1A0F0C;
}

/* ── Bug cards ───────────────────────────────────────────────── */
.adm-bug-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adm-bug-empty {
    text-align: center;
    padding: 48px;
    color: #9E8C87;
    font-size: 14px;
}

.adm-bug-card {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-left: 3px solid #E8DDD4;
    border-radius: 6px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adm-bug-card--server {
    border-left-color: #E74C3C;
}

.adm-bug-card--alert {
    border-left-color: #C9A96E;
}

.adm-bug-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.adm-bug-card-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.adm-bug-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.adm-bug-severity {
    font-size: 18px;
    flex-shrink: 0;
}

.adm-bug-type-label {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9E8C87;
    display: block;
}

.adm-bug-title {
    font-size: 14px;
    font-weight: 500;
    color: #1A0F0C;
    margin: 3px 0 0;
}

.adm-bug-desc {
    font-size: 13px;
    color: #6B5B54;
    line-height: 1.6;
    margin: 0;
}

.adm-bug-url {
    font-size: 11px;
    color: #9E8C87;
    margin: 0;
    font-family: 'Courier New', monospace;
}

/* Status badges */
.adm-bug-status {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.adm-status--open {
    background: rgba(231,76,60,.1);
    color: #E74C3C;
}

.adm-status--progress {
    background: rgba(201,169,110,.15);
    color: #8A6520;
}

.adm-status--resolved {
    background: rgba(143,175,138,.15);
    color: #5A8A55;
}

.adm-status--dismissed {
    background: rgba(0,0,0,.05);
    color: #9E8C87;
}

/* Post button */
.adm-btn-posted {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid #C9A96E;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: #C9A96E;
    cursor: pointer;
    transition: all .15s;
}

.adm-btn-posted--on {
    background: #C9A96E;
    color: #fff;
}

.adm-btn-posted:hover {
    background: rgba(201,169,110,.15);
}

/* Schedule info */
.adm-bug-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9E8C87;
    background: #FAF6F1;
    padding: 6px 12px;
    border-radius: 4px;
}

.adm-live-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(192,57,43,.1);
    color: #E74C3C;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    animation: seederPulse 1.5s infinite;
}

/* Stack trace */
.adm-stack-trace {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: #1A0F0C;
    color: rgba(250,246,241,.7);
    border-radius: 4px;
    overflow: hidden;
}

    .adm-stack-trace summary {
        padding: 6px 12px;
        cursor: pointer;
        color: rgba(250,246,241,.5);
        font-size: 11px;
        font-family: 'Jost', sans-serif;
    }

    .adm-stack-trace pre {
        padding: 12px;
        margin: 0;
        overflow-x: auto;
        font-size: 10px;
        line-height: 1.6;
        white-space: pre-wrap;
        border-top: 1px solid rgba(255,255,255,.05);
    }

/* Bug footer */
.adm-bug-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #F0E8DC;
}

.adm-bug-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Primary button */
.adm-btn-primary {
    padding: 8px 18px;
    background: #1A0F0C;
    color: #FAF6F1;
    border: none;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    letter-spacing: .08em;
    cursor: pointer;
    transition: background .15s;
}

    .adm-btn-primary:hover {
        background: #C48B9F;
    }

/* ── Login page ──────────────────────────────────────────────── */
.adm-login-page {
    min-height: 100svh;
    background: linear-gradient(160deg, #0F0A08 0%, #1A0F0C 50%, #2A1510 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.adm-login-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 64px rgba(0,0,0,.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.adm-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adm-login-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.adm-login-brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 20px;
    color: #1A0F0C;
    margin: 0;
}

.adm-login-brand-sub {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9E8C87;
    margin: 0;
}

.adm-login-divider {
    height: 1px;
    background: #E8DDD4;
}

.adm-login-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 26px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0;
}

.adm-login-sub {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #9E8C87;
    margin: 0;
}

/* ── Error ───────────────────────────────────────────────────── */
.adm-login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(192,57,43,.08);
    border: 1px solid rgba(192,57,43,.2);
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #C0392B;
}

/* ── Form ────────────────────────────────────────────────────── */
.adm-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.adm-login-input {
    width: 100%;
    box-sizing: border-box;
}

.adm-login-pw-wrap {
    position: relative;
}

    .adm-login-pw-wrap .adm-input {
        padding-right: 44px;
    }

.adm-login-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: .6;
    transition: opacity .15s;
}

    .adm-login-pw-toggle:hover {
        opacity: 1;
    }

.adm-login-btn {
    width: 100%;
    padding: 12px;
    background: #1A0F0C;
    color: #FAF6F1;
    border: none;
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    letter-spacing: .08em;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .adm-login-btn:hover {
        background: #C48B9F;
    }

    .adm-login-btn:disabled {
        background: #D4C4B0;
        cursor: not-allowed;
    }

.adm-login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: admSpin .7s linear infinite;
}

.adm-login-footer {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    color: #C4B4A8;
    text-align: center;
    margin: 0;
    letter-spacing: .08em;
}

/* ── Sidebar user info ───────────────────────────────────────── */
.adm-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    border-radius: 4px;
    margin-bottom: 8px;
}

.adm-user-name {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #FAF6F1;
}

.adm-user-role {
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
}

.adm-btn-logout {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,.4);
    cursor: pointer;
    transition: all .15s;
    margin-bottom: 6px;
}

    .adm-btn-logout:hover {
        border-color: rgba(192,57,43,.5);
        color: #E74C3C;
    }

/* ── Auth checking ───────────────────────────────────────────── */
.adm-auth-checking {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF6F1;
}

/* ── Expiration panel ────────────────────────────────────────── */
.adm-expiry-panel {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.adm-expiry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.adm-expiry-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 18px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0 0 4px;
}

.adm-expiry-success {
    padding: 10px 14px;
    background: rgba(143,175,138,.1);
    border: 1px solid rgba(143,175,138,.3);
    border-radius: 4px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #5A8A55;
}

.adm-expiry-empty {
    padding: 16px;
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    color: #9E8C87;
    background: #FAF6F1;
    border-radius: 4px;
}

.adm-expiry-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
}

/* ── Preview report section ──────────────────────────────────── */
.adm-preview-report {
    border: 1px solid rgba(196,139,159,.2);
    background: rgba(196,139,159,.03);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 32px;
}

.adm-preview-report-hint {
    font-size: 11px;
    font-weight: 400;
    color: #9E8C87;
    font-style: italic;
    margin-left: 6px;
    font-family: 'Jost', sans-serif;
}

/* ── Smaller stat cards ──────────────────────────────────────── */
.adm-stats-sm {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 20px;
}

    .adm-stats-sm .adm-stat-card {
        padding: 14px 12px;
    }

    .adm-stats-sm .adm-stat-value {
        font-size: 22px;
    }

/* ── Preview category bar — rose color ───────────────────────── */
.adm-category-bar--preview {
    background: #C48B9F; /* ← rose instead of default */
}

/* ── Preview → Real conversion label ────────────────────────── */
.adm-stat-label {
    font-size: 10px;
}


/* ── Checkbox ────────────────────────────────────────────────── */
.adm-row-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #C48B9F;
}

/* ── Marked row highlight ────────────────────────────────────── */
.adm-row-marked {
    background: rgba(201,169,110,.06);
    border-left: 2px solid #C9A96E;
}

/* ── In progress badge ───────────────────────────────────────── */
.adm-mark-badge {
    font-family: 'Jost', sans-serif;
    font-size: 9px;
    letter-spacing: .08em;
    color: #8A6520;
    background: rgba(201,169,110,.15);
    border: 1px solid rgba(201,169,110,.3);
    border-radius: 2px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ── Marked summary bar ──────────────────────────────────────── */
.adm-marked-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(201,169,110,.08);
    border: 1px solid rgba(201,169,110,.2);
    border-radius: 4px;
    margin-top: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #8A6520;
}

/* ── Tier badge ──────────────────────────────────────────────── */
.adm-tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 2px;
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.adm-tier-free {
    background: #F5F0E8;
    color: #9E8C87;
}

.adm-tier-premium {
    background: rgba(196,139,159,.12);
    color: #C48B9F;
}

.adm-tier-premium-plus {
    background: linear-gradient(135deg, rgba(201,169,110,.2) 0%, rgba(196,139,159,.2) 100%);
    color: #8A6520;
    border: 1px solid rgba(201,169,110,.3);
}

/* ── Promo page ──────────────────────────────────────────────── */
.adm-promo-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.adm-promo-generate-card,
.adm-promo-list-card {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 24px;
}

.adm-promo-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 20px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0 0 20px;
}

/* ── Generate form ───────────────────────────────────────────── */
.adm-promo-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.adm-promo-count-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.adm-promo-count-input {
    width: 80px;
    flex-shrink: 0;
}

/* ── Result ──────────────────────────────────────────────────── */
.adm-promo-result {
    margin-top: 20px;
    padding: 16px;
    background: rgba(143,175,138,.08);
    border: 1px solid rgba(143,175,138,.25);
    border-radius: 4px;
}

.adm-promo-result-label {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #5A8A55;
    margin: 0 0 8px;
}

.adm-promo-result-code {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adm-promo-code-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    color: #1A0F0C;
    letter-spacing: .1em;
    flex: 1;
}

/* ── List header ─────────────────────────────────────────────── */
.adm-promo-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* ── Code cell ───────────────────────────────────────────────── */
.adm-promo-code-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.adm-promo-code-label {
    font-size: 12px;
    color: #1A0F0C;
    letter-spacing: .04em;
}

/* ── Status badge ────────────────────────────────────────────── */
.adm-promo-status {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
}

.adm-promo-status--active {
    background: rgba(90,138,85,.1);
    color: #5A8A55;
}

.adm-promo-status--disabled {
    background: #F5F0E8;
    color: #9E8C87;
}

.adm-promo-status--expired {
    background: rgba(192,57,43,.08);
    color: #C0392B;
}

.adm-promo-status--used-up {
    background: rgba(201,169,110,.1);
    color: #8A6520;
}

/* ── Muted row ───────────────────────────────────────────────── */
.adm-row-muted {
    opacity: .55;
}

/* ── Primary button ──────────────────────────────────────────── */
.adm-btn {
    padding: 11px 24px;
    border: none;
    border-radius: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .06em;
    cursor: pointer;
    transition: opacity .2s;
}

.adm-btn-primary {
    background: #1A0F0C;
    color: #FAF6F1;
}

    .adm-btn-primary:hover {
        opacity: .8;
    }

.adm-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Verify page ─────────────────────────────────────────────── */
.adm-verify-page {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.adm-verify-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.adm-verify-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0;
}

/* ── Card ────────────────────────────────────────────────────── */
.adm-verify-card {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.adm-verify-card--success {
    border-color: rgba(90,138,85,.3);
    background: rgba(90,138,85,.04);
    align-items: center;
    text-align: center;
}

.adm-verify-card--rejected {
    border-color: rgba(192,57,43,.3);
    background: rgba(192,57,43,.03);
    align-items: center;
    text-align: center;
}

/* ── Match badge ─────────────────────────────────────────────── */
.adm-verify-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(90,138,85,.1);
    color: #5A8A55;
    border-radius: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    align-self: flex-start;
}

/* ── Details ─────────────────────────────────────────────────── */
.adm-verify-details {
    background: #FAF6F1;
    border: 1px solid #E8DDD4;
    border-radius: 4px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adm-verify-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.adm-verify-label {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: #9E8C87;
    flex-shrink: 0;
    padding-top: 1px;
}

.adm-verify-val {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #1A0F0C;
    text-align: right;
    word-break: break-all;
}

.adm-verify-status-pending {
    font-size: 10px;
    background: rgba(201,169,110,.12);
    color: #8A6520;
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Jost', sans-serif;
}

/* ── Actions ─────────────────────────────────────────────────── */
.adm-verify-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Error ───────────────────────────────────────────────────── */
.adm-verify-error {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(192,57,43,.06);
    border: 1px solid rgba(192,57,43,.2);
    border-radius: 4px;
}

    .adm-verify-error p {
        font-family: 'Jost', sans-serif;
        font-size: 12px;
        color: #C0392B;
        margin: 0;
        line-height: 1.5;
    }

/* ── Input ───────────────────────────────────────────────────── */
.adm-verify-ref-input {
    font-size: 18px !important;
    letter-spacing: .08em;
}

/* ── Success ─────────────────────────────────────────────────── */
.adm-verify-success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(90,138,85,.1);
    color: #5A8A55;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adm-verify-success-title {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    font-weight: 300;
    color: #1A0F0C;
    margin: 0;
}

/* ── Pending list ────────────────────────────────────────────── */
.adm-verify-pending {
    background: #fff;
    border: 1px solid #E8DDD4;
    border-radius: 6px;
    overflow: hidden;
}

.adm-verify-pending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #E8DDD4;
    background: #FAF6F1;
}

.adm-verify-pending-title {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6B5B54;
    margin: 0;
}

.adm-verify-pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #F0E8DC;
    cursor: pointer;
    transition: background .15s;
}

    .adm-verify-pending-item:last-child {
        border-bottom: none;
    }

    .adm-verify-pending-item:hover {
        background: #FAF6F1;
    }

.adm-verify-pending-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.adm-verify-pending-slug {
    font-size: 12px;
    color: #3A3230;
    margin: 2px 0;
}

.adm-verify-pending-right {
    text-align: right;
    flex-shrink: 0;
}

.adm-verify-pending-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    color: #C48B9F;
    margin: 0;
}

/* ── Payment verified badge ──────────────────────────────────── */
.adm-queue-payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Jost', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    background: rgba(90,138,85,.1);
    color: #5A8A55;
    border: 1px solid rgba(90,138,85,.25);
}

/* ── Card with verified payment — subtle green left border ───── */
.adm-queue-card:has(.adm-queue-payment-badge) {
    border-left-color: #5A8A55;
}

.form-file-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

/* ── Music upload area ───────────────────────────────────────── */
.adm-fin-music-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    border: 2px dashed #E8DDD4;
    border-radius: 4px;
    cursor: pointer;
    background: #FEFCF8;
    transition: border-color .2s, background .2s;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #6B5B54;
    position: relative;
    text-align: center;
}

    .adm-fin-music-upload:hover {
        border-color: #C48B9F;
        background: rgba(196,139,159,.04);
    }

.adm-fin-upload--loading {
    pointer-events: none;
    opacity: .6;
}

/* ── Music player ────────────────────────────────────────────── */
.adm-fin-music-player {
    width: 100%;
    height: 36px;
    border-radius: 4px;
}

/* ── Uploaded block ──────────────────────────────────────────── */
.adm-fin-music-uploaded {
    padding: 12px;
    background: rgba(90,138,85,.06);
    border: 1px solid rgba(90,138,85,.2);
    border-radius: 4px;
}

/* Label must be relative so the hidden input is contained inside it */
.form-music-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    border: 1.5px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    /* Do NOT set height: 100% or min-height that fills parent */
}
