:root {
    color-scheme: light;
    --bg: #ffffff;
    --ink: #202124;
    --muted: #5f6368;
    --line: #dfe1e5;
    --line-soft: #ecedef;
    --hover: #f8f9fa;
    --chip: #f1f3f4;
    --link: #1a73e8;
    --blue: #1a73e8;
    --blue-dark: #1765cc;
    --ok-bg: #e6f4ea; --ok-ink: #137333;
    --warn-bg: #fef7e0; --warn-ink: #b06000;
    --err-bg: #fce8e6; --err-ink: #c5221f;
    --shadow: 0 1px 6px rgba(32,33,36,.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: Roboto, arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-text-size-adjust: 100%;
    line-height: 1.5;
    font-size: 15px;
}
.muted { color: var(--muted); font-weight: 400; }
i.muted { font-style: italic; }

/* topbar — minimal, terang */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 18px;
    padding-top: max(12px, env(safe-area-inset-top));
}
.brand { color: var(--ink); font-weight: 500; font-size: 17px; text-decoration: none; letter-spacing: -.2px; }

.wrap { max-width: 620px; margin: 0 auto; padding: 22px 16px 48px; }

/* search — pill mengambang ala Google */
.search {
    position: relative;
    display: flex; align-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 3px 8px;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.search:focus-within { box-shadow: var(--shadow); border-color: transparent; }
.search-ic { font-size: 15px; opacity: .55; padding-left: 8px; }
.search input {
    flex: 1; border: 0; outline: 0; background: transparent;
    font-size: 16px; padding: 12px 10px; color: var(--ink);
}
.search-clear {
    text-decoration: none; color: var(--muted);
    font-size: 18px; padding: 8px 12px; border-radius: 50%; line-height: 1;
}
.search-clear:hover { background: var(--hover); }

/* list head */
.list-head { margin: 24px 6px 6px; }
.list-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.list-head p { margin: 2px 0 0; font-size: 13px; }

/* results — flat, airy, tanpa kotak berat */
.cards { display: flex; flex-direction: column; }
.card {
    display: block; text-decoration: none; color: inherit;
    padding: 14px 12px;
    border-radius: 10px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .12s ease;
}
.card:last-child { border-bottom: 0; }
.card:hover { background: var(--hover); }
.card:active { background: var(--chip); }
.card-top { display: flex; align-items: center; gap: 9px; }
.ssid { font-weight: 400; font-size: 18px; color: var(--link); word-break: break-word; letter-spacing: -.1px; }
.card:hover .ssid { text-decoration: underline; }
.card-meta { margin-top: 3px; padding-left: 19px; }
.meta { font-size: 13px; color: var(--muted); }
.sn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.card-foot { font-size: 12.5px; margin-top: 4px; padding-left: 19px; }

/* status dot */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.dot.on  { background: #34a853; }
.dot.off { background: #bdc1c6; }

/* tags — chip abu halus */
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; padding-left: 19px; }
.panel .tags { padding-left: 0; }
.tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--chip); color: var(--muted);
    border-radius: 999px; font-size: 13px; padding: 4px 12px; font-weight: 400;
}
.tag-x {
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    font-size: 13px; padding: 0 0 0 2px; line-height: 1; opacity: .6;
}
.tag-x:hover { opacity: 1; }

/* empty */
.empty {
    padding: 40px 18px; text-align: center; color: var(--muted); margin-top: 12px;
}
.empty p { margin: 8px 0; }
.empty a { color: var(--link); text-decoration: none; }

/* device detail */
.back { display: inline-block; margin: 2px 2px 16px; color: var(--link); text-decoration: none; font-size: 14px; }
.back:hover { text-decoration: underline; }
.dev-head { display: flex; gap: 11px; align-items: flex-start; margin: 0 2px 20px; }
.dev-head h2 { margin: 0 0 3px; font-size: 22px; font-weight: 400; word-break: break-word; letter-spacing: -.3px; }
.dev-head p { margin: 1px 0; font-size: 13px; }
.dev-head .dot { margin-top: 10px; }

/* panels */
.panel {
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px; margin-bottom: 14px;
}
.panel h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
.panel > p { margin: 0 0 14px; font-size: 13px; }

/* forms */
label { display: block; font-size: 13px; font-weight: 500; margin: 12px 0 6px; color: var(--muted); }
label .muted { font-weight: 400; }
input[type=text], input[type=password], input[type=search] {
    width: 100%; font-size: 16px; padding: 13px 14px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink);
    transition: border-color .12s ease, box-shadow .12s ease;
}
input[type=text]:focus, input[type=password]:focus {
    outline: 0; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue);
}
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; font-size: 18px; cursor: pointer; padding: 6px; opacity: .7;
}
.pass-toggle:hover { opacity: 1; }
.btn-primary, .btn-secondary {
    display: inline-block; width: 100%; margin-top: 18px;
    font-size: 15px; font-weight: 500; padding: 13px; border: 0;
    border-radius: 8px; cursor: pointer; transition: background .12s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary {
    width: auto; margin-top: 0; background: var(--bg); color: var(--blue);
    border: 1px solid var(--line); padding: 12px 18px;
}
.btn-secondary:hover { background: var(--hover); }

.tag-form { display: flex; gap: 8px; margin-top: 14px; }
.tag-form input { flex: 1; }

/* flash */
.flash {
    border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; font-weight: 400;
}
.flash.ok   { background: var(--ok-bg);   color: var(--ok-ink); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.flash.err  { background: var(--err-bg);  color: var(--err-ink); }

/* footer */
.botbar { text-align: center; font-size: 12px; padding: 26px 10px 34px; color: var(--muted); }
