@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24..48,100..700,0..1,-50..200");

:root {
    --bg-0: #050816;
    --bg-1: #0b1220;
    --bg-2: #111827;
    --panel: rgba(15, 23, 42, 0.92);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.26);
    --text: #e5eefb;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-2: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    font-size: 14px;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.9rem;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

a {
    color: inherit;
}

.sidebar {
    width: 230px;
    min-height: 100vh;
    padding: 14px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1030;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1060;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.sidebar-toggle .material-symbols-rounded {
    font-size: 1.18rem;
    line-height: 1;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(3px);
    z-index: 1025;
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(34, 197, 94, 0.12));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

.sidebar-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #07111f;
    background: linear-gradient(135deg, #7dd3fc, #86efac);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sidebar-brand-text strong {
    font-size: 0.86rem;
    letter-spacing: 0.08em;
}

.sidebar-brand-text small {
    color: var(--muted);
    font-size: 0.68rem;
    margin-top: 4px;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 11px;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid transparent;
    color: var(--text);
    background: transparent;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--line);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(56, 189, 248, 0.08));
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.12);
}

.sidebar-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 13px;
    font-family: "Material Symbols Rounded";
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-note {
    padding: 11px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

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

.main-content {
    flex: 1;
    min-width: 0;
    padding: 18px;
}

.page-shell {
    max-width: 1360px;
    margin: 0 auto;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero h2,
.page-hero h3 {
    margin: 0;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    line-height: 1.06;
}

.page-hero h1 {
    font-size: clamp(1.65rem, 2.2vw, 2rem);
}

.page-hero h2 {
    font-size: clamp(1.35rem, 1.8vw, 1.6rem);
}

.page-hero h3 {
    font-size: clamp(1.1rem, 1.4vw, 1.25rem);
}

.page-hero p {
    margin: 6px 0 0;
    color: var(--muted);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(56, 189, 248, 0.1);
    color: #d8f3ff;
    font-size: 0.72rem;
    font-weight: 700;
}

.card,
.modal-content {
    border-radius: var(--radius) !important;
    border: 1px solid var(--line) !important;
    background: var(--panel) !important;
    box-shadow: var(--shadow) !important;
    color: var(--text) !important;
}

.modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 2rem);
}

.modal-body {
    overflow-y: auto;
}

.admin-modal .modal-content {
    background: #0b1220 !important;
    opacity: 1 !important;
}

.admin-modal .modal-header,
.admin-modal .modal-footer {
    background: #0f172a !important;
}

.admin-modal .modal-body {
    background: #0b1220 !important;
}

.card-header,
.modal-header,
.modal-footer {
    border-color: var(--line) !important;
}

.card-header {
    padding: 12px 16px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    color: var(--text) !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.card-body {
    color: var(--text);
}

.stat-card {
    padding: 14px;
    border-radius: var(--radius) !important;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 35%),
        rgba(15, 23, 42, 0.95) !important;
    border: 1px solid var(--line) !important;
    min-height: 132px;
}

.stat-card-title {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card-value {
    margin-top: 10px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 800;
    line-height: 1;
    color: white;
}

.stat-card p {
    color: var(--muted);
}

.dashboard-metric-card {
    min-height: 182px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96)) !important;
}

.dashboard-metric-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--metric-glow, radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 38%));
    pointer-events: none;
}

.dashboard-metric-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-metric-title {
    max-width: 70%;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.35;
}

.dashboard-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--metric-accent, #7dd3fc);
    background: var(--metric-surface, rgba(56, 189, 248, 0.14));
    border: 1px solid var(--metric-border, rgba(56, 189, 248, 0.22));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-metric-icon .material-symbols-rounded {
    font-size: 1.2rem;
    line-height: 1;
    font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
}

.dashboard-metric-body {
    margin-top: 26px;
}

.dashboard-metric-value-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-metric-value {
    font-size: clamp(1.8rem, 2.6vw, 2.45rem);
    font-weight: 800;
    line-height: 1.04;
    color: #f8fbff;
    letter-spacing: -0.03em;
}

