:root {
    --primary: #007BFF;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;
    --sidebar: #343A40;
    --sidebar-soft: #3f474f;
    --saffron: #F97316;
    --bg: #F4F6F9;
    --surface: #FFFFFF;
    --surface-soft: #f8f9fc;
    --text: #212529;
    --muted: #6C757D;
    --border: #DEE2E6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.08);
    --radius: 0.65rem;
    --sidebar-width: 250px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.app-page {
    width: 100%;
}
.topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: inline-flex;
    flex-direction: column;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}
.brand small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}
.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.nav-link,
.nav-user {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    font-weight: 600;
}
.nav-link {
    color: var(--muted);
    border: 1px solid transparent;
}
.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.14);
}
.nav-link-accent {
    background: var(--saffron);
    color: #fff;
}
.nav-link-accent:hover,
.nav-link-accent.active {
    background: #ea6a10;
    color: #fff;
}
.nav-user {
    background: var(--surface-soft);
    color: var(--text);
}
.app-user-chip {
    max-width: 220px;
}

.main-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: rgba(255, 255, 255, 0.8);
    padding: 18px 14px 24px;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}
.sidebar-brand {
    display: grid;
    gap: 4px;
    padding: 6px 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
}
.sidebar-brand-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}
.sidebar-brand-subtitle {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-weight: 600;
}
.nav-sidebar {
    display: grid;
    gap: 6px;
}
.sidebar-group {
    display: grid;
    gap: 6px;
}
.sidebar-group summary {
    list-style: none;
}
.sidebar-group summary::-webkit-details-marker {
    display: none;
}
.sidebar-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    font-weight: 600;
}
.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.sidebar-group-toggle {
    position: relative;
    cursor: pointer;
    padding-right: 34px;
}
.sidebar-group-toggle::after {
    content: "+";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
}
.sidebar-group[open] .sidebar-group-toggle::after {
    content: "−";
}
.sidebar-submenu {
    display: grid;
    gap: 6px;
    padding: 2px 0 4px 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px;
}
.sidebar-sublink {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-weight: 600;
}
.sidebar-sublink:hover,
.sidebar-sublink.active {
    background: rgba(0, 123, 255, 0.18);
    color: #fff;
}
.sidebar-link-accent {
    margin-top: 12px;
    background: rgba(249, 115, 22, 0.16);
    color: #fff;
}

.has-sidebar .app-shell {
    margin-left: var(--sidebar-width);
    padding-top: 20px;
}
.app-shell {
    min-height: calc(100vh - 64px);
    padding: 22px 0 90px;
}
.auth-shell,
.admin-shell {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 28px 0 92px;
}

.panel { display: grid; gap: 18px; }
.hero { padding: 22px 0 14px; }
.hero-grid {
    display: grid;
    gap: 20px;
    align-items: stretch;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}

.hero-card,
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.hero-card {
    padding: 26px;
}
.card {
    padding: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(23, 162, 184, 0.12);
    color: var(--info);
    font-weight: 700;
    font-size: 0.78rem;
}
.page-title,
.hero h1 {
    margin: 14px 0 10px;
    color: var(--text);
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    line-height: 1.15;
}
.section-title {
    margin: 0;
    font-size: clamp(1.55rem, 3.4vw, 2.2rem);
    line-height: 1.16;
}
.page-subtitle,
.hero p,
.muted,
.section-copy {
    color: var(--muted);
}
.hero-disclaimer {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid var(--saffron);
    background: #fff7ed;
    color: #9a3412;
    border-radius: 0.45rem;
}

.section { padding: 14px 0 28px; }
.section-head {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

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

.feature-card {
    border-top: 3px solid var(--primary);
}
.feature-card:nth-child(3n + 2) {
    border-top-color: var(--success);
}
.feature-card:nth-child(3n + 3) {
    border-top-color: var(--saffron);
}

.card h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 1.02rem;
}
.metric {
    margin: 10px 0 6px;
    font-size: clamp(1.75rem, 3.8vw, 2.1rem);
    font-weight: 700;
    color: var(--text);
}
.metric-compact {
    font-size: 1rem;
    line-height: 1.45;
    word-break: break-word;
}

