@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mr-navy: #0f172a;
    --mr-primary: #059669;
    --mr-primary-light: #10b981;
    --mr-primary-dark: #047857;
    --mr-teal: #11c4d1;
    --mr-indigo: #059669;
    --mr-purple: #10b981;
    --mr-green-soft: #ecfdf5;
    --mr-green-border: #a7f3d0;
    --mr-green-text: #065f46;
    --mr-bg: #f1f5f9;
    --mr-surface: #ffffff;
    --mr-border: #e2e8f0;
    --mr-text: #1e293b;
    --mr-muted: #64748b;
    --mr-radius: 14px;
    --mr-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    --mr-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --bs-primary: #059669;
    --bs-primary-rgb: 5, 150, 105;
    --bs-link-color: #059669;
    --bs-link-hover-color: #047857;
}

.btn-primary {
    --bs-btn-bg: var(--mr-primary);
    --bs-btn-border-color: var(--mr-primary);
    --bs-btn-hover-bg: var(--mr-primary-dark);
    --bs-btn-hover-border-color: var(--mr-primary-dark);
    --bs-btn-active-bg: var(--mr-primary-dark);
    --bs-btn-active-border-color: var(--mr-primary-dark);
    --bs-btn-disabled-bg: var(--mr-primary);
    --bs-btn-disabled-border-color: var(--mr-primary);
    background: linear-gradient(135deg, var(--mr-primary), var(--mr-primary-light));
    border: none;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, var(--mr-primary-dark), var(--mr-primary)) !important;
    border-color: var(--mr-primary-dark) !important;
}

.btn-outline-primary {
    --bs-btn-color: var(--mr-primary);
    --bs-btn-border-color: var(--mr-primary);
    --bs-btn-hover-bg: var(--mr-primary);
    --bs-btn-hover-border-color: var(--mr-primary);
    --bs-btn-active-bg: var(--mr-primary-dark);
    --bs-btn-active-border-color: var(--mr-primary-dark);
}

.text-primary,
.text-indigo { color: var(--mr-primary) !important; }
.border-primary { border-color: var(--mr-primary) !important; }
.bg-primary { background-color: var(--mr-primary) !important; }
.progress-bar { background: linear-gradient(90deg, var(--mr-primary), var(--mr-teal)) !important; }

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--mr-text);
    -webkit-font-smoothing: antialiased;
}

body.app-body {
    background: var(--mr-bg);
    min-height: 100vh;
}

body.auth-body {
    background: linear-gradient(135deg, #047857 0%, var(--mr-primary) 45%, var(--mr-teal) 100%);
    min-height: 100vh;
}

/* ── Flash Alerts ── */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.app-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: none;
    border-radius: var(--mr-radius);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--mr-shadow);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.app-alert-icon { font-size: 1.1rem; margin-top: 0.1rem; flex-shrink: 0; }
.app-alert-body { flex: 1; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #e0f2fe; color: #075985; }

/* ── Cards & Stats ── */
.card {
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    box-shadow: var(--mr-shadow);
}

.stat-card {
    border: none;
    border-radius: var(--mr-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mr-shadow-lg);
}

.stat-card .card-body { padding: 1.25rem 1.5rem; }
.stat-card h5 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; margin-bottom: 0.5rem; }
.stat-card h2 { font-size: 1.85rem; font-weight: 700; margin: 0; }

