/* ══════════════════════════════════════════════════
   SetiaPoints — Warm Luxe Design System
   Premium loyalty experience
   ══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --brand: #0D9488;
    --brand-soft: color-mix(in srgb, var(--brand) 12%, #FFFDF7);
    --brand-medium: color-mix(in srgb, var(--brand) 25%, #FFFDF7);

    --bg: #FFFDF7;
    --bg-warm: #FFF8EE;
    --surface: #FFFFFF;
    --surface-raised: #FFFFFF;
    --surface-hover: #FAFAF6;
    --surface-pressed: #F5F3EE;

    --ink: #1A1A1A;
    --ink-secondary: #5C5C5C;
    --ink-tertiary: #8A8A8A;
    --ink-faint: #B8B8B8;

    --border: #E8E4DC;
    --border-light: #F0ECE4;
    --divider: #F0ECE4;

    --success: #059669;
    --success-soft: #ECFDF5;
    --error: #DC2626;
    --error-soft: #FEF2F2;
    --warning: #D97706;
    --warning-soft: #FFFBEB;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-xl: 0 8px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-brand: 0 4px 14px -2px color-mix(in srgb, var(--brand) 35%, transparent);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    min-height: 100dvh;
}

h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ── Top Bar ── */
.navbar {
    background: var(--ink);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    text-decoration: none;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-user {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
.shop-badge {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.75rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
}
.nav-logout {
    height: 32px; padding: 0 14px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
}
.nav-logout:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ── Container ── */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ink-tertiary);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 0 20px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s var(--ease-out);
    white-space: nowrap;
    position: relative;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--brand);
    color: #FFFFFF;
    box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px -2px rgba(5,150,105,0.35);
}

.btn-outline {
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--ink);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.btn-soft {
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid var(--brand-medium);
}
.btn-soft:hover { background: var(--brand-medium); }

.btn-ghost {
    background: transparent;
    color: var(--brand);
}
.btn-ghost:hover { background: var(--brand-soft); }

.btn-block { width: 100%; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 0.9375rem; border-radius: var(--radius-md); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 0.75rem; border-radius: 8px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    height: 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    background: var(--surface);
    color: var(--ink);
    transition: all 0.15s;
}
.form-group input::placeholder { color: var(--ink-faint); }
.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-row .form-group { flex: 1; min-width: 140px; }

.input-sm {
    padding: 10px 14px; height: 40px;
    font-size: 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    flex: 1;
    transition: all 0.15s;
}
.input-sm:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.input-prefix { display: flex; align-items: center; }
.input-prefix span {
    padding: 12px 14px; height: 48px;
    display: flex; align-items: center;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--ink-secondary);
    white-space: nowrap;
}
.input-prefix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ── Alerts ── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 12px 16px;
    max-width: 680px;
    margin-left: auto; margin-right: auto;
    display: flex; align-items: center; gap: 10px;
    animation: alertIn 0.4s var(--ease-out);
}
@keyframes alertIn {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid #BBF7D0; }
.alert-error { background: var(--error-soft); color: var(--error); border: 1px solid #FECACA; }

/* ══════════════════════════════════════════════════
   AUTH
   ══════════════════════════════════════════════════ */
.auth-container {
    display: flex;
    justify-content: center;
    padding: 32px 16px;
    min-height: calc(100dvh - 60px);
    align-items: flex-start;
    background:
        radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--brand) 6%, transparent) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--brand) 4%, transparent) 0%, transparent 50%),
        var(--bg);
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-light);
    animation: cardIn 0.5s var(--ease-out);
}
@keyframes cardIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.auth-card-wide { max-width: 460px; }
.auth-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 16px 0 4px;
    letter-spacing: -0.03em;
}
.auth-subtitle {
    color: var(--ink-secondary);
    font-size: 0.875rem;
    margin-bottom: 28px;
}
.auth-card form { text-align: left; }
.auth-link { margin-top: 20px; font-size: 0.8125rem; color: var(--ink-tertiary); }
.auth-link a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }
.auth-hint {
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--ink-faint);
    text-align: center;
}

/* Segmented Tabs */
.login-tabs {
    display: flex;
    margin: 20px 0 28px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-light);
}
.tab-btn {
    flex: 1;
    height: 36px;
    border: none;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--ink-tertiary);
    border-radius: 7px;
    transition: all 0.2s var(--ease-out);
}
.tab-btn.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   SHOP LANDING
   ══════════════════════════════════════════════════ */
