:root { --ink:#111827; --muted:#64748b; --quiet:#94a3b8; --line:#dfe5ec; --soft:#f8fafc; --navy:#0f172a; --blue:#2563eb; --blue-soft:#eff6ff; --green:#15936b; --green-soft:#ecfdf5; --orange:#e1742d; --orange-soft:#fff7ed; --shadow:0 18px 50px rgba(15,23,42,.06); }
* { box-sizing:border-box; }
body { margin:0; min-width:320px; color:var(--ink); background:linear-gradient(180deg,#fff 0%,#fbfcfe 52%,#f7fafc 100%); font-family:"Trebuchet MS","Segoe UI",sans-serif; letter-spacing:-.012em; }
button,input,select { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
.portal-header { height:74px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 clamp(18px,5vw,74px); border-bottom:1px solid #e8edf2; background:rgba(255,255,255,.88); backdrop-filter:blur(16px); }
.brand { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; }
.brand-mark { display:grid; place-items:center; width:32px; height:32px; border-radius:9px; color:#fff; background:var(--navy); font-family:Georgia,serif; font-size:18px; font-weight:700; }
.brand strong,.brand small { display:block; }
.brand strong { font-family:Georgia,serif; font-size:15px; letter-spacing:-.03em; }
.brand small { margin-top:1px; color:var(--muted); text-transform:uppercase; letter-spacing:.16em; font-size:8px; }
.header-right { display:flex; align-items:center; gap:24px; }
.privacy-badge { display:flex; align-items:center; gap:8px; color:#187752; font-size:11px; }
.privacy-badge i,.portal-footer i { width:7px; height:7px; border-radius:50%; background:#36b37e; box-shadow:0 0 0 4px rgba(54,179,126,.12); }
.back-link { color:var(--muted); text-decoration:none; font-size:11px; }
.back-link:hover { color:var(--blue); }
.back-link span { margin-left:4px; color:var(--blue); }
.portal-main { width:min(100%,1120px); margin:0 auto; padding:50px 24px 55px; }
.intro { margin-bottom:26px; }
.eyebrow { margin:0 0 10px; color:#527295; text-transform:uppercase; letter-spacing:.18em; font-size:10px; font-weight:700; }
h1,h2,p { margin-top:0; }
h1 { margin-bottom:12px; font-family:Georgia,"Times New Roman",serif; letter-spacing:-.06em; font-size:clamp(34px,5vw,57px); line-height:.98; font-weight:700; }
h1 em { color:var(--blue); font-style:normal; }
.intro-copy { max-width:710px; margin-bottom:0; color:var(--muted); font-size:14px; line-height:1.55; }
.auth-card,.detail-card,.metric-card { border:1px solid var(--line); border-radius:15px; background:#fff; box-shadow:var(--shadow); }
.auth-card { overflow:hidden; }
.card-heading { display:flex; align-items:center; gap:11px; padding:18px 22px 17px; border-bottom:1px solid #edf1f5; }
.key-heading-icon { display:grid; place-items:center; width:27px; height:27px; color:var(--navy); font-size:21px; }
.card-heading h2,.detail-heading h2,.summary-heading h2 { margin:0; color:var(--ink); font-family:Georgia,"Times New Roman",serif; letter-spacing:-.04em; font-size:19px; }
.card-heading p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.lock-label { margin-left:auto; padding:5px 8px; border-radius:99px; color:#55708c; background:#f5f8fb; letter-spacing:.13em; font-size:8px; font-weight:700; }
#usageForm { padding:21px 22px 19px; }
.field { display:block; margin-bottom:15px; color:#3b4b63; font-size:11px; font-weight:700; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.input-wrap,.select-wrap { position:relative; display:flex; align-items:center; margin-top:7px; }
.input-wrap input,.select-wrap select { width:100%; height:41px; padding:0 12px; border:1px solid #d9e1ea; border-radius:8px; outline:0; color:#0f172a; background:#fff; font-size:12px; font-weight:400; }
.input-wrap input:focus,.select-wrap select:focus { border-color:#81a8e6; box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.input-action { position:absolute; right:7px; display:grid; place-items:center; width:28px; height:28px; border:0; color:#718096; background:transparent; cursor:pointer; }
.select-wrap span { position:absolute; right:13px; color:#64748b; pointer-events:none; }
.select-wrap select { appearance:none; padding-right:34px; }
.check-button { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:39px; margin-top:4px; border:0; border-radius:6px; color:#fff; background:#111a2d; cursor:pointer; font-size:12px; font-weight:700; transition:.18s ease; }
.check-button:hover { background:#22304d; transform:translateY(-1px); }
.check-button span { font-size:17px; line-height:0; }
.form-status { min-height:43px; display:flex; align-items:center; padding:0 22px; border-top:1px solid #edf1f5; color:var(--muted); font-size:10px; }
.form-status.is-error { color:#b42318; background:#fff8f7; }
.form-status.is-success { color:#13714f; background:#f4fcf8; }
.summary-section { margin-top:39px; }
.summary-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.summary-heading .eyebrow { margin-bottom:6px; }
.scope-chip { padding:6px 9px; border:1px solid var(--line); border-radius:99px; color:var(--muted); background:#fff; font-family:monospace; font-size:9px; }
.metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.metric-card { position:relative; min-height:145px; padding:19px 18px 17px; overflow:hidden; }
.metric-label { color:#5a7694; letter-spacing:.13em; font-size:9px; font-weight:700; }
.metric-value { margin-top:17px; color:#0f172a; font-family:Georgia,"Times New Roman",serif; letter-spacing:-.06em; font-size:33px; font-weight:700; }
.metric-card p { margin:8px 0 0; color:var(--muted); font-size:10px; }
.metric-icon { position:absolute; top:18px; right:17px; display:grid; place-items:center; width:30px; height:30px; border:1px solid #e2e8f0; border-radius:8px; color:#111a2d; background:#fbfdff; font-size:16px; }
.metric-card:nth-child(1) .metric-icon { color:#a85b20; background:var(--orange-soft); border-color:#fde5ce; }
.metric-card:nth-child(2) .metric-icon { color:#a66c0f; background:#fffbeb; border-color:#fbecc3; }
.metric-card:nth-child(3) .metric-icon { color:#2563eb; background:var(--blue-soft); border-color:#dbeafe; }
.metric-card:nth-child(4) .metric-icon { color:#147756; background:var(--green-soft); border-color:#ccefe1; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr); gap:14px; margin-top:14px; }
.detail-card { padding:20px; }
.detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }
.detail-heading .eyebrow { margin-bottom:7px; }
.detail-total { color:var(--muted); font-family:monospace; font-size:10px; }
.daily-chart { min-height:194px; display:flex; align-items:flex-end; gap:9px; padding:20px 5px 4px; border-top:1px solid #eef2f5; margin-top:18px; }
.bar-column { display:flex; flex:1; flex-direction:column; align-items:center; gap:7px; min-width:0; height:165px; justify-content:flex-end; }
.bar { width:100%; max-width:34px; min-height:3px; border-radius:5px 5px 2px 2px; background:linear-gradient(180deg,#6ea2f6,#2563eb); }
.bar-label { overflow:hidden; color:#93a3b5; font-family:monospace; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.bar-value { color:#52657c; font-family:monospace; font-size:8px; }
.empty-state { align-self:center; width:100%; padding:16px; color:#94a3b8; text-align:center; font-size:11px; }
.key-card { display:flex; flex-direction:column; }
.status-pill { padding:5px 8px; border-radius:99px; font-size:9px; font-weight:700; }
.status-muted { color:#64748b; background:#f1f5f9; }
.status-good { color:#13714f; background:var(--green-soft); }
.key-context { display:flex; align-items:center; gap:12px; margin:27px 0 23px; }
.key-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; color:#244e9c; background:#eaf2ff; font-size:12px; font-weight:800; }
.key-context strong,.key-context span { display:block; }
.key-context strong { font-family:Georgia,"Times New Roman",serif; font-size:16px; }
.key-context span { margin-top:4px; color:var(--muted); font-size:10px; }
.quota-line { margin-top:auto; }
.quota-line > div:first-child { display:flex; justify-content:space-between; color:var(--muted); font-size:10px; }
.quota-line strong { color:var(--ink); font-family:monospace; font-size:10px; }
.quota-track { height:7px; overflow:hidden; margin-top:8px; border-radius:99px; background:#eaf0f5; }
.quota-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#6ea2f6,#2563eb); transition:width .45s ease; }
.key-note { margin:19px 0 0; padding-top:14px; border-top:1px solid #eef2f5; color:#8090a1; font-size:10px; line-height:1.5; }
.portal-footer { display:flex; justify-content:space-between; gap:18px; padding:18px clamp(18px,5vw,74px) 24px; border-top:1px solid #e8edf2; color:#8a9aaa; font-family:monospace; font-size:9px; }
.portal-footer span:last-child { display:flex; align-items:center; gap:7px; }
.toast { position:fixed; right:20px; bottom:20px; max-width:330px; padding:12px 14px; border:1px solid #cbdaf0; border-radius:9px; color:#1f3b68; background:#f4f8ff; box-shadow:0 14px 35px rgba(15,23,42,.12); opacity:0; pointer-events:none; transform:translateY(8px); transition:.2s ease; font-size:11px; }
.toast.is-visible { opacity:1; transform:none; }
@media (max-width:760px) { .portal-header { height:auto; min-height:68px; padding:14px 18px; align-items:flex-start; } .header-right { flex-direction:column; align-items:flex-end; gap:7px; } .privacy-badge { font-size:9px; text-align:right; } .portal-main { padding:35px 15px 42px; } .field-grid,.detail-grid { grid-template-columns:1fr; } .metric-grid { grid-template-columns:repeat(2,1fr); } .metric-card { min-height:132px; } .metric-value { font-size:28px; } .portal-footer { flex-direction:column; gap:9px; } }
@media (max-width:430px) { .portal-header { flex-direction:column; gap:13px; } .header-right { width:100%; flex-direction:row; justify-content:space-between; align-items:center; } .metric-grid { grid-template-columns:1fr; } .metric-card { min-height:125px; } h1 { font-size:39px; } .card-heading { align-items:flex-start; } .lock-label { display:none; } }
