:root { --ink: #14213d; --muted: #4a5568; --line: #d5dae2; --ground: #f4f6f8; --accent: #0b7a75; --danger: #b42318; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Hind Siliguri", "Noto Sans Bengali", "SolaimanLipi", system-ui, sans-serif; font-size: 16px; line-height: 1.5; }
h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0; }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.link { border: none; background: none; color: var(--accent); text-decoration: underline; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f0a202; outline-offset: 2px; }
input, select { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid #8b95a5; background: #fff; color: var(--ink); }
label { display: block; margin: 14px 0 4px; font-size: 0.95rem; }
label.check { display: flex; align-items: center; gap: 10px; }
label.check input { width: 22px; min-height: 22px; height: 22px; }
.error { color: var(--danger); margin: 12px 0 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.06em; overflow-wrap: anywhere; }

.login { max-width: 360px; margin: 12vh auto; padding: 28px 24px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.login button { width: 100%; margin-top: 20px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--ink); color: #fff; }
.top .link { color: #bfe3e0; }
.content { max-width: 1000px; margin: 0 auto; padding: 20px; }
section { margin-bottom: 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#calls-heading, #log-heading { margin-bottom: 12px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; font-size: 0.9rem; color: var(--muted); background: #fafbfc; }
tbody tr:last-child td { border-bottom: none; }
td.actions-cell { display: flex; flex-wrap: wrap; gap: 8px; }
td input.limit { width: 96px; }
.status::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; border: 2px solid var(--muted); }
.status.on::before { background: var(--accent); border-color: var(--accent); }
.status.unknown::before { border-style: dashed; }
.denied { color: var(--danger); }

dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
dialog::backdrop { background: rgba(20, 33, 61, 0.55); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
dl.secret { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 0; }
dl.secret dt { color: var(--muted); }
dl.secret dd { margin: 0; font-weight: 600; }
textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #8b95a5; background: #fff; color: var(--ink); font-family: ui-monospace, Consolas, monospace; }
textarea:focus-visible { outline: 3px solid #f0a202; outline-offset: 2px; }
#ip-heading { margin-bottom: 8px; }
#ip-message { margin: 12px 0 0; }
#ip-message.ok { color: #0b5e5a; }
#ip-message.bad { color: var(--danger); }
#trunk-heading { margin-bottom: 8px; }
#trunk-form { max-width: 520px; }
#trunk-message { margin: 12px 0 0; }
#trunk-message.ok { color: #0b5e5a; }
#trunk-message.bad { color: var(--danger); }
pre { margin: 8px 0 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }

.group-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 16px; margin-bottom: 12px; }
.group-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; }
.group-card .actions { justify-content: flex-start; margin-top: 12px; }
.inline-row { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-row input { flex: 1 1 220px; }
#groups-message.ok, #trunk-message.ok, #ip-message.ok { color: var(--accent); }
#groups-message.bad { color: var(--danger); }