.dashboard-metric-suffix {
    padding-bottom: 4px;
    color: rgba(226, 232, 240, 0.88);
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-metric-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.metric-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.12);
    color: rgba(226, 232, 240, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.08);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-metric-card--blue {
    --metric-accent: #60a5fa;
    --metric-surface: rgba(37, 99, 235, 0.18);
    --metric-border: rgba(96, 165, 250, 0.22);
    --metric-glow: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 38%);
}

.dashboard-metric-card--green {
    --metric-accent: #34d399;
    --metric-surface: rgba(16, 185, 129, 0.16);
    --metric-border: rgba(52, 211, 153, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 38%);
}

.dashboard-metric-card--amber {
    --metric-accent: #fbbf24;
    --metric-surface: rgba(245, 158, 11, 0.16);
    --metric-border: rgba(251, 191, 36, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 38%);
}

.dashboard-metric-card--violet {
    --metric-accent: #a78bfa;
    --metric-surface: rgba(139, 92, 246, 0.16);
    --metric-border: rgba(167, 139, 250, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), transparent 38%);
}

.dashboard-metric-card--cyan {
    --metric-accent: #22d3ee;
    --metric-surface: rgba(6, 182, 212, 0.16);
    --metric-border: rgba(34, 211, 238, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(6, 182, 212, 0.15), transparent 38%);
}

.dashboard-metric-card--gold {
    --metric-accent: #facc15;
    --metric-surface: rgba(234, 179, 8, 0.16);
    --metric-border: rgba(250, 204, 21, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(234, 179, 8, 0.14), transparent 38%);
}

.dashboard-metric-card--purple {
    --metric-accent: #c084fc;
    --metric-surface: rgba(168, 85, 247, 0.16);
    --metric-border: rgba(192, 132, 252, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(168, 85, 247, 0.15), transparent 38%);
}

.dashboard-metric-card--magenta {
    --metric-accent: #f472b6;
    --metric-surface: rgba(236, 72, 153, 0.16);
    --metric-border: rgba(244, 114, 182, 0.2);
    --metric-glow: radial-gradient(circle at top right, rgba(236, 72, 153, 0.16), transparent 38%);
}

.analytics-card,
.analytics-list-card {
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96)) !important;
}

.analytics-card {
    min-height: 352px;
}

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

.analytics-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
}

.analytics-card-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.analytics-total-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.analytics-total-chip--blue {
    color: #8ec5ff;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.16);
}

.analytics-total-chip--green {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.16);
}

.analytics-chart {
    min-height: 250px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.analytics-card--deposit .analytics-chart {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.analytics-bar-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 100%;
}

.analytics-bar-value {
    min-height: 32px;
    color: #8fb8ef;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

.analytics-card--deposit .analytics-bar-value {
    color: #8fe3c3;
}

.analytics-bar-track {
    width: 100%;
    max-width: 58px;
    height: 180px;
    display: flex;
    align-items: flex-end;
}

.analytics-card--deposit .analytics-bar-track {
    max-width: 44px;
}

.analytics-bar {
    width: 100%;
    min-height: 8px;
    border-radius: 10px 10px 4px 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.analytics-bar--blue {
    background: linear-gradient(180deg, #68a6f7, #3b82f6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 10px 28px rgba(59, 130, 246, 0.2);
}

.analytics-bar--green {
    background: linear-gradient(180deg, #3dd5a2, #22c55e);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 10px 28px rgba(34, 197, 94, 0.18);
}

.analytics-bar-label {
    color: rgba(148, 163, 184, 0.86);
    font-size: 0.76rem;
    text-align: center;
    line-height: 1.2;
}

.analytics-list-card {
    min-height: 0;
}

.analytics-link {
    color: #5eb7ff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.analytics-link:hover {
    color: #8fd0ff;
}

.analytics-product-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.analytics-product-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analytics-product-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.analytics-product-title {
    color: #f8fbff;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
}

.analytics-product-qty {
    color: #f8fbff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.analytics-product-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.analytics-product-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.24);
}

.analytics-product-meta {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.table-responsive {
    border-radius: 0 0 var(--radius) var(--radius);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0 !important;
    color: var(--text) !important;
}

.table thead th {
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--muted) !important;
    border-bottom: 1px solid var(--line) !important;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table tbody td {
    background: transparent !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--line) !important;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: rgba(148, 163, 184, 0.04) !important;
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.btn {
    border-radius: 11px;
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.88rem;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    border: none !important;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #f8fafc !important;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.form-control,
.form-select {
    min-height: 40px;
    border-radius: 11px !important;
    background: rgba(2, 6, 23, 0.75) !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(56, 189, 248, 0.65) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16) !important;
}

.form-label {
    color: var(--muted);
    font-weight: 700;
}

code {
    color: #7dd3fc;
    word-break: break-word;
}

.text-secondary {
    color: var(--muted) !important;
}

.main-content .row {
    --bs-gutter-x: 1.35rem;
    --bs-gutter-y: 1.35rem;
}

.hover-scale,
.transition-all {
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.hover-scale:hover {
    transform: translateY(-2px);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.65);
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.34);
    border-radius: 999px;
    border: 2px solid rgba(2, 6, 23, 0.65);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 14px;
}

.login-card {
    width: min(100%, 360px);
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow);
}

.login-highlights {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.08);
    color: #d8f3ff;
    font-size: 0.8rem;
    font-weight: 700;
}

.login-card h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 800;
}

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

.info-panel {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.9);
    border-radius: var(--radius);
    padding: 14px;
}

.settings-toggle-grid {
    display: grid;
    gap: 12px;
}

.settings-toggle-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(9, 15, 28, 0.9);
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.settings-toggle-card:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(15, 23, 42, 0.98);
}

