:root {
    --primary: #15803D;
    --primary-dark: #166534;
    --primary-soft: #ECFDF5;
    --gold: #D97706;
    --gold-light: #FEF3C7;
    --gold-border: #FDE68A;
    --bg: #F8FAFC;
    --card: #FFFFFF;
    --text: #0F172A;
    --muted: #64748B;
    --border: #E2E8F0;
    --success: #15803D;
    --danger: #DC2626;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px -15px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.5; }
.hidden { display: none !important; }

/* Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 38px; width: 38px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.brand p { font-size: 12px; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color 0.15s; }
.nav-link:hover { color: var(--text); }
.guest-actions { display: flex; align-items: center; gap: 10px; }

/* Container & Cards */
.container { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Landing Hero (Lynk.id inspired) */
.hero-section { padding: 36px 0 48px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-light);
    color: #92400E;
    border: 1px solid var(--gold-border);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-title {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.hero-title span { color: var(--primary); }
.hero-sub {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 24px;
    max-width: 540px;
}

.claim-bar {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
    gap: 8px;
    box-shadow: var(--shadow-md);
    max-width: 520px;
    transition: border-color 0.2s;
}
.claim-bar:focus-within { border-color: var(--primary); }
.claim-prefix { font-size: 15px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.claim-bar input {
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    width: 100%;
    min-width: 110px;
    background: transparent;
}
.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

/* Phone Mockup */
.phone-wrap { display: flex; justify-content: center; perspective: 1000px; }
@keyframes phoneFloat {
    0%, 100% { transform: translateY(0px) rotateY(-4deg) rotateX(2deg); }
    50% { transform: translateY(-12px) rotateY(3deg) rotateX(-1deg); }
}
.phone-mockup {
    width: 310px;
    background: #0F172A;
    border-radius: 36px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    border: 3px solid #334155;
    animation: phoneFloat 5s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.phone-mockup:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 28px 60px -15px rgba(21, 128, 61, 0.25);
}
@media (prefers-reduced-motion: reduce) {
    .phone-mockup { animation: none; }
}
.phone-screen {
    background: #FFFFFF;
    border-radius: 26px;
    overflow: hidden;
    padding: 0;
}
.phone-screen img.mock-warung-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.mock-shop-head {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 12px;
}
.mock-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #EA580C, #F97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 8px;
}
.mock-url {
    display: inline-block;
    background: #FFF7ED;
    color: #C2410C;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
}
.mock-link-btn {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
}
.mock-menu-item {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.mock-menu-item strong { font-size: 13px; display: block; }
.mock-menu-item small { font-size: 11px; color: var(--muted); }
.mock-price { font-size: 12px; font-weight: 800; color: var(--primary); }
.mock-footer-pills {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.mock-pill {
    font-size: 10px;
    font-weight: 700;
    background: #DCFCE7;
    color: #15803D;
    padding: 3px 8px;
    border-radius: 999px;
}

/* Landing Sections */
.section-block { padding: 48px 0; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-heading h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.section-heading p { font-size: 15px; color: var(--muted); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.feature-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); }

/* Pricing & Premium Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}
.plan-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.plan-card.popular {
    border: 2px solid var(--gold);
    box-shadow: 0 12px 32px -12px rgba(217, 119, 6, 0.25);
}
.plan-ribbon {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gold);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
}
.plan-name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.plan-price { font-size: 28px; font-weight: 800; margin: 10px 0 4px; letter-spacing: -0.02em; }
.plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-fee-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 12px 0;
    font-size: 13px;
}
.plan-fee-row { display: flex; justify-content: space-between; padding: 3px 0; }
.plan-list { list-style: none; margin: 12px 0 20px; font-size: 13px; color: #334155; }
.plan-list li { padding: 5px 0; display: flex; gap: 8px; }

/* Split Login Box */
.login-shell {
    max-width: 860px;
    margin: 32px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.login-aside {
    background: linear-gradient(145deg, #1E293B, #0F172A);
    color: #FFFFFF;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-aside h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.login-aside p { font-size: 14px; color: #CBD5E1; }
.login-aside ul { list-style: none; margin-top: 20px; font-size: 13px; color: #E2E8F0; }
.login-aside li { padding: 6px 0; }
.login-panel { padding: 32px; }

/* Forms & Buttons */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: #334155; }
.field input, .field select, .field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
    background: #FFFFFF;
    transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.field input[type="checkbox"], .field input[type="radio"] {
    width: auto;
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #F1F5F9; color: var(--text); }
.btn-secondary:hover { background: #E2E8F0; }
.btn-outline { background: #FFFFFF; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dashboard */
.store-hero-card {
    background: linear-gradient(to right, #FFFFFF, #ECFDF5);
    border: 1px solid #A7F3D0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-btn {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); border-color: #CBD5E1; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.stat-card.highlight { border-left: 4px solid var(--primary); }
.stat-card .lbl { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-card .val { font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-open { background: #DCFCE7; color: #15803D; }
.badge-closed { background: #FEE2E2; color: #DC2626; }
.badge-pending { background: #FEF3C7; color: #B45309; }
.badge-plan { background: #E0F2FE; color: #0369A1; }

.order-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: #FFFFFF;
}
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.checkbox-row { display: flex; gap: 14px; flex-wrap: wrap; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0F172A;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .hero-grid, .login-shell { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .topbar { padding: 12px 14px; }
    .container { padding: 16px 12px 48px; }
    .card { padding: 16px; border-radius: 14px; }
    .store-hero-card { flex-direction: column; align-items: flex-start; }
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .val { font-size: 19px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .tab-btn { white-space: nowrap; flex-shrink: 0; }
    #chatTab > div { grid-template-columns: 1fr !important; }
    .phone-mockup { width: 270px; }
    .claim-bar { padding: 6px 6px 6px 12px; }
    .claim-prefix { font-size: 13px; }
}
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .claim-bar { flex-wrap: wrap; padding: 10px; }
    .claim-bar .btn { width: 100%; }
}