.stat-indigo { background: linear-gradient(135deg, var(--mr-primary-dark), var(--mr-primary-light)); color: #fff; }
.stat-emerald { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.stat-sky { background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff; }
.stat-amber { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.stat-rose { background: linear-gradient(135deg, #e11d48, #fb7185); color: #fff; }
.stat-slate { background: linear-gradient(135deg, #334155, #64748b); color: #fff; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1, .page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--mr-navy);
}

.page-header .subtitle { color: var(--mr-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mr-navy);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--mr-green-soft);
    color: var(--mr-green-text);
    border: 1px solid var(--mr-green-border);
    border-radius: var(--mr-radius);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Super Admin Shell ── */
#wrapper { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #064e3b 0%, var(--mr-navy) 55%, #1e293b 100%);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.app-sidebar.collapsed { width: var(--sidebar-collapsed); }
.app-sidebar.collapsed .sidebar-text,
.app-sidebar.collapsed .nav-header,
.app-sidebar.collapsed .sidebar-brand span { display: none; }

.app-sidebar .sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 700;
    font-size: 1.15rem;
}

.app-sidebar .sidebar-brand span { color: #6ee7b7; }

.app-sidebar .nav-header {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 1rem 1rem 0.35rem;
}

.app-sidebar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.7rem 1rem;
    margin: 2px 0.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

.app-sidebar .nav-link.active {
    background: rgba(16, 185, 129, 0.28);
    color: #fff !important;
    border-left: 3px solid #34d399;
    padding-left: calc(1rem - 3px);
}

.app-sidebar .nav-link i { width: 18px; text-align: center; }

#main-content {
    flex: 1;
    min-width: 0;
    background: var(--mr-bg);
}

.app-topbar {
    background: var(--mr-surface);
    border-bottom: 1px solid var(--mr-border);
    padding: 0.85rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.app-main-panel {
    padding: 1.5rem;
}

.app-content-card {
    background: var(--mr-surface);
    border-radius: var(--mr-radius);
    box-shadow: var(--mr-shadow);
    padding: 1.5rem 1.75rem;
    border: 1px solid var(--mr-border);
}

/* ── Legacy dashboard layout ── */
body.legacy-dashboard {
    background: linear-gradient(135deg, rgba(4,120,87,0.82), rgba(5,150,105,0.78), rgba(17,196,209,0.72)),
                url('../../images/bg-background.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
}

.content-box {
    background: rgba(255,255,255,0.98);
    border-radius: var(--mr-radius);
    box-shadow: var(--mr-shadow-lg);
}

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--mr-shadow-lg) !important;
}

.auth-card {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}

/* ── Auth pages (login / registration) ── */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-brand-panel {
    flex: 0 0 42%;
    max-width: 520px;
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: rgba(4, 120, 87, 0.28);
    backdrop-filter: blur(8px);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.auth-logo-text {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-logo-text span { color: #6ee7b7; }

.auth-tagline {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
    margin-bottom: 2rem;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.9);
}

.auth-features i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.auth-brand-footer { color: rgba(255,255,255,0.55); }

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 460px;
}

.auth-form-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.auth-back-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-back-link:hover { color: #fff; }

.auth-step-badge {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.auth-card-panel {
    background: var(--mr-surface);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.15);
    overflow: hidden;
}

.auth-card-header {
    padding: 2rem 2rem 0.5rem;
}

.auth-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.auth-variant-client .auth-card-icon { background: var(--mr-green-soft); color: var(--mr-primary); }
.auth-variant-admin .auth-card-icon { background: #fef3c7; color: #d97706; }
.auth-variant-success .auth-card-icon { background: #d1fae5; color: #059669; }

.auth-card-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--mr-navy);
    margin: 0 0 0.35rem;
}

.auth-subtitle {
    color: var(--mr-muted);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}

.auth-card-body { padding: 1.25rem 2rem 2rem; }

.auth-card-body .form-control:focus,
.auth-card-body .form-select:focus {
    border-color: var(--mr-primary);
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.15);
}

.auth-powered {
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
}

.auth-powered strong { color: rgba(255,255,255,0.85); }

.auth-otp-input {
    font-size: 1.75rem !important;
    letter-spacing: 0.35em;
    text-align: center;
    font-weight: 700;
    padding: 0.85rem 1rem !important;
}

.auth-links-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.auth-links-row a { text-decoration: none; }

.auth-role-hint {
    text-align: center;
    font-size: 0.78rem;
    color: var(--mr-muted);
    margin-top: 1.25rem;
}

.auth-success-icon {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 0.5rem;
}

/* ── Public landing page ── */
.landing-page {
    --landing-green: var(--mr-primary);
    --landing-green-light: var(--mr-primary-light);
    --landing-teal: var(--mr-teal);
}

.landing-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.landing-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--mr-navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.landing-brand span {
    background: linear-gradient(90deg, var(--landing-green), var(--landing-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav .nav-link:hover,
.landing-nav .nav-link:focus { color: var(--landing-green) !important; }

.landing-btn-primary {
    background: linear-gradient(135deg, var(--landing-green), var(--landing-green-light));
    border: none;
    color: #fff;
    font-weight: 600;
}

.landing-btn-primary:hover {
    background: linear-gradient(135deg, #047857, var(--landing-green));
    color: #fff;
}

.landing-btn-outline {
    border: 2px solid var(--landing-green);
    color: var(--landing-green);
    font-weight: 600;
    background: transparent;
}

.landing-btn-outline:hover {
    background: var(--landing-green);
    border-color: var(--landing-green);
    color: #fff;
}

.landing-hero {
    position: relative;
    background-image: url('../../images/bg-background.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    padding: 7rem 0 5rem;
    margin-top: 56px;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(11, 214, 136, 0.92) 0%,
        rgba(5, 150, 105, 0.88) 45%,
        rgba(17, 196, 209, 0.85) 100%);
    z-index: 0;
}

.landing-hero .container { position: relative; z-index: 1; }

.landing-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.landing-hero-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--landing-green) !important;
    font-weight: 600;
}

.landing-hero-image {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border: 4px solid rgba(255, 255, 255, 0.35);
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.landing-section-green {
    background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
}

.landing-card {
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.landing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--mr-shadow-lg);
}

.landing-logo-grid img {
    max-width: 110px;
    border-radius: 10px;
    transition: transform 0.25s ease;
}

.landing-logo-grid img:hover { transform: scale(1.05); }

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

    .auth-brand-panel {
        flex: none;
        max-width: none;
        padding: 1.5rem 1.25rem 1.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .auth-tagline { margin-bottom: 1rem; font-size: 0.95rem; }
    .auth-features { display: none; }
    .auth-form-panel { padding: 1.5rem 1rem 2rem; }
    .auth-card-header, .auth-card-body { padding-left: 1.5rem; padding-right: 1.5rem; }
}

.app-footer {
    background: var(--mr-navy);
    color: rgba(255,255,255,0.75);
    padding: 1.25rem 2rem;
    font-size: 0.8rem;
}

.btn { border-radius: 10px; font-weight: 500; }
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--mr-border);
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 991px) {
    .app-sidebar { display: none !important; }
    .app-main-panel { padding: 1rem; }
}

/* ── Shop admin dashboard ── */
.toolbar-card {
    background: var(--mr-surface);
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.clients-panel {
    transition: opacity 0.25s ease;
}

.clients-panel.loading {
    opacity: 0.5;
    pointer-events: none;
}

.clients-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--mr-border);
    font-size: 0.72rem;
    white-space: nowrap;
}

.clients-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.clients-table thead th.sortable:hover {
    background: #f1f5f9;
}

.clients-table .sort-icon {
    font-size: 0.65rem;
    margin-left: 0.25rem;
}

.tier-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tier-bronze { background: #fef3c7; color: #92400e; }
.tier-silver { background: #f1f5f9; color: #475569; }
.tier-gold   { background: #fef9c3; color: #a16207; }

.stat-card small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Client details ── */
.client-profile-card {
    background: linear-gradient(160deg, #064e3b 0%, #065f46 55%, #047857 100%);
    color: #fff;
    border: none;
    overflow: hidden;
}

.client-profile-card .profile-header {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
    background: rgba(255,255,255,0.04);
}

.client-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin-bottom: 1rem;
    border: 3px solid rgba(255,255,255,0.15);
}

.client-profile-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.client-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.client-meta-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--mr-border);
    font-size: 0.875rem;
}

.client-meta-list li:last-child { border-bottom: none; }

.client-meta-list i {
    color: var(--mr-muted);
    width: 16px;
    margin-top: 0.15rem;
}

.client-balance-box {
    background: linear-gradient(135deg, #059669, #34d399);
    color: #fff;
    border-radius: var(--mr-radius);
    padding: 1.25rem;
    text-align: center;
}

.client-balance-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.client-balance-box .amount {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.tier-progress-card .progress {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
}

.tier-progress-card .progress-bar {
    border-radius: 999px;
    font-size: 0;
}

.action-card {
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.action-card:hover {
    box-shadow: var(--mr-shadow-lg);
    transform: translateY(-2px);
}

.action-card .action-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-card.action-spend .action-header { background: #ecfdf5; color: #065f46; }
.action-card.action-redeem .action-header { background: #eff6ff; color: #1e40af; }

.action-card .action-body { padding: 1.25rem; }

/* ── Add client form ── */
.form-page {
    max-width: 820px;
    margin: 0 auto;
}

.form-card {
    background: var(--mr-surface);
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 1.75rem 2rem;
    box-shadow: var(--mr-shadow);
}

.form-card .form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mr-muted);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mr-border);
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .form-control {
    padding-left: 2.5rem;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mr-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.form-hint-card {
    background: #f8fafc;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 1.25rem;
}

.form-hint-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--mr-navy);
    margin-bottom: 0.75rem;
}

.form-hint-card ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.82rem;
    color: var(--mr-muted);
}

.form-hint-card li { margin-bottom: 0.35rem; }

/* ── Reports ── */
.report-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f8fafc;
    border: 1px dashed var(--mr-border);
    border-radius: var(--mr-radius);
    color: var(--mr-muted);
}

.report-empty i {
    font-size: 2.5rem;
    opacity: 0.35;
    margin-bottom: 1rem;
    display: block;
}

.report-summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    margin-bottom: 1.25rem;
}

.report-summary-bar .item {
    flex: 1;
    min-width: 140px;
}

.report-summary-bar .item .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mr-muted);
    font-weight: 600;
}

.report-summary-bar .item .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mr-navy);
}

.quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quick-picks .btn {
    font-size: 0.82rem;
}

/* ── Client portal ── */
.client-portal { background: var(--mr-bg); }

.client-topbar {
    background: var(--mr-surface);
    border-bottom: 1px solid var(--mr-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.client-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.client-brand .brand-link {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--mr-navy);
    text-decoration: none;
    white-space: nowrap;
}

.client-brand .brand-link span { color: var(--mr-indigo); }

.client-brand .brand-divider {
    width: 1px;
    height: 20px;
    background: var(--mr-border);
}

.client-brand .brand-page {
    color: var(--mr-muted);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-avatar-btn {
    display: flex;
    align-items: center;
    border: 1px solid var(--mr-border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    background: #fff;
}

.client-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mr-primary), var(--mr-teal));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.client-main { padding: 1.5rem; }

.client-main-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.client-hero {
    background: linear-gradient(135deg, #064e3b 0%, var(--mr-primary) 55%, var(--mr-teal) 100%);
    color: #fff;
    border-radius: var(--mr-radius);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.client-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.client-hero .hero-sub {
    opacity: 0.85;
    font-size: 0.9rem;
    margin: 0;
}

.client-hero-balance {
    text-align: right;
}

.client-hero-balance .label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.client-hero-balance .amount {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-accepted { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-pending  { background: #fef3c7; color: #92400e; }

.pending-card {
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: var(--mr-radius);
}

.pending-card .card-header {
    background: transparent;
    border-bottom: 1px solid #fde68a;
    font-weight: 600;
    color: #92400e;
}

/* ── Super admin audit & reports ── */
.shop-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.shop-pill {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--mr-muted);
    background: #f1f5f9;
    border: 1px solid var(--mr-border);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.shop-pill:hover {
    background: #e2e8f0;
    color: var(--mr-navy);
}

.shop-pill.active {
    background: linear-gradient(135deg, var(--mr-primary), var(--mr-primary-light));
    color: #fff;
    border-color: var(--mr-primary);
}

.shop-section-card .card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--mr-border);
    font-weight: 600;
}

.shop-section-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.75rem 0 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--mr-border);
}

.shop-section-stats .item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mr-muted);
}

.shop-section-stats .item .value {
    font-weight: 700;
    color: var(--mr-navy);
}

/* ── Report viewer portal ── */
.report-portal-card {
    border: 1px solid var(--mr-border);
    border-radius: var(--mr-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--mr-surface);
}

.report-portal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mr-shadow-lg);
}