.shop-landing {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100dvh - 60px);
    padding: 32px 16px;
    background:
        radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--brand) 8%, transparent) 0%, transparent 50%),
        var(--bg);
}
.shop-landing-card {
    text-align: center;
    max-width: 340px;
    animation: cardIn 0.6s var(--ease-out);
}
.shop-logo-placeholder {
    width: 80px; height: 80px;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-brand);
    transition: transform 0.3s var(--ease-spring);
}
.shop-logo-placeholder:hover { transform: scale(1.06) rotate(-2deg); }
.shop-logo-lg { width: 80px; border-radius: var(--radius-lg); margin-bottom: 24px; }
.shop-landing-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.shop-landing-card p { color: var(--ink-secondary); font-size: 0.9375rem; }
.shop-landing-actions { margin-top: 28px; }

/* ══════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════ */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 4px 0;
}
.dashboard-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
}

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s var(--ease-out);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.stat-label {
    font-size: 0.6875rem;
    color: var(--ink-tertiary);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════════════
   STAMP PROGRESS
   ══════════════════════════════════════════════════ */
.stamp-card {
    text-align: center;
    padding: 28px 20px;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 6%, var(--surface)) 0%, var(--surface) 70%);
    border: 1px solid var(--border-light);
    overflow: visible;
}
.stamp-progress-ring {
    width: 150px; height: 150px;
    margin: 0 auto 20px;
    position: relative;
}
.stamp-progress-ring svg {
    width: 150px; height: 150px;
    display: block;
    filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--brand) 20%, transparent));
}
.stamp-progress-ring circle.track {
    stroke: var(--border-light);
}
.stamp-progress-ring circle.progress {
    transition: stroke-dashoffset 1.2s var(--ease-out);
}
.stamp-count-center {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.stamp-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ink);
    display: block;
    line-height: 1;
    letter-spacing: -0.04em;
}
.stamp-label {
    font-size: 0.875rem;
    color: var(--ink-tertiary);
    font-weight: 500;
}
.stamp-status {
    color: var(--ink-secondary);
    font-size: 0.875rem;
    margin-top: 4px;
}
.reward-ready {
    color: var(--success);
    font-weight: 600;
    animation: pulse 2s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Stamp Grid */
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 4px;
}
.stamp-dot {
    aspect-ratio: 1;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    border: 2px solid var(--border);
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--ink-faint);
    transition: all 0.4s var(--ease-spring);
    position: relative;
}
.stamp-dot.filled {
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent);
    animation: stampPop 0.5s var(--ease-spring);
}
@keyframes stampPop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Activity List ── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
    transition: background 0.1s;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.activity-icon.stamp { background: var(--brand-soft); color: var(--brand); }
.activity-icon.reward { background: var(--warning-soft); color: var(--warning); }
.activity-detail { flex: 1; min-width: 0; }
.activity-detail strong { font-size: 0.8125rem; font-weight: 600; }

/* ── Search ── */
.search-box { margin-bottom: 10px; position: relative; }
.search-box input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    transition: all 0.2s;
}
.search-box::before {
    content: '';
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Cline x1='12' y1='12' x2='16' y2='16'/%3E%3C/svg%3E") no-repeat;
    pointer-events: none;
    z-index: 1;
}
.search-box input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    background: var(--surface);
}
.search-box input::placeholder { color: var(--ink-faint); }

.search-result {
    padding: 12px 14px;
    cursor: pointer;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    min-height: 48px;
}
.search-result:hover { background: var(--brand-soft); }
.search-result:active { transform: scale(0.99); }

/* ── Action Buttons ── */
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.table th, .table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
}
.table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--ink-tertiary);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg);
}
.table tr:hover td { background: var(--surface-hover); }

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
    background: var(--brand-soft);
    color: var(--brand);
}
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-inactive, .badge-expired, .badge-suspended { background: var(--error-soft); color: var(--error); }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-none { background: var(--bg); color: var(--ink-tertiary); }

/* ── Admin Nav ── */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── QR ── */
.qr-page { text-align: center; padding: 32px 16px; }
.qr-page h1 { font-size: 1.375rem; font-weight: 700; margin-bottom: 6px; }
.qr-container {
    margin: 28px auto;
    background: white;
    display: inline-block;
    padding: 24px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}
