:root {
    --bg: #07111f;
    --panel: #0d1b2b;
    --panel-2: #10243a;
    --text: #edf5ff;
    --muted: #95a8be;
    --border: rgba(255,255,255,.09);
    --accent: #2d8cff;
    --accent-2: #58a7ff;
    --success: #1fc77e;
    --danger: #ff5f6d;
    --shadow: 0 28px 80px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 15%, rgba(45,140,255,.18), transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(49,216,154,.10), transparent 32%),
        var(--bg);
    color: var(--text);
}
.shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 36px; }
.hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.brand-mark {
    width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px;
    font-weight: 800; letter-spacing: -.04em;
    background: linear-gradient(145deg, var(--accent), #155fbc);
    box-shadow: 0 14px 38px rgba(45,140,255,.28);
    overflow: hidden;
}
.brand-mark.has-logo { background: rgba(255,255,255,.06); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.eyebrow { margin: 0 0 4px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(30px, 6vw, 44px); letter-spacing: -.04em; }
.subtitle { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.card {
    position: relative; display: flex; gap: 18px; margin: 18px 0; padding: 24px;
    border: 1px solid var(--border); border-radius: 22px;
    background: linear-gradient(180deg, rgba(16,36,58,.94), rgba(13,27,43,.94));
    box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.step {
    flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
    background: rgba(45,140,255,.14); border: 1px solid rgba(88,167,255,.35); color: var(--accent-2); font-weight: 800;
}
.card-content { flex: 1; min-width: 0; }
.card h2 { margin: 2px 0 6px; font-size: 20px; }
.card p { margin: 0 0 18px; color: var(--muted); }
label { display: block; margin: 14px 0; color: #cfe0f3; font-size: 14px; font-weight: 650; }
input, textarea {
    width: 100%; margin-top: 8px; padding: 14px 15px; border: 1px solid var(--border);
    border-radius: 12px; outline: none; background: rgba(3,10,18,.58); color: var(--text); font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease;
}
textarea { resize: vertical; min-height: 108px; }
input:focus, textarea:focus { border-color: rgba(88,167,255,.7); box-shadow: 0 0 0 4px rgba(45,140,255,.10); }
button { border: 0; font: inherit; cursor: pointer; }
button:disabled { opacity: .62; cursor: wait; }
.primary {
    width: 100%; margin-top: 6px; padding: 14px 16px; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #176fcf); color: white; font-weight: 800;
    box-shadow: 0 12px 30px rgba(45,140,255,.18);
}
.secondary-button {
    padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.06); color: #d7e8fb;
    border: 1px solid rgba(255,255,255,.08);
}
.link-button { padding: 8px 10px; background: transparent; color: var(--muted); font-size: 14px; }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.alert { margin: 18px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; line-height: 1.45; }
.alert.success { background: rgba(31,199,126,.10); border-color: rgba(31,199,126,.28); color: #8cf0bd; }
.alert.error { background: rgba(255,95,109,.10); border-color: rgba(255,95,109,.28); color: #ffb0b8; }
.device-result { margin-top: 18px; padding: 16px; border: 1px solid rgba(31,199,126,.25); border-radius: 15px; background: rgba(31,199,126,.06); }
.status-badge {
    display: inline-flex; margin-bottom: 12px; padding: 5px 9px; border-radius: 999px;
    background: rgba(31,199,126,.15); color: #8cf0bd; font-size: 12px; font-weight: 850; letter-spacing: .08em;
}
dl { margin: 0; display: grid; gap: 9px; }
dl > div { display: flex; justify-content: space-between; gap: 18px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.06); }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 700; }
.history-head { align-items: center; }
.history-empty {
    padding: 16px; border: 1px dashed rgba(255,255,255,.12); border-radius: 14px; color: var(--muted);
    background: rgba(255,255,255,.02);
}
.table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; }
.history-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.history-table th, .history-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
.history-table th { background: rgba(255,255,255,.04); color: #b9cde4; font-size: 13px; }
.history-table td { color: #eaf3ff; font-size: 14px; }
.pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.success-pill { background: rgba(31,199,126,.15); color: #8cf0bd; }
.info-pill { background: rgba(45,140,255,.14); color: #8ec0ff; }
footer { margin-top: 28px; color: #6f8298; font-size: 12px; line-height: 1.5; text-align: center; }
.hidden { display: none !important; }
@media (max-width: 720px) {
    .shell { padding-top: 30px; }
    .hero { align-items: flex-start; }
    .card { padding: 18px; gap: 12px; }
    .step { width: 30px; height: 30px; }
    .row-between { gap: 8px; flex-direction: column; }
    .history-head { align-items: flex-start; }
}