.report-portal-card .icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.report-portal-card.daily .icon-wrap { background: var(--mr-green-soft); color: var(--mr-primary); }
.report-portal-card.monthly .icon-wrap { background: #ecfdf5; color: #059669; }

.report-portal-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.88rem;
    color: var(--mr-muted);
}

.report-portal-stats span strong {
    color: var(--mr-navy);
    font-weight: 700;
}

.report-shop-overview thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.report-share-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--mr-green-soft);
    color: var(--mr-primary);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.report-search-wrap {
    position: relative;
    min-width: 220px;
}

.report-search-wrap i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mr-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.report-search-wrap .form-control {
    padding-left: 2rem;
    border-radius: 999px;
}

.report-shop-accordion .accordion-button {
    font-size: 0.95rem;
    background: #f8fafc;
    box-shadow: none;
}

.report-shop-accordion .accordion-button:not(.collapsed) {
    background: var(--mr-green-soft);
    color: var(--mr-navy);
}

.report-accordion-meta {
    font-size: 0.82rem;
    color: var(--mr-muted);
    font-weight: 500;
}

.report-shop-accordion .accordion-item {
    border-radius: var(--mr-radius) !important;
    overflow: hidden;
}

@media (max-width: 767px) {
    .page-header h1, .page-header h2 { font-size: 1.3rem; }
    .stat-card h2 { font-size: 1.5rem; }
    .form-card { padding: 1.25rem; }
    .client-main { padding: 1rem; }
    .client-hero { padding: 1.25rem; }
    .client-hero-balance { text-align: left; width: 100%; }
    .client-brand .brand-page { display: none; }
}