.settings-toggle-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-toggle-card:has(input:checked) {
    border-color: rgba(56, 189, 248, 0.34);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.settings-toggle-card input:checked ~ .settings-toggle-dot {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.06);
}

.settings-toggle-dot {
    width: 12px;
    height: 12px;
    margin-top: 4px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.status-positive {
    background: var(--accent-2);
}

.status-negative {
    background: var(--danger);
}

.settings-toggle-copy {
    display: grid;
    gap: 4px;
}

.settings-toggle-copy strong {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text);
}

.settings-toggle-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.settings-color-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-color-input .input-group {
    flex: 1 1 auto;
}

.settings-color-picker {
    width: 58px !important;
    min-width: 58px;
    height: 46px;
    padding: 4px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    background: rgba(9, 15, 28, 0.9) !important;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settings-color-picker::-webkit-color-swatch {
    border: 0;
    border-radius: 12px;
}

.settings-color-picker::-moz-color-swatch {
    border: 0;
    border-radius: 12px;
}

.settings-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-media-card {
    min-width: 0;
}

.settings-media-frame {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 38%),
        linear-gradient(180deg, rgba(9, 15, 28, 0.96), rgba(15, 23, 42, 0.96));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.settings-media-frame.has-media {
    border-color: rgba(56, 189, 248, 0.24);
}

.settings-media-frame-qris {
    background:
        linear-gradient(180deg, rgba(7, 12, 25, 0.4), rgba(7, 12, 25, 0.85)),
        linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(56, 189, 248, 0.16));
}

.settings-media-placeholder {
    position: absolute;
    inset: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}

.settings-media-placeholder span {
    font-size: 1rem;
    font-weight: 800;
    color: #f8fcff;
}

.settings-media-placeholder small {
    color: var(--muted);
    line-height: 1.45;
    max-width: 240px;
}

.settings-media-overlay {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(7, 12, 25, 0.72);
    backdrop-filter: blur(10px);
}

.settings-media-overlay strong {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.settings-media-overlay small {
    color: #d7e5f9;
}

.settings-qris-swatch {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(7, 12, 25, 0.78);
    backdrop-filter: blur(10px);
}

.settings-qris-swatch-color {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.settings-qris-swatch strong {
    display: block;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 800;
}

.settings-qris-swatch small {
    color: #d7e5f9;
}

.bot-preview-card {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(9, 15, 28, 0.98), rgba(15, 23, 42, 0.98));
}

.bot-preview-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-preview-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    color: #07111f;
    background: linear-gradient(135deg, #7dd3fc, #86efac);
}

.bot-preview-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.bot-preview-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.bot-preview-bubble {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    background: rgba(14, 25, 45, 0.88);
}

.bot-preview-message {
    color: #eff6ff;
    line-height: 1.7;
}

.bot-preview-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bot-preview-footer span,
.bot-preview-contact strong {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: #dbeafe;
    font-size: 0.8rem;
    font-weight: 700;
}

.bot-preview-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bot-preview-contact span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(15, 23, 42, 0.9));
}

