/* ── Dashboard Specific Classes ── */
.btn-pri {
    box-shadow: 0 2px 12px rgba(96, 64, 240, 0.28);
}

.btn-lg {
    padding: 13px 32px;
    font-size: 15px;
}

.icon-btn:hover {
    background: var(--base-2);
}

.search-input {
    width: 240px;
    padding: 8px 14px 8px 36px;
    border-radius: 8px;
    border: 1px solid var(--edge-2);
    background: var(--surface-2);
    font-size: 13px;
    font-family: inherit;
    color: var(--ink-0);
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.search-input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(96, 64, 240, 0.1);
}

.search-input::placeholder {
    color: var(--ink-3);
}

.search-ico {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
}

/* ── KPI Cards ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kpi-card {
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 64, 240, 0.28);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 64, 240, 0.5), transparent);
}

.kpi-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kpi-ico {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-val {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--ink-0);
}

.kpi-lbl {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
}

/* ── Panels ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.panel {
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--edge);
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
}

.panel-body {
    padding: 24px;
}

.chart-tabs {
    display: flex;
    gap: 2px;
    background: var(--base-2);
    border-radius: 8px;
    padding: 3px;
}

.chart-tab {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--ink-3);
    border: none;
    background: none;
}

.chart-tab.active {
    background: var(--surface);
    color: var(--ink-0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-row {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--edge);
}

.sm-val {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.sm-lbl {
    font-size: 12.5px;
    color: var(--ink-2);
    font-weight: 500;
}

/* ── Feed ── */
.feed-live-lbl {
    font-size: 12px;
    color: var(--emerald);
    font-weight: 800;
    letter-spacing: 0.05em;
}

.feed-list {
    max-height: 380px;
    overflow-y: auto;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--edge);
}

.feed-item:hover {
    background: rgba(96, 64, 240, 0.02);
}

.feed-av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.feed-info {
    flex: 1;
    min-width: 0;
}

.feed-name {
    font-size: 14px;
    font-weight: 700;
}

.feed-detail {
    font-size: 12.5px;
    color: var(--ink-2);
    font-weight: 500;
}

.feed-r {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.feed-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
}

.pill {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.pill.ci {
    background: rgba(10, 170, 110, 0.12);
    color: var(--emerald);
}

.pill.vip {
    background: rgba(96, 64, 240, 0.12);
    color: var(--violet);
}

/* ── Quick Actions ── */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ac-card {
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ac-card:hover {
    border-color: rgba(96, 64, 240, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    background: var(--surface-2);
}

.ac-ico {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-title {
    font-size: 14px;
    font-weight: 700;
}

.ac-desc {
    font-size: 12.5px;
    color: var(--ink-2);
    font-weight: 500;
}

/* ── Empty State Dashboard ── */
.empty-hero {
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 72px 40px 60px;
    text-align: center;
    position: relative;
    margin: 32px 40px;
    display: none;
    /* Controlled by JS */
}

.empty-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--edge) 1px, transparent 1px),
        linear-gradient(90deg, var(--edge) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 80%);
    opacity: .5;
}

.empty-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 64, 240, 0.1) 0%, transparent 68%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -56%);
    pointer-events: none;
}

.empty-illustration {
    position: relative;
    z-index: 1;
    margin-bottom: 36px;
    width: 160px;
    height: 160px;
    animation: floatIllo 4s ease-in-out infinite;
}

@keyframes floatIllo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.illo-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px dashed rgba(96, 64, 240, 0.22);
    animation: orbitSpin 20s linear infinite;
}

@keyframes orbitSpin {
    to {
        transform: rotate(360deg);
    }
}

.illo-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.id-1 {
    top: -4.5px;
    left: calc(50% - 4.5px);
    background: var(--violet);
    box-shadow: 0 2px 8px rgba(96, 64, 240, .4);
}

.id-2 {
    bottom: 14px;
    right: -4.5px;
    background: var(--azure);
    box-shadow: 0 2px 8px rgba(26, 150, 216, .4);
}

.id-3 {
    top: 18px;
    left: -4.5px;
    background: var(--emerald);
    box-shadow: 0 2px 8px rgba(10, 170, 110, .3);
}

.illo-bg {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid rgba(96, 64, 240, 0.1);
    box-shadow: 0 8px 32px rgba(96, 64, 240, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.illo-inner {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(96, 64, 240, 0.32);
}

.illo-inner svg {
    width: 38px;
    height: 38px;
    color: #fff;
}

.mini-card {
    position: absolute;
    z-index: 2;
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(13, 12, 26, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 600;
    animation: floatIllo 4s ease-in-out infinite;
}

.mini-card:nth-child(2) {
    animation-delay: -1.3s;
}

.mini-card:nth-child(3) {
    animation-delay: -2.6s;
}

.mc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mc-left {
    right: calc(100% + 48px);
    top: 28px;
}

.mc-right {
    left: calc(100% + 48px);
    top: 52px;
}

.mc-bottom {
    left: calc(100% + 20px);
    bottom: 18px;
}

.empty-title {
    font-family: var(--font-d);
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--ink-0);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.empty-sub {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.7;
    max-width: 440px;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

/* ── Modal & Backdrop ── */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(13, 12, 26, .38);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface-2);
    border: 1px solid var(--edge);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px) scale(.97);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}

.backdrop.open .modal {
    transform: none;
}

.modal-hdr {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--edge);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-title {
    font-family: var(--font-d);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--ink-3);
}

.modal-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.f-lbl {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: 8px;
}

.f-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--edge-2);
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .1s;
}

.f-input:focus {
    border-color: var(--violet);
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.type-btn {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--edge-2);
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all .1s;
}

.type-btn.active {
    border-color: var(--violet);
    background: rgba(37, 99, 235, 0.06);
    color: var(--violet);
    box-shadow: 0 0 0 1px var(--violet) inset;
}

.modal-ftr {
    padding: 20px 28px 28px;
    display: flex;
    gap: 12px;
}