:root {
  color-scheme: light;
  --navy: #07192f;
  --navy-2: #0c2947;
  --ink: #10233d;
  --muted: #6d7f93;
  --line: #dce6ef;
  --soft: #f3f7fa;
  --cyan: #08bce3;
  --cyan-dark: #087f9c;
  --green: #11996f;
  --red: #dc4f5b;
  --amber: #c27a10;
  --shadow: 0 20px 55px rgba(22, 55, 83, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #edf5f9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, audio:focus-visible {
  outline: 3px solid rgba(8, 188, 227, .3);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.eyebrow {
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -1.2px;
  text-decoration: none;
}
.brand em { color: var(--cyan-dark); font-style: normal; }
.brand-mark {
  width: 31px;
  height: 31px;
  border: 8px solid var(--cyan-dark);
  border-radius: 10px;
  transform: rotate(45deg);
}

/* Secure extension sign-in */
.login-shell {
  width: min(1180px, calc(100% - 38px));
  margin: auto;
  padding: 24px 0 30px;
}
.public-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.login-card {
  display: grid;
  min-height: 650px;
  margin-top: 22px;
  padding: clamp(36px, 6vw, 82px);
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(177, 201, 217, .8);
  border-radius: 30px;
  background:
    radial-gradient(circle at 5% 0%, rgba(8, 188, 227, .15), transparent 26rem),
    rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
.login-copy h1 {
  margin: 14px 0 20px;
  color: var(--navy);
  font-size: clamp(42px, 5vw, 67px);
  line-height: 1.02;
  letter-spacing: -.048em;
}
.login-copy > p {
  max-width: 560px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.feature-line {
  margin: 13px 0;
  color: #455b72;
  font-size: 14px;
  font-weight: 650;
}
.feature-line b { margin-right: 9px; color: var(--green); }
.login-form {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(27, 63, 91, .1);
}
.form-heading {
  display: flex;
  margin-bottom: 28px;
  gap: 12px;
  align-items: center;
}
.form-heading b, .form-heading small { display: block; }
.form-heading b { margin-bottom: 3px; }
.form-heading small { color: var(--muted); }
.secure-dot, .live-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(17, 153, 111, .1);
}
.login-form label {
  display: block;
  margin: 0 0 8px;
  color: #32475e;
  font-size: 13px;
  font-weight: 800;
}
.login-form input {
  width: 100%;
  height: 53px;
  margin-bottom: 18px;
  padding: 0 15px;
  border: 1px solid #c8d5df;
  border-radius: 11px;
  background: #fbfdff;
  color: var(--ink);
}
.login-form input:focus { border-color: var(--cyan); }
.primary-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #08bce3, #18d0d1);
  color: #032239;
  font-weight: 900;
}
.primary-button:disabled { cursor: wait; opacity: .65; }
.form-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #efb5ba;
  border-radius: 9px;
  background: #fff2f3;
  color: #b62f3a;
  font-size: 13px;
  line-height: 1.5;
}
.privacy-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}
.login-shell footer {
  padding-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* App shell */
.workspace {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 255px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  padding: 27px 18px 20px;
  flex-direction: column;
  background: var(--navy);
  color: #d5e3ef;
}
.sidebar-brand { margin: 0 12px 35px; color: #fff; }
.sidebar-brand em { color: var(--cyan); }
.extension-card {
  display: flex;
  margin-bottom: 24px;
  padding: 14px;
  gap: 11px;
  align-items: center;
  border: 1px solid rgba(132, 178, 211, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
}
.extension-card > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #087f9c;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.extension-card b, .extension-card small { display: block; }
.extension-card b {
  max-width: 145px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.extension-card small {
  max-width: 145px;
  margin-top: 3px;
  overflow: hidden;
  color: #8197aa;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.extension-card small + small { color: #b6c8d6; font-weight: 750; }
.sidebar nav { display: grid; gap: 6px; }
.nav-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8da3b7;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}
.nav-button span { width: 17px; color: #6f889d; text-align: center; }
.nav-button:hover, .nav-button.active {
  background: rgba(8, 188, 227, .11);
  color: #fff;
}
.nav-button.active { box-shadow: inset 3px 0 var(--cyan); }
.nav-button i {
  display: grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
}
.sidebar-bottom { margin-top: auto; }
.switch-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.switch-row span { min-width: 0; }
.switch-row b, .switch-row small { display: block; }
.switch-row b { font-size: 12px; }
.switch-row small { margin-top: 4px; color: #778da1; font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #607287;
  transition: .2s ease;
}
.switch-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: .2s ease;
}
.switch-row input:checked + i { background: var(--cyan-dark); }
.switch-row input:checked + i::after { transform: translateX(16px); }
.signout-button {
  width: 100%;
  margin-top: 20px;
  padding: 13px;
  border: 1px solid rgba(177, 208, 229, .14);
  border-radius: 9px;
  background: transparent;
  color: #8da3b7;
  font-size: 11px;
  font-weight: 800;
}
.signout-button:hover { color: #fff; }
.main-area { min-width: 0; padding: 29px clamp(22px, 4vw, 56px) 50px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 31px;
  letter-spacing: -.035em;
}
.connection-status { text-align: right; }
.connection-status span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.connection-status span::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a4b4;
  content: "";
}
.connection-status span[data-tone="ready"]::before,
.connection-status span[data-tone="active"]::before { background: var(--green); }
.connection-status span[data-tone="ringing"]::before { background: var(--cyan); animation: pulse 1s infinite; }
.connection-status span[data-tone="error"]::before { background: var(--red); }
.connection-status small { display: block; margin-top: 4px; color: #93a2b1; font-size: 10px; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .55; } }

.stats-grid {
  display: grid;
  margin: 27px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.stats-grid article {
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(24, 57, 84, .045);
}
.stats-grid span, .stats-grid small { display: block; color: var(--muted); font-size: 11px; }
.stats-grid span { font-weight: 750; }
.stats-grid strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--navy);
  font-size: 28px;
  letter-spacing: -.04em;
}
.view-section { animation: reveal .18s ease; }
@keyframes reveal { from { opacity: .35; transform: translateY(3px); } }
.phone-layout {
  display: grid;
  grid-template-columns: minmax(320px, .78fr) minmax(380px, 1.22fr);
  gap: 18px;
  align-items: stretch;
}
.phone-console, .activity-card, .content-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 57, 84, .055);
}
.phone-console { overflow: hidden; }
.console-head {
  display: flex;
  min-height: 55px;
  padding: 0 19px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.console-head > div { display: flex; gap: 10px; align-items: center; }
.console-head > div > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.console-head small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 650; }
.icon-button, .text-link {
  border: 0;
  background: transparent;
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 850;
}
.call-screen {
  display: flex;
  min-height: 145px;
  padding: 26px 18px 19px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(145deg, #f8fbfd, #eef7fa);
  text-align: center;
}
.screen-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.connected-label { color: var(--green); }
.dial-display, .caller-number {
  max-width: 100%;
  margin: 12px 0 7px;
  overflow: hidden;
  color: var(--navy);
  font-size: clamp(23px, 2.5vw, 32px);
  font-weight: 750;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.call-screen small { color: var(--muted); font-size: 11px; }
.quality-label {
  margin-top: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e4f7f0;
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
}
.dialpad {
  display: grid;
  max-width: 310px;
  margin: 15px auto 10px;
  padding: 0 13px;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.dialpad button {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
}
.dialpad button:hover { background: var(--soft); }
.dialpad b { font-size: 21px; line-height: 1; }
.dialpad small { color: #8495a6; font-size: 7px; font-weight: 850; letter-spacing: .13em; }
.phone-controls {
  display: flex;
  min-height: 76px;
  padding: 12px 18px 18px;
  gap: 9px;
  align-items: center;
  justify-content: center;
}
.phone-controls button {
  min-height: 43px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
}
.secondary-control { background: #edf2f6; color: #41576e; }
.call-control { background: var(--green); color: #fff; }
.call-control.disabled { cursor: not-allowed; opacity: .45; }
.answer-control { background: var(--green); color: #fff; }
.hangup-control { background: var(--red); color: #fff; }
.record-control { background: #fff0f1; color: #bd3541; }
.record-control span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--red);
}
.record-control.active { background: var(--red); color: #fff; }
.record-control.active span { background: #fff; animation: pulse 1s infinite; }

.activity-card, .content-card { padding: 25px; }
.section-head {
  display: flex;
  margin-bottom: 20px;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
}
.section-head h2 { margin: 5px 0 0; color: var(--navy); font-size: 22px; letter-spacing: -.025em; }
.call-list { min-height: 220px; }
.call-row {
  display: grid;
  min-height: 67px;
  padding: 12px 4px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e8eef3;
}
.call-row:last-child { border-bottom: 0; }
.call-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: #e4f7f0;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}
.call-row.missed .call-icon { background: #fff0f1; color: var(--red); }
.call-main { min-width: 0; }
.call-main b, .call-main small { display: block; }
.call-main b {
  overflow: hidden;
  color: #243b52;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.call-main small, .call-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.call-meta { text-align: right; }
.call-meta b { display: block; margin-bottom: 4px; color: #455b71; font-size: 10px; }
.empty-state {
  display: grid;
  min-height: 190px;
  padding: 25px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.recording-setting {
  margin-top: 20px;
  padding: 17px;
  border-radius: 13px;
  background: #f3f8fa;
}
.recording-setting .switch-row b { color: #30475e; }
.recording-setting p { margin: 13px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.ringtone-setting {
  display: flex;
  margin-top: 11px;
  padding: 16px 17px;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2eaf0;
  border-radius: 13px;
  background: #fff;
}
.ringtone-setting b, .ringtone-setting small { display: block; }
.ringtone-setting b { color: #30475e; font-size: 12px; }
.ringtone-setting small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.ringtone-controls { display: flex; flex: 0 0 auto; gap: 6px; }
.ringtone-controls select,
.ringtone-controls button {
  min-height: 34px;
  border: 1px solid #d3dee7;
  border-radius: 8px;
  background: #f8fbfd;
  color: #41576e;
  font-size: 9px;
  font-weight: 750;
}
.ringtone-controls select { padding: 0 25px 0 9px; }
.ringtone-controls button { padding: 0 10px; color: var(--cyan-dark); }
.full-list .call-row { min-height: 76px; padding-inline: 10px; }
.history-actions { display: flex; gap: 8px; align-items: center; }
.filter-group { display: flex; padding: 4px; gap: 3px; border-radius: 9px; background: #edf2f6; }
.filter-button {
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.filter-button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(30, 59, 82, .09); }
.download-group { display: flex; gap: 4px; }
.download-group button, .recording-download {
  min-height: 33px;
  padding: 0 9px;
  border: 1px solid #cddbe5;
  border-radius: 8px;
  background: #fff;
  color: var(--cyan-dark);
  font-size: 9px;
  font-weight: 850;
  text-decoration: none;
}
.download-group button:hover, .recording-download:hover { background: #eef9fb; }
.privacy-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e5f7f1;
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
}
.consent-banner {
  margin-bottom: 13px;
  padding: 14px 16px;
  border: 1px solid #eedab6;
  border-radius: 11px;
  background: #fffaf0;
  color: #70511b;
}
.consent-banner b { font-size: 11px; }
.consent-banner p { margin: 5px 0 0; font-size: 9px; line-height: 1.5; }
.recording-row {
  display: grid;
  padding: 14px 5px;
  grid-template-columns: minmax(170px, .85fr) minmax(230px, 1.15fr);
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #e8eef3;
}
.recording-row:last-child { border: 0; }
.recording-row audio { width: 100%; height: 38px; }
.recording-player { display: flex; gap: 8px; align-items: center; }
.recording-player audio { min-width: 0; flex: 1; }
.recording-download { display: inline-flex; min-height: 36px; align-items: center; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: min(390px, calc(100% - 40px));
  padding: 13px 17px;
  border-radius: 11px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .workspace { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar-brand { margin-inline: auto; }
  .sidebar-brand > span:last-child,
  .extension-card div,
  .nav-button:not(.active) i,
  .nav-button { font-size: 0; }
  .extension-card { padding: 10px; justify-content: center; }
  .nav-button { justify-content: center; }
  .nav-button span { font-size: 17px; }
  .switch-row span, .signout-button { display: none; }
  .sidebar-bottom .switch-row { justify-content: center; }
  .phone-layout { grid-template-columns: minmax(320px, .9fr) minmax(340px, 1.1fr); }
}
@media (max-width: 760px) {
  .login-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .public-header > span { display: none; }
  .login-card { display: block; min-height: 0; margin-top: 10px; padding: 34px 21px; border-radius: 22px; }
  .login-copy h1 { font-size: 41px; }
  .login-form { margin-top: 32px; padding: 23px 18px; }
  .workspace { display: block; }
  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: block;
    width: 100%;
    height: 65px;
    padding: 7px 10px;
  }
  .sidebar-brand, .extension-card, .sidebar-bottom { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .nav-button, .nav-button:not(.active) { display: grid; min-height: 50px; place-items: center; font-size: 9px; }
  .nav-button span { width: auto; font-size: 16px; }
  .nav-button.active { box-shadow: none; }
  .nav-button i { position: absolute; top: 3px; right: 20%; }
  .main-area { padding: 20px 12px 90px; }
  .topbar h1 { font-size: 25px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stats-grid article { min-height: 100px; padding: 15px; }
  .phone-layout { display: block; }
  .activity-card { margin-top: 13px; }
  .phone-console, .activity-card, .content-card { border-radius: 14px; }
  .activity-card, .content-card { padding: 18px 14px; }
  .section-head { align-items: flex-start; }
  .filter-group { flex-wrap: wrap; justify-content: flex-end; }
  .history-actions { align-items: flex-end; flex-direction: column; }
  .download-group { flex-wrap: wrap; justify-content: flex-end; }
  .recording-row { display: block; }
  .recording-player { margin-top: 12px; }
  .ringtone-setting { align-items: stretch; flex-direction: column; }
  .ringtone-controls select { min-width: 0; flex: 1; }
  .privacy-pill { display: none; }
}
