/* SenOS Cloud - public site, portal and console. Palette from the SenOS lotus logo. */
:root {
  --bg: #070716; --bg2: #0e0e24; --bg3: #16163a; --line: #2a2a58; --text: #eef0ff; --muted: #a3a7cf;
  --blue: #3b4bff; --violet: #8b5cff; --pink: #e14bd8; --cyan: #5ef2e6; --ok: #3ddc97; --warn: #ffb84d; --bad: #ff6b81;
  --grad: linear-gradient(120deg, #3b4bff 0%, #8b5cff 48%, #e14bd8 100%);
  --r: 18px; --font: 'Be Vietnam Pro', 'Segoe UI', system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); line-height: 1.6; font-size: 16px;
  background:
    radial-gradient(900px 520px at 100% -10%, rgba(225, 75, 216, .13), transparent 62%),
    radial-gradient(1000px 600px at -10% 30%, rgba(59, 75, 255, .16), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.right { text-align: right; }
.hide { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(7, 7, 22, .72); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 22px rgba(139, 92, 255, .45); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: .93rem; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }

/* buttons, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  color: var(--text); padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--violet); text-decoration: none; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px rgba(139, 92, 255, .8); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.sm { padding: 6px 12px; font-size: .85rem; }
.btn.danger { border-color: rgba(255, 107, 129, .5); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: .875rem; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 11px 14px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
textarea { min-height: 140px; resize: vertical; }
.field-row { display: flex; align-items: stretch; }
.field-row .pre { display: flex; align-items: center; padding: 0 12px; background: var(--bg3); border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.field-row input { border-radius: 0 12px 12px 0; }
.msg { margin-top: 10px; font-size: .9rem; min-height: 1.4em; }
.msg.bad { color: var(--bad); } .msg.ok { color: var(--ok); }

/* cards */
.card { background: rgba(14, 14, 36, .82); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat .k { color: var(--muted); font-size: .82rem; }
.stat .v { font-size: 1.6rem; font-weight: 800; line-height: 1.25; }
.stat .s { color: var(--muted); font-size: .8rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; border: 1px solid var(--line); }
.pill.active, .pill.paid { color: var(--ok); border-color: rgba(61, 220, 151, .45); }
.pill.pending, .pill.provisioning { color: var(--warn); border-color: rgba(255, 184, 77, .45); }
.pill.suspended, .pill.expired, .pill.error, .pill.cancelled, .pill.underpaid, .pill.no_order { color: var(--bad); border-color: rgba(255, 107, 129, .45); }
section { padding: 64px 0; }

/* home */
.hero { padding: 84px 0 56px; text-align: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.addr { display: inline-flex; margin: 30px auto 0; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); font-weight: 600; }
.addr b { color: var(--cyan); }
.feat h3 { margin-top: 10px; }
.feat .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(120deg, rgba(59, 75, 255, .25), rgba(225, 75, 216, .25)); font-size: 1.25rem; }
.steps { counter-reset: s; }
.steps .card { position: relative; padding-top: 46px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 14px; left: 20px; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.plan { display: flex; flex-direction: column; }
.plan.hot { border-color: var(--violet); box-shadow: 0 20px 60px -30px rgba(139, 92, 255, .9); }
.plan .price { font-size: 2rem; font-weight: 800; margin: 6px 0 2px; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 20px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; font-size: .93rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 800; }
.plan .tag { align-self: flex-start; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
footer { border-top: 1px solid var(--line); padding: 28px 0 90px; color: var(--muted); font-size: .88rem; }

/* auth + pay */
.narrow { width: min(460px, 100% - 32px); margin: 48px auto; }
.mid { width: min(760px, 100% - 32px); margin: 40px auto; }
.planpick { display: grid; gap: 10px; }
.planpick label { margin: 0; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; color: var(--text); font-size: .95rem; }
.planpick input { width: auto; }
.planpick label:has(input:checked) { border-color: var(--violet); background: rgba(139, 92, 255, .12); }
.planpick .p { margin-left: auto; font-weight: 700; white-space: nowrap; }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: 240px; height: 240px; display: grid; place-items: center; color: #333; text-align: center; font-size: .85rem; }
.qr img { width: 100%; height: 100%; object-fit: contain; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-all; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--muted); }

/* app pages */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 18px; }
.tabs button { background: none; border: 1px solid transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.on { color: var(--text); border-color: var(--line); background: rgba(139, 92, 255, .16); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid rgba(42, 42, 88, .6); vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 999px; background: var(--bg3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.spark i { flex: 1; min-width: 3px; background: var(--grad); border-radius: 3px 3px 0 0; opacity: .85; }
.spark i:hover { opacity: 1; }
.rowact { display: flex; gap: 6px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.banner { border: 1px solid rgba(255, 184, 77, .5); background: rgba(255, 184, 77, .08); color: #ffd699; padding: 12px 16px; border-radius: 14px; margin: 16px 0; font-size: .93rem; }

/* guide chatbot */
.guide-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad); box-shadow: 0 14px 40px -10px rgba(139, 92, 255, .9); padding: 0; overflow: hidden; }
.guide-fab img { width: 100%; height: 100%; object-fit: cover; }
.guide { position: fixed; right: 20px; bottom: 90px; z-index: 50; width: min(380px, 100vw - 24px); height: min(540px, 100vh - 120px); display: none; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px -20px #000; }
.guide.open { display: flex; }
.guide header { padding: 12px 16px; background: var(--grad); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.guide header span { font-weight: 500; font-size: .8rem; opacity: .9; }
.guide header button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.guide .log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.guide .m { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: .92rem; white-space: pre-wrap; word-wrap: break-word; }
.guide .m.u { align-self: flex-end; background: rgba(139, 92, 255, .28); border-bottom-right-radius: 4px; }
.guide .m.a { align-self: flex-start; background: var(--bg3); border-bottom-left-radius: 4px; }
.guide form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.guide form input { border-radius: 999px; }
@media (max-width: 640px) { section { padding: 44px 0; } .nav a.opt { display: none; } }
