:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #182935;
  background: #f0f4f5;
  --ink: #182935;
  --muted: #506472;
  --line: #d6e1e5;
  --brand: #165f63;
  --danger: #a13636;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.16; letter-spacing: -.045em; }
h2 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -.02em; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button {
  border: 1px solid transparent; padding: .48rem .85rem; border-radius: .45rem;
  font-weight: 650; color: var(--ink); background: white; white-space: nowrap;
}
button:disabled { opacity: .48; cursor: default; }
input:not([type=checkbox]) {
  display: block; width: 100%; min-height: 2.6rem; margin-top: .25rem;
  padding: .4rem .58rem; border: 1px solid #acbec6; background: #fcfefe;
  border-radius: .38rem; color: var(--ink);
}
:focus-visible { outline: 3px solid #378e91; outline-offset: 3px; }
label, legend { font-size: .88rem; font-weight: 650; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }
code { font: .95rem/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.wrap { width: min(76rem, calc(100% - 2rem)); margin-inline: auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner, .heading, .page-title {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.masthead-inner { min-height: 4.4rem; }
.main-panel { padding-block: 2.55rem 3rem; }
.page-title { margin-bottom: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .62rem; color: var(--ink); text-decoration: none; font-size: 1.16rem; font-weight: 760; line-height: 1.13; }
.brand small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }
.brandmark {
  display: grid; place-items: center; width: 2.35rem; height: 2.35rem;
  color: white; background: var(--brand); border-radius: .52rem; font-weight: 750;
}
.phase, .state { display: inline-block; border-radius: 999px; padding: .2rem .65rem; font-size: .78rem; font-weight: 700; }
.phase, .off { background: #e6ecef; color: #435a67; }
.on { background: #dcf1e9; color: #20594a; }
.overview { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; margin-bottom: 1rem; }
.workbench { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(22rem, 1fr); gap: 1rem; align-items: start; }
.softphone-card { min-width: 0; }
.softphone-card .heading a { color: var(--brand); font-size: .85rem; }
.softphone-frame { display: block; width: 100%; height: 38rem; border: 0; margin-top: .6rem; }
.card, .login-card { background: #fff; border: 1px solid var(--line); border-radius: .7rem; padding: 1.25rem; }
.card h2 { margin-bottom: .75rem; }
.heading h2 { margin-bottom: 0; }
.muted { color: var(--muted); font-size: .87rem; }
.primary { background: var(--brand); color: white; }
.primary:not(:disabled):hover { background: #124d52; }
.quiet { border-color: #adbec5; background: #fff; }
.quiet:not(:disabled):hover { background: #ecf3f4; }
.text { color: var(--brand); padding: .2rem .45rem; }
.danger { color: var(--danger); font-weight: 650; }
.actions, .inline { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.actions { margin-top: .85rem; }
.inline { align-items: end; }
.inline label { flex: 1 1 8rem; }
.bans { list-style: none; margin: .4rem 0 0; padding: 0; }
.bans li { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.inline + .muted { margin-top: .5rem; }
.new-phone { margin-top: 1rem; padding: .65rem .75rem; background: #edf5f5; border-radius: .4rem; }
.new-phone summary { color: #124d52; font-weight: 680; }
.phone { border-bottom: 1px solid var(--line); }
.phone:last-child { border-bottom: 0; }
.phone > summary { list-style: none; display: grid; grid-template-columns: 3.4rem 1.4fr 1fr auto; align-items: center; gap: .6rem; padding: .75rem 0; }
.phone > summary::-webkit-details-marker { display: none; }
.extension { color: var(--brand); font: 650 .95rem ui-monospace, monospace; }
.edit-label { font-size: .8rem; color: var(--brand); }
.phone[open] > summary .edit-label { visibility: hidden; }
.phone-controls { border-radius: .42rem; background: #f4f7f8; padding: .75rem; margin-bottom: .75rem; }
.edit-form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; padding-top: .45rem; }
.edit-form > label { flex: 1 1 7rem; }
.check { display: inline-flex; margin-right: .35rem; align-items: center; gap: .14rem; font-weight: 540; }
.check input { accent-color: var(--brand); }
.secondary { align-items: start; }
.message { padding: .65rem .85rem; border: 1px solid; border-radius: .5rem; margin-bottom: 1rem; }
.message p { margin: .25rem 0; }
.error { color: #802c2c; border-color: #e5baba; background: #fbf0f0; }
.success { color: #215447; border-color: #a9d3c6; background: #ecf8f4; }
.access { min-height: 100svh; display: grid; place-items: center; padding: 1.25rem; background: linear-gradient(145deg, #edf5f4, #edf0f6); }
.login-card { width: min(26rem, 100%); padding: clamp(1.25rem, 6vw, 2.2rem); box-shadow: 0 12px 38px #233b5312; }
.login-card h1 { margin: 1.4rem 0 1.1rem; font-size: 1.95rem; }
.login-form { display: grid; gap: .85rem; }
@media (max-width: 700px) {
  .overview { grid-template-columns: 1fr; }
  .main-panel { padding-top: 1.5rem; }
  .phone > summary { grid-template-columns: 2.7rem 1fr auto; }
  .phone > summary > .muted { grid-column: 2; grid-row: 2; }
  .phone > summary > .edit-label { grid-column: 3; grid-row: 1; }
}
@media (max-width: 850px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
}