.table-pagination-summary {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.table-pagination nav {
    margin-left: auto;
}

.pagination {
    --bs-pagination-color: var(--text);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-hover-color: #fff;
    --bs-pagination-hover-bg: transparent;
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-focus-color: #fff;
    --bs-pagination-focus-bg: transparent;
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
    --bs-pagination-active-color: inherit;
    --bs-pagination-active-bg: transparent;
    --bs-pagination-active-border-color: transparent;
    --bs-pagination-disabled-color: rgba(148, 163, 184, 0.6);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: transparent;
    gap: 8px;
    align-items: center;
}

.page-item {
    display: flex;
}

.page-link {
    min-width: 42px;
    height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.page-link:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(56, 189, 248, 0.12);
    color: #f8fcff;
}

.page-link:focus {
    border-color: rgba(56, 189, 248, 0.45);
}

.page-item.active .page-link {
    color: #06121f;
    border-color: rgba(125, 211, 252, 0.9);
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.22);
}

.page-item.disabled .page-link {
    opacity: 0.46;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.1);
    box-shadow: none;
}

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

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(88vw, 330px);
        min-height: 100vh;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        transform: translateX(-102%);
        transition: transform 220ms ease;
        box-shadow: 26px 0 60px rgba(0, 0, 0, 0.4);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-backdrop {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        padding: 72px 14px 16px;
    }

    .page-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .page-hero .text-lg-end {
        text-align: left !important;
    }

    .page-hero h1,
    .page-hero h2,
    .page-hero h3 {
        font-size: clamp(1.35rem, 5vw, 1.8rem);
    }

    .card-header {
        padding: 13px 14px !important;
        letter-spacing: 0.04em;
    }

    .card-body {
        padding: 14px !important;
    }

    .main-content .row {
        --bs-gutter-x: 0.9rem;
        --bs-gutter-y: 0.9rem;
    }

    .table thead th,
    .table tbody td {
        font-size: 0.8rem;
        padding: 0.72rem 0.7rem;
    }

    .modal-dialog {
        margin: 0.5rem auto;
        max-width: calc(100vw - 0.75rem) !important;
    }

    .modal-content {
        border-radius: 18px !important;
    }

    .modal-header,
    .modal-footer {
        padding: 12px 14px !important;
    }

    .modal-body {
        padding: 14px !important;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 100%;
    }

    .page-hero > .btn {
        width: 100%;
    }

    .login-card {
        padding: 18px;
        border-radius: 20px;
    }

    .login-highlights {
        gap: 8px;
    }

    .table-pagination {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .table-pagination-summary {
        text-align: center;
    }

    .table-pagination nav {
        margin-left: 0;
    }

    .table-pagination .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .settings-color-input {
        align-items: stretch;
    }

    .settings-media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .sidebar-link-icon {
        min-width: 54px;
    }

    .main-content {
        padding: 68px 12px 12px;
    }

    .page-hero {
        padding: 14px;
        gap: 12px;
    }

    .dashboard-metric-card {
        min-height: 168px;
        padding: 16px;
    }

    .analytics-card,
    .analytics-list-card {
        padding: 16px;
    }

    .analytics-card {
        min-height: 0;
    }

    .analytics-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-chart {
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
    }

    .analytics-card--deposit .analytics-chart,
    .analytics-chart {
        width: max-content;
        min-width: 100%;
    }

    .dashboard-metric-body {
        margin-top: 22px;
    }

    .stat-card {
        padding: 14px;
        min-height: 120px;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 6px 10px;
    }

    .btn {
        min-height: 38px;
    }

    .form-control,
    .form-select {
        min-height: 38px;
    }

    .settings-color-input {
        flex-direction: column;
    }

    .settings-color-picker {
        width: 100% !important;
        min-width: 0;
    }

    .settings-media-frame {
        min-height: 190px;
    }

    .bot-preview-card,
    .settings-toggle-card {
        padding: 16px;
    }
}

.order-row {
    cursor: pointer;
}

.order-row:hover {
    background: rgba(15, 23, 42, 0.92);
}
