:root {
  color-scheme: light;
  --canvas: #f3f6f5;
  --paper: #fff;
  --ink: #172821;
  --muted: #52665e;
  --line: #dce5e0;
  --green: #086c4c;
  --green-dark: #064b37;
  --wash: #e7f4ed;
  --sidebar: #122a23;
  --sidebar-ink: #e9f4ef;
  --radius: 16px;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
a { color: inherit; }
p { margin: .25rem 0 0; color: var(--muted); }
h1, h2 { margin: 0; line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(1.85rem, 3.5vw, 2.65rem); }
h2 { font-size: 1.14rem; }
svg { flex: none; }
:focus-visible { outline: 2px solid #21aa7d; outline-offset: 3px; }

.workspace { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.workspace-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 1.8rem;
  padding: clamp(1rem, 2vw, 1.5rem) 1rem;
  background: var(--sidebar); color: var(--sidebar-ink);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 780; letter-spacing: -.025em; }
.brand-logo { display: block; width: min(100%, 186px); height: auto; }
.workspace-brand { min-width: 0; padding: .4rem .5rem; border-radius: 10px; background: #fff; }
.public-brand .brand-logo { width: clamp(145px, 30vw, 190px); }
.mobile-brand { display: none; }
.stat-icon, .panel-icon {
  display: inline-flex; height: 40px; width: 40px; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--green); background: var(--wash);
}
.stat-icon svg, .panel-icon svg { width: 20px; height: 20px; }
.sidebar nav { display: grid; gap: .3rem; }
.sidebar nav a, .sidebar button {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem;
  border-radius: 8px; color: #dbebe3; text-decoration: none; font-size: .94rem;
}
.sidebar nav svg, .sidebar button svg, .button-link svg { width: 18px; height: 18px; }
.sidebar nav a:hover, .sidebar button:hover { background: #244538; }
.sidebar nav a[aria-current="page"] { color: #fff; background: #2a5343; font-weight: 700; }
.logout { margin-top: auto; }
.sidebar button { width: 100%; background: transparent; border: 0; justify-content: flex-start; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner {
  min-height: 70px; padding: .65rem clamp(1rem, 3.2vw, 2.75rem);
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
}
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--muted); font-size: .9rem; }
.breadcrumb strong, .identity strong { color: var(--ink); }
.identity { display: flex; align-items: center; gap: .55rem; min-width: 0; font-size: .87rem; }
.identity strong { display: block; overflow-wrap: anywhere; }
.identity small { display: block; color: var(--muted); font-size: .8rem; }
.avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 50%; background: var(--wash); color: var(--green); font-weight: 750; }
.skip-link { position: absolute; top: .5rem; left: .5rem; translate: 0 -160%; background: #fff; z-index: 3; padding: .5rem; }
.skip-link:focus { translate: 0 0; }
main { width: min(100% - 2rem, 670px); margin: clamp(1.3rem, 3vw, 2.6rem) auto; flex: 1; }
main.wide { width: min(calc(100% - clamp(2rem, 6vw, 5.5rem)), 1280px); }
.public-layout { background: radial-gradient(ellipse at 60% 18%, #dfeee6, var(--canvas) 66%); }
.public-layout main { width: min(100% - 2rem, 440px); margin-top: clamp(2rem, 8vh, 5rem); }
.public-layout h1 { margin-bottom: 1rem; }
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem;
  padding: .85rem clamp(1rem, 3.2vw, 2.75rem); border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem; background: var(--paper);
}
.site-footer span:first-child { font-weight: 690; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 14px #173a2607; min-width: 0; }
.body, .account, .result { padding: clamp(1rem, 2.4vw, 1.55rem); }
.intro { margin: .45rem 0 1.25rem; }
.account, .result { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #f9fcfa; }
.account { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
.result { border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--line); }
.actions, .banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.actions { margin-top: 1.15rem; }
button, .button-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: 9px; padding: .62rem .92rem;
  background: var(--green); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
button:hover, .button-link:hover { background: var(--green-dark); }
button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
button.secondary:hover { background: var(--wash); }
button:disabled { opacity: .48; cursor: default; }
.text-link { color: var(--green); font-size: .92rem; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
label { display: block; margin-bottom: .35rem; font-size: .92rem; font-weight: 700; }
input { display: block; width: 100%; padding: .68rem .75rem; border: 1px solid #bccfc4; border-radius: 9px; background: #fbfdfc; color: var(--ink); font: inherit; }
input:hover { border-color: #84ad99; }
input:focus { background: white; }
input + label { margin-top: .95rem; }
.stack h2 { margin-bottom: .9rem; }
.stack label:first-of-type { margin-top: .25rem; }
input::file-selector-button { padding: .35rem .65rem; margin-right: .55rem; border: 0; border-radius: 6px; background: var(--wash); color: var(--green); font: inherit; cursor: pointer; }
.hint { color: var(--muted); font-size: .85rem; }
.error { color: #9f2429; margin-top: .7rem; overflow-wrap: anywhere; }
.error:empty, #detail:empty { display: none; }
.notice { padding: .75rem 1rem; margin: 0 0 1rem; border-radius: 9px; background: var(--wash); }
.notice.error { background: #fff0ef; }
.consent { display: flex; align-items: flex-start; gap: .55rem; margin-top: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; font-size: .91rem; font-weight: 550; }
.consent input { width: 1rem; height: 1rem; flex: none; margin: .2rem 0 0; accent-color: var(--green); }
#qr { display: block; width: min(100%, 300px); height: auto; margin: 1rem auto; border: 1px solid var(--line); border-radius: 12px; }
audio { display: block; width: 100%; margin-top: .75rem; }
.call-state { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
#call-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: .24rem .64rem; border-radius: 999px; background: var(--wash); color: var(--green); font-size: .82rem; font-weight: 720; white-space: nowrap; }
.result-failed { background: #fcebec; color: #972b38; }
.result-pending { background: #fff2d9; color: #724b0d; }

.dashboard-banner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.1rem;
  margin-bottom: 1rem; padding: clamp(1.1rem, 3vw, 1.95rem); border-radius: 19px;
  color: white; background: linear-gradient(118deg, #123f31, #0d5e43);
}
.dashboard-banner p { margin-top: .5rem; color: #d5f0e2; }
.dashboard-banner .button-link { background: #e9faef; color: #124533; }
.dashboard-banner .button-link:hover { background: white; }
.dashboard-banner .subtle { color: #f0fff7; border-color: #9cc4b78c; background: transparent; }
.dashboard-banner .subtle:hover { background: #ffffff19; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; margin: 0 0 1rem; }
.stat-card { padding: .85rem 1rem 1rem; }
.stat-card dt { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.stat-card dd { margin: .52rem 0 0; overflow-wrap: anywhere; font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.15; font-weight: 780; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.tone-phone { background: #e8f0fb; color: #285d98; }
.tone-users, .tone-credit { background: #eceafa; color: #504193; }
.tone-alert { background: #fcebec; color: #a34149; }
.insight-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: .85rem; margin-bottom: .9rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; margin-bottom: .8rem; }
.section-head p, .outcome-card > p { font-size: .9rem; }
.legend { display: flex; flex-wrap: wrap; gap: .55rem .85rem; font-size: .85rem; }
.legend span { display: flex; align-items: center; gap: .25rem; }
.legend span::before, .outcomes i { content: ""; width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #b6d5f0; }
.legend span:last-child::before, .outcomes .outcome-success { background: #298361; }
.activity-chart { width: 100%; height: auto; display: block; margin-top: .3rem; }
.chart-grid { stroke: #e2eae6; fill: none; }
.chart-text { fill: #4a6157; font-size: 15px; }
.sent-bar { fill: #b6d5f0; }
.success-bar { fill: #298361; }
.chart-hit { fill: transparent; }
.outcomes { margin: .65rem 0; }
.outcomes div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.outcomes dt { display: flex; align-items: center; gap: .55rem; font-size: .94rem; }
.outcomes dd { margin: 0; font-size: 1.04rem; font-weight: 760; }
.outcomes .outcome-failed { background: #be5662; }
.outcomes .outcome-pending { background: #ac7c24; }
.outcomes .outcome-disconnected { background: #687a8a; }
.outcomes .outcome-rejected { background: #a64f71; }
.outcome-note { margin-top: .7rem; }
.recent-card { margin-bottom: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: .92rem; }
th { color: var(--muted); font-weight: 680; background: #f6f9f7; }
tbody tr:last-child td { border-bottom: 0; }
.empty-state { display: flex; align-items: center; gap: .65rem; padding: .65rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1070px) {
  .workspace { grid-template-columns: 200px minmax(0,1fr); }
}
.header-leading, .sidebar-heading { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.drawer-toggle, .sidebar .drawer-close, .drawer-backdrop { display: none; }

@media (max-width: 790px) {
  .workspace { display: block; }
  .workspace-main { min-height: 100dvh; }
  .header-leading { flex: 1; }
  .mobile-brand { display: block; min-width: 0; }
  .mobile-brand .brand-logo { width: clamp(88px, 28vw, 137px); max-width: 100%; }
  .workspace .breadcrumb { display: none; }
  .top-inner { min-height: 58px; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20;
    width: min(18rem, 86vw); height: 100dvh; overflow-y: auto;
    visibility: hidden; transform: translateX(-100%); transition: transform .2s ease;
    overscroll-behavior: contain;
  }
  .workspace.drawer-open { overflow: hidden; }
  .drawer-open .sidebar {
    visibility: visible; transform: translateX(0); box-shadow: .6rem 0 2rem #10251c45;
  }
  .sidebar-heading { justify-content: space-between; }
  .drawer-toggle, .sidebar .drawer-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0; flex: none;
  }
  .drawer-toggle { color: var(--green); background: var(--wash); border-color: var(--line); }
  .drawer-toggle:hover { color: var(--green-dark); background: #d7ecdf; }
  .drawer-toggle svg, .sidebar .drawer-close svg { height: 21px; width: 21px; }
  .drawer-backdrop {
    display: block; position: fixed; inset: 0; z-index: 19;
    width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0;
    background: #11291f78;
  }
  .drawer-backdrop:hover { background: #11291f78; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}
@media (max-width: 560px) {
  .dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .insight-grid { grid-template-columns: 1fr; }
  .sidebar nav a { padding: .45rem .55rem; gap: .35rem; font-size: .85rem; }
  .sidebar nav svg { height: 15px; width: 15px; }
  .identity small { display: none; }
  .breadcrumb { gap: .25rem; }
  .breadcrumb strong { display: none; }
  .breadcrumb span { display: none; }
}

.signup-offer {
  display: flex; align-items: center; gap: .72rem;
  padding: .78rem .9rem; margin-bottom: .85rem;
  border: 1px solid #cce4d6; border-radius: 12px; background: var(--wash);
}
.signup-offer p, .auth-switch { font-size: .92rem; }
.signup-offer p { margin: 0; }
.signup-offer strong { color: var(--green-dark); }
.auth-switch { margin-top: .9rem; text-align: center; }

.approval-details p { margin: .65rem 0; }
.approval-details [lang="ur"] { color: var(--ink); line-height: 1.8; }
.approval-phone { display: inline-block; color: var(--green); font-weight: 750; unicode-bidi: isolate; }

@font-face {
  font-family: "Jameel Noori Nastaleeq";
  src: url("?asset=fonts%2Fjameel-noori-nastaleeq.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
.approval-details [lang="ur"] {
  display: block;
  font-family: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 2;
  margin: .5rem auto;
  text-align: center;
}
.icon-button { position: relative; width: 42px; height: 42px; padding: 0; flex: none; }
.icon-button svg { width: 20px; height: 20px; }
.icon-button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 4;
  inset-inline-end: 0;
  bottom: calc(100% + .4rem);
  opacity: 0;
  padding: .3rem .55rem;
  border-radius: 6px;
  pointer-events: none;
  background: #122a23;
  color: #fff;
  font-size: .79rem;
  white-space: nowrap;
}
.icon-button[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

.user-directory { margin-top: 1.15rem; scroll-margin-top: 1rem; }
.user-directory .section-head button svg, .modal-actions button svg { width: 18px; height: 18px; }
.directory-tools { margin-bottom: .85rem; }
.directory-tools input { max-width: 30rem; }
.directory-table { width: 100%; }
.directory-table .table {
  --bs-table-bg: #fff;
  --bs-table-striped-bg: #f3f7f5;
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
}
.directory-table .table > :not(caption) > * > * {
  padding: .78rem .75rem;
  background-color: var(--bs-table-bg);
  box-shadow: inset 0 0 0 9999px var(--bs-table-bg-type, transparent);
  white-space: normal;
  overflow-wrap: anywhere;
}
.directory-table .table > thead > tr > th { --bs-table-bg: #edf4f0; }
.directory-table .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: var(--bs-table-striped-bg); }
.directory-table tbody tr:last-child > * { border-bottom: 0; }
.directory-table .pill { white-space: normal; }
.user-meta { display: block; color: var(--muted); font-size: .85rem; }
.user-contact { display: grid; gap: .12rem; font-size: .9rem; }
.table-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.user-modal {
  position: fixed; width: min(41rem, calc(100vw - 2rem)); max-width: none;
  max-height: min(90vh, calc(100dvh - 2rem)); margin: auto;
  padding: 0; border: 1px solid var(--line); border-radius: 16px;
  color: var(--ink); background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 18px 70px #112c2850;
}
.user-modal::backdrop { background: #102b2399; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .85rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal-heading p { font-size: .9rem; }
.modal-form { padding: 1.1rem 1.25rem; }
.modal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem .85rem; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; margin-top: 1.15rem; }

@media (max-width: 680px) {
  .directory-table { overflow: visible; }
  .directory-table .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .directory-table .table, .directory-table tbody { display: block; width: 100%; }
  .directory-table tbody tr { display: grid; width: 100%; border-top: 1px solid var(--line); }
  .directory-table .table > tbody > tr > * {
    display: grid;
    grid-template-columns: minmax(4.5rem, 27%) minmax(0, 1fr);
    gap: .6rem;
    align-items: center;
    border-bottom: 0;
    padding: .35rem .65rem;
  }
  .directory-table .table > tbody > tr > [data-label]::before { content: attr(data-label); color: var(--muted); font-size: .83rem; font-weight: 650; }
  .directory-table .table > tbody > tr > th { display: block; padding-block: .7rem .35rem; }
  .directory-table .table > tbody > tr > th::before { display: none; }
  .directory-table .table > tbody > tr > .actions-cell { padding-bottom: .75rem; }
  .directory-table .pill { justify-self: start; }
}
@media (max-width: 535px) {
  .user-modal { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .modal-heading, .modal-form { padding: .85rem; }
  .modal-fields { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
}

.history-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem; margin-top: 1rem; text-align: center; font-size: .9rem; }
.pagination-link { border: 1px solid var(--line); border-radius: 8px; padding: .36rem .7rem; color: var(--green); text-decoration: none; font-weight: 720; }
.pagination-link:not(.disabled):hover { background: var(--wash); }
.pagination-link.disabled { color: var(--muted); opacity: .7; }
.sticky-warning {
  position: sticky; bottom: 0; z-index: 4; justify-content: center;
  background: #123f31; border-color: #0d3529;
  padding: .35rem .85rem calc(.35rem + env(safe-area-inset-bottom, 0px));
}
.sticky-warning p {
  margin: 0; color: #fff; text-align: center; line-height: 1.9;
  font: 400 clamp(1.05rem, 3.2vw, 1.28rem)/1.9 "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
}
@media (max-width: 680px) {
  .directory-table .history-table > tbody > tr > th { display: grid; }
  .directory-table .history-table > tbody > tr > th::before { display: block; }
}

#bulk-numbers {
  display: block; width: 100%; padding: .68rem .75rem; resize: vertical;
  border: 1px solid #bccfc4; border-radius: 9px; background: #fbfdfc; color: var(--ink); font: inherit;
}
.bulk-delays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .9rem; }
#bulk-form > label[for="bulk-audio"] { margin-top: .9rem; }
.bulk-progress { margin-top: .9rem; }
@media (max-width: 430px) { .bulk-delays { grid-template-columns: 1fr; } }

#speech-text, .speech-settings select {
  display: block; width: 100%; padding: .68rem .75rem; border: 1px solid #bccfc4;
  border-radius: 9px; background: #fbfdfc; color: var(--ink); font: inherit;
}
#speech-text { resize: vertical; }

.speech-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .9rem; }
@media (max-width: 470px) { .speech-settings { grid-template-columns: 1fr; gap: .55rem; } }
.api-key-card {
  display: grid; gap: .75rem; margin: 1rem 0; padding: clamp(1rem, 3vw, 1.65rem);
  border-radius: 16px; background: linear-gradient(118deg, #123f31, #0d5e43); color: #fff;
}
.api-key-card p { color: #e0f6ea; }
.api-key-card p:empty { display: none; }
.api-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.api-key-row code {
  max-width: 100%; padding: .66rem; overflow-wrap: anywhere;
  border: 1px solid #b1dbca8a; border-radius: 8px; background: #fff2; color: #fff;
}
.api-key-row button { background: #e8f7ef; color: #174e3c; }
.api-key-row button:hover { background: #fff; }
.key-rotate, .key-rotate:hover { background: transparent; padding: 0; text-decoration: underline; font-size: .88rem; }
.api-section { margin: .85rem 0; }
.api-endpoint { overflow-wrap: anywhere; }
.api-section pre {
  max-width: 100%; overflow: auto; padding: .85rem; border-radius: 9px;
  background: #122a23; color: #effaf4; font-size: .87rem; line-height: 1.55;
}

.stat-card dd.credit-expiry-label { margin-top: .5rem; color: var(--muted); font-size: .83rem; line-height: 1.4; letter-spacing: 0; font-weight: 500; }
.credit-expiry-label strong { display: block; color: var(--ink); }
.credit-popup-fields { text-align: start; }
.credit-popup-fields label:not(:first-child) { margin-top: .85rem; }
.credit-popup-fields input { font-size: 1rem; }

.call-animation {
    position: relative;
    display: grid;
    place-items: center;
    width: 7rem;
    height: 7rem;
    margin: .25rem auto 1rem;
    color: #087c59;
}
.call-animation .call-pulse {
    position: absolute;
    inset: 14%;
    border: 2px solid currentColor;
    border-radius: 50%;
    opacity: .25;
}
.call-animation .call-handset {
    width: 2.75rem;
    height: 2.75rem;
}
.call-animation[data-motion="outgoing"] .call-pulse {
    animation: call-pulse 1.5s ease-out infinite;
}
.call-animation[data-motion="outgoing"] .call-handset {
    animation: call-ring 1.5s ease-in-out infinite;
}
.call-animation[data-motion="waves"] .call-handset,
.call-animation[data-motion="waves"] .call-pulse {
    display: none;
}
.call-waves {
    display: none;
    align-items: center;
    gap: .35rem;
}
.call-animation[data-motion="waves"] .call-waves {
    display: flex;
}
.call-waves i {
    width: .4rem;
    height: 2.2rem;
    border-radius: 1rem;
    background: currentColor;
    animation: call-wave .75s ease-in-out infinite alternate;
}
.call-waves i:nth-child(2n) { animation-delay: -.3s; }
.call-waves i:nth-child(3n) { animation-delay: -.55s; }
.call-animation[data-motion="drop"] { color: #b42332; }
.call-animation[data-motion="drop"] .call-handset {
    transform: translateY(.4rem) rotate(48deg);
    animation: call-drop .45s ease-out;
}
.call-dialog-status { font-weight: 700; font-size: 1.2rem; }
.call-dialog-detail { margin: .4rem 0 0; overflow-wrap: anywhere; }
.call-dialog-end[hidden] { display: none; }
@keyframes call-pulse {
    0% { transform: scale(.8); opacity: .65; }
    100% { transform: scale(1.35); opacity: 0; }
}
@keyframes call-ring {
    0%, 45%, 100% { transform: rotate(0); }
    12%, 32% { transform: rotate(-12deg); }
    22% { transform: rotate(10deg); }
}
@keyframes call-wave {
    from { transform: scaleY(.3); }
    to { transform: scaleY(1); }
}
@keyframes call-drop {
    from { transform: translateY(-.55rem) rotate(0); }
    to { transform: translateY(.4rem) rotate(48deg); }
}
@media (prefers-reduced-motion: reduce) {
    .call-animation *, .call-animation { animation: none !important; }
    .call-waves i:nth-child(odd) { transform: scaleY(.55); }
}

#bulk-contacts details { margin: .55rem 0; }
#bulk-contacts summary { cursor: pointer; color: var(--green, #087c59); }
#bulk-contact-choices { margin: .75rem 0; min-width: 0; }
.contact-list { max-height: 16rem; overflow: auto; margin-bottom: .65rem; }
.contact-list label { overflow-wrap: anywhere; }

main.audio-library { width: 95%; }
#audio-upload-progress { margin-top: .9rem; }
#audio-upload-progress progress { display: block; width: 100%; accent-color: #087c59; }
.audio-duration { background: #d8f6e5; color: #07583b; font-variant-numeric: tabular-nums; }

.audio-picker { margin: .9rem 0; min-width: 0; }
.audio-picker select {
    display: block;
    width: 100%;
    padding: .65rem .75rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: .55rem;
    font: inherit;
}
.audio-picker select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

fieldset.audio-picker { border: 0; padding: 0; }
.audio-picker legend { padding: 0; font-weight: 700; }
.audio-source-options { display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; margin: .45rem 0 .85rem; }
.audio-source-options label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.audio-source-options input { width: auto; margin: 0; accent-color: var(--green); }

.campaign-table th, .campaign-table td { vertical-align: middle; }
.campaign-table th[scope="row"] { overflow-wrap: anywhere; }
.campaign-progress { display: grid; gap: .28rem; min-width: 10rem; }
.campaign-progress progress { width: 100%; accent-color: var(--green); }
.campaign-progress small { color: var(--muted); }
.campaign-progress :is(small, span):empty, #campaign-state:empty { display: none; }
.campaign-success { color: var(--green); font-weight: 700; }
.campaign-failed { color: #a32033; font-weight: 700; }
.campaign-actions { display: flex; gap: .25rem; flex-wrap: wrap; min-width: 12rem; }
.campaign-actions .icon-button { width: 34px; height: 34px; }
.campaign-actions .icon-button svg { width: 17px; height: 17px; }
.campaign-table > tbody > tr:first-child .icon-button[data-tooltip]::after { top: calc(100% + .35rem); bottom: auto; }
@media (max-width: 760px) {
    .campaign-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .campaign-table tbody, .campaign-table { display: block; }
    .campaign-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; margin-bottom: .65rem; }
    .campaign-table [data-column] { display: block; padding: .3rem; border: 0; }
    .campaign-table td::before { content: attr(data-column); display: block; color: var(--muted); font-size: .75rem; }
    .campaign-table th[scope="row"], .campaign-table td[data-column="Progress"], .campaign-table td[data-column="Actions"] { grid-column: 1 / -1; }
    .campaign-actions { min-width: 0; }
    .campaign-actions .icon-button[data-tooltip]::after { inset-inline: 0 auto; }
}

.campaign-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto; gap: .75rem; align-items: end; }
.campaign-filters input { width: 100%; }
.campaign-filter-actions, .campaign-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.campaign-pagination { justify-content: center; margin-top: 1rem; }
.campaign-created { display: block; color: var(--muted); font-weight: 400; }
@media (max-width: 760px) {
    .campaign-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .campaign-filters > :first-child, .campaign-filter-actions { grid-column: 1 / -1; }
}

.sidebar nav { overflow-y: auto; min-height: 0; }
.sidebar-group summary {
    display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem;
    cursor: pointer; list-style: none; border-radius: 8px; color: #dbebe3; font-size: .94rem;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary:hover { background: #244538; }
.sidebar-group summary::after {
    content: ''; margin-inline-start: auto; width: .45rem; height: .45rem;
    border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}
.sidebar-group[open] summary::after { transform: rotate(225deg); }
.sidebar-submenu { display: grid; gap: .2rem; margin-inline-start: .9rem; }
