@font-face{font-family:Geist;src:url('/dialer/assets/geist-variable.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}

:root{font-family:Geist,Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#10211c;background:#e7eae6;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--green:#00d84a;--green-strong:#00b93f;--green-soft:#cfe7d6;--ink:#06211c;--petrol:#0b2b25;--canvas:#e7eae6;--surface:#fff;--muted:#7c8782;--line:#d9ddd7;--danger:#bb3434;--shadow:0 8px 24px rgba(6,33,28,.045);--sidebar-width:258px;--topbar-height:64px;--content-max-width:1600px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px}

*{box-sizing:border-box}
html{min-width:320px;scroll-behavior:smooth}
body{margin:0;min-width:320px;min-height:100vh;background:var(--canvas);font-size:14px;line-height:1.5}
button,input{font:inherit}
button,a,input{ -webkit-tap-highlight-color:transparent}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
.hidden{display:none!important}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(0,216,74,.28)}

.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);padding:21px 14px 14px;background:linear-gradient(180deg,#06211c,#061b17);color:#f4faf6;display:flex;flex-direction:column;z-index:5;border-right:1px solid rgba(255,255,255,.05)}
.brand-lockup{height:39px;display:flex;align-items:center;padding:0 8px;margin-bottom:22px}
.brand-lockup img{width:174px;height:36px;object-fit:contain;object-position:left center}
.workspace-switch{min-height:58px;padding:8px;border-radius:12px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.045);display:grid;grid-template-columns:34px minmax(0,1fr) 14px;align-items:center;gap:9px}
.workspace-avatar,.operator-avatar{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--green);color:var(--ink);font-size:12px;font-weight:800}
.workspace-switch>span:nth-child(2),.operator-row>span:nth-child(2),.service-status>span:last-child{display:grid;min-width:0}
.workspace-switch small{color:#8da59a;font-size:11px;letter-spacing:.11em}
.workspace-switch strong{font-size:12px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.switch-chevron{color:#98aaa1;font-size:17px;text-align:center}
.nav-label{margin:27px 9px 8px;color:#83998f;font-size:11px;font-weight:750;letter-spacing:.15em}
.side-nav{display:grid;gap:4px}
.nav-link{position:relative;min-height:42px;padding:0 10px;border-radius:10px;display:flex;align-items:center;gap:10px;color:#b7c5be;font-size:13px;font-weight:520;transition:background .15s,color .15s}
.nav-link:hover{background:rgba(255,255,255,.055);color:#fff}
.nav-link.active{background:rgba(0,216,74,.14);color:#fff}
.nav-icon{width:19px;color:#8ea69a;font-size:17px;text-align:center}
.active .nav-icon{color:#56eb84}
.active-mark{position:absolute;left:0;width:3px;height:20px;border-radius:0 4px 4px 0;background:var(--green)}
.sidebar-bottom{margin-top:auto}
.service-status{display:flex;align-items:center;gap:10px;padding:11px 9px}
.service-status strong,.operator-row strong{font-size:12px;font-weight:650}
.service-status small,.operator-row small{color:#8da198;font-size:12px}
.status-pulse,.online-dot{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#28d567;box-shadow:0 0 0 3px rgba(40,213,103,.12)}
.sidebar-divider{height:1px;background:rgba(255,255,255,.08);margin:5px 0 12px}
.operator-row{display:grid;grid-template-columns:34px 1fr 32px;align-items:center;gap:9px;padding:2px 3px}
.operator-avatar{background:#173d32;color:#c8f6d6}
.logout-button{width:32px;height:32px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:rgba(255,255,255,.035);color:#c5d2cb;font-size:17px}
.logout-button:hover{background:rgba(255,255,255,.1);color:white}

.workspace{grid-column:2;min-width:0}
.topbar{position:sticky;top:0;z-index:4;height:var(--topbar-height);padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:rgba(231,234,230,.92);backdrop-filter:blur(12px);border-bottom:1px solid rgba(6,33,28,.08)}
.topbar-left{display:flex;align-items:center;gap:12px;min-width:0}
.nav-toggle{display:none;width:38px;height:38px;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink)}
.nav-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.nav-overlay{position:fixed;inset:0;z-index:29;border:0;background:rgba(6,27,23,.42);backdrop-filter:blur(2px)}
.breadcrumb{display:flex;align-items:center;gap:10px;font-size:12px;color:#77837d}
.breadcrumb strong{font-weight:650;color:#25372f}
.crumb-separator{color:#b4bcb7}
.topbar-right{display:flex;align-items:center;gap:14px}
.environment{display:flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid #cce9d4;border-radius:999px;background:#eef9f1;color:#287642;font-size:12px;font-weight:650}
.environment .online-dot{width:7px;height:7px;box-shadow:none}
.topbar-divider{height:22px;width:1px;background:#d4dad5}
.sync-status{color:#75817b;font-size:12px;font-variant-numeric:tabular-nums}
.page-container{width:min(100%,var(--content-max-width));margin:0 auto;padding:24px 24px 32px}
.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:21px}
.eyebrow,.panel-kicker{display:block;color:#238447;font-size:11px;font-weight:800;letter-spacing:.14em}
.page-header h1{margin:5px 0 5px;font-size:29px;line-height:1.13;letter-spacing:-.045em;font-weight:700;color:#10211c}
.page-header p,.panel-heading p{margin:0;color:#748079;font-size:13px}
.secure-badge{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #d5ddd7;border-radius:9px;background:rgba(255,255,255,.58);color:#66746c;font-size:12px;font-weight:600;white-space:nowrap}
.secure-badge svg{width:16px;height:16px;fill:none;stroke:#248648;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}

.call-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.8fr);gap:16px;align-items:stretch}
.panel{min-width:0;border:1px solid #dbe0db;border-radius:15px;background:var(--surface);box-shadow:var(--shadow)}
.dial-panel{padding:21px 22px 17px}
.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}
.panel-heading h2{margin:4px 0 4px;font-size:17px;letter-spacing:-.025em;line-height:1.25;font-weight:680}
.call-symbol{width:39px;height:39px;border-radius:12px;background:#e9f8ed;color:#218243;display:grid;place-items:center}
.call-symbol svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dial-form{margin-top:23px}
.dial-form label,.login-card label{display:block;margin-bottom:7px;color:#35443c;font-size:12px;font-weight:650}
.session-select-row{height:40px;margin-bottom:16px;border:1px solid #d1d9d3;border-radius:9px;background:#fff;transition:border .15s,box-shadow .15s}
.session-select-row:focus-within{border-color:#45b967;box-shadow:0 0 0 3px rgba(0,216,74,.12)}
.session-select-row select{width:100%;height:100%;padding:0 12px;border:0;border-radius:inherit;outline:0;background:transparent;color:#14261d;font:inherit;font-size:13px}
.session-select-row select:disabled{color:#87928b;cursor:not-allowed}
.dial-input-row{height:48px;display:flex;align-items:center;gap:8px;padding:4px;border:1px solid #cdd6d0;border-radius:11px;background:#fff;transition:border .15s,box-shadow .15s}
.dial-input-row:focus-within{border-color:#48b96b;box-shadow:0 0 0 3px rgba(0,216,74,.12)}
.phone-prefix{padding-left:8px;color:#6f7c75;font-size:18px}
.dial-input-row input{flex:1;min-width:0;height:38px;border:0;outline:0;background:transparent;color:#14261d;font-size:14px}
.dial-input-row input::placeholder{color:#a1aaa4}
.button{min-height:40px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:9px;font-size:13px;font-weight:700;transition:background .15s,border-color .15s,color .15s,transform .15s}
.button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.button:active:not(:disabled){transform:scale(.985)}
.button-primary{background:var(--green);color:#06211c;box-shadow:0 4px 11px rgba(0,216,74,.14)}
.button-primary:hover{background:#00c943}
.button-secondary{background:#fff;border-color:#d8dfda;color:#35463d}
.button-secondary:hover{background:#f3f7f4;border-color:#bfcac2}
.button-danger{background:#fff2f0;border-color:#f0d4cf;color:#ad3834}
.button-danger:hover{background:#fde6e3}
.button:disabled{opacity:.55;cursor:not-allowed}
.field-hint{margin:7px 1px 0;color:#87928b;font-size:12px}
.call-status{min-height:42px;margin-top:19px;padding:10px 12px;display:flex;align-items:center;flex-wrap:wrap;gap:9px;border:1px solid #e3e8e4;border-radius:10px;background:#f7f9f7;color:#526259;font-size:12px}
.call-duration{margin-left:auto;color:#26372e;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.recording-status{padding:3px 8px;border:1px solid #eadbb2;border-radius:999px;background:#fff8e7;color:#856315;font-size:11px;font-weight:650;white-space:nowrap}
.recording-status.recording-on{border-color:#cce9d4;background:#eef9f1;color:#287642}
.status-dot{width:8px;height:8px;border-radius:50%;background:#a7b1aa;flex:0 0 auto}
.incoming-actions,.audio-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.audio-note{display:flex;gap:9px;align-items:flex-start;margin-top:13px;color:#78857d;font-size:12px;line-height:1.5}
.audio-note>span:first-child{color:#459260;font-size:14px;line-height:1.2}
.diagnostics{margin-top:13px;border-top:1px solid #edf0ed;padding-top:10px}
.diagnostics summary{width:max-content;cursor:pointer;color:#7a8780;font-size:12px}
.meter{margin:8px 0 0;color:#6d7972;font:11px/1.55 Geist,ui-monospace,monospace;overflow-wrap:anywhere}
.session-panel{padding:19px 18px 15px;display:flex;flex-direction:column}
.panel-heading.compact{align-items:center}
.panel-heading.compact h2{font-size:16px;margin-bottom:0}
.add-device{min-height:34px;padding:0 10px;font-size:12px}
.add-device>svg{width:16px;height:16px}
.session-caption{display:flex;align-items:flex-start;gap:9px;margin:14px 0 9px;padding:10px 11px;border:1px solid #e2e8e3;border-radius:9px;background:#f8faf8;color:#758179;font-size:12px;line-height:1.45}
.session-caption .online-dot{margin-top:4px;width:7px;height:7px;box-shadow:none}
.sessions-list{display:grid;gap:8px}
.session{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:11px 12px;border:1px solid #e1e6e2;border-radius:10px;background:#fff;color:#33433a;font-size:12px}
.session strong{display:block;font-size:12px;font-weight:650}
.session>span{color:#77847c;font-size:12px}
.qr{display:block;width:min(250px,100%);height:auto;margin:10px auto 2px;padding:8px;border:1px solid #e3e8e4;border-radius:9px;background:#fff;image-rendering:pixelated}
.history-panel{margin-top:16px;padding:18px 20px 10px}
.history-caption{color:#859189;font-size:12px}
.calls-list{margin-top:12px}
.call{min-height:54px;padding:10px 2px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid #edf0ed;color:#3d4b43;font-size:12px}
.call strong{display:block;color:#26372e;font-size:12px;font-weight:650}
.call span{color:#7b8780;font-size:12px}
.muted{color:#77847c}
.notice{margin-top:12px;padding:11px 13px;border:1px solid #d9e9dd;border-radius:10px;background:#f3faf5;color:#276d3d;font-size:12px;overflow-wrap:anywhere}
.notice:empty{display:none}
.notice.error{border-color:#f0d7d3;background:#fff5f3;color:#a83530}
.notice.success{border-color:#d9e9dd;background:#f3faf5;color:#276d3d}
.page-footer{margin-top:21px;padding-top:13px;display:flex;justify-content:space-between;gap:14px;border-top:1px solid #d7ddd8;color:#849087;font-size:12px}
.page-footer span:first-child{font-weight:700;color:#627068}
.login-shell{min-height:100vh;padding:28px 20px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 7%,rgba(0,216,74,.11),transparent 34%),#e7eae6}
.login-brand{margin-bottom:22px}
.login-brand img{width:194px;height:44px;object-fit:contain}
.login-card{width:min(100%,420px);padding:27px;border:1px solid #dbe1dc;border-radius:17px;background:#fff;box-shadow:0 18px 48px rgba(6,33,28,.09)}
.login-card h1{margin:5px 0 8px;color:#10211c;font-size:24px;letter-spacing:-.04em}
.login-card>.muted{margin:0 0 22px;color:#758179;font-size:13px;line-height:1.6}
.login-card input{width:100%;height:44px;padding:0 12px;border:1px solid #d1d9d3;border-radius:9px;background:#fff;color:#14261d;outline:0;font-size:13px}
.login-card input:focus{border-color:#45b967;box-shadow:0 0 0 3px rgba(0,216,74,.12)}
.login-card input::placeholder{color:#a1aaa4}
.login-submit{width:100%;height:43px;margin-top:15px;justify-content:space-between;padding:0 14px}
.login-submit span{font-size:19px;font-weight:500}
.inline-error{min-height:18px;margin:8px 0 0;color:#b13b36;font-size:12px}
.login-foot{display:flex;align-items:center;gap:9px;margin-top:17px;padding-top:15px;border-top:1px solid #edf0ed;color:#758179;font-size:12px}
.login-foot .online-dot{width:7px;height:7px;box-shadow:none}
.legal-note{max-width:430px;margin:16px 0 0;color:#87928b;text-align:center;font-size:12px;line-height:1.5}

@media(max-width:1050px){.app-shell{grid-template-columns:218px minmax(0,1fr)}
.app-shell{display:block}
.sidebar{position:fixed;inset:0 auto 0 0;width:min(292px,calc(100vw - 48px));height:100dvh;padding:18px 14px 14px;transform:translateX(-105%);transition:transform .22s ease;z-index:30;box-shadow:0 18px 48px rgba(6,27,23,.2)}
.sidebar.open{transform:translateX(0)}
.brand-lockup{margin-bottom:18px}
.workspace-switch{display:grid}
.nav-label{display:block}
.side-nav{display:grid}
.sidebar-bottom{display:block}
.nav-toggle{display:inline-grid;flex:0 0 auto}
.nav-overlay:not(.hidden){display:block}
.workspace{grid-column:auto}
.page-container{padding:20px 16px 28px}
.call-layout{grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr)}
.dial-panel{padding:18px}
.session-panel{padding:17px 14px}
.topbar{padding:0 20px}
}

@media(max-width:760px){.app-shell{display:block}
.sidebar{width:min(292px,calc(100vw - 48px));height:100dvh;padding:18px 14px 14px;flex-direction:column;align-items:stretch;gap:0}
.brand-lockup{height:39px;margin:0 0 18px;padding:0 8px}
.brand-lockup img{width:174px;height:36px}
.workspace{min-height:100vh}
.topbar{height:53px;padding:0 16px}
.topbar-left{gap:9px}
.nav-toggle{width:36px;height:36px}
.topbar-right{gap:9px}
.environment{padding:6px 9px;font-size:12px}
.topbar-divider{height:18px}
.sync-status{font-size:12px}
.page-container{padding:16px 12px 24px}
.page-header{align-items:flex-start;margin-bottom:16px}
.page-header h1{font-size:26px}
.page-header p{max-width:440px;font-size:12px}
.secure-badge{font-size:0;padding:8px}
.secure-badge span{font-size:16px}
.call-layout{grid-template-columns:1fr}
.dial-panel{padding:18px}
.session-panel{padding:17px}
.history-panel{margin-top:13px}
.page-footer{flex-direction:column;gap:4px}
}

@media(max-width:450px){.topbar{padding:0 12px}
.breadcrumb{min-width:0}
.breadcrumb{gap:6px;font-size:12px}
.environment{border:0;background:transparent;padding:5px 0}
.topbar-right{gap:7px}
.topbar-divider{display:none}
.sync-status{max-width:105px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-container{padding:12px 12px 20px}
.page-header{gap:9px}
.page-header h1{font-size:24px}
.page-header p{font-size:12px}
.page-header .eyebrow{font-size:11px}
.dial-panel{padding:16px 13px}
.panel-heading h2{font-size:16px}
.panel-heading p{font-size:12px}
.dial-input-row{height:auto;min-height:48px;flex-wrap:wrap;padding:5px}
.dial-input-row input{width:calc(100% - 38px);flex:1 1 calc(100% - 38px)}
.dial-input-row .button{flex:1;height:40px}
.phone-prefix{padding-left:5px}
.session-panel{padding:15px 12px}
.add-label{display:none}
.add-device{width:34px;padding:0}
.history-panel{padding:15px 13px 8px}
.history-caption{display:none}
.call{align-items:flex-start;flex-direction:column;gap:3px}
.page-footer{font-size:12px}
}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

/* A CRM embed presents only the call surface; keep session and history tools
   in the full dialer, outside the third-party popup. */
body.embedded-dialer{min-height:0;background:#fff}
.embedded-dialer .app-shell{display:block;min-height:0}
.embedded-dialer .sidebar,.embedded-dialer .topbar,.embedded-dialer .page-header,
.embedded-dialer .session-panel,.embedded-dialer #history,.embedded-dialer .page-footer,
.embedded-dialer .nav-overlay{display:none!important}
.embedded-dialer .workspace{min-height:0;margin:0}
.embedded-dialer .page-container{width:100%;max-width:760px;margin:0 auto;padding:16px}
.embedded-dialer .call-layout{display:block}
.embedded-dialer .dial-panel{padding:20px;border-color:#e4e9e4;border-radius:14px;box-shadow:none}
.embedded-dialer .dial-form{margin-top:18px}
.embedded-dialer .audio-note{margin-top:10px}
@media(max-width:450px){.embedded-dialer .page-container{padding:8px}.embedded-dialer .dial-panel{padding:16px 13px}}

.video-panel{margin-top:14px;display:grid;gap:10px}
.video-stage{position:relative;aspect-ratio:4/3;max-height:360px;border-radius:12px;overflow:hidden;background:#06211c}
.video-stage canvas{width:100%;height:100%;object-fit:contain;display:block}
.video-stage canvas.idle{opacity:.25}
.video-stage video{position:absolute;right:10px;bottom:10px;width:28%;min-width:96px;aspect-ratio:4/3;object-fit:cover;border-radius:8px;border:2px solid rgba(255,255,255,.7);transform:scaleX(-1);background:#000}
.video-note.error{color:#b42318}
