:root {
    --payments-bg: #fffdf7;
    --payments-surface: #ffffff;
    --payments-muted: #58615d;
    --payments-text: #111816;
    --payments-green: #2d9e4f;
    --payments-green-soft: #dcfce7;
    --payments-border: #e8e5dc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 28%),
        linear-gradient(180deg, #fffdf7 0%, #fafaf7 60%, #fff 100%);
    color: var(--payments-text);
}

a {
    color: inherit;
    text-decoration: none;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    padding: 28px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--payments-border);
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #22c55e, #2d9e4f);
    color: white;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.brand-title,
.topbar-title,
.page-header h1,
.kpi-card h2,
.panel-head h2,
.row-title,
.row-amount {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-title {
    font-size: 1.4rem;
}

.brand-subtitle,
.footer-label,
.footer-value,
.topbar-label,
.page-description,
.kpi-label,
.kpi-footnote,
.row-subtitle,
.detail-list dt,
.detail-list dd {
    margin: 0;
}

.brand-subtitle,
.footer-label,
.topbar-label,
.eyebrow,
.kpi-label {
    color: var(--payments-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 800;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    color: #5f6b66;
    font-weight: 700;
}

.nav-item.active {
    background: var(--payments-green-soft);
    color: var(--payments-green);
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px;
    border-radius: 24px;
    background: #f7f4ed;
}

.footer-value {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

.content-shell {
    flex: 1;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 8px 4px 24px;
}

.topbar-title {
    font-size: 1.5rem;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--payments-border);
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 700;
}

.page-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-header {
    max-width: 760px;
}

.page-header h1 {
    margin-top: 8px;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 0.92;
}

.page-description {
    margin-top: 14px;
    color: var(--payments-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.kpi-grid,
.dashboard-grid,
.detail-grid,
.subscription-grid {
    display: grid;
    gap: 18px;
}

.kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid,
.detail-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.9fr);
}

.subscription-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-card,
.panel-card,
.not-found-card {
    background: white;
    border: 1px solid var(--payments-border);
    border-radius: 32px;
    box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.25);
    padding: 26px;
}

.kpi-card h2 {
    margin-top: 14px;
    font-size: 2.5rem;
}

.kpi-footnote,
.row-subtitle,
.detail-list dt,
.detail-list dd,
.not-found-card p {
    color: var(--payments-muted);
    font-size: 0.9rem;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.panel-head h2 {
    margin-top: 8px;
    font-size: 1.5rem;
}

.primary-link {
    color: var(--payments-green);
    font-weight: 800;
    font-size: 0.9rem;
}

.table-list,
.subscription-list,
.event-timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.table-row,
.subscription-item,
.transaction-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 22px;
    border: 1px solid #eef1ec;
    background: #fffdfa;
    padding: 16px 18px;
}

.table-row:hover,
.transaction-table-row:hover {
    border-color: rgba(45, 158, 79, 0.35);
    box-shadow: 0 12px 34px -24px rgba(45, 158, 79, 0.45);
}

.row-title {
    font-size: 1rem;
}

.row-right {
    text-align: right;
}

.row-amount {
    font-size: 1rem;
}

.status-badge,
.provider-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-muted,
.provider-pill {
    background: #f1f5f9;
    color: #334155;
}

.filters-card {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 220px 220px;
    gap: 12px;
}

.search-input,
.filter-select {
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--payments-border);
    background: #f0fdf4;
    padding: 16px 18px;
    color: var(--payments-text);
    font: inherit;
    outline: none;
}

.transaction-table-head,
.transaction-table-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) 150px 140px 140px 180px;
    align-items: center;
    gap: 16px;
}

.transaction-table-head {
    padding: 0 18px 14px;
    color: var(--payments-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.detail-list {
    display: grid;
    gap: 16px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #f0ede6;
    padding-bottom: 14px;
}

.detail-list dd {
    color: var(--payments-text);
    font-weight: 700;
    text-align: right;
}

.event-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 14px;
}

.event-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    margin-top: 6px;
    background: var(--payments-green);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.payload-box {
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    overflow-x: auto;
}

@media (max-width: 1024px) {
    .admin-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .kpi-grid,
    .dashboard-grid,
    .detail-grid,
    .subscription-grid,
    .filters-card {
        grid-template-columns: 1fr;
    }

    .transaction-table-head {
        display: none;
    }

    .transaction-table-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
