:root { --bg: #f6f7fb; --card: #ffffff; --border: #e5e8ef; --ink: #1a1d29; --muted: #6b7280; --accent: #4f46e5; --accent-2: #7c3aed; --green: #16a34a; --red: #dc2626; --amber: #d97706; --radius: 14px; --shadow: 0 1px 3px rgba(20, 24, 40, 0.08); } * { box-sizing: border-box; } html, body { margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Thai', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; } #app { min-height: 100vh; } .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); } button { font-family: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--card); padding: 10px 16px; border-radius: 10px; font-size: 14px; color: var(--ink); } button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none; } button:disabled { opacity: 0.5; cursor: not-allowed; } input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 14px; } label { font-size: 13px; color: var(--muted); display: block; margin: 10px 0 4px; } .row { display: flex; gap: 12px; flex-wrap: wrap; } .badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; } .badge.A { background: #dcfce7; color: #166534; } .badge.B { background: #fef9c3; color: #854d0e; } .badge.C { background: #fee2e2; color: #991b1b; } .badge.won { background: #dcfce7; color: #166534; } .badge.lost { background: #fee2e2; color: #991b1b; } .badge.not_tried { background: #eef2ff; color: #4338ca; } .error { color: var(--red); font-size: 13px; } .muted { color: var(--muted); } .msg-seller { background: var(--accent); color: #fff; align-self: flex-end; border-radius: 16px 16px 4px 16px; } .msg-customer { background: #fff; align-self: flex-start; border-radius: 16px 16px 16px 4px; border: 1px solid var(--border); } /* ── UX polish: focus rings, touch targets, transitions ───────────── */ /* Visible focus rings for keyboard nav (a11y) */ button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } a { color: inherit; } a:focus { outline: 2px solid var(--accent); outline-offset: 2px; } /* Comfortable touch density + consistent transitions */ button { min-height: 44px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px; } button:not(:disabled):hover { box-shadow: 0 4px 12px rgba(20,24,40,.1); } button:not(:disabled):active { transform: scale(.97); } button.primary:not(:disabled):hover { box-shadow: 0 6px 18px rgba(79,70,229,.35); } button.soft { background: #f1f3f9; border-color: transparent; color: var(--ink); } button.soft:not(:disabled):hover { background: #e6eaf3; } /* Align inline SVG (lucide) icons inside buttons/links */ button svg, .icon-btn svg, .brand svg { vertical-align: -2px; } input, select, textarea { min-height: 44px; transition: border-color .15s ease, box-shadow .15s ease; } input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.15); } textarea { min-height: 88px; resize: vertical; } /* Cards lift on hover (only for interactive/uniform card grids) */ .card.lift { transition: transform .2s ease, box-shadow .25s ease; } .card.lift:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,24,40,.10); } /* Disabled clarity */ button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; } /* Back link button */ .btn-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; margin-bottom: 12px; background: transparent; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 13px; text-decoration: none; } .btn-back:hover { color: var(--ink); border-color: var(--accent); } /* Status spinner */ .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; } @keyframes spin { to { transform: rotate(360deg); } } /* Skeleton loading blocks */ .skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef0f5 25%, #e2e5ec 37%, #eef0f5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; } @keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } /* Respect reduced motion */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } } /* Empty-state block */ .empty-state { text-align: center; padding: 40px 20px; color: var(--muted); } .empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); } /* Field helper/error lines under inputs */ .field-error { color: var(--red); font-size: 12px; margin-top: 4px; } /* Responsive container default */ @media (max-width: 640px) { .main { padding: 16px; } .row { gap: 10px; } .msg-seller, .msg-customer { max-width: 84%; } /* Moreminimore convention: centered content when a section collapses to one column */ .stat-row > .card, .row.stat > .card { flex: 1 1 40%; text-align: center; } .stat div { text-align: center; } } @media (max-width: 460px) { .row.stat, .stat-row, .row.stat-row { justify-content: center; } .stat-row > .card { min-width: 42%; } }