:root {
    --gopay-primary: #16705A;
    --gopay-primary-dark: #0f5c4a;
    --gopay-primary-light: #e7f3ef;
    --gopay-primary-soft: #eff8f4;
    --gopay-ink: #111111;
    --gopay-ink-soft: #1a1f1e;
    --gopay-surface: #f7faf9;
    --gopay-surface-2: #ffffff;
    --gopay-border: #d6e5df;
    --gopay-muted: #6b7673;

    --sidebar-width: 260px;
    --primary-color: var(--gopay-primary);
    --dark-bg: var(--gopay-ink);
    --light-bg: var(--gopay-surface);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 10px rgba(12, 24, 20, 0.06);
    --shadow-md: 0 8px 24px rgba(12, 24, 20, 0.08);
}

body {
    background-color: var(--gopay-surface);
    color: #1c2422;
    letter-spacing: 0.01em;
    font-family: "Manrope", "Segoe UI", sans-serif;
}

#sidebar {
    background: linear-gradient(180deg, #0d0f0f 0%, #111514 100%);
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.25);
    padding: 14px 10px 18px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(22, 112, 90, 0.28);
    border-radius: 14px;
    padding: 10px 12px 14px;
}

.sidebar-header a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    text-align: center;
}

#sidebar ul.components {
    border-bottom: 1px solid rgba(22, 112, 90, 0.35);
    margin-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 12px;
    flex: 1 1 auto;
}

#sidebar ul li {
    margin-bottom: 6px;
}

#sidebar ul li a {
    color: #c3c9c8;
    border-left: 4px solid transparent;
    border-radius: 0 12px 12px 0;
    margin-right: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 1.08rem;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.2s ease;
}

#sidebar ul li a:hover,
#sidebar ul li.active > a {
    color: #fff;
    background: linear-gradient(90deg, rgba(22, 112, 90, 0.25), rgba(22, 112, 90, 0.08));
    border-left: 4px solid var(--gopay-primary);
}

#sidebar ul li a i {
    opacity: 0.9;
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.dashboard-logo {
    width: 82px;
    height: 82px;
    object-fit: contain;
    margin: 0 auto 10px;
    filter: drop-shadow(0 6px 16px rgba(22, 112, 90, 0.25));
}

.sidebar-header h3 {
    letter-spacing: 0.02em;
    color: #ecf4f1;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

#sidebar .CTAs {
    margin-top: auto !important;
}

.navbar {
    border: 1px solid var(--gopay-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 10px;
    z-index: 1035;
    overflow: visible;
    isolation: isolate;
    margin-bottom: 16px;
}

#content {
    position: relative;
    z-index: 1;
}

#content .container-fluid,
#content .navbar .container-fluid {
    overflow: visible;
}

.notification-badge,
#content .navbar .dropdown {
    position: relative;
}

#content .navbar .dropdown-menu,
.notification-dropdown {
    z-index: 2050;
}

#sidebar a.text-danger {
    color: #ff5d6d !important;
}

.card {
    border: 1px solid rgba(17, 17, 17, 0.05);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--gopay-surface-2);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.table {
    --bs-table-hover-bg: #f5faf8;
}

.table thead th {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #50605b;
    border-bottom-width: 1px;
    border-color: #e4efeb;
}

.table td,
.table th {
    vertical-align: middle;
    border-color: #edf3f1;
}

.btn-primary {
    --bs-btn-bg: var(--gopay-primary);
    --bs-btn-border-color: var(--gopay-primary);
    --bs-btn-hover-bg: var(--gopay-primary-dark);
    --bs-btn-hover-border-color: var(--gopay-primary-dark);
    --bs-btn-active-bg: var(--gopay-primary-dark);
    --bs-btn-active-border-color: var(--gopay-primary-dark);
    --bs-btn-disabled-bg: var(--gopay-primary);
    --bs-btn-disabled-border-color: var(--gopay-primary);
    --bs-btn-focus-shadow-rgb: 22, 112, 90;
    font-weight: 600;
}

.btn-outline-primary {
    --bs-btn-color: var(--gopay-primary);
    --bs-btn-border-color: var(--gopay-primary);
    --bs-btn-hover-bg: var(--gopay-primary);
    --bs-btn-hover-border-color: var(--gopay-primary);
    --bs-btn-active-bg: var(--gopay-primary-dark);
    --bs-btn-active-border-color: var(--gopay-primary-dark);
    --bs-btn-focus-shadow-rgb: 22, 112, 90;
    font-weight: 600;
}