.qr-image { max-width: 240px; display: block; }
.qr-url { font-size: 0.8125rem; color: var(--ink-tertiary); margin: 16px 0; word-break: break-all; }
.qr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ══════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════ */
.landing-page { background: var(--bg); }

.hero {
    text-align: center;
    padding: 72px 24px 64px;
    background:
        radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--brand) 10%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, color-mix(in srgb, var(--brand) 6%, transparent) 0%, transparent 50%),
        var(--ink);
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(255,255,255,0.01) 40px,
            rgba(255,255,255,0.01) 80px
        );
    pointer-events: none;
}
.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    position: relative;
}
.hero p {
    font-size: 1.0625rem;
    opacity: 0.7;
    max-width: 440px;
    margin: 0 auto 36px;
    line-height: 1.6;
    position: relative;
}
.hero-actions { position: relative; }
.hero-actions .btn {
    background: #FFFFFF;
    color: var(--ink);
    font-weight: 700;
    height: 52px;
    padding: 0 32px;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}
.hero-actions .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

.features { padding: 64px 24px; max-width: 780px; margin: 0 auto; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.feature-card {
    padding: 24px 20px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s var(--ease-out);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
}
.feature-icon svg { flex-shrink: 0; }
.feature-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.feature-card p { font-size: 0.8125rem; color: var(--ink-secondary); line-height: 1.5; }

.pricing {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg-warm);
}
.pricing h2 {
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.03em;
}
.price-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    max-width: 340px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
}
.price-card::before {
    content: 'POPULAR';
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-brand);
}
.price-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.04em;
    margin-top: 8px;
}
.price-amount span { font-size: 1rem; color: var(--ink-tertiary); font-weight: 400; }
.price-features { list-style: none; margin: 28px 0; text-align: left; }
.price-features li {
    padding: 7px 0;
    font-size: 0.8125rem;
    display: flex; align-items: center; gap: 10px;
    color: var(--ink);
}
.price-features li::before {
    content: "\2713";
    color: var(--success);
    font-weight: 700;
    width: 20px; height: 20px;
    background: var(--success-soft);
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    flex-shrink: 0;
}
.price-summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin: 16px 0;
    font-size: 0.8125rem;
}

.footer {
    text-align: center;
    padding: 32px 24px;
    font-size: 0.75rem;
    color: var(--ink-faint);
}

/* ── Error ── */
.error-page {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 60vh; text-align: center; padding: 32px;
}
.error-page h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: var(--border);
    letter-spacing: -0.04em;
}
.error-page p { color: var(--ink-secondary); margin: 8px 0 28px; }

/* ── Helpers ── */
.text-muted { color: var(--ink-secondary); }
.text-sm { font-size: 0.75rem; }
a { color: var(--brand); }
a:hover { color: var(--brand); opacity: 0.8; }
.table a { font-weight: 500; text-decoration: none; }
.table a:hover { text-decoration: underline; }