.actions,
.actions-tight,
.actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 0.45rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.85rem;
}
.btn-primary {
    background: var(--success);
    color: #fff;
}
.btn-primary:hover { background: #218838; }
.btn-secondary {
    background: var(--primary);
    color: #fff;
}
.btn-secondary:hover { background: #0069d9; }
.btn-accent {
    background: var(--saffron);
    color: #fff;
}
.btn-accent:hover { background: #ea6a10; }
.btn-outline {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover { background: var(--surface-soft); }
.btn-danger {
    background: var(--danger);
    color: #fff;
}

.auth-card,
.admin-card {
    width: min(100%, 500px);
    padding: 26px;
}

.form-stack {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #ced4da;
    border-radius: 0.45rem;
    padding: 12px 14px;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
}
.field textarea {
    min-height: 120px;
    resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(0, 123, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}
.help-text {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}
.field-status {
    min-height: 18px;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
}
.field-status-neutral { color: var(--muted); }
.field-status-checking { color: #495057; }
.field-status-success { color: #155724; }
.field-status-error { color: #842029; }

.mini-note {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 0.45rem;
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.alert {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 0.45rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}
.alert-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.stat-stack { display: grid; gap: 12px; }
.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.stat-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.referral-link-box {
    padding: 13px 14px;
    border-radius: 0.45rem;
    background: var(--surface-soft);
    border: 1px dashed #adb5bd;
    word-break: break-word;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: #fff;
}
.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    text-align: left;
    vertical-align: top;
}
.data-table thead th {
    background: #f8f9fa;
    color: var(--muted);
    font-weight: 700;
}

.step-no {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.12);
    color: var(--primary);
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #8a6d03;
}
.status-approved,
.status-active,
.status-paid {
    background: rgba(40, 167, 69, 0.18);
    color: #1d6b31;
}
.status-rejected,
.status-deleted {
    background: rgba(220, 53, 69, 0.16);
    color: #842029;
}
.status-hold {
    background: rgba(249, 115, 22, 0.18);
    color: #9a3412;
}
.status-draft,
.status-inactive {
    background: #e9ecef;
    color: #495057;
}
.status-open,
.status-reviewing,
.status-unread {
    background: rgba(23, 162, 184, 0.18);
    color: #0f6674;
}

.wallet-card-list {
    display: grid;
    gap: 14px;
}
.wallet-item {
    padding: 16px;
    border-radius: 0.55rem;
    border: 1px solid var(--border);
    background: #fff;
}
.wallet-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.wallet-item-body {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.media-card {
    display: grid;
    gap: 12px;
}
.media-thumb,
.media-thumb-fallback {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0.55rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}
.media-thumb { object-fit: cover; }
.media-thumb-fallback {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
}
.media-meta {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.88rem;
}
.media-preview,
.media-preview-video,
.media-preview-frame {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--surface-soft);
}
.media-preview-video,
.media-preview-frame {
    min-height: 320px;
}

.report-filter-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

.list-clean {
    margin: 0;
    padding: 0;
    list-style: none;
}
.list-clean li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.list-clean li:last-child { border-bottom: 0; }

.otp-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.otp-summary > div {
    padding: 14px;
    border-radius: 0.45rem;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}
.otp-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.footer {
    padding: 22px 0 88px;
    color: var(--muted);
    font-size: 0.9rem;
}
.footer .container {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1001;
    display: none;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}
.bottom-nav a {
    flex: 1;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0.55rem;
    padding: 6px 4px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    gap: 3px;
    line-height: 1.05;
    white-space: nowrap;
}
.bottom-nav a.active {
    background: rgba(0, 123, 255, 0.12);
    color: var(--primary);
}
.bottom-nav-icon {
    display: block;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}
.bottom-nav a span:last-child {
    display: block;
    width: 100%;
}

@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .main-sidebar { display: none; }
    .has-sidebar .app-shell { margin-left: 0; }
    .grid-4,
    .grid-3,
    .grid-2,
    .media-grid,
    .otp-summary,
    .report-filter-grid { grid-template-columns: 1fr; }
    .bottom-nav { display: flex; }
    .footer { padding-bottom: 108px; }
    .bottom-nav a {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    .nav-link,
    .nav-user {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 0.86rem;
    }
    .card,
    .hero-card,
    .auth-card,
    .admin-card {
        padding: 18px;
    }
    .app-shell,
    .auth-shell,
    .admin-shell {
        padding-bottom: 110px;
    }
    .stat-row,
    .wallet-item-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .data-table {
        min-width: 620px;
    }
}

.nav-profile-pill {
    gap: 10px;
    padding-inline: 10px 14px;
    flex-wrap: nowrap;
}
.nav-profile-pill.active,
.nav-profile-pill:hover {
    color: var(--text);
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.14);
}
.nav-avatar,
.profile-fab {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.nav-user-copy {
    display: grid;
    gap: 2px;
    text-align: left;
    min-width: 0;
}
.nav-user-copy strong {
    font-size: 0.89rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-user-copy small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-app-hero {
    padding: 22px;
}
.mobile-app-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.profile-fab {
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.profile-fab-static {
    cursor: default;
}
.user-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.user-meta-pill,
.card-surface,
.metric-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 14px 16px;
}
.user-meta-label,
.metric-card-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.wallet-summary-grid {
    align-items: stretch;
}
.wallet-summary-card {
    padding: 18px 20px;
}
.wallet-summary-primary {
    background: linear-gradient(180deg, rgba(0, 123, 255, 0.06), #fff);
}
.wallet-summary-alt {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.08), #fff);
}
.wallet-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.quick-action-grid,
.module-grid,
.app-module-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.quick-action-card,
.module-card,
.app-module-card {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    box-shadow: var(--shadow-sm);
}
.app-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.app-module-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 14px 16px;
}
.quick-action-card:hover,
.module-card:hover,
.app-module-card:hover {
    border-color: rgba(0, 123, 255, 0.2);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}
.quick-action-icon,
.module-icon,
.app-module-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 123, 255, 0.12);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
}
.app-module-content {
    flex: 1;
    min-width: 0;
}
.module-card-static {
    cursor: default;
}
.module-card small,
.quick-action-card small {
    color: var(--muted);
}
.app-module-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.app-module-title {
    font-size: 0.98rem;
    line-height: 1.2;
}
.app-module-subtitle {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}
.app-module-arrow {
    color: var(--muted);
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: auto;
}
.module-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compact-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.compact-section-head .section-title {
    font-size: 1.35rem;
}
.mobile-grid-tight .metric-card .metric {
    margin: 6px 0 0;
    font-size: 1.5rem;
}
.app-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.app-stat-card {
    min-height: 108px;
    padding: 14px 15px;
}
.app-stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.app-stat-value {
    display: block;
    font-size: clamp(1.1rem, 4vw, 1.38rem);
    line-height: 1.2;
    font-weight: 800;
}
.app-stat-card .metric {
    margin: 4px 0 0;
    font-size: clamp(1.05rem, 4vw, 1.5rem);
    line-height: 1.2;
}
.quick-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.quick-action-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 96px;
    padding: 14px;
}
.quick-action-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.quick-action-copy strong {
    font-size: 0.95rem;
    line-height: 1.2;
}
.quick-action-copy small {
    font-size: 0.82rem;
    line-height: 1.35;
}
.activity-feed {
    display: grid;
    gap: 14px;
}
.activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.activity-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--success);
    margin-top: 6px;
}
.activity-copy {
    display: grid;
    gap: 4px;
}
.activity-copy p,
.activity-copy small {
    margin: 0;
    color: var(--muted);
}
.empty-state-card {
    display: grid;
    gap: 10px;
    align-content: start;
}
.empty-state-card h3,
.empty-state-card h2,
.list-panel {
    margin: 0;
}
.list-panel {
    display: grid;
    gap: 12px;
}
.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

@media (min-width: 992px) {
    .layout-user .main-sidebar {
        display: block;
    }
    .layout-user .bottom-nav {
        display: none;
    }
}

@media (max-width: 991px) {
    .nav-profile-pill {
        width: 100%;
        justify-content: flex-start;
        max-width: 100%;
    }
    .quick-action-grid,
    .module-grid,
    .module-grid-compact,
    .user-meta-row,
    .app-module-grid,
    .app-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .compact-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 96px;
        overflow-x: hidden;
    }
    .main-header {
        position: relative;
        top: auto;
    }
    .mobile-app-hero,
    .wallet-summary-card {
        padding: 18px;
    }
    .mobile-app-hero-head {
        flex-direction: row;
    }
    .app-page {
        padding-bottom: 110px;
    }
    .quick-action-grid,
    .module-grid,
    .module-grid-compact,
    .user-meta-row,
    .app-module-grid,
    .app-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .app-module-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .app-module-card {
        min-height: 72px;
        padding: 14px;
    }
    .activity-item,
    .list-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }
    .quick-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .app-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .app-stat-card .metric,
    .app-stat-value {
        font-size: 1.35rem;
    }
    .bottom-nav {
        left: 10px;
        right: 10px;
        gap: 6px;
        padding: 7px;
        min-height: 74px;
    }
    .bottom-nav a {
        min-height: 60px;
        padding: 7px 2px;
        font-size: 0.72rem;
    }
    .bottom-nav-icon {
        width: auto;
        height: auto;
        border-radius: 0;
        display: block;
        background: transparent;
        font-size: 1.05rem;
        font-weight: 400;
        letter-spacing: 0;
    }
    .bottom-nav a.active .bottom-nav-icon {
        background: transparent;
    }
    .nav-links {
        gap: 8px;
    }
    .nav-link-mobile-hide {
        display: none;
    }
    .nav-user,
    .nav-link {
        min-height: 36px;
    }
    .app-user-chip {
        max-width: calc(100% - 92px);
        flex: 1 1 auto;
    }
    .nav-user-copy strong {
        font-size: 0.88rem;
    }
    .nav-user-copy small {
        font-size: 0.7rem;
    }
    .page-title {
        font-size: 1.75rem;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .page-subtitle,
    .section-copy,
    .muted {
        font-size: 0.95rem;
        line-height: 1.45;
    }
    .card {
        margin-bottom: 16px;
    }
}

@media (max-width: 520px) {
    .quick-action-grid,
    .module-grid,
    .module-grid-compact,
    .user-meta-row,
    .app-module-grid,
    .app-stat-grid {
        grid-template-columns: 1fr;
    }
    .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .quick-action-grid,
    .app-stat-grid {
        grid-template-columns: 1fr;
    }
    .container {
        width: min(100% - 20px, 1240px);
    }
}