.btn {
    border-radius: 10px;
}

.btn-info {
    --bs-btn-bg: #1f8f7d;
    --bs-btn-border-color: #1f8f7d;
    --bs-btn-hover-bg: #177566;
    --bs-btn-hover-border-color: #177566;
    --bs-btn-active-bg: #14675a;
    --bs-btn-active-border-color: #14675a;
    --bs-btn-focus-shadow-rgb: 31, 143, 125;
}

.btn-secondary {
    --bs-btn-bg: #5d6b67;
    --bs-btn-border-color: #5d6b67;
    --bs-btn-hover-bg: #4d5956;
    --bs-btn-hover-border-color: #4d5956;
    --bs-btn-active-bg: #434d4a;
    --bs-btn-active-border-color: #434d4a;
}

.btn-warning {
    --bs-btn-bg: #f0b429;
    --bs-btn-border-color: #f0b429;
    --bs-btn-hover-bg: #df9f11;
    --bs-btn-hover-border-color: #df9f11;
    --bs-btn-active-bg: #cd910d;
    --bs-btn-active-border-color: #cd910d;
}

.btn-sm {
    border-radius: 8px;
}

.text-primary {
    color: var(--gopay-primary) !important;
}

.bg-primary {
    background-color: var(--gopay-primary) !important;
}

.border-primary {
    border-color: var(--gopay-primary) !important;
}

.bg-primary-subtle {
    background-color: var(--gopay-primary-light) !important;
}

.badge {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.4em 0.65em;
}

.badge.bg-secondary {
    background-color: #5f6d69 !important;
}

.badge.bg-info {
    background-color: #1f8f7d !important;
}

.badge.bg-warning {
    color: #2c2c2c !important;
}

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

.form-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #4d5a56;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: #d9e7e2;
}

.form-control::placeholder {
    color: #94a39e;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(22, 112, 90, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(22, 112, 90, 0.15);
}

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid #deebe6;
    box-shadow: 0 10px 24px rgba(12, 24, 20, 0.12);
}

.dropdown-item {
    border-radius: 8px;
}

.dropdown-item:hover {
    background-color: var(--gopay-primary-soft);
    color: #1a3931;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
}

.page-link {
    color: var(--gopay-primary);
    border-radius: 8px;
    margin: 0 2px;
}

.page-link:hover {
    color: var(--gopay-primary-dark);
    background-color: var(--gopay-primary-soft);
}

.page-item.active .page-link {
    background-color: var(--gopay-primary);
    border-color: var(--gopay-primary);
}

.notification-badge .badge {
    background: var(--gopay-primary);
}

.notification-badge .badge.pulse {
    animation: gopayPulse 2s infinite;
}

@keyframes gopayPulse {
    0% { box-shadow: 0 0 0 0 rgba(22, 112, 90, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(22, 112, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 112, 90, 0); }
}

.notification-item.unread {
    background: var(--gopay-primary-light);
}

.notification-dropdown-header {
    border-bottom: 2px solid var(--gopay-border);
}

.notification-dropdown-footer a {
    color: var(--gopay-primary);
}

.nav-tabs {
    border-bottom: 1px solid #dce9e4;
}

.nav-tabs .nav-link {
    border: none;
    color: #5f6e69;
    border-bottom: 2px solid transparent;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    color: var(--gopay-primary);
    background-color: var(--gopay-primary-soft);
}

.nav-tabs .nav-link.active {
    color: var(--gopay-primary);
    background: #ffffff;
    border-bottom: 2px solid var(--gopay-primary);
}

.list-group-item {
    border-color: #e5efeb;
}

.list-group-item.list-group-item-action:hover {
    background-color: #f7fbf9;
}

.progress {
    background-color: #e8f0ed;
    border-radius: 999px;
}

.progress-thin {
    height: 4px;
}

.progress-bar {
    border-radius: 999px;
}

.empty-state {
    padding: 20px;
    text-align: center;
    color: var(--gopay-muted);
}

.chart-box {
    height: 300px;
}

.chart-empty {
    height: 300px;
}

.metric-value-md {
    font-size: 1rem;
}

.metric-value-lg {
    font-size: 1.5rem;
}

.metric-value-xl {
    font-size: 2rem;
}

.w-40 {
    width: 40%;
}

.col-logo {
    width: 60px;
}

.inline-form {
    display: inline-block;
}

.notification-mark-read-btn {
    font-size: 11px;
}

.logo-thumb {
    max-height: 40px;
    max-width: 60px;
}

.logo-thumb-sm {
    max-height: 35px;
    max-width: 50px;
}

.logo-thumb-lg {
    max-height: 80px;
}

.logo-thumb-xl {
    max-height: 80px;
    max-width: 120px;
}

.logo-placeholder {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    background: linear-gradient(180deg, #f4faf7 0%, #ecf5f1 100%);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 34px;
    border-radius: 18px;
    border: 1px solid rgba(17, 17, 17, 0.06);
    background: var(--gopay-surface-2);
    box-shadow: 0 16px 34px rgba(12, 24, 20, 0.12);
}

.auth-brand {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--gopay-primary);
}

.otp-hint {
    background: #ecf6f2;
    border-left: 4px solid var(--gopay-primary);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--gopay-primary-dark);
}

