/* Point Saving — tema bersih terang, aksen hijau tosca */

:root {
    --teal-900: #0A4842;
    --teal-800: #0C5D55;
    --teal-700: #0E7C72;
    --teal-600: #0F9E8E;
    --teal-500: #17B8A6;
    --green-500: #22C55E;
    --mint-100: #E6F7F3;
    --mint-50: #F4FBF9;
    --ink: #0F2E2B;
    --muted: #5C7D79;
    --line: #DCEDE9;
    --card: #FFFFFF;
    --amber: #C2820B;
    --amber-bg: #FEF5E3;
    --red: #C81E4B;
    --red-bg: #FEECF1;
    --radius: 16px;
    --radius-sm: 11px;
    --shadow: 0 10px 30px rgba(10, 72, 66, .07);
    --shadow-sm: 0 2px 10px rgba(10, 72, 66, .05);
    --grad: linear-gradient(135deg, #0F9E8E 0%, #22C55E 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #F4FBF9;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.5;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { color: var(--teal-900); }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(15, 158, 142, .22); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 22px rgba(15, 158, 142, .3); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--teal-800); }
.btn-ghost:hover { background: var(--mint-50); }
.btn-soft { background: var(--mint-100); color: var(--teal-800); }
.btn-soft:hover { background: #d9f2ec; color: var(--teal-900); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: #f8d3df; }
.btn-danger:hover { background: #fcdde7; color: var(--red); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- Brand ---------------- */
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--grad); color: #fff;
    display: grid; place-items: center;
    font-weight: 800; letter-spacing: .04em; font-size: 15px;
    box-shadow: 0 6px 16px rgba(15, 158, 142, .25);
    flex: 0 0 auto;
}
.brand-mark-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15.5px; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: 11.5px; }

/* ---------------- Public layout ---------------- */
.public-body { background:
    radial-gradient(900px 500px at 12% -10%, #dcf5ef 0%, rgba(220,245,239,0) 60%),
    radial-gradient(700px 460px at 92% 4%, #e8f8e9 0%, rgba(232,248,233,0) 62%),
    #F4FBF9; }

.public-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 24px;
}
.public-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; color: var(--muted); }
.public-links a { color: var(--muted); }
.public-links a.active, .public-links a:hover { color: var(--teal-800); }
.public-actions { display: flex; gap: 10px; }

.hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: 28px 24px 8px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 44px;
    align-items: center;
}
.hero h1 { font-size: clamp(30px, 4.3vw, 48px); letter-spacing: -.03em; }
.hero h1 .accent {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin-top: 18px; font-size: 16.5px; color: var(--muted); max-width: 52ch; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 22px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); }

.hero-card {
    background: rgba(255, 255, 255, .82);
    border: 1px solid #e6f2ee;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(10, 72, 66, .12);
    padding: 22px;
    backdrop-filter: blur(12px) saturate(160%);
}
.hero-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hero-card-title { font-weight: 700; font-size: 14px; }
.hero-balance { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.hero-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.hero-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.hero-steps li {
    display: flex; align-items: center; gap: 10px;
    background: var(--mint-50);
    border: 1px solid #e4f4f0;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 13.5px;
}
.hero-steps .num {
    width: 24px; height: 24px; border-radius: 8px; background: #fff; color: var(--teal-700);
    display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid #d8eeea;
    flex: 0 0 auto;
}

.section { max-width: 1160px; margin: 0 auto; padding: 56px 24px 8px; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(23px, 2.6vw, 32px); letter-spacing: -.02em; }
.section-head p { margin-top: 10px; color: var(--muted); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-600); }

.grid { display: grid; gap: 20px; }
.grid > *, .stat-grid > *, .two-col > *, .two-col-even > *, .label-grid > * { min-width: 0; }
.card { min-width: 0; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.feature-card {
    background: var(--card);
    border: 1px solid #e5f2ee;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.feature-card h3 { font-size: 16px; margin: 14px 0 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }
.icon-badge {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--mint-100); color: var(--teal-700);
    display: grid; place-items: center;
}

.stats-strip {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid #e5f2ee;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.stats-strip .value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stats-strip .label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.market-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.market-badge {
    padding: 8px 14px; border-radius: 999px; background: #fff;
    border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--teal-800);
}

