/* ════════════════════════════════════════════════════════════════════════════
   AURORA 4 — Design System Afrodecibels
   ════════════════════════════════════════════════════════════════════════════ */

/* ── KPI Grid ──────────────────────────────────────────────────────────── */
.a4-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.a4-kpi {
    background: var(--bg2, #fff);
    border: 1.5px solid var(--border, #e5e0d0);
    border-radius: 14px;
    padding: 18px 20px;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}

.a4-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    border-color: rgba(244,121,32,.4);
}

.a4-kpi.primary { border-left: 4px solid #F47920; }
.a4-kpi.success { border-left: 4px solid #2a8a5c; }
.a4-kpi.danger  { border-left: 4px solid #c84b2f; }
.a4-kpi.warning { border-left: 4px solid #c8a000; }

.a4-kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted, #9a7055);
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.a4-kpi-value {
    font-size: 28px;
    font-weight: 900;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--brown, #4a2000);
    line-height: 1;
}

.a4-kpi-value.orange { color: #F47920; }
.a4-kpi-value.green  { color: #2a8a5c; }

.a4-kpi-trend {
    font-size: 11px;
    margin-top: 6px;
    color: var(--muted);
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.a4-card {
    background: var(--bg2, #fff);
    border: 1.5px solid var(--border, #e5e0d0);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
}

.a4-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 14px;
    flex-wrap: wrap;
}

.a4-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    color: var(--brown, #4a2000);
}

.a4-card-sub {
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 0;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.a4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    text-decoration: none;
}

.a4-btn-primary {
    background: linear-gradient(135deg, #F47920, #D4AF37);
    color: white;
}

.a4-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(244,121,32,.3); }

.a4-btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--brown);
}

.a4-btn-ghost:hover { border-color: #F47920; color: #F47920; }

.a4-btn-danger {
    background: #c84b2f;
    color: white;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.a4-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.a4-badge-success { background: rgba(42,138,92,.12); color: #2a8a5c; }
.a4-badge-warning { background: rgba(200,160,0,.12); color: #c8a000; }
.a4-badge-danger  { background: rgba(200,75,47,.12); color: #c84b2f; }
.a4-badge-info    { background: rgba(10,107,158,.12); color: #0a6b9e; }
.a4-badge-orange  { background: rgba(244,121,32,.12); color: #F47920; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.a4-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg2);
    border-radius: 12px;
    overflow: hidden;
}

.a4-table thead {
    background: var(--bg3, rgba(244,121,32,.05));
}

.a4-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .5px;
    border-bottom: 1.5px solid var(--border);
}

.a4-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.a4-table tbody tr:hover { background: rgba(244,121,32,.03); }

/* ── Inputs ────────────────────────────────────────────────────────────── */
.a4-input, .a4-textarea, .a4-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border2, #d4cab8);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    transition: border-color .15s ease;
}

.a4-input:focus, .a4-textarea:focus, .a4-select:focus {
    outline: none;
    border-color: #F47920;
    box-shadow: 0 0 0 3px rgba(244,121,32,.1);
}

.a4-textarea { resize: vertical; min-height: 80px; }

.a4-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
    letter-spacing: .3px;
}

/* ── Modal ─────────────────────────────────────────────────────────────── */
.a4-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.a4-modal.open { display: flex; }

.a4-modal-content {
    background: var(--bg2);
    border-radius: 14px;
    max-width: 600px;
    width: 100%;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.a4-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.a4-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
}

.a4-empty-icon {
    font-size: 56px;
    opacity: .25;
    margin-bottom: 14px;
}

.a4-empty-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--brown);
}

/* ── Skeleton loaders ──────────────────────────────────────────────────── */
.a4-skeleton {
    background: linear-gradient(90deg, var(--bg3) 0%, var(--bg2) 50%, var(--bg3) 100%);
    background-size: 200% 100%;
    animation: a4-skeleton 1.2s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes a4-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Filters bar ───────────────────────────────────────────────────────── */
.a4-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.a4-filters .a4-input,
.a4-filters .a4-select {
    width: auto;
    flex: 0 1 200px;
}

/* ── Page Hero (WP-style) ─────────────────────────────────────────────── */
.ph.ph-mini.ph-dark.ph-sa {
    background: linear-gradient(135deg, #2a1a0e 0%, #1a1108 100%);
    color: white;
    margin-bottom: 18px;
    border-radius: 0 0 14px 14px;
    position: relative;
    overflow: hidden;
}

.ph.ph-mini.ph-dark.ph-sa .ph-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ph.ph-mini.ph-dark.ph-sa .ph-inner {
    position: relative;
    z-index: 1;
}

.ph.ph-mini.ph-dark.ph-sa .ph-title {
    margin: 0;
    color: white;
}

.ph.ph-mini.ph-dark.ph-sa .ph-sub {
    color: rgba(255,255,255,.6);
}

.ph-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all .15s ease;
}

.ph-btn-p {
    background: linear-gradient(135deg, #F47920, #D4AF37);
    color: white !important;
    border-radius: 10px;
}

.ph-btn-p:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(244,121,32,.3); }

/* Dark mode */
[data-theme="dark"] .a4-kpi,
[data-theme="dark"] .a4-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .a4-kpi-value { color: white; }