.avatar-34 {
    width: 34px;
    height: 34px;
    font-size: 0.75rem;
}

.avatar-64 {
    width: 64px;
    height: 64px;
    font-size: 1.3rem;
}

.avatar-80 {
    width: 80px;
    height: 80px;
    font-size: 1.6rem;
}

.alert {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------------------
   Wallet / Reversal dashboard enhancements
   ------------------------------------------------------------------------- */

.wallet-hero-card {
    background: linear-gradient(135deg, var(--gopay-primary) 0%, #149579 60%, #21ad8f 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.wallet-hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 55%);
    opacity: 0.35;
    pointer-events: none;
}

.wallet-hero-card .hero-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    opacity: 0.75;
}

.wallet-hero-card .hero-balance {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.wallet-hero-card .hero-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

.hero-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-progress {
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-side-panel {
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 22px;
    display: grid;
    gap: 18px;
}

.hero-side-panel .side-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-side-panel .side-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
}

.hero-side-panel .side-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-side-panel .side-meta {
    font-size: 0.78rem;
    opacity: 0.75;
}

.gopay-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.gopay-metric-card {
    background: var(--gopay-surface-2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(17, 17, 17, 0.05);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 8px;
}

.gopay-metric-card .metric-icon {
    font-size: 1.35rem;
}

.gopay-metric-card .metric-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gopay-muted);
}

.gopay-metric-card .metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gopay-ink);
}

.gopay-metric-card .metric-meta {
    font-size: 0.78rem;
    color: var(--gopay-muted);
}

.reversal-action-card {
    border: 1px solid rgba(22, 112, 90, 0.1);
}

.reversal-action-card .action-hints {
    line-height: 1.4;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--gopay-primary-soft);
    color: var(--gopay-primary);
}

.status-pill .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.status-pill.success {
    background: rgba(38, 179, 144, 0.15);
    color: #1f7d63;
}

.status-pill.pending {
    background: rgba(240, 180, 41, 0.15);
    color: #c7890d;
}

.status-pill.failed {
    background: rgba(219, 68, 55, 0.12);
    color: #b12f25;
}

.reason-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(17, 17, 17, 0.06);
    color: #2c3835;
}

.reason-pill.auto {
    background: rgba(33, 173, 143, 0.18);
    color: #11715d;
}

.table-warning-soft {
    background: rgba(240, 180, 41, 0.08) !important;
}

.wallet-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
}

.wallet-stat-card {
    background: var(--gopay-surface-2);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 1px solid rgba(17, 17, 17, 0.05);
    box-shadow: var(--shadow-sm);
}

.wallet-stat-card .value {
    font-size: 1.4rem;
    font-weight: 700;
}

.wallet-card-detail {
    display: grid;
    gap: 12px;
}

.wallet-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    font-size: 0.83rem;
    color: var(--gopay-muted);
}

.threshold-progress-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gopay-primary-soft);
    color: var(--gopay-primary);
    font-size: 0.78rem;
    font-weight: 600;
}

.progress.progress-thin .progress-bar {
    transition: width 0.35s ease;
}

.recent-reversal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.recent-reversal-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    background: var(--gopay-surface);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.recent-reversal-list li .amount {
    font-weight: 700;
    color: var(--gopay-primary);
}

.config-form-card .form-text {
    font-size: 0.78rem;
    color: var(--gopay-muted);
}

.config-form-card .input-group-text {
    background: var(--gopay-primary-soft);
    color: var(--gopay-primary);
    font-weight: 600;
}

@media (max-width: 991px) {
    .navbar {
        margin-bottom: 18px;
    }

    #content {
        padding: 14px;
    }

    #sidebar {
        z-index: 1060;
    }
}
