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

:root {
  --paper: #f7f4ec;
  --paper-deep: #eee9dd;
  --ink: #24241f;
  --muted: #77766e;
  --line: #ded9cd;
  --card: rgba(255,255,255,.76);
  --purple: #7b6ad9;
  --purple-deep: #6453c3;
  --purple-soft: #e7e1ff;
  --coral: #ee826a;
  --mint: #5ab79c;
  --shadow: 0 18px 55px rgba(54,48,37,.09);
}

* { box-sizing: border-box; }
html { color-scheme: light; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 12% 16%, #e8ddff 0, transparent 28%), radial-gradient(circle at 88% 84%, #ffddd3 0, transparent 27%), var(--paper); }
.login-card { width: min(100%, 470px); padding: clamp(30px, 7vw, 56px); border: 1px solid rgba(255,255,255,.8); border-radius: 34px; background: rgba(255,255,255,.66); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.brand-mark { display: inline-flex; align-items: end; gap: 5px; width: 52px; height: 52px; padding: 13px; border-radius: 17px; background: var(--purple); transform: rotate(-4deg); box-shadow: 0 12px 28px rgba(123,106,217,.28); }
.brand-mark span { width: 6px; border-radius: 99px; background: #fff; transform: rotate(20deg); }
.brand-mark span:nth-child(1) { height: 12px; }.brand-mark span:nth-child(2) { height: 25px; }.brand-mark span:nth-child(3) { height: 18px; }
.brand-mark.small { width: 43px; height: 43px; padding: 10px; border-radius: 14px; flex: 0 0 auto; }
.login-card .kicker { margin-top: 28px; }
.login-card h1 { margin: 10px 0 16px; font-size: clamp(38px, 9vw, 58px); line-height: .98; letter-spacing: -.045em; }
em { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; color: var(--purple); }
.login-copy, .privacy-note { color: var(--muted); line-height: 1.6; }
.login-card form { margin-top: 28px; }
.login-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.password-row { display: flex; gap: 9px; }
.password-row input { min-width: 0; flex: 1; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; outline: none; }
.password-row input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(123,106,217,.11); }
.icon-button { width: 52px; border: 0; border-radius: 15px; color: #fff; background: var(--purple); font-size: 25px; cursor: pointer; }
.form-error { min-height: 21px; margin: 8px 0 0; color: #b9473b; font-size: 13px; }
.privacy-note { margin: 22px 0 0; font-size: 12px; }

.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 246px; padding: 28px 20px 22px; display: flex; flex-direction: column; background: rgba(247,244,236,.9); border-right: 1px solid var(--line); backdrop-filter: blur(18px); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 16px; letter-spacing: .08em; }
.logo small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .16em; }
.desktop-nav { display: grid; gap: 6px; margin-top: 56px; }
.nav-item { border: 0; background: transparent; cursor: pointer; }
.desktop-nav .nav-item { padding: 13px 14px; display: flex; gap: 13px; align-items: center; text-align: left; border-radius: 14px; color: var(--muted); font-weight: 600; }
.desktop-nav .nav-item span { display: grid; place-items: center; width: 23px; font-size: 21px; }
.desktop-nav .nav-item b { margin-left: auto; display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 99px; color: #fff; background: var(--coral); font-size: 11px; }
.desktop-nav .nav-item.active { color: var(--purple-deep); background: var(--purple-soft); }
.sidebar-foot { margin-top: auto; }
.schedule-mini { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.5); }
.schedule-mini b, .schedule-mini small { display: block; }.schedule-mini b { font-size: 12px; }.schedule-mini small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.pulse { width: 9px; height: 9px; border-radius: 99px; background: var(--mint); box-shadow: 0 0 0 5px rgba(90,183,156,.13); }
.sidebar-foot > button { margin: 12px auto 0; width: 100%; }

.main { margin-left: 246px; min-height: 100vh; padding: 30px clamp(24px, 4vw, 58px) 70px; }
.topbar { min-height: 76px; margin-bottom: 27px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kicker { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.2; letter-spacing: .22em; font-weight: 800; }
.topbar h2 { margin: 7px 0 0; font-size: 30px; letter-spacing: -.035em; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.primary-button, .scan-button, .quiet-button, .danger-button, .text-button { border: 0; cursor: pointer; font-weight: 700; }
.primary-button { padding: 13px 18px; border-radius: 13px; color: #fff; background: var(--purple); box-shadow: 0 10px 24px rgba(123,106,217,.23); }
.primary-button:hover { background: var(--purple-deep); }
.scan-button { padding: 12px 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.65); }
.scan-button span { color: var(--mint); font-size: 19px; }
.quiet-button { padding: 11px 14px; border-radius: 12px; color: var(--muted); background: transparent; }
.quiet-button:hover { background: var(--paper-deep); color: var(--ink); }
.danger-button { padding: 11px 14px; border-radius: 12px; color: #b34c42; background: #ffe9e5; }
.text-button { padding: 8px; color: var(--purple); background: transparent; }
.page { display: none; animation: rise .28s ease both; }.page.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }

.hero-card { min-height: 315px; padding: clamp(26px, 5vw, 52px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); align-items: center; overflow: hidden; border-radius: 28px; color: #fff; background: linear-gradient(120deg, #7664cd, #9d83de 55%, #d2aee4); box-shadow: 0 22px 60px rgba(104,83,184,.2); }
.hero-card .kicker { color: #eae5ff; }.hero-card h3 { margin: 10px 0 14px; font-size: clamp(36px, 5vw, 58px); line-height: 1; letter-spacing: -.045em; }.hero-card em { color: #fff2c9; }
.hero-card p:not(.kicker) { max-width: 610px; margin: 0 0 25px; color: #ede9ff; line-height: 1.55; }
.hero-card .primary-button { color: var(--purple-deep); background: #fff; box-shadow: none; }
.radar-visual { position: relative; width: min(32vw, 320px); aspect-ratio: 1; justify-self: end; border-radius: 50%; background: rgba(52,37,120,.13); }
.ring { position: absolute; inset: 10%; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; }.ring-two { inset: 29%; }.ring-three { inset: 46%; background: rgba(255,255,255,.8); }
.radar-visual::before, .radar-visual::after { content: ''; position: absolute; z-index: 0; background: rgba(255,255,255,.25); }.radar-visual::before { left: 50%; top: 8%; bottom: 8%; width: 1px; }.radar-visual::after { top: 50%; left: 8%; right: 8%; height: 1px; }
.sweep { position: absolute; inset: 10%; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255,255,255,.38), transparent 20%, transparent); animation: sweep 4.2s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.target { position: absolute; z-index: 3; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #ff927b; box-shadow: 0 0 0 6px rgba(255,255,255,.12); }.t1 { left: 25%; top: 34%; }.t2 { right: 21%; top: 47%; }.t3 { left: 51%; bottom: 18%; }
.radar-label { position: absolute; z-index: 4; inset: 42%; display: grid; place-items: center; color: var(--purple-deep); font-size: 7px; line-height: 1; letter-spacing: .08em; text-align: center; }.radar-label b { font-size: 8px; }

.stats-grid { margin: 18px 0 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stats-grid article { padding: 20px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--card); box-shadow: 0 10px 35px rgba(54,48,37,.04); }
.stat-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; font-size: 23px; }.lavender { color: var(--purple); background: var(--purple-soft); }.coral { color: var(--coral); background: #ffe7e0; }.mint { color: var(--mint); background: #ddf4ec; }
.stats-grid strong, .stats-grid small { display: block; }.stats-grid strong { font-size: 23px; letter-spacing: -.03em; }.stats-grid small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.content-section { margin-top: 35px; }.section-head { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }.section-head h3 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.03em; }
.watchlist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }.watchlist-grid.wide { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
.watch-card { position: relative; min-width: 0; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: var(--card); box-shadow: 0 10px 35px rgba(54,48,37,.045); }
.watch-card::after { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent, var(--purple)); opacity: .85; }
.watch-card-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }.watch-card-head h4 { margin: 0; font-size: 17px; line-height: 1.25; }.card-menu { width: 31px; height: 31px; flex: 0 0 auto; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 20px; }
.watch-desc { min-height: 42px; margin: 9px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }.chip { max-width: 100%; padding: 5px 8px; overflow: hidden; border-radius: 99px; color: #615a50; background: var(--paper-deep); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }.chip.required { color: #347965; background: #ddf4ec; }.chip.excluded { color: #aa574b; background: #ffe8e3; }
.card-footer { margin-top: 19px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.market-icons { display: flex; gap: 5px; }.market { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 7px; color: #fff; font-size: 10px; font-weight: 800; }.market.tokopedia { background: #42b449; }.market.shopee { background: #ee4d2d; }
.status-pill { padding: 5px 8px; border-radius: 99px; color: #2d7c64; background: #dff3ec; font-weight: 700; }.status-pill.paused { color: #7d7568; background: #ece8df; }

.empty-state { grid-column: 1 / -1; padding: 46px 24px; border: 1px dashed #cfc8ba; border-radius: 22px; text-align: center; background: rgba(255,255,255,.3); }.empty-state .empty-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; color: var(--purple); background: var(--purple-soft); font-size: 27px; }.empty-state h4 { margin: 0 0 7px; }.empty-state p { max-width: 420px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.filter-bar { min-height: 62px; margin-bottom: 20px; padding: 11px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.54); }.search-field { flex: 1; display: flex; align-items: center; gap: 8px; }.search-field span { color: var(--muted); font-size: 22px; }.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }.segmented { display: flex; padding: 3px; border-radius: 11px; background: var(--paper-deep); }.segmented button { padding: 8px 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 3px 10px rgba(50,45,35,.08); }.muted { color: var(--muted); }

.findings-list, .runs-list { display: grid; gap: 11px; }
.finding-card { padding: 15px; display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }.finding-thumb { width: 92px; aspect-ratio: 1; border-radius: 13px; object-fit: cover; background: var(--paper-deep); }.finding-card h4 { margin: 0 0 5px; }.finding-card p { margin: 0; color: var(--muted); font-size: 12px; }.finding-price { display: block; margin-top: 8px; color: var(--purple-deep); font-weight: 800; }.finding-actions { display: grid; gap: 7px; }.finding-actions a, .finding-actions button { padding: 8px 10px; border: 0; border-radius: 9px; text-align: center; text-decoration: none; cursor: pointer; font-size: 11px; font-weight: 700; }.finding-actions a { color: #fff; background: var(--purple); }.finding-actions button { background: var(--paper-deep); }
.schedule-card { padding: 32px; display: grid; grid-template-columns: 125px 1fr; gap: 30px; align-items: center; border-radius: 25px; color: #fff; background: linear-gradient(120deg,#292636,#4c436d); box-shadow: var(--shadow); }.clock { width: 115px; height: 115px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-family: 'Playfair Display', serif; font-size: 39px; }.clock span { margin-top: -45px; margin-left: 57px; font: 700 12px 'DM Sans'; }.schedule-card .kicker { color: #c8bedf; }.schedule-card h3 { margin: 7px 0; font-size: 27px; }.schedule-card p:last-child { max-width: 700px; margin: 0; color: #d5d0df; line-height: 1.6; }
.run-card { padding: 15px 18px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }.run-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }.run-dot.failed { background: var(--coral); }.run-card div { flex: 1; }.run-card b, .run-card small { display: block; }.run-card small { color: var(--muted); }.run-card time { color: var(--muted); font-size: 11px; }

.item-dialog { width: min(760px, calc(100% - 28px)); max-height: min(900px, calc(100dvh - 28px)); padding: 0; border: 0; border-radius: 25px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 110px rgba(32,28,24,.28); }.item-dialog::backdrop { background: rgba(31,28,23,.52); backdrop-filter: blur(4px); }.item-dialog form { max-height: calc(100dvh - 28px); display: flex; flex-direction: column; }.dialog-head { padding: 23px 25px 18px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }.dialog-head h2 { margin: 6px 0 0; font-size: 28px; }.close-button { width: 39px; height: 39px; border: 0; border-radius: 50%; color: var(--muted); background: var(--paper-deep); cursor: pointer; font-size: 25px; }.form-scroll { padding: 5px 25px 30px; overflow: auto; }.intro-section { margin: 27px 0 15px; display: flex; gap: 13px; align-items: start; }.step-number { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--purple); background: var(--purple-soft); font-size: 10px; font-weight: 800; }.intro-section h3 { margin: 0; font-size: 18px; }.intro-section p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.full { grid-column: 1 / -1; }.field > span, .field legend { display: block; margin-bottom: 7px; color: #5b594f; font-size: 11px; font-weight: 700; }.field b { color: var(--coral); }.field input, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.75); outline: none; resize: vertical; }.field input:focus, .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123,106,217,.1); }.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }.field { min-width: 0; margin: 0; padding: 0; border: 0; }.money-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.75); }.money-field > span { padding-left: 13px; color: var(--muted); font-size: 12px; }.money-field input { border: 0; background: transparent; box-shadow: none !important; }
.check-row, .market-row { display: flex; flex-wrap: wrap; gap: 7px; }.check-row label input, .market-row label input { position: absolute; opacity: 0; }.check-row label span { display: block; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.6); cursor: pointer; font-size: 10px; font-weight: 700; }.check-row label input:checked + span { border-color: var(--purple); color: var(--purple); background: var(--purple-soft); }.market-row label { flex: 1; min-width: 150px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.65); cursor: pointer; }.market-row label:has(input:checked) { border-color: var(--purple); background: #f1edff; }.market-row b { color: var(--ink); font-size: 12px; }
.switch-field { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.58); cursor: pointer; }.switch-field b, .switch-field small { display: block; }.switch-field b { font-size: 12px; }.switch-field small { margin-top: 2px; color: var(--muted); font-size: 9px; }.switch-field input { position: absolute; opacity: 0; }.switch-field i { position: relative; width: 44px; height: 25px; flex: 0 0 auto; border-radius: 99px; background: #cbc6bd; transition: .2s; }.switch-field i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.17); }.switch-field input:checked + i { background: var(--mint); }.switch-field input:checked + i::after { transform: translateX(19px); }
.dialog-foot { padding: 16px 25px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: rgba(247,244,236,.94); }.dialog-foot > div { margin-left: auto; display: flex; gap: 7px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; max-width: min(90vw, 420px); padding: 13px 18px; border-radius: 13px; color: #fff; background: #29272e; box-shadow: 0 16px 50px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .25s; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.error { background: #9f433b; }
.mobile-nav { display: none; }

@media (max-width: 1040px) {
  .watchlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: 1fr 240px; }.radar-visual { width: 240px; }
  .top-actions .quiet-button { display: none; }
}

@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .sidebar { display: none; }.main { margin: 0; padding: 18px 15px 38px; }
  .topbar { min-height: 57px; margin-bottom: 17px; }.topbar h2 { font-size: 23px; }.topbar .kicker { display: none; }
  .top-actions .scan-button { width: 41px; height: 41px; padding: 0; font-size: 0; }.top-actions .scan-button span { font-size: 20px; }.top-actions .add-button { display: none; }
  .hero-card { min-height: 360px; padding: 26px; display: block; }.hero-card h3 { font-size: 39px; }.hero-card p:not(.kicker) { font-size: 13px; }.radar-visual { position: absolute; width: 205px; margin-top: -65px; right: -50px; opacity: .4; }.hero-card > div:first-child { position: relative; z-index: 2; }
  .stats-grid { margin: 12px 0 31px; grid-template-columns: 1fr; gap: 8px; }.stats-grid article { padding: 13px 15px; }.stat-icon { width: 39px; height: 39px; }.stats-grid strong { font-size: 19px; }
  .watchlist-grid, .watchlist-grid.wide { grid-template-columns: 1fr; }.watch-card { padding: 18px; }
  .filter-bar { align-items: stretch; flex-direction: column; }.segmented { align-self: stretch; }.segmented button { flex: 1; }
  .finding-card { grid-template-columns: 70px 1fr; }.finding-thumb { width: 70px; }.finding-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .schedule-card { padding: 25px; grid-template-columns: 1fr; }.clock { width: 90px; height: 90px; }.clock span { margin-top: -38px; margin-left: 43px; }
  .mobile-nav { position: fixed; z-index: 20; inset: auto 0 0; height: 72px; padding: 7px 12px max(7px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; border-top: 1px solid var(--line); background: rgba(250,248,242,.94); backdrop-filter: blur(18px); }.mobile-nav .nav-item { display: grid; place-items: center; gap: 1px; color: var(--muted); font-size: 20px; }.mobile-nav .nav-item small { font-size: 8px; font-weight: 700; }.mobile-nav .nav-item.active { color: var(--purple); }.mobile-add { align-self: start; justify-self: center; width: 52px; height: 52px; margin-top: -20px; border: 5px solid var(--paper); border-radius: 50%; color: #fff; background: var(--purple); box-shadow: 0 8px 22px rgba(123,106,217,.33); font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }.full { grid-column: auto; }.item-dialog { width: 100%; max-height: 95dvh; margin: auto 0 0; border-radius: 25px 25px 0 0; }.item-dialog form { max-height: 95dvh; }.dialog-head { padding: 20px; }.form-scroll { padding: 4px 20px 25px; }.dialog-foot { padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); }.dialog-foot .quiet-button { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