/* ── Print ── */
@media print {
    .navbar, .qr-actions, .btn { display: none !important; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile First
   ══════════════════════════════════════════════════ */

/* ── Extra small (< 360px) — small phones ── */
@media (max-width: 359px) {
    html { font-size: 14px; }
    .container { padding: 12px 10px 32px; }
    .card { padding: 14px; margin-bottom: 10px; }
    .navbar { padding: 0 12px; height: 52px; }
    .nav-logo { font-size: 0.9375rem; gap: 8px; }
    .shop-badge { width: 26px; height: 26px; font-size: 0.6875rem; }
    .auth-card { padding: 24px 16px; border-radius: var(--radius-lg); }
    .stamp-progress-ring { width: 120px; height: 120px; }
    .stamp-progress-ring svg { width: 120px; height: 120px; }
    .stamp-number { font-size: 2rem; }
    .stamp-grid { gap: 6px; }
    .stamp-dot { font-size: 0.5625rem; border-width: 1.5px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 14px 10px; }
    .stat-number { font-size: 1.375rem; }
    .hero { padding: 48px 16px 40px; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.9375rem; }
    .price-amount { font-size: 2.25rem; }
    .feature-grid { grid-template-columns: 1fr; gap: 10px; }
    .feature-card { padding: 18px 14px; }
    .dashboard-header h1 { font-size: 1.125rem; }
    .table { font-size: 0.75rem; }
    .table th, .table td { padding: 8px 6px; }
    .action-buttons { flex-direction: column; }
    .inline-form { flex-direction: column; width: 100%; }
    .inline-form .input-sm { width: 100%; }
    .qr-image { max-width: 180px; }
    .qr-container { padding: 16px; }
}

/* ── Small phones (360px - 479px) ── */
@media (min-width: 360px) and (max-width: 479px) {
    .container { padding: 16px 14px 36px; }
    .auth-card { padding: 28px 20px; }
    .hero { padding: 56px 20px 48px; }
    .hero h1 { font-size: 2rem; }
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-card { padding: 18px 14px; }
    .feature-card h3 { font-size: 0.8125rem; }
    .feature-card p { font-size: 0.75rem; }
    .inline-form { flex-wrap: wrap; }
    .inline-form .input-sm { min-width: 100%; }
}

/* ── Regular phones (480px - 599px) ── */
@media (min-width: 480px) and (max-width: 599px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .auth-card { max-width: 420px; }
    .inline-form .input-sm { min-width: 140px; }
}

/* ── Tablet (600px - 899px) ── */
@media (min-width: 600px) {
    .container { padding: 28px 24px 40px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .stamp-grid { grid-template-columns: repeat(10, 1fr); gap: 8px; }
    .stamp-dot { font-size: 0.625rem; }
    .auth-card { padding: 44px 36px; }
    .hero h1 { font-size: 2.75rem; }
    .feature-grid { grid-template-columns: repeat(4, 1fr); }
    .dashboard-header h1 { font-size: 1.5rem; }
    .navbar { height: 60px; }
    .form-row { flex-wrap: nowrap; }
    .admin-nav { flex-wrap: nowrap; }
    .action-buttons { flex-wrap: nowrap; }
    .table-responsive { margin: 0; padding: 0; }
}

/* ── Desktop (900px+) ── */
@media (min-width: 900px) {
    .hero h1 { font-size: 3.25rem; }
    .hero { padding: 80px 32px 72px; }
    .features { padding: 72px 32px; }
    .pricing { padding: 72px 32px; }
    .auth-container { padding: 48px 24px; }
}

/* ── Touch devices (phones + tablets) ── */
@media (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .form-group input,
    .form-group select { height: 48px; padding: 12px 14px; font-size: 1rem; }
    .input-sm { height: 44px; padding: 10px 14px; }
    .search-box input { height: 52px; padding: 14px 16px 14px 44px; }
    .search-result { min-height: 52px; padding: 14px; }
    .table td, .table th { padding: 14px 12px; }
    .tab-btn { height: 40px; }
    .activity-item { padding: 16px 0; }
    .nav-logout { height: 36px; padding: 0 16px; }
}

/* ── Landscape phone ── */
@media (max-height: 500px) and (orientation: landscape) {
    .shop-landing { min-height: auto; padding: 24px 16px; }
    .auth-container { min-height: auto; padding: 16px; }
    .hero { padding: 40px 24px 32px; }
    .stamp-progress-ring { width: 120px; height: 120px; }
    .stamp-progress-ring svg { width: 120px; height: 120px; }
}

/* ── Safe areas (notch phones) ── */
@supports (padding: env(safe-area-inset-bottom)) {
    .navbar { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
    .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: max(40px, env(safe-area-inset-bottom)); }
    .alert { margin-left: max(16px, env(safe-area-inset-left)); margin-right: max(16px, env(safe-area-inset-right)); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141414;
        --bg-warm: #1A1A1A;
        --surface: #1E1E1E;
        --surface-raised: #252525;
        --surface-hover: #2A2A2A;
        --surface-pressed: #333333;
        --ink: #F0F0F0;
        --ink-secondary: #A0A0A0;
        --ink-tertiary: #6A6A6A;
        --ink-faint: #4A4A4A;
        --border: #333333;
        --border-light: #282828;
        --divider: #282828;
        --success-soft: #052E16;
        --error-soft: #2D0A0A;
        --warning-soft: #2D1B00;
    }
    .navbar { background: #0A0A0A; }
    .stamp-progress-ring svg { filter: drop-shadow(0 2px 12px color-mix(in srgb, var(--brand) 30%, transparent)); }
    .hero { background: #0A0A0A; }
}
