/* ── demo.css  —  Dashboard v2 styles ─────────────────────────── */

/* ── Hero banner ─────────────────────────────────────────────── */
.d2-hero {
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 50%, #7c3aed 100%);
    border-radius: 12px;
    padding: 2rem 2rem 1.75rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.d2-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.d2-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.d2-hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    object-fit: cover;
    flex-shrink: 0;
}

.d2-hero-avatar-fallback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    flex-shrink: 0;
}

.d2-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.d2-hero-sub {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

.d2-hero-actions .btn {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.d2-hero-actions .btn-light {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
}

.d2-hero-actions .btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Status chip on hero ─────────────────────────────────────── */
.d2-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(4px);
}

.d2-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.d2-status-dot.dot-pending { background: #fbbf24; }
.d2-status-dot.dot-active { background: #34d399; }
.d2-status-dot.dot-denied { background: #f87171; }
.d2-status-dot.dot-suspended { background: #f87171; }

/* ── Section label ───────────────────────────────────────────── */
.d2-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--st-muted);
    margin-bottom: 0.75rem;
}

/* ── Metric cards ────────────────────────────────────────────── */
.d2-metric {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    height: 100%;
}

.d2-metric:hover {
    border-color: var(--st-primary);
    box-shadow: 0 2px 12px rgba(13, 110, 253, 0.08);
}

.d2-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.d2-metric-icon.mi-blue { background: #dbeafe; color: #2563eb; }
.d2-metric-icon.mi-green { background: #d1fae5; color: #059669; }
.d2-metric-icon.mi-purple { background: #ede9fe; color: #7c3aed; }
.d2-metric-icon.mi-amber { background: #fef3c7; color: #d97706; }

html[data-theme='dark'] .d2-metric-icon.mi-blue { background: #1e3a5f; color: #60a5fa; }
html[data-theme='dark'] .d2-metric-icon.mi-green { background: #14332a; color: #6ee7b7; }
html[data-theme='dark'] .d2-metric-icon.mi-purple { background: #2d1b4e; color: #a78bfa; }
html[data-theme='dark'] .d2-metric-icon.mi-amber { background: #3a2d10; color: #fbbf24; }

.d2-metric-body {
    flex: 1;
    min-width: 0;
}

.d2-metric-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--st-ink);
}

.d2-metric-label {
    font-size: 0.78rem;
    color: var(--st-muted);
    margin-top: 2px;
}

/* ── Content cards ───────────────────────────────────────────── */
.d2-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.d2-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.d2-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--st-ink);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.d2-card-title i {
    color: var(--st-muted);
    font-size: 0.8rem;
}

.d2-card-count {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--st-accent);
    color: var(--st-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

html[data-theme='dark'] .d2-card-count {
    background: #1e3a5f;
    color: #93b8ff;
}

.d2-card-body {
    flex: 1;
}

.d2-card-footer {
    margin-top: auto;
    padding-top: 0.85rem;
}

.d2-card-footer .btn {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
}

/* ── Tag pills (categories, social) ──────────────────────────── */
.d2-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    color: var(--st-ink);
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s;
}

.d2-tag:hover {
    border-color: var(--st-primary);
    color: var(--st-primary);
}

a.d2-tag:hover {
    background: var(--st-accent);
}

.d2-tag i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ── Empty state ─────────────────────────────────────────────── */
.d2-empty {
    text-align: center;
    padding: 1.25rem 0.5rem;
    color: var(--st-muted);
    font-size: 0.82rem;
}

.d2-empty i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

/* ── Verification banner ─────────────────────────────────────── */
.d2-verify {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: #92400e;
}

html[data-theme='dark'] .d2-verify {
    background: #3a2d10;
    border-color: #5c4a1a;
    border-left-color: #fbbf24;
    color: #fbbf24;
}

.d2-verify i {
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Quick-action links ──────────────────────────────────────── */
.d2-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--st-ink);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--st-border);
    background: var(--st-surface);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.d2-quick-link:hover {
    border-color: var(--st-primary);
    background: var(--st-accent);
    color: var(--st-primary);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.08);
}

html[data-theme='dark'] .d2-quick-link:hover {
    background: #1e3a5f;
    color: #93b8ff;
}

.d2-quick-link i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: var(--st-accent);
    color: var(--st-primary);
    flex-shrink: 0;
}

html[data-theme='dark'] .d2-quick-link i {
    background: #1e3a5f;
    color: #93b8ff;
}

.d2-quick-link .fa-arrow-right {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.4;
    background: none;
    width: auto;
    height: auto;
}

/* ── Brand balance card ──────────────────────────────────────── */
.d2-balance {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--st-ink);
    line-height: 1;
}

.d2-balance-label {
    font-size: 0.75rem;
    color: var(--st-muted);
    margin-top: 0.25rem;
}

/* ── Compact hero variant (profile, settings pages) ─────────── */
.d2-hero--compact {
    padding: 1.5rem 2rem 1.25rem;
}

.d2-hero--compact h1 {
    font-size: 1.3rem;
}

/* ── Breadcrumb inside hero ─────────────────────────────────── */
.d2-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
}

.d2-breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-weight: 500;
}

.d2-breadcrumb a:hover {
    color: #fff;
}

.d2-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.35);
}

.d2-breadcrumb-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* ── Pill checkbox (category selection) ─────────────────────── */
.d2-pill-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--st-border);
    border-radius: 8px;
    background: var(--st-surface);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--st-ink);
    user-select: none;
    width: 100%;
}

.d2-pill-check:hover {
    border-color: var(--st-primary);
    box-shadow: 0 1px 6px rgba(13, 110, 253, 0.08);
}

.d2-pill-check.is-checked,
.d2-pill-check:has(.d2-pill-input:checked) {
    border-color: var(--st-primary);
    background: var(--st-accent);
    color: #1d4ed8;
}

html[data-theme='dark'] .d2-pill-check.is-checked,
html[data-theme='dark'] .d2-pill-check:has(.d2-pill-input:checked) {
    background: #1e3a5f;
    color: #93b8ff;
    border-color: #4a6fa8;
}

.d2-pill-input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--st-primary);
    flex-shrink: 0;
}

.d2-pill-label {
    line-height: 1.3;
}

/* ── Social row inside card ─────────────────────────────────── */
.d2-social-row {
    background: var(--st-bg);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 0.85rem;
}

/* ── Form label (lighter, inside cards) ─────────────────────── */
.d2-form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--st-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Form actions bar ───────────────────────────────────────── */
.d2-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0 0.5rem;
    border-top: 1px solid var(--st-border);
    margin-top: 0.25rem;
}

.d2-form-actions .btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .d2-hero {
        padding: 1.5rem;
    }

    .d2-hero h1 {
        font-size: 1.25rem;
    }

    .d2-metric-value {
        font-size: 1.15rem;
    }
}