.public-footer {
    max-width: 1160px;
    margin: 64px auto 0;
    padding: 26px 24px 40px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: 13px; color: var(--muted);
}
.public-footer > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------- Auth ---------------- */
.auth-wrap { max-width: 460px; margin: 36px auto 72px; padding: 0 20px; }
.auth-card {
    background: var(--card);
    border: 1px solid #e5f2ee;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 18px 44px rgba(10, 72, 66, .09);
}
.auth-card h1 { font-size: 24px; }
.auth-card .sub { color: var(--muted); margin-top: 8px; font-size: 14px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }

.role-tabs { display: flex; gap: 8px; background: var(--mint-50); border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin: 20px 0 6px; }
.role-tabs a {
    flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.role-tabs a.active { background: #fff; color: var(--teal-800); box-shadow: var(--shadow-sm); }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; gap: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: #295C57; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="tel"], input[type="search"], select, textarea {
    font: inherit;
    padding: 11px 13px;
    border: 1px solid #d9ebe7;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .16);
}
textarea { min-height: 84px; resize: vertical; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline > span { white-space: nowrap; }
.field.inline select { width: auto; padding: 8px 12px; font-size: 13.5px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-error { background: var(--red-bg); color: var(--red); border: 1px solid #f8d3df; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; }
.form-note { background: var(--mint-50); border: 1px dashed #cfeae4; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; color: #2c615b; }

/* ---------------- App shell ---------------- */
.app-body { background: #F4FBF9; }
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 252px;
    flex: 0 0 252px;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar .brand { padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 13px;
    border-radius: 12px;
    color: #3C625E;
    font-size: 14px;
    font-weight: 500;
}
.side-link:hover { background: var(--mint-50); color: var(--teal-900); }
.side-link.active { background: var(--mint-100); color: var(--teal-900); font-weight: 700; }
.side-link .ico { width: 18px; height: 18px; }
.side-card {
    margin-top: auto;
    background: linear-gradient(160deg, #EAF8F4, #F6FCFA);
    border: 1px solid #d8eeea;
    border-radius: 14px;
    padding: 16px;
}
.side-card-title { font-weight: 700; font-size: 13.5px; margin-top: 10px; }
.side-card-text { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.side-logout {
    font-size: 13.5px; font-weight: 600; color: var(--muted);
    padding: 9px 13px; border-radius: 10px;
}
.side-logout:hover { background: var(--red-bg); color: var(--red); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    padding: 22px 30px;
    background: rgba(255, 255, 255, .72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 21px; letter-spacing: -.02em; }
.topbar-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--mint-100); color: var(--teal-800);
    display: grid; place-items: center; font-weight: 700; font-size: 13px;
    border: 1px solid #d5ece7;
}
.topbar-id { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-id strong { font-size: 13.5px; }
.topbar-id small { color: var(--muted); font-size: 11.5px; }

.content { padding: 26px 30px 52px; display: flex; flex-direction: column; gap: 22px; }

/* ---------------- Cards & stats ---------------- */
.card {
    background: var(--card);
    border: 1px solid #e5f2ee;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card {
    background: var(--card);
    border: 1px solid #e5f2ee;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute; right: -28px; top: -28px;
    width: 88px; height: 88px; border-radius: 50%;
    background: radial-gradient(circle, rgba(23,184,166,.13), rgba(23,184,166,0) 70%);
}
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.stat-note { font-size: 12px; color: var(--muted); }
.stat-card.accent { background: linear-gradient(150deg, #0F9E8E, #14B8A6 55%, #22C55E); border-color: transparent; color: #fff; }
.stat-card.accent .stat-label, .stat-card.accent .stat-note { color: rgba(255, 255, 255, .82); }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.two-col-even { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
    text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data td { padding: 13px 12px; border-bottom: 1px solid #eef7f4; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fafefd; }
table.data .num { text-align: right; white-space: nowrap; }
table.data .strong { font-weight: 700; }
table.data .sub { color: var(--muted); font-size: 12px; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
    background: var(--mint-100); color: var(--teal-800);
    white-space: nowrap;
}
.pill-soft { background: #EFF8F6; color: var(--teal-700); }
.pill-green { background: #E7F8EC; color: #14803E; }
.pill-amber { background: var(--amber-bg); color: var(--amber); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-grey { background: #F1F5F4; color: var(--muted); }

/* ---------------- Flash, empty, misc ---------------- */
.flash { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; border: 1px solid transparent; }
.flash-success { background: #E9F9EF; color: #14743C; border-color: #c9efd7; }
.flash-error { background: var(--red-bg); color: var(--red); border-color: #f8d3df; }
.flash-info { background: #EAF6FA; color: #14607A; border-color: #cde9f1; }
.empty { color: var(--muted); font-size: 13.5px; padding: 18px 0; text-align: center; }
.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.quick-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Chart ---------------- */
.chart {
    display: flex; align-items: flex-end; gap: 10px;
    height: 190px; padding: 8px 4px 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}
.chart-col { flex: 1 0 42px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.chart-bar {
    width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #17B8A6, #0E7C72);
    min-height: 4px;
    transition: height .3s ease;
}
.chart-label { font-size: 10.5px; color: var(--muted); text-align: center; white-space: nowrap; transform: rotate(-18deg); padding-top: 2px; }

/* ---------------- QR ---------------- */
.qr-box {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px;
    box-shadow: var(--shadow-sm);
}
.qr-canvas-holder { display: grid; place-items: center; }
.qr-canvas-holder img, .qr-canvas-holder canvas { display: block; width: 100%; max-width: 220px; height: auto; }
.qr-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .16em; color: var(--teal-800); font-weight: 700; }
.qr-small img, .qr-small canvas { max-width: 56px; }
.qr-link { font-size: 11.5px; color: var(--muted); word-break: break-all; text-align: center; }

.label-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.qr-label {
    border: 1px dashed #b9ded7; border-radius: 14px; padding: 14px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    background: #fff;
}
.qr-label .name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.qr-label .meta { font-size: 11.5px; color: var(--muted); }
.qr-label img, .qr-label canvas { max-width: 132px; }

.claim-card {
    max-width: 560px; margin: 0 auto;
    background: var(--card); border: 1px solid #e5f2ee; border-radius: 20px;
    padding: 26px; box-shadow: var(--shadow);
}
.product-teaser {
    border-radius: 14px; background: var(--mint-50); border: 1px solid #e0f2ee; padding: 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.product-teaser .name { font-weight: 700; font-size: 15.5px; }
.point-highlight {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, #E9F9F4, #F1FBEE);
    border: 1px solid #d6efe5; border-radius: 14px; padding: 14px 16px;
}
.point-highlight .value { font-size: 22px; font-weight: 800; color: var(--teal-800); letter-spacing: -.02em; }
.success-mark {
    width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 14px;
    background: var(--grad); color: #fff; display: grid; place-items: center;
    box-shadow: 0 12px 26px rgba(15,158,142,.28);
}
.success-mark .ico { width: 30px; height: 30px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
    .hero { grid-template-columns: 1fr; gap: 30px; }
    .two-col, .two-col-even { grid-template-columns: 1fr; }
    .stat-grid, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .label-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
    .public-links { display: none; }
    .app { flex-direction: column; }
    .sidebar {
        width: 100%; flex: none; height: auto; position: static;
        border-right: none; border-bottom: 1px solid var(--line);
        padding: 14px 16px; gap: 14px;
    }
    .sidebar .brand-text small { display: none; }
    .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .side-link { white-space: nowrap; padding: 9px 12px; font-size: 13px; }
    .side-card, .side-logout { display: none; }
    .topbar { padding: 16px 18px; position: static; }
    .topbar-user .topbar-id { display: none; }
    .content { padding: 18px 16px 44px; gap: 18px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .card { padding: 18px; }
}
@media (max-width: 560px) {
    .stat-grid, .grid-4, .grid-3, .grid-2, .stats-strip { grid-template-columns: 1fr; }
    .label-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 14px; }
    .public-actions .btn-ghost { display: none; }
    .hero-actions .btn { width: 100%; }
}

/* ---------------- Print ---------------- */
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .public-nav, .public-footer, .no-print, .filter-bar, .btn { display: none !important; }
    .app { display: block; }
    .content { padding: 0; gap: 14px; }
    .card { box-shadow: none; border-color: #d5d5d5; break-inside: avoid; }
    .label-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qr-label { break-inside: avoid; page-break-inside: avoid; }
}
