/* HandL OS customer portal — Clover-like: white surfaces, green accent. */
:root {
  --cg:#1a9e4b; --cg-dark:#137a39; --cg-soft:#e9f7ef; --bg:#f5f6f8; --line:#e6e8eb; --ink:#22262c; --muted:#6b7280;
  --navy:#0f2540; --orange:#f59e0b; --red:#dc2626; --red-soft:#fee2e2; --amber:#b45309; --amber-soft:#fef3c7;
}
* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--ink); font-family:'Segoe UI',system-ui,-apple-system,Arial,sans-serif; font-size:14px; }
a { color:var(--cg-dark); }
.hidden { display:none !important; }
.brand { font-weight:800; font-size:19px; letter-spacing:.2px; color:var(--navy); }
.brand .l { color:var(--orange); }
.muted { color:var(--muted); font-size:12.5px; }
button { font-family:inherit; }

/* buttons + inputs */
.btn { background:var(--cg); color:#fff; border:none; border-radius:8px; padding:10px 16px; font-weight:700; font-size:14px; cursor:pointer; }
.btn:hover { background:var(--cg-dark); }
.btn:disabled { opacity:.55; cursor:default; }
.btn.ghost { background:#fff; color:var(--ink); border:1px solid var(--line); }
.btn.ghost:hover { background:var(--bg); }
.btn.sm { padding:6px 11px; font-size:12.5px; }
.btn.danger { background:#fff; color:var(--red); border:1px solid #fecaca; }
.btn.block { width:100%; }
label.f { display:flex; flex-direction:column; gap:5px; font-size:12px; font-weight:700; color:var(--muted); margin-bottom:12px; }
input, select { padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; font-family:inherit; background:#fff; color:var(--ink); width:100%; }
input:focus, select:focus { outline:2px solid var(--cg-soft); border-color:var(--cg); }
.err { color:var(--red); font-size:13px; min-height:18px; margin:4px 0 8px; }
.ok-msg { color:var(--cg-dark); font-size:13px; }

/* sign-in pages */
.auth { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.auth-card { background:#fff; border:1px solid var(--line); border-radius:14px; width:100%; max-width:400px; padding:28px 26px; box-shadow:0 8px 30px rgba(15,37,64,.06); }
.auth-card h1 { font-size:20px; margin:18px 0 4px; }
.auth-card .sub { color:var(--muted); margin:0 0 18px; font-size:13.5px; }
.auth-top { display:flex; align-items:center; justify-content:space-between; }
.code-input { font-size:24px; letter-spacing:8px; text-align:center; font-weight:700; }
.dev { background:#fefce8; border-left:4px solid var(--orange); padding:8px 10px; font-size:12px; border-radius:0 6px 6px 0; margin-bottom:10px; }

/* language switch */
.lang { display:inline-flex; border:1px solid var(--line); border-radius:7px; overflow:hidden; }
.lang button { background:#fff; border:none; padding:5px 9px; font-size:12px; font-weight:700; color:var(--muted); cursor:pointer; }
.lang button.on { background:var(--cg); color:#fff; }

/* shell */
.top { background:#fff; border-bottom:1px solid var(--line); height:58px; display:flex; align-items:center; gap:14px; padding:0 18px; position:sticky; top:0; z-index:5; }
.top .biz { font-weight:700; color:var(--ink); padding-left:14px; border-left:1px solid var(--line); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.top .sp { flex:1; }
.top .who { font-size:13px; color:var(--muted); white-space:nowrap; }
.menu-btn { display:none; background:none; border:none; font-size:22px; cursor:pointer; color:var(--ink); padding:4px; }
.shell { display:flex; min-height:calc(100vh - 58px); }
.side { width:228px; background:#fff; border-right:1px solid var(--line); padding:14px 10px; flex-shrink:0; }
.side a { display:flex; gap:11px; align-items:center; padding:11px 12px; border-radius:9px; text-decoration:none; color:#374151; font-weight:600; margin-bottom:2px; }
.side a:hover { background:var(--bg); }
.side a.on { background:var(--cg-soft); color:var(--cg-dark); }
.side a .i { width:20px; text-align:center; }
.side hr { border:none; border-top:1px solid var(--line); margin:10px 4px; }
.main { flex:1; min-width:0; padding:24px 26px 40px; max-width:1100px; }
.main h2 { margin:0 0 4px; font-size:22px; }
.main .lead { color:var(--muted); margin:0 0 20px; }

/* cards */
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; margin-bottom:18px; }
.card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.card h3 { margin:0 0 12px; font-size:15px; }
.kpi .k { font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.kpi .v { font-size:24px; font-weight:800; margin-top:6px; }
.kpi .s { font-size:12.5px; color:var(--muted); margin-top:3px; }
.stack > * + * { margin-top:14px; }
.row-between { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }

.pill { display:inline-block; padding:2px 9px; border-radius:10px; font-size:11.5px; font-weight:700; white-space:nowrap; }
.p-ok { background:#dcfce7; color:#15803d; } .p-bad { background:var(--red-soft); color:var(--red); }
.p-warn { background:var(--amber-soft); color:var(--amber); } .p-grey { background:#eef0f3; color:#4b5563; }
.dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; }
.d-ok { background:#16a34a; } .d-warn { background:var(--orange); } .d-off { background:#cbd5e1; }

.tbl-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th, td { text-align:left; padding:10px; border-bottom:1px solid var(--line); white-space:nowrap; }
th { color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.4px; }
td.num, th.num { text-align:right; }
tr.total td { font-weight:800; border-bottom:none; }

.loc { border:1px solid var(--line); border-radius:12px; background:#fff; padding:16px 18px; margin-bottom:12px; }
.loc .name { font-weight:800; font-size:15.5px; }
.dev-list { margin:10px 0 0; padding:0; list-style:none; }
.dev-list li { display:flex; gap:10px; align-items:center; padding:7px 0; border-top:1px dashed var(--line); font-size:13px; }
.dev-list li .t { margin-left:auto; color:var(--muted); font-size:12px; }

.banner { border-radius:10px; padding:12px 16px; margin-bottom:16px; font-size:13.5px; }
.banner.warn { background:#fffbeb; border:1px solid #fcd34d; color:#78350f; }
.banner.bad { background:#fef2f2; border:1px solid #fecaca; color:#7f1d1d; }
.banner.info { background:#eff6ff; border:1px solid #bfdbfe; color:#1e3a8a; }

.feat { margin:6px 0 0; padding-left:18px; color:#374151; }
.feat li { margin:3px 0; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { background:var(--cg-soft); color:var(--cg-dark); border-radius:14px; padding:4px 10px; font-size:12.5px; font-weight:600; }

/* modal */
.modal-bg { position:fixed; inset:0; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; padding:16px; z-index:20; }
.modal { background:#fff; border-radius:14px; width:100%; max-width:440px; padding:22px; max-height:90vh; overflow:auto; }
.modal h3 { margin:0 0 14px; }
.modal .actions { display:flex; gap:8px; justify-content:flex-end; margin-top:8px; }
.checks label { display:flex; gap:8px; align-items:center; font-size:13.5px; margin:6px 0; font-weight:500; color:var(--ink); }
.checks input { width:auto; }

@media (max-width: 780px) {
  .menu-btn { display:block; }
  .side { position:fixed; top:58px; bottom:0; left:0; z-index:6; transform:translateX(-100%); transition:transform .18s; box-shadow:4px 0 20px rgba(0,0,0,.08); }
  .side.open { transform:none; }
  .main { padding:18px 16px 36px; }
  .top .who { display:none; }
  .top .biz { max-width:45vw; }
}
td:first-child { white-space:normal; min-width:150px; }
.main code { background:#f1f5f9; color:#0f2540; padding:2px 6px; border-radius:5px; font-size:12px; word-break:break-all; }
.brand { white-space:nowrap; }
@media (max-width: 780px) { .cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .kpi .v { font-size:20px; } .top { gap:10px; padding:0 12px; } }

/* ── phase 2 ── */
textarea { padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; font-family:inherit; background:#fff; color:var(--ink); width:100%; resize:vertical; }
textarea:focus { outline:2px solid var(--cg-soft); border-color:var(--cg); }
.p-blue { background:#dbeafe; color:#1d4ed8; }
/* offer themes */
.th-green { --o1:#e9f7ef; --o2:#137a39; } .th-blue { --o1:#e8f0fe; --o2:#1d4ed8; } .th-orange { --o1:#fff4e0; --o2:#b45309; }
.th-purple { --o1:#f3e8ff; --o2:#7e22ce; } .th-navy { --o1:#e7ecf3; --o2:#0f2540; }
.ostrip { display:flex; align-items:center; gap:12px; background:var(--o1); color:var(--o2); border-radius:12px; padding:10px 12px 10px 14px; margin-bottom:16px; font-size:13.5px; }
.ostrip .art { font-size:22px; } .ostrip .tx { flex:1; min-width:0; color:var(--ink); } .ostrip .tx b { color:var(--o2); }
.ostrip .x { background:none; border:none; color:var(--muted); cursor:pointer; font-size:14px; padding:4px; }
.ocar-wrap { margin-bottom:18px; }
.ocar { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(260px, calc((100% - 28px) / 3)); gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px; }
.ocard { scroll-snap-align:start; background:#fff; border:1px solid var(--line); border-top:4px solid var(--o2); border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; min-height:220px; }
.ocard .otop { display:flex; justify-content:space-between; align-items:center; }
.ocard .art { font-size:26px; background:var(--o1); border-radius:10px; width:44px; height:44px; display:flex; align-items:center; justify-content:center; }
.ocard .partner { font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; }
.ocard .ot { font-weight:800; font-size:15.5px; margin:10px 0 4px; }
.ocard .ob { color:#374151; font-size:13.5px; flex:1; }
.ocard .ofine { color:var(--muted); font-size:11px; margin-top:8px; line-height:1.35; }
.ocard .oact { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
/* market */
.mgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.mcard { display:flex; flex-direction:column; }
.mcard.focus { outline:3px solid var(--cg); }
.mhead { display:flex; gap:12px; align-items:center; }
.micon { font-size:24px; width:44px; height:44px; border-radius:10px; background:var(--cg-soft); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.mt { font-weight:800; }
.mb { color:#374151; font-size:13.5px; margin:10px 0; flex:1; }
.mfoot { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:10px; }
.mprice { font-weight:700; font-size:13px; }
/* ticket thread */
.thread { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.msg { max-width:min(640px, 92%); border-radius:12px; padding:10px 14px; border:1px solid var(--line); background:#fff; }
.msg.me { align-self:flex-end; background:var(--cg-soft); border-color:#cdebd8; }
.msg .mh { font-size:12.5px; margin-bottom:4px; }
.msg .mbody { white-space:pre-wrap; word-wrap:break-word; font-size:14px; }
.msys { align-self:center; color:var(--muted); font-size:12px; }
@media (max-width: 780px) { .ocar { grid-auto-columns:85%; } .ostrip { flex-wrap:wrap; } }
