:root{color-scheme:light;}
/* Fulltastic Dialer - Combined CSS */

/* Inter font - self-hosted */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-full{bottom:100%}.left-0{left:0}.left-2\.5{left:.625rem}.right-0{right:0}.right-1{right:.25rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-12{top:3rem}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1000\]{z-index:1000}.z-\[100\]{z-index:100}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1/span 1}.col-span-full{grid-column:1/-1}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.-ml-2{margin-left:-.5rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[32px\]{height:32px}.h-\[36px\]{height:36px}.h-\[38px\]{height:38px}.h-\[42px\]{height:42px}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[500px\]{max-height:500px}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.min-h-\[18px\]{min-height:18px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-2{width:.5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-4{width:1rem}.w-56{width:14rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[90\%\]{width:90%}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[150px\]{min-width:150px}.min-w-\[24px\]{min-width:24px}.min-w-\[36px\]{min-width:36px}.max-w-2xl{max-width:42rem}.max-w-\[120px\]{max-width:120px}.max-w-\[200px\]{max-width:200px}.max-w-\[600px\]{max-width:600px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-1\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:hsla(0,0%,100%,.05)}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[var\(--radius-lg\)\]{border-radius:var(--radius-lg)}.rounded-\[var\(--radius-md\)\]{border-radius:var(--radius-md)}.rounded-\[var\(--radius-sm\)\]{border-radius:var(--radius-sm)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l-\[3px\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-accent{--tw-border-opacity:1;border-color:rgb(225 29 72/var(--tw-border-opacity,1))}.border-accent-dim{border-color:rgba(225,29,72,.12)}.border-dark-600{--tw-border-opacity:1;border-color:rgb(136 146 164/var(--tw-border-opacity,1))}.border-dark-700{--tw-border-opacity:1;border-color:rgb(30 42 66/var(--tw-border-opacity,1))}.border-dark-800{--tw-border-opacity:1;border-color:rgb(20 27 45/var(--tw-border-opacity,1))}.border-dark-850{--tw-border-opacity:1;border-color:rgb(17 22 34/var(--tw-border-opacity,1))}.border-dark-900{--tw-border-opacity:1;border-color:rgb(12 16 23/var(--tw-border-opacity,1))}.border-dark-950{--tw-border-opacity:1;border-color:rgb(6 8 15/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity,1))}.border-gray-700\/50{border-color:rgba(55,65,81,.5)}.border-green-500{--tw-border-opacity:1;border-color:rgb(34 197 94/var(--tw-border-opacity,1))}.border-rose-500{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.border-rose-500\/30{border-color:rgba(244,63,94,.3)}.border-white\/10{border-color:hsla(0,0%,100%,.1)}.border-white\/5{border-color:hsla(0,0%,100%,.05)}.border-yellow-500{--tw-border-opacity:1;border-color:rgb(234 179 8/var(--tw-border-opacity,1))}.border-l-\[var\(--accent\)\]{border-left-color:var(--accent)}.bg-\[rgba\(220\2c 38\2c 38\2c 0\.05\)\]{background-color:rgba(220,38,38,.05)}.bg-accent{--tw-bg-opacity:1;background-color:rgb(225 29 72/var(--tw-bg-opacity,1))}.bg-accent-dim{background-color:rgba(225,29,72,.12)}.bg-accent-hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-accent\/20{background-color:rgba(225,29,72,.2)}.bg-amber-500\/10{background-color:rgba(245,158,11,.1)}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/60{background-color:rgba(0,0,0,.6)}.bg-blue-500\/10{background-color:rgba(59,130,246,.1)}.bg-dark-500{--tw-bg-opacity:1;background-color:rgb(160 170 184/var(--tw-bg-opacity,1))}.bg-dark-600{--tw-bg-opacity:1;background-color:rgb(136 146 164/var(--tw-bg-opacity,1))}.bg-dark-700{--tw-bg-opacity:1;background-color:rgb(30 42 66/var(--tw-bg-opacity,1))}.bg-dark-800{--tw-bg-opacity:1;background-color:rgb(20 27 45/var(--tw-bg-opacity,1))}.bg-dark-850{--tw-bg-opacity:1;background-color:rgb(17 22 34/var(--tw-bg-opacity,1))}.bg-dark-900{--tw-bg-opacity:1;background-color:rgb(12 16 23/var(--tw-bg-opacity,1))}.bg-dark-950{--tw-bg-opacity:1;background-color:rgb(6 8 15/var(--tw-bg-opacity,1))}.bg-emerald-500\/10{background-color:rgba(16,185,129,.1)}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.bg-gray-500\/10{background-color:hsla(220,9%,46%,.1)}.bg-gray-500\/20{background-color:hsla(220,9%,46%,.2)}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.bg-gray-900\/95{background-color:rgba(17,24,39,.95)}.bg-green-500\/10{background-color:rgba(34,197,94,.1)}.bg-green-500\/20{background-color:rgba(34,197,94,.2)}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.bg-orange-500\/20{background-color:rgba(249,115,22,.2)}.bg-purple-500\/20{background-color:rgba(168,85,247,.2)}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity,1))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.bg-red-500\/10{background-color:rgba(239,68,68,.1)}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-red-900\/20{background-color:rgba(127,29,29,.2)}.bg-rose-500{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.bg-rose-500\/10{background-color:rgba(244,63,94,.1)}.bg-rose-500\/20{background-color:rgba(244,63,94,.2)}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-500\/10{background-color:rgba(234,179,8,.1)}.bg-yellow-500\/20{background-color:rgba(234,179,8,.2)}.bg-yellow-600{--tw-bg-opacity:1;background-color:rgb(202 138 4/var(--tw-bg-opacity,1))}.bg-opacity-70{--tw-bg-opacity:0.7}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#0f1420\]{--tw-gradient-from:#0f1420 var(--tw-gradient-from-position);--tw-gradient-to:rgba(15,20,32,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-500{--tw-gradient-from:#ef4444 var(--tw-gradient-from-position);--tw-gradient-to:rgba(239,68,68,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-red-600{--tw-gradient-from:#dc2626 var(--tw-gradient-from-position);--tw-gradient-to:rgba(220,38,38,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-rose-700{--tw-gradient-from:#be123c var(--tw-gradient-from-position);--tw-gradient-to:rgba(190,18,60,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-\[\#090c14\]{--tw-gradient-to:#090c14 var(--tw-gradient-to-position)}.to-red-500{--tw-gradient-to:#ef4444 var(--tw-gradient-to-position)}.to-rose-500{--tw-gradient-to:#f43f5e var(--tw-gradient-to-position)}.to-rose-700{--tw-gradient-to:#be123c var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pr-1{padding-right:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-accent{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity,1))}.text-accent-dim{color:rgba(225,29,72,.12)}.text-dark-500{--tw-text-opacity:1;color:rgb(160 170 184/var(--tw-text-opacity,1))}.text-dark-600{--tw-text-opacity:1;color:rgb(136 146 164/var(--tw-text-opacity,1))}.text-dark-700{--tw-text-opacity:1;color:rgb(30 42 66/var(--tw-text-opacity,1))}.text-dark-800{--tw-text-opacity:1;color:rgb(20 27 45/var(--tw-text-opacity,1))}.text-dark-850{--tw-text-opacity:1;color:rgb(17 22 34/var(--tw-text-opacity,1))}.text-dark-900{--tw-text-opacity:1;color:rgb(12 16 23/var(--tw-text-opacity,1))}.text-dark-950{--tw-text-opacity:1;color:rgb(6 8 15/var(--tw-text-opacity,1))}.text-emerald-400{--tw-text-opacity:1;color:rgb(52 211 153/var(--tw-text-opacity,1))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-rose-300{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.text-rose-400{--tw-text-opacity:1;color:rgb(251 113 133/var(--tw-text-opacity,1))}.text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity,1))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.accent-red-500{accent-color:#ef4444}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-2xl,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-white{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity,1))}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px)}.backdrop-blur-md,.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-accent\/30:hover{border-color:rgba(225,29,72,.3)}.hover\:bg-accent-hover:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.hover\:bg-accent\/30:hover{background-color:rgba(225,29,72,.3)}.hover\:bg-dark-500:hover{--tw-bg-opacity:1;background-color:rgb(160 170 184/var(--tw-bg-opacity,1))}.hover\:bg-dark-600:hover{--tw-bg-opacity:1;background-color:rgb(136 146 164/var(--tw-bg-opacity,1))}.hover\:bg-dark-700:hover{--tw-bg-opacity:1;background-color:rgb(30 42 66/var(--tw-bg-opacity,1))}.hover\:bg-dark-800:hover{--tw-bg-opacity:1;background-color:rgb(20 27 45/var(--tw-bg-opacity,1))}.hover\:bg-dark-850:hover{--tw-bg-opacity:1;background-color:rgb(17 22 34/var(--tw-bg-opacity,1))}.hover\:bg-dark-900:hover{--tw-bg-opacity:1;background-color:rgb(12 16 23/var(--tw-bg-opacity,1))}.hover\:bg-dark-950:hover{--tw-bg-opacity:1;background-color:rgb(6 8 15/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:bg-gray-700\/30:hover{background-color:rgba(55,65,81,.3)}.hover\:bg-green-500:hover{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity,1))}.hover\:bg-rose-500:hover{--tw-bg-opacity:1;background-color:rgb(244 63 94/var(--tw-bg-opacity,1))}.hover\:bg-rose-500\/10:hover{background-color:rgba(244,63,94,.1)}.hover\:bg-rose-500\/20:hover{background-color:rgba(244,63,94,.2)}.hover\:bg-rose-700:hover{--tw-bg-opacity:1;background-color:rgb(190 18 60/var(--tw-bg-opacity,1))}.hover\:bg-white\/10:hover{background-color:hsla(0,0%,100%,.1)}.hover\:bg-white\/5:hover{background-color:hsla(0,0%,100%,.05)}.hover\:bg-yellow-500:hover{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity,1))}.hover\:text-accent-hover:hover{--tw-text-opacity:1;color:rgb(244 63 94/var(--tw-text-opacity,1))}.hover\:text-rose-300:hover{--tw-text-opacity:1;color:rgb(253 164 175/var(--tw-text-opacity,1))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.focus\:border-rose-500:focus{--tw-border-opacity:1;border-color:rgb(244 63 94/var(--tw-border-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-accent:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(225 29 72/var(--tw-ring-opacity,1))}.focus\:ring-rose-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity,1))}.disabled\:opacity-50:disabled{opacity:.5}.peer:checked~.peer-checked\:bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:640px){.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:hidden{display:none}.sm\:w-48{width:12rem}.sm\:w-52{width:13rem}.sm\:w-60{width:15rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}}@media (min-width:768px){.md\:sticky{position:sticky}.md\:block{display:block}.md\:hidden{display:none}.md\:w-60{width:15rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:p-6{padding:1.5rem}}@media (min-width:1024px){.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:p-8{padding:2rem}}@media (min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}
/**
 * CellHub WebRTC Dialer — Premium Design System
 * Supports Light (default) and Dark themes via CSS custom properties
 * and Tailwind dark: class mode.
 */

/* ===================== CSS Custom Properties ===================== */
:root {
    /* Light mode (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f6;
    --bg-elevated: #f9fafb;
    --bg-input: #f3f4f6;
    --bg-hover: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-heading: #030712;
    --accent: #e11d48;
    --accent-hover: #f43f5e;
    --accent-soft: rgba(225, 29, 72, 0.06);
    --accent-dim: rgba(225, 29, 72, 0.10);
    --accent-glow: 0 0 24px rgba(225,29,72,0.15), 0 0 8px rgba(225,29,72,0.08);
    --success: #10b981;
    --success-dim: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-dim: rgba(245, 158, 11, 0.08);
    --danger: #f43f5e;
    --danger-dim: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-dim: rgba(59, 130, 246, 0.08);
    --border: #e5e7eb;
    --border-subtle: #f3f4f6;
    --border-hover: rgba(225, 29, 72, 0.25);
    --border-focus: rgba(225, 29, 72, 0.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.08);
    --shadow-accent: 0 0 24px rgba(225,29,72,0.10), 0 0 8px rgba(225,29,72,0.06);
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 28px;
    --sidebar-width: 260px;
    --header-height: 56px;
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Scrollbar for light mode */
    --scrollbar-thumb: rgba(0,0,0,0.15);
    --scrollbar-thumb-hover: rgba(0,0,0,0.25);
    --scrollbar-track: transparent;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    /* Modal overlay */
    --modal-overlay: rgba(0,0,0,0.5);
    /* Toast background alpha */
    --toast-alpha: 0.95;
}

/* Dark mode overrides */
.dark {
    --bg-primary: #06080f;
    --bg-secondary: #0c1017;
    --bg-card: #111622;
    --bg-card-hover: #161d2e;
    --bg-elevated: #192035;
    --bg-input: #141b2d;
    --bg-hover: #1e2a42;
    --text-primary: #f0f2f5;
    --text-secondary: #8892a4;
    --text-muted: #5a6478;
    --text-heading: #ffffff;
    --accent: #e11d48;
    --accent-hover: #f43f5e;
    --accent-soft: rgba(225, 29, 72, 0.08);
    --accent-dim: rgba(225, 29, 72, 0.12);
    --accent-glow: 0 0 24px rgba(225,29,72,0.2), 0 0 8px rgba(225,29,72,0.1);
    --success: #10b981;
    --success-dim: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-dim: rgba(245, 158, 11, 0.1);
    --danger: #f43f5e;
    --danger-dim: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-dim: rgba(59, 130, 246, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.03);
    --border-hover: rgba(225, 29, 72, 0.25);
    --border-focus: rgba(225, 29, 72, 0.5);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.3);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.5), 0 8px 16px rgba(0,0,0,0.35);
    --shadow-accent: 0 0 24px rgba(225,29,72,0.15), 0 0 8px rgba(225,29,72,0.1);
    --scrollbar-thumb: rgba(255,255,255,0.08);
    --scrollbar-thumb-hover: rgba(255,255,255,0.15);
    --scrollbar-track: transparent;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0,0,0,0.7);
    --toast-alpha: 1;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    letter-spacing: -0.01em;
    background: var(--bg-primary);
    color: var(--text-primary);
}

::selection { background: rgba(225, 29, 72, 0.25); color: #fff; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-hover); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }

/* ===================== Theme Toggle ===================== */
.theme-toggle-btn,
.lang-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 8px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text-secondary); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
    font-family: inherit; line-height: 1;
}
.theme-toggle-btn:hover,
.lang-toggle-btn:hover {
    color: var(--text-primary); border-color: var(--border-hover);
    background: var(--accent-soft);
}
.theme-toggle-btn svg { width: 16px; height: 16px; }
.lang-toggle-btn { min-width: 52px; gap: 2px; }

/* ===================== Sidebar ===================== */
.sidebar-wrapper {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border) !important;
    /* DEFAULT: off-screen (prevents mobile flash), desktop override below */
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    width: var(--sidebar-width, 260px);
    height: 100vh;
    z-index: auto;
    flex-shrink: 0;
}
/* MOBILE: sidebar off-screen, opens on toggle */
@media (max-width: 767px) {
    .sidebar-wrapper {
        position: fixed !important;
        top: 0;
        left: 0;
        z-index: 50 !important;
        height: 100vh;
        width: 280px;
        transform: translateX(-100%);
    }
    .sidebar-wrapper.open { transform: translateX(0) !important; }
}
/* DESKTOP: sidebar in flow, overlay hidden */
@media (min-width: 768px) {
    .sidebar-wrapper {
        position: static !important;
        transform: none !important;
        width: var(--sidebar-width, 260px) !important;
        height: 100vh;
        z-index: auto;
    }
    #sidebar-overlay { display: none !important; }
}
#sidebar-overlay { opacity: 0; transition: opacity var(--transition-smooth); pointer-events: none;  }
#sidebar-overlay.active { opacity: 1; pointer-events: auto; }

/* Premium nav links */
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 8px 12px;
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-size: 13px; font-weight: 500; transition: all var(--transition-fast);
    cursor: pointer; text-decoration: none; white-space: nowrap; position: relative; overflow: hidden;
}
.nav-link::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent);
    transition: transform var(--transition-smooth);
}
.nav-link:hover { background: var(--accent-soft); color: var(--text-primary); }
.nav-link.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.nav-link.active::before { transform: translateY(-50%) scaleY(1); }
.nav-link svg { flex-shrink: 0; opacity: 0.55; transition: all var(--transition-fast); }
.nav-link:hover svg { opacity: 0.85; }
.nav-link.active svg { opacity: 1; }

/* Logout nav link */
.nav-link.text-red-400 { color: var(--danger) !important; }
.nav-link.text-red-400:hover { background: rgba(239,68,68,0.08) !important; }

.nav-section-toggle {
    display: flex; align-items: center; justify-content: space-between; padding: 8px 12px;
    border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition); width: 100%; background: none; border: none;
}
.nav-section-toggle:hover { color: var(--text-primary); }
.nav-section-toggle .chevron { transition: transform 0.2s ease; }
.nav-section-toggle.collapsed .chevron { transform: rotate(-90deg); }
.nav-section-items { max-height: 500px; overflow: hidden; transition: max-height 0.3s ease; }
.nav-section-items.collapsed { max-height: 0; }

/* ===================== Glass Card System ===================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px;
    transition: all var(--transition-smooth); position: relative; overflow: hidden;
}
.card::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    opacity: 0; transition: opacity var(--transition-smooth); pointer-events: none;
    background: linear-gradient(135deg, rgba(225,29,72,0.03) 0%, transparent 60%);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-accent); transform: translateY(-1px); }
.card:hover::after { opacity: 1; }

.card-static {
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px;
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text-heading); letter-spacing: 0.01em; text-transform: uppercase; }

/* ===================== KPI Stat Cards ===================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px;
    transition: all var(--transition-smooth); position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    opacity: 0; transition: opacity var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-accent); transform: translateY(-2px); }

.stat-card .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; color: var(--text-heading); line-height: 1; letter-spacing: -0.02em; }
.stat-card .stat-change { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 8px; padding: 2px 8px; border-radius: 20px; }
.stat-change.positive { color: var(--success); background: var(--success-dim); }
.stat-change.negative { color: var(--danger); background: var(--danger-dim); }
.stat-change.neutral { color: var(--text-muted); background: rgba(90,100,120,0.1); }

/* ===================== Tables ===================== */
.table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.table-wrapper table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table-wrapper th {
    background: var(--bg-input); padding: 12px 16px; text-align: left;
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table-wrapper td { padding: 12px 16px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.table-wrapper tr:hover td { background: var(--accent-soft); }
.table-wrapper tr:last-child td { border-bottom: none; }

/* ===================== Premium Buttons ===================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 18px; border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
    transition: all var(--transition-fast); text-decoration: none; white-space: nowrap; letter-spacing: 0.01em;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #fff; box-shadow: 0 1px 3px rgba(225,29,72,0.25);
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(225,29,72,0.35), 0 1px 3px rgba(225,29,72,0.25); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-hover); }

.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.btn-success:hover { background: rgba(16,185,129,0.2); }

.btn-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.btn-warning:hover { background: rgba(245,158,11,0.2); }

.btn-ghost { background: transparent; color: var(--text-secondary); padding: 6px 10px; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text-primary); }

/* ===================== Badges ===================== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }
.badge-info { background: var(--info-dim); color: var(--info); }
.badge-neutral { background: rgba(90,100,120,0.1); color: var(--text-muted); }
.badge-accent { background: var(--accent-dim); color: var(--accent); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px rgba(16,185,129,0.5); animation: pulse-green 2s ease-in-out infinite; }
.status-dot.offline { background: var(--text-muted); }
.status-dot.busy { background: var(--danger); box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.status-dot.away { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.status-dot.idle { background: var(--info); box-shadow: 0 0 8px rgba(59,130,246,0.5); }

@keyframes pulse-green { 0%, 100% { box-shadow: 0 0 4px rgba(16,185,129,0.3); } 50% { box-shadow: 0 0 14px rgba(16,185,129,0.7); } }

/* ===================== Form Inputs ===================== */
.form-input {
    width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; font-family: inherit;
    transition: all var(--transition-fast); letter-spacing: -0.01em;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(225,29,72,0.1), 0 0 0 1px rgba(225,29,72,0.3); }
.form-input::placeholder { color: var(--text-muted); }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }

/* Settings Layout */
/* ===================== Responsive ===================== */
@media (max-width: 767px) {
    .mobile-stack { flex-direction: column !important; }
    .mobile-full { width: 100% !important; min-width: 0 !important; }
}
@media (max-width: 639px) {
    .stat-card .stat-value { font-size: 24px; }
    .card { padding: 16px; }
    main { padding-left: 12px !important; padding-right: 12px !important; }
}

.grid-kpi { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid-kpi { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .grid-kpi { grid-template-columns: repeat(6, 1fr); } }

.grid-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

.grid-charts { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-charts { grid-template-columns: repeat(2, 1fr); } }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quick-action-btn {
    display: flex; align-items: center; gap: 8px; padding: 10px 18px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all var(--transition-smooth); text-decoration: none;
}
.quick-action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.quick-action-btn svg { flex-shrink: 0; }

.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.page-header h1 { font-size: 24px; font-weight: 800; color: var(--text-heading); letter-spacing: -0.02em; }
.page-header p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
@media (max-width: 639px) { .page-header { flex-direction: column; align-items: flex-start; } .page-header h1 { font-size: 20px; } }

.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state svg { margin: 0 auto 20px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
.empty-state p { font-size: 13px; max-width: 360px; margin: 0 auto; line-height: 1.6; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.animate-fade-in { animation: fadeIn 0.35s ease-out; }
.animate-slide-up { animation: slideInUp 0.35s ease-out; }
.animate-slide-left { animation: slideInLeft 0.35s ease-out; }
.animate-scale-in { animation: scaleIn 0.25s ease-out; }

.stagger-children > * { animation: none; }

.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.modal-overlay {
    display: none !important;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-overlay);
    z-index: 100; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
}

.toast-container { position: fixed; top: 72px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
    padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 10px; animation: slideInLeft 0.3s ease-out;
    box-shadow: var(--shadow-md); backdrop-filter: blur(12px);
}
.toast-success { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.toast-error { background: rgba(239,68,68,0.12); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.toast-warning { background: rgba(245,158,11,0.12); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.toast-info { background: rgba(59,130,246,0.12); color: var(--info); border: 1px solid rgba(59,130,246,0.2); }

/* Premium header */
header { background: var(--bg-secondary) !important; backdrop-filter: none !important; border-bottom: 1px solid var(--border) !important; }

/* Print */
@media print { .sidebar-wrapper, #sidebar-overlay, header { display: none !important; } main { padding: 0 !important; } .card { border: 1px solid #ddd; background: #fff; color: #000; } }

/* ===================== Light/Dark mode specific overrides for layout ===================== */

/* Light mode: Header user dropdown */
#user-dropdown {
    background: var(--bg-card);
    border-color: var(--border);
}

/* Sidebar section labels */
.sidebar-wrapper .text-gray-500,
.sidebar-wrapper .text-\[10px\] {
    color: var(--text-muted) !important;
}

/* Sidebar text colors via theme */
.sidebar-wrapper .text-white {
    color: var(--text-heading) !important;
}
.sidebar-wrapper .text-gray-400 {
    color: var(--text-muted) !important;
}
.sidebar-wrapper .text-gray-300 {
    color: var(--text-secondary) !important;
}
.sidebar-wrapper .text-red-400 {
    color: var(--danger) !important;
}

/* Header text overrides for theme */
header .text-white {
    color: var(--text-heading) !important;
}
header .text-gray-400 {
    color: var(--text-muted) !important;
}
header .text-gray-300 {
    color: var(--text-secondary) !important;
}

/* Body background via CSS variable */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== MOBILE RESPONSIVE ENHANCEMENTS ========== */

/* Tables scrollable on mobile */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 600px; }

/* Stack form groups on mobile */
@media (max-width: 639px) {
    .form-row { flex-direction: column !important; }
    .form-row > * { width: 100% !important; min-width: 0 !important; }
    
    /* Smaller stat cards */
    .stat-card { padding: 12px !important; }
    .stat-card .stat-value { font-size: 20px !important; }
    .stat-card .stat-label { font-size: 11px !important; }
    
    /* Stack header actions */
    .header-actions { flex-direction: column; gap: 8px; width: 100%; }
    .header-actions .btn { width: 100%; justify-content: center; }
    
    /* Card grid single column */
    .grid-kpi { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .grid-cards { grid-template-columns: 1fr !important; }
    .grid-charts { grid-template-columns: 1fr !important; }
    
    /* Navbar spacing */
    header { padding: 0 12px !important; }
    .breadcrumb { display: none !important; }
    
    /* Toggle buttons smaller on mobile */
    .theme-toggle-btn, .lang-toggle-btn { padding: 4px 6px !important; font-size: 11px !important; }
    
    /* Content padding */
    main { padding: 12px !important; }
    
    /* Login card padding */
    .login-card { padding: 1.5rem !important; }
}

/* Medium screens */
@media (min-width: 640px) and (max-width: 767px) {
    .grid-kpi { grid-template-columns: repeat(2, 1fr); }
    .grid-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Fix sidebar overlay on mobile */
#sidebar-overlay.active { z-index: 45; }

/* Ensure buttons are touch-friendly (min 44px tap target) */
.btn { min-height: 36px; min-width: 36px; }
@media (max-width: 639px) {
    .btn { min-height: 42px; padding: 8px 14px; }
}

/* Prevent horizontal overflow */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Login page mobile */
@media (max-width: 480px) {
    .login-card { margin: 0 8px; border-radius: 12px; padding: 1.25rem; }
    .login-toggles { top: 8px; right: 8px; }
}




/* ============================================
   Theme-Aware Utility Classes
   Replace inline style="color:var(...)" patterns
   ============================================ */
.t-text-primary { color: var(--text-primary) !important; }
.t-text-secondary { color: var(--text-secondary) !important; }
.t-text-muted { color: var(--text-muted) !important; }
.t-text-heading { color: var(--text-heading) !important; }
.t-text-accent { color: var(--accent) !important; }
.t-text-success { color: var(--success) !important; }
.t-text-warning { color: var(--warning) !important; }
.t-text-danger { color: var(--danger) !important; }
.t-text-info { color: var(--info) !important; }

.t-bg-primary { background: var(--bg-primary) !important; }
.t-bg-secondary { background: var(--bg-secondary) !important; }
.t-bg-card { background: var(--bg-card) !important; }
.t-bg-input { background: var(--bg-input) !important; }
.t-bg-hover { background: var(--bg-hover) !important; }
.t-bg-accent { background: var(--accent) !important; }
.t-bg-success { background: var(--success) !important; }
.t-bg-warning { background: var(--warning) !important; }
.t-bg-danger { background: var(--danger) !important; }
.t-bg-info { background: var(--info) !important; }
.t-bg-transparent { background: transparent !important; }
.t-bg-none { background: none !important; }

.t-border { border-color: var(--border) !important; }
.t-border-accent { border-color: var(--accent) !important; }

/* Combined form input style: bg + border + text color */
.t-form-input {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

/* Combined card style: bg + border */
.t-card-style {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
}

/* Filter button states */
.t-filter-active {
/* Hover variants for theme background */
.hover-t-bg-hover:hover { background: var(--bg-hover) !important; }
.hover-t-bg-card:hover { background: var(--bg-card-hover) !important; }
.hover-t-bg-input:hover { background: var(--bg-input) !important; }
.hover-t-text-primary:hover { color: var(--text-primary) !important; }
.hover-t-text-secondary:hover { color: var(--text-secondary) !important; }
    border-color: var(--border) !important;
    background: rgba(220, 38, 38, 0.15) !important;
    color: var(--accent) !important;
}
.t-filter-inactive {
    border-color: var(--border) !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
}

/* Muted spacing */
.t-tracking-wide { letter-spacing: 0.5px; }

/* Close button */
.t-close-btn {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
}

/* Accent underline for active nav */
.t-accent-color { accent-color: var(--accent); }

.live-timer {
    font-variant-numeric: tabular-nums;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.range-tab-active {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
}

/**
 * CellHub WebRTC Dialer - Dialer Styles
 * 
 * Styles for the dialer interface, numpad, call status,
 * contacts, history, and settings views.
 */

/* ===================== Dialer Container ===================== */
.dialer-container {
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ===================== Call Status ===================== */
.call-status {
    width: 100%;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.8), rgba(220, 38, 38, 0.2));
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: pulse-border 2s ease-in-out infinite;
}

.call-status.active-call {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(127, 29, 29, 0.4));
}

.call-status.incoming-call {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(76, 175, 80, 0.2));
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(220, 38, 38, 0.3); }
    50% { border-color: rgba(220, 38, 38, 0.6); }
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-state {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-duration {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.status-actions {
    display: flex;
    gap: 8px;
}

/* ===================== Phone Display ===================== */
.phone-display {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.phone-number {
    width: 100%;
    min-height: 52px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 48px 12px 16px;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-align: center;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
}

.phone-number:empty::before {
    content: attr(placeholder);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 20px;
    letter-spacing: 0;
    font-family: 'Inter', sans-serif;
}

.btn-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-clear:hover {
    color: var(--danger);
    background: rgba(244, 67, 54, 0.1);
}

/* ===================== Numpad ===================== */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.num-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 40, 75, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.num-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--border-hover);
}

.num-btn:active {
    background: rgba(220, 38, 38, 0.2);
    transform: scale(0.95);
}

.num-btn .digit {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.num-btn .letters {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ===================== Call Button ===================== */
.dialer-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 160px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #00897b, #e11d48);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
}

.btn-call:active {
    transform: translateY(0);
}

.btn-call.calling {
    background: linear-gradient(135deg, #be123c, #f43f5e);
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.3);
}

.btn-call:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================== Button Icons ===================== */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(30, 40, 75, 0.6);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--border-hover);
    color: var(--accent-primary);
}

.btn-icon.active {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: var(--danger);
}

.btn-icon.btn-danger {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    color: var(--danger);
}

.btn-icon.btn-danger:hover {
    background: rgba(244, 67, 54, 0.3);
}

/* ===================== Registration Status ===================== */
.reg-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.reg-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.reg-indicator.online { background: var(--success); }
.reg-indicator.offline { background: var(--text-muted); }
.reg-indicator.registering { background: var(--warning); animation: blink 1s ease-in-out infinite; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===================== Recent Calls ===================== */
.recent-calls {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.section-title {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.calls-list {
    max-height: 280px;
    overflow-y: auto;
}

.call-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.call-item:last-child {
    border-bottom: none;
}

.call-item:hover {
    background: rgba(220, 38, 38, 0.05);
}

.call-icon {
    flex-shrink: 0;
}

.call-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.call-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-time {
    font-size: 11px;
    color: var(--text-muted);
}

.call-status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-answered { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-missed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-ringing { background: rgba(220, 38, 38, 0.15); color: var(--accent-primary); }
.badge-completed { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-busy { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.badge-unknown { background: rgba(136, 146, 176, 0.15); color: var(--text-muted); }

/* ===================== Empty State ===================== */
.empty-state {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================== Contacts View ===================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.panel-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.search-input {
    flex: 1;
    max-width: 280px;
    padding: 8px 14px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.contacts-list {
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(220, 38, 38, 0.05);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-phone {
    font-size: 12px;
    color: var(--text-secondary);
}

.contact-company {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-call-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--accent-primary);
    opacity: 0;
    transition: var(--transition);
}

.contact-item:hover .btn-call-sm {
    opacity: 1;
}

.btn-call-sm:hover {
    background: rgba(220, 38, 38, 0.2);
}

/* ===================== Call History ===================== */
.history-list {
    display: flex;
    flex-direction: column;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.history-direction {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-time {
    font-size: 11px;
    color: var(--text-muted);
}

.history-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

/* ===================== Settings ===================== */
.settings-content {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-section h3 {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    background: rgba(220, 38, 38, 0.03);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.setting-item span {
    font-size: 13px;
    color: var(--text-primary);
}

.form-select-setting {
    padding: 6px 12px;
    background: rgba(10, 15, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 200px;
}

.form-select-setting:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
}

.status-text.online {
    color: var(--success);
}

/* ===================== Incoming Call Modal ===================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    
}

.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-incoming {
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.incoming-icon {
    margin-bottom: 16px;
    animation: ring 1.5s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.incoming-caller {
    font-size: 16px;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.incoming-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-accept {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--success);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-accept:hover {
    background: #43a047;
    transform: translateY(-2px);
}

.btn-reject {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--danger);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reject:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

/* ===================== View Panels ===================== */
.view-panel {
    display: none;
}

.view-panel.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Settings Layout */
/* ===================== Responsive ===================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        z-index: 100;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        width: 100%;
        padding: 16px;
    }

    .phone-number {
        font-size: 22px;
    }

    .num-btn .digit {
        font-size: 20px;
    }

    .numpad {
        gap: 8px;
    }
}

/* ===================== Call Statistics Cards ===================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-icon {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ===================== Backspace Button ===================== */
.btn-backspace {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-backspace:hover {
    color: var(--warning);
    background: rgba(255, 152, 0, 0.1);
}

/* ===================== Answer Button ===================== */
.btn-answer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 160px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #047857, #10b981);
    border: none;
    border-radius: 28px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    animation: pulse-answer 1.5s ease-in-out infinite;
}

.btn-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
}

@keyframes pulse-answer {
    0%, 100% { box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(76, 175, 80, 0.6); }
}

/* ===================== Call Notes Modal ===================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-notes {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 400px;
    max-width: 90vw;
}

.modal-notes h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.notes-call-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.modal-notes textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

.modal-notes textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.notes-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.notes-actions .btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.notes-actions .btn-primary {
    background: var(--accent-primary);
    color: #0d1b2a;
}

.notes-actions .btn-primary:hover {
    background: var(--accent-hover);
}

.notes-actions .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* ===================== Refresh Button ===================== */
.refresh-btn {
    float: right;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0 4px;
}

.refresh-btn:hover {
    color: var(--accent-primary);
    transform: rotate(180deg);
}

/* ===================== History View ===================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-input {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    width: 220px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* ===================== Settings View ===================== */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.settings-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
}

.setting-item label {
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-item span {
    color: var(--text-primary);
}

.form-select-setting {
    padding: 6px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    width: 200px;
    outline: none;
}

.btn.btn-primary {
    padding: 8px 16px;
    background: var(--accent-primary);
    color: #0d1b2a;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn.btn-primary:hover {
    background: var(--accent-hover);
}

.status-text {
    font-weight: 500;
}

.status-text.online {
    color: var(--success);
}

/* ===================== Contacts View ===================== */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(220, 38, 38, 0.08);
}

.contact-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-phone {
    font-size: 11px;
    color: var(--text-muted);
}

.contact-company {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-call-sm {
    color: var(--success);
}

/* ===================== History Items ===================== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--border-hover);
}

.history-direction {
    flex-shrink: 0;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.history-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.history-time {
    font-size: 11px;
    color: var(--text-muted);
}

.history-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-answered, .badge-completed { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-no_answer, .badge-missed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-ringing, .badge-dialing { background: rgba(220, 38, 38, 0.15); color: var(--accent-primary); }
.badge-busy { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.badge-failed { background: rgba(244, 67, 54, 0.15); color: var(--danger); }
.badge-pending { background: rgba(90, 99, 128, 0.2); color: var(--text-muted); }
.badge-transferred { background: rgba(220, 38, 38, 0.15); color: var(--accent-primary); }
.badge-skipped_blacklisted { background: rgba(90, 99, 128, 0.2); color: var(--text-muted); }

/* ===================== View Panel ===================== */
.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

/* Settings Layout */
.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 767px) { .settings-layout { grid-template-columns: 1fr; } }
/* ===================== Responsive Stats ===================== */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DTMF Received Display */
.dtmf-received {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e11d48;
    background: rgba(220, 38, 38, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}
.dtmf-received.flash {
    background: rgba(220, 38, 38, 0.3);
    transform: scale(1.2);
}

/* Incoming call overlay animation */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
.incoming-call-overlay .modal-overlay.show {
    display: flex !important;
}

.modal-content {
    animation: slideInUp 0.3s ease;
}
.btn-accept {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    transition: background 0.2s;
}
.btn-accept:hover { background: #43a047; }
.btn-reject {
    background: #f43f5e;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 8px;
    transition: background 0.2s;
}
.btn-reject:hover { background: #e53935; }

/* =============================================================================
   Fulltastic Dialer - Comprehensive Mobile Responsive Overrides
   Covers ALL view files: dashboard, dialer, campaigns, contacts, reports,
   monitoring, queues, audit, tenants, webhooks, api-tokens, ivr, ivr-maker,
   audio, voicemail, notifications, security, manager
   ============================================================================= */

/* ===================== Global Touch & Viewport ===================== */

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ===================== SPA Main Content Area ===================== */

@media (max-width: 767px) {
    #spa-content {
        padding: 0.75rem !important;
    }
}

/* ===================== Page Containers ===================== */

/* Views with .page-container { padding: 24px } — reduce on mobile */
@media (max-width: 767px) {
    .page-container,
    .ivr-maker-page,
    .maker-card {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .settings-card {
        padding: 1rem !important;
    }

    /* Webhooks page */
    .events-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Webhooks delivery-row responsive */
    .delivery-row {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }

    .webhook-row {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* API Tokens page */
    .permissions-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .form-row {
        flex-wrap: wrap !important;
    }

    /* IVR Builder - stack panels on mobile */
    .builder-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    .builder-palette,
    .builder-canvas,
    .builder-properties {
        height: auto !important;
        min-height: 300px !important;
    }
}

@media (max-width: 480px) {
    .page-container,
    .ivr-maker-page {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .events-grid {
        grid-template-columns: 1fr !important;
    }

    .permissions-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================== Tenant Pages ============================= */

/* tenants/invite.php - Two-column grid */
@media (max-width: 767px) {
    .invite-section {
        grid-template-columns: 1fr !important;
    }

    .invite-row {
        flex-direction: column !important;
        gap: 4px !important;
    }
}

/* tenants/register.php & accept.php */
@media (max-width: 639px) {
    .register-card,
    .accept-card {
        padding: 1.5rem 1rem !important;
    }

    .form-row-2 {
        grid-template-columns: 1fr !important;
    }
}

/* tenants/plan.php - reduce padding on mobile */
@media (max-width: 767px) {
    .plan-card {
        padding: 1rem !important;
    }

    .usage-grid,
    .plans-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================== Tables ===================== */


/* ===================== Mobile Layout Fixes ===================== */
@media (max-width: 767px) {
    /* Reduce page padding on mobile */
    #spa-content, main, .main-content {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Ensure page/card headers wrap properly */
    .page-header, .card-header {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }

    /* Make filter rows wrap */
    .filter-row, [class*="filter"] {
        flex-wrap: wrap !important;
    }

    /* Reduce stat card text sizes on mobile */
    .text-3xl, .text-4xl, .text-5xl {
        font-size: 1.5rem !important;
    }

    /* Prevent select min-width overflow */
    select.form-input, select.t-form-input {
        min-width: 0 !important;
        max-width: 100% !important;
        width: auto !important;
    }

    /* Make modals full-width on mobile */
    .modal-content, .max-w-lg, .max-w-md {
        max-width: 95vw !important;
        width: 95vw !important;
        margin: 0.5rem !important;
    }

    /* Ensure buttons don't overflow */
    .btn {
        white-space: nowrap;
    }

    /* Fix date input sizing */
    input[type="date"] {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Make grid-kpi responsive */
    .grid-kpi {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Fix grid-charts stacking */
    .grid-charts {
        grid-template-columns: 1fr !important;
    }
}


/* ===================== Mobile Responsive Tables (card view) ===================== */

/* Desktop: normal table layout - hide data-label prefix */
@media (min-width: 768px) {
    .data-table td[data-label]::before {
        display: none;
    }
}

/* Mobile: transform tables into stacked card layout */
@media (max-width: 767px) {
    /* Hide the thead on mobile */
    .data-table thead {
        display: none !important;
    }

    /* Transform table to block layout */
    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block !important;
        width: 100% !important;
    }

    /* Each row becomes a card */
    .data-table tr {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        overflow: hidden;
    }

    /* Remove alternating row backgrounds on mobile */
    .data-table tr:nth-child(even),
    .data-table tr:nth-child(odd) {
        background: var(--bg-card);
    }

    /* Each cell becomes a labeled row */
    .data-table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        white-space: normal !important;
        font-size: 0.875rem;
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    /* Show data-label as a prefix */
    .data-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }

    .data-table td[data-label] {
        display: flex !important;
    }

    /* Actions column: right-align buttons */
    .data-table td.actions,
    .data-table td[data-label="Actions"] {
        justify-content: flex-end;
        padding-top: 0.75rem;
        border-bottom: none;
    }

    /* Badge styling in cards */
    .data-table td .badge {
        display: inline-flex;
    }

    /* Code elements in cards */
    .data-table td code {
        word-break: break-all;
        font-size: 0.8rem;
    }

    /* SIP password reveal buttons */
    .data-table td .sip-pass {
        font-size: 0.8rem;
    }

    /* Hide columns marked as hide-mobile */
    .data-table .hide-mobile {
        display: none !important;
    }

    /* Table wrapper: remove min-width, no horizontal scroll needed */
    .table-wrapper .data-table,
    .overflow-x-auto .data-table {
        min-width: 0 !important;
    }

    /* Table wrapper: remove horizontal scroll on mobile */
    .table-wrapper,
    .overflow-x-auto {
        overflow-x: visible !important;
    }
}

/* ===================== Reports Filter Selects ===================== */

@media (max-width: 639px) {
    /* Override hardcoded min-width:140px on filter selects */
    .filter-row select,
    .flex.flex-wrap select,
    select[style*="min-width"] {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* ===================== Campaign Detail ========================= */

@media (max-width: 639px) {
    /* Add-contact form: stack on mobile */
    form .grid.grid-cols-2.sm\:grid-cols-3,
    form .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Queue filter buttons */
    .flex.gap-2.items-center.flex-wrap {
        gap: 0.375rem !important;
    }
}

/* ===================== Dialer Page ============================= */

@media (max-width: 767px) {
    /* Dialer stats grid */
    .dialer-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Queue filter buttons must wrap */
    .queue-filters,
    .flex.items-center.gap-2 {
        flex-wrap: wrap !important;
    }
}

/* ===================== IVR Maker =============================== */

@media (max-width: 639px) {
    /* Fix hardcoded width on category select */
    .ivr-maker-category-select {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Maker cards reduce padding */
    .maker-card {
        padding: 1rem !important;
    }

    /* Editor toolbar wraps */
    .editor-toolbar {
        flex-wrap: wrap !important;
    }
}

/* ===================== Audio Page =============================== */

@media (max-width: 639px) {
    /* Drop zone - reduce excessive p-10 padding */
    .audio-drop-zone {
        padding: 1.5rem !important;
    }
}

/* ===================== Dashboard =============================== */

@media (max-width: 639px) {
    /* Dashboard search input */
    .dashboard-search {
        max-width: 100% !important;
    }

    /* Modal fixes */
    .modal-container {
        width: 95% !important;
        max-width: none !important;
        margin: 0.5rem !important;
    }
}

/* ===================== Manager Page ============================= */

@media (max-width: 767px) {
    /* Manager tables need overflow wrapper */
    .tab-content .overflow-x-auto,
    #users-table-wrap,
    #sip-table-wrap,
    #blacklist-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Manager modals nearly full-screen */
    .modal-overlay .modal {
        width: 95% !important;
        max-width: none !important;
        margin: 0.5rem !important;
    }

    /* Tab buttons: horizontal scroll */
    .tab-bar, .tab-nav {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap !important;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .tab-bar::-webkit-scrollbar,
    .tab-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0 !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }
}

/* ===================== Fixed Inline Styles Override ============= */

/* Queue modals: force single-column on mobile */
@media (max-width: 639px) {
    .modal .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }

    /* Skills add row: stack on mobile */
    .modal .flex.items-center.gap-2 {
        flex-wrap: wrap !important;
    }

    .modal .flex.items-center.gap-2 input,
    .modal .flex.items-center.gap-2 select {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* ===================== Buttons & Touch Targets ================== */

@media (max-width: 767px) {
    /* Ensure minimum 44px touch targets */
    .btn,
    button[class*="bg-"],
    a[class*="bg-"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Smaller buttons like icon-only stay 36px minimum */
    .btn-icon,
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
    }

    /* Quick actions grid: single column on tiny phones */
    @media (max-width: 400px) {
        .grid-kpi {
            grid-template-columns: 1fr !important;
        }

        .stat-card .stat-value {
            font-size: 1.25rem !important;
        }

        .quick-action-btn svg {
            display: none !important;
        }
    }
}

/* ===================== Misc Responsive ========================= */

@media (max-width: 639px) {
    /* Page header stacking */
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .page-header h1 {
        font-size: 1.25rem !important;
    }

    /* Card grids */
    .grid-cards {
        grid-template-columns: 1fr !important;
    }

    /* Charts grid */
    .grid-charts {
        grid-template-columns: 1fr !important;
    }

    /* Stat cards: 2 per row */
    .grid-kpi {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Content area tighter */
    main {
        padding: 0.75rem !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .grid-kpi {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .grid-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid-charts {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ===================== Comprehensive Mobile Fixes ================ */

/* --- Campaign create modal --- */
@media (max-width: 639px) {
    .campaign-modal[id] > div,
    div[style*="max-width:600px"],
    div[style*="max-width: 600px"] {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* --- Form cards p-6 → p-3 on mobile --- */
@media (max-width: 639px) {
    .card-static,
    .t-card-style,
    div.p-6 {
        padding: 0.75rem !important;
    }

    /* Page heading font sizes */
    h1, .page-title {
        font-size: 1.375rem !important;
    }

    h2, .card-title {
        font-size: 1.125rem !important;
    }

    /* Filter rows stack vertically */
    .filter-row,
    .flex.items-center.gap-4.filter-row,
    main div.flex.items-center.gap-3,
    main div.flex.items-center.gap-4 {
        flex-wrap: wrap !important;
    }

    /* Header right-side controls must never wrap */
    header .flex.items-center {
        flex-wrap: nowrap !important;
    }

    /* Selects and inputs full width on mobile */
    select, input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], textarea {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Page-container reduce padding on mobile */
    .page-container {
        padding: 0.75rem !important;
    }

    /* Modals should be near-full-screen on mobile */
    .modal-overlay > div,
    .modal-overlay > .modal,
    dialog > div,
    dialog {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: auto !important;
        padding: 1rem !important;
    }
}

/* --- Tenants pages: accept/register cards --- */
@media (max-width: 480px) {
    .accept-card,
    .register-card {
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }
}

/* --- Inline style overrides for hardcoded widths --- */
@media (max-width: 639px) {
    div[style*="max-width:600px"],
    div[style*="max-width: 600px"],
    div[style*="max-width:500px"],
    div[style*="max-width: 500px"],
    div[style*="max-width:420px"],
    div[style*="max-width: 420px"] {
        max-width: 95% !important;
        width: 95% !important;
    }

    div[style*="padding: 24px"],
    div[style*="padding:24px"],
    div[style*="padding: 32px"],
    div[style*="padding:32px"],
    div[style*="padding: 40px"],
    div[style*="padding:40px"] {
        padding: 12px !important;
    }

    /* Audio page drop zone */
    .audio-drop-zone {
        padding: 1rem !important;
    }

    /* Webhook/API token delivery rows */
    .delivery-row,
    .webhook-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    /* Status badges shouldn't overflow */
    .badge,
    span[class*="badge"] {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    /* Prevent horizontal scrollbar from cards */
    .card-static,
    .card {
        overflow: hidden !important;
    }

    /* Campaign stat grid: 2 columns on tiny phones */
    .campaign-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- Tables: force smaller font on mobile --- */
@media (max-width: 767px) {
    .data-table {
        font-size: 0.8rem !important;
    }

    .data-table th,
    .data-table td {
        padding: 0.375rem 0.5rem !important;
    }
}

/* --- Sidebar nav compact on mobile --- */
@media (max-width: 767px) {
    #sidebar .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    #sidebar .nav-link svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* --- Dialer page mobile --- */
@media (max-width: 639px) {
    .dialer-container {
        padding: 0.5rem !important;
    }

    .dialer-keypad {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }

    .dialer-keypad button {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .contact-item,
    .history-item {
        padding: 0.5rem !important;
    }
}

/* --- IVR Builder mobile --- */
@media (max-width: 767px) {
    .ivr-maker-page {
        padding: 0.75rem !important;
    }
}

/* --- Prevent overflow from long URLs or text --- */
.data-table td,
.card-static {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===================== Print Styles ============================= */

@media print {
    .sidebar-wrapper,
    #sidebar-overlay,
    header,
    .login-toggles,
    .btn,
    button {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ddd !important;
        background: #fff !important;
        color: #000 !important;
    }
}
/* ===================== Floating Phone Widget ===================== */
/* Facebook Messenger-style phone dialer widget */

/* === Floating Bubble (Collapsed State) === */
#phone-widget-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent, #e11d48);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35), 0 2px 4px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#phone-widget-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(225, 29, 72, 0.45), 0 3px 8px rgba(0,0,0,0.2);
}

#phone-widget-bubble:active {
    transform: scale(0.96);
}

#phone-widget-bubble svg {
    width: 26px;
    height: 26px;
    fill: #fff;
    stroke: none;
    transition: transform 0.2s ease;
}

/* Pulsing green dot for SIP registration */
#phone-widget-sip-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted, #9ca3af);
    border: 2px solid #fff;
    transition: background 0.3s ease;
    z-index: 1;
}

#phone-widget-sip-dot.online {
    background: var(--success, #10b981);
    animation: pw-dot-pulse 2s ease-in-out infinite;
}

#phone-widget-sip-dot.registering {
    background: var(--warning, #f59e0b);
    animation: pw-dot-pulse 1s ease-in-out infinite;
}

#phone-widget-sip-dot.error {
    background: var(--danger, #ef4444);
}

@keyframes pw-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* Call duration timer on bubble */
#phone-widget-timer {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger, #ef4444);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
    display: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.4;
}

#phone-widget-timer.visible {
    display: block;
}

/* Active call pulse animation on bubble */
#phone-widget-bubble.in-call {
    animation: pw-bubble-pulse 1.5s ease-in-out infinite;
}

@keyframes pw-bubble-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35), 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(225, 29, 72, 0.5), 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* === Phone Panel (Expanded State) === */
#phone-widget-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.4) translateY(60px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    transform-origin: bottom right;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#phone-widget-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Panel Header */
.pw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--accent, #e11d48);
    color: #fff;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.pw-header:active {
    cursor: grabbing;
}

.pw-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-header-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.pw-sip-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
}

.pw-sip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: background 0.3s ease;
}

.pw-sip-dot.online {
    background: #34d399;
    box-shadow: 0 0 4px rgba(52, 211, 153, 0.5);
}

.pw-sip-dot.offline {
    background: rgba(255,255,255,0.4);
}

.pw-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pw-btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    padding: 0;
    line-height: 1;
}

.pw-btn-icon:hover {
    background: rgba(255,255,255,0.25);
}

.pw-btn-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Phone Number Display */
.pw-display {
    padding: 12px 16px 8px;
    text-align: center;
    flex-shrink: 0;
}

.pw-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
}

.pw-number-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-heading, #030712);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    word-break: break-all;
}

.dark .pw-number-text {
    color: var(--text-heading, #f9fafb);
}

.pw-number-placeholder {
    font-size: 16px;
    color: var(--text-muted, #9ca3af);
    font-weight: 400;
}

.pw-number-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pw-number-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-hover, #e5e7eb);
    color: var(--text-secondary, #4b5563);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}

.pw-number-btn:hover {
    background: var(--accent, #e11d48);
    color: #fff;
}

.pw-number-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Numpad */
.pw-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 4px 16px 8px;
    flex-shrink: 0;
}

.pw-numpad-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.1s ease, transform 0.1s ease;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-numpad-btn:hover {
    background: var(--bg-hover, #e5e7eb);
}

.pw-numpad-btn:active {
    transform: scale(0.95);
    background: var(--accent-dim, rgba(225,29,72,0.1));
}

.dark .pw-numpad-btn {
    background: var(--bg-input, #141b2d);
    color: var(--text-primary, #e5e7eb);
}

.dark .pw-numpad-btn:hover {
    background: var(--bg-hover, #1e2a42);
}

.pw-numpad-btn .pw-digit {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
}

.pw-numpad-btn .pw-letters {
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted, #9ca3af);
    line-height: 1;
    margin-top: 1px;
    height: 8px;
}

/* Call/Hangup Button */
.pw-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 4px 16px 8px;
    height: 44px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s ease, transform 0.1s ease;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-call-btn.idle {
    background: var(--success, #10b981);
}

.pw-call-btn.idle:hover {
    background: #059669;
}

.pw-call-btn.calling {
    background: var(--danger, #ef4444);
    animation: pw-call-pulse 1.2s ease-in-out infinite;
}

.pw-call-btn.calling:hover {
    background: #dc2626;
}

@keyframes pw-call-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.pw-call-btn:active {
    transform: scale(0.98);
}

.pw-call-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: none;
}

/* Call Status Bar (shown during active call) */
.pw-call-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2px 16px 4px;
    font-size: 12px;
    color: var(--success, #10b981);
    font-weight: 500;
    flex-shrink: 0;
}

.pw-call-status.visible {
    display: flex;
}

.pw-call-status .pw-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success, #10b981);
    animation: pw-dot-blink 1.5s ease-in-out infinite;
}

@keyframes pw-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Recent Calls Section */
.pw-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px 4px;
    border-top: 1px solid var(--border, #e5e7eb);
    flex-shrink: 0;
}

.pw-recent-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #9ca3af);
}

.pw-recent-refresh {
    font-size: 11px;
    color: var(--accent, #e11d48);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.pw-recent-refresh:hover {
    background: var(--accent-soft, rgba(225,29,72,0.06));
}

.pw-recent-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: 120px;
    padding: 0 8px 8px;
}

.pw-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.pw-recent-item:hover {
    background: var(--bg-card-hover, #f3f4f6);
}

.dark .pw-recent-item:hover {
    background: var(--bg-card-hover, #161d2e);
}

.pw-recent-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pw-recent-icon.outbound {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success, #10b981);
}

.pw-recent-icon.inbound {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info, #3b82f6);
}

.pw-recent-icon.missed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger, #ef4444);
}

.pw-recent-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.pw-recent-info {
    flex: 1;
    min-width: 0;
}

.pw-recent-number {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .pw-recent-number {
    color: var(--text-primary, #e5e7eb);
}

.pw-recent-meta {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    display: flex;
    align-items: center;
    gap: 4px;
}

.pw-recent-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.3;
}

.pw-recent-badge.answered {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success, #10b981);
}

.pw-recent-badge.missed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger, #ef4444);
}

.pw-recent-badge.busy {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning, #f59e0b);
}

.pw-recent-duration {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    flex-shrink: 0;
}

.pw-recent-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-muted, #9ca3af);
    font-size: 12px;
}

/* === Mobile Responsive === */
@media (max-width: 767px) {
    #phone-widget-bubble {
        width: 60px;
        height: 60px;
        bottom: 16px;
        right: 16px;
    }

    #phone-widget-bubble svg {
        width: 28px;
        height: 28px;
    }

    #phone-widget-sip-dot {
        width: 14px;
        height: 14px;
    }

    #phone-widget-panel {
        width: 90vw;
        right: 5vw;
        bottom: 16px;
        max-height: 80vh;
        border-radius: 20px;
    }

    .pw-numpad-btn {
        height: 54px;
        min-width: 48px;
    }

    .pw-numpad-btn .pw-digit {
        font-size: 22px;
    }

    .pw-call-btn {
        height: 50px;
        font-size: 16px;
    }

    .pw-recent-list {
        max-height: 90px;
    }

    .pw-header {
        padding: 14px 16px;
    }

    .pw-number-text {
        font-size: 22px;
    }
}

/* Print: hide widget */
@media print {
    #phone-widget-bubble,
    #phone-widget-panel {
        display: none !important;
    }
}

/* Ensure widget stays above normal content but below modals */
#phone-widget-bubble,
#phone-widget-panel {
    z-index: 1000;
}

/* Dark mode adjustments — using .dark class on html */
.dark #phone-widget-panel {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

.dark .pw-numpad-btn {
    background: var(--bg-input, #141b2d);
    color: var(--text-primary, #e5e7eb);
}

.dark .pw-numpad-btn:hover {
    background: var(--bg-hover, #1e2a42);
}

.dark .pw-number-btn {
    background: var(--bg-hover, #1e2a42);
    color: var(--text-secondary, #9ca3af);
}

/* Incoming call modal overlay for widget */
.pw-incoming-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    border-radius: 16px;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.pw-incoming-overlay.visible {
    display: flex;
}

.pw-incoming-caller {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.pw-incoming-label {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 4px;
}

.pw-incoming-actions {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.pw-incoming-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pw-incoming-btn:active {
    transform: scale(0.92);
}

.pw-incoming-btn.accept {
    background: var(--success, #10b981);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.pw-incoming-btn.accept:hover {
    transform: scale(1.08);
}

.pw-incoming-btn.reject {
    background: var(--danger, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.pw-incoming-btn.reject:hover {
    transform: scale(1.08);
}

.pw-incoming-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: none;
}

/* ===================== Phone Widget Pro — Enhanced Styles ===================== */
/* ===================== Phone Widget Pro — Enhanced Styles ===================== */

/* === Active Call Controls Bar === */
.pw-call-controls {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    flex-shrink: 0;
    background: var(--bg-card, #fff);
    border-top: 1px solid var(--border, #e5e7eb);
    transition: opacity 0.2s ease;
}

.pw-call-controls.visible {
    display: flex;
}

.pw-ctrl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 56px;
    height: 52px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-secondary, #4b5563);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 2px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.pw-ctrl-btn:hover {
    background: var(--bg-hover, #e5e7eb);
    color: var(--text-primary, #111827);
    border-color: var(--border-hover, #d1d5db);
}

.pw-ctrl-btn:active {
    transform: scale(0.94);
}

.pw-ctrl-btn .pw-ctrl-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

.pw-ctrl-btn .pw-ctrl-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: inherit;
    line-height: 1;
    white-space: nowrap;
}

/* Muted state */
.pw-ctrl-btn.pw-muted {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger, #ef4444);
    color: var(--danger, #ef4444);
}

.pw-ctrl-btn.pw-muted:hover {
    background: rgba(239, 68, 68, 0.18);
}

/* Hold state */
.pw-ctrl-btn.pw-on-hold {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning, #f59e0b);
    color: var(--warning, #f59e0b);
    animation: pw-hold-glow 2s ease-in-out infinite;
}

.pw-ctrl-btn.pw-on-hold:hover {
    background: rgba(245, 158, 11, 0.18);
}

@keyframes pw-hold-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.15); }
}

/* Active DTMF toggle */
.pw-ctrl-btn.active {
    background: var(--accent-soft, rgba(225, 29, 72, 0.08));
    border-color: var(--accent, #e11d48);
    color: var(--accent, #e11d48);
}

/* Dark mode call controls */
.dark .pw-call-controls {
    background: var(--bg-card, #0f1629);
    border-top-color: var(--border, #1e293b);
}

.dark .pw-ctrl-btn {
    background: var(--bg-input, #141b2d);
    border-color: var(--border, #1e293b);
    color: var(--text-secondary, #9ca3af);
}

.dark .pw-ctrl-btn:hover {
    background: var(--bg-hover, #1e2a42);
    color: var(--text-primary, #e5e7eb);
    border-color: var(--border, #334155);
}

.dark .pw-ctrl-btn.pw-muted {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger, #ef4444);
    color: var(--danger, #ef4444);
}

.dark .pw-ctrl-btn.pw-on-hold {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--warning, #f59e0b);
    color: var(--warning, #f59e0b);
}

/* === Transfer Bar === */
.pw-transfer-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    flex-shrink: 0;
    border-top: 1px solid var(--border, #e5e7eb);
    animation: pw-slide-down 0.2s ease;
}

@keyframes pw-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.pw-transfer-input {
    flex: 1;
    height: 36px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    font-size: 14px;
    font-weight: 500;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-transfer-input:focus {
    border-color: var(--accent, #e11d48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.dark .pw-transfer-input {
    background: var(--bg-input, #141b2d);
    border-color: var(--border, #1e293b);
    color: var(--text-primary, #e5e7eb);
}

.pw-transfer-confirm,
.pw-transfer-cancel {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s ease;
    padding: 0;
    flex-shrink: 0;
}

.pw-transfer-confirm {
    background: var(--success, #10b981);
    color: #fff;
}

.pw-transfer-confirm:hover {
    background: #059669;
}

.pw-transfer-confirm svg,
.pw-transfer-cancel svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.pw-transfer-cancel {
    background: var(--bg-hover, #e5e7eb);
    color: var(--text-secondary, #4b5563);
}

.pw-transfer-cancel:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger, #ef4444);
}

/* === Voicemail Drop Dropdown === */
.pw-voicemail-dropdown {
    position: relative;
    padding: 8px 12px;
    border-top: 1px solid var(--border, #e5e7eb);
    background: var(--bg-card, #fff);
    border-radius: 0 0 12px 12px;
    animation: pw-slide-down 0.2s ease;
    z-index: 5;
}

.pw-vmd-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #9ca3af);
    margin-bottom: 6px;
}

.pw-vmd-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 140px;
    overflow-y: auto;
}

.pw-vmd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-vmd-item:hover {
    background: var(--accent-soft, rgba(225, 29, 72, 0.08));
    color: var(--accent, #e11d48);
}

.pw-vmd-item svg {
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.pw-vmd-empty {
    text-align: center;
    padding: 12px;
    color: var(--text-muted, #9ca3af);
    font-size: 12px;
    font-style: italic;
}

.dark .pw-voicemail-dropdown {
    background: var(--bg-card, #0f1629);
    border-top-color: var(--border, #1e293b);
}

.dark .pw-vmd-item {
    background: var(--bg-input, #141b2d);
    color: var(--text-primary, #e5e7eb);
}

/* === DTMF Toast === */
.pw-dtmf-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 10px;
    z-index: 15;
    pointer-events: none;
    white-space: nowrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-dtmf-toast-anim {
    animation: pw-toast-pop 1.2s ease forwards;
}

@keyframes pw-toast-pop {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

/* === Hold Indicator === */
.pw-hold-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--warning, #f59e0b);
    animation: pw-hold-pulse-text 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pw-hold-pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pw-hold-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning, #f59e0b);
    animation: pw-hold-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes pw-hold-dot-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* === Timer Color Classes === */
.pw-timer-green { color: var(--success, #10b981) !important; }

.pw-timer-yellow { color: var(--warning, #f59e0b) !important; }

.pw-timer-red { color: var(--danger, #ef4444) !important; }

#phone-widget-timer.pw-timer-green { background: var(--success, #10b981); }
#phone-widget-timer.pw-timer-yellow { background: var(--warning, #f59e0b); }
#phone-widget-timer.pw-timer-red { background: var(--danger, #ef4444); }

/* === Network Quality Indicator (Panel) === */
.pw-quality-indicator {
    display: none;
    align-items: flex-end;
    gap: 2px;
    margin-left: 8px;
    height: 14px;
}

.pw-quality-indicator.visible {
    display: inline-flex;
}

.pw-qi-bar {
    width: 4px;
    border-radius: 2px;
    background: var(--border, #d1d5db);
    transition: background 0.3s ease, height 0.3s ease;
}

.pw-qi-bar:nth-child(1) { height: 5px; }
.pw-qi-bar:nth-child(2) { height: 9px; }
.pw-qi-bar:nth-child(3) { height: 14px; }

.pw-qi-bar.active {
    background: var(--success, #10b981);
}

.pw-qi-bar:nth-child(1).active { background: var(--danger, #ef4444); }
.pw-qi-bar:nth-child(2).active { background: var(--warning, #f59e0b); }

/* Green only when all 3 active */
.pw-qi-bar:nth-child(3).active ~ .pw-qi-bar.active,
.pw-quality-indicator .pw-qi-bar:nth-child(1).active + .pw-qi-bar:nth-child(2).active + .pw-qi-bar:nth-child(3).active {
    /* All 3 active = good quality */
}

/* Quality indicator on bubble */
.pw-quality-bubble {
    display: none;
    align-items: flex-end;
    gap: 1px;
    position: absolute;
    top: 2px;
    left: 2px;
    height: 10px;
}

.pw-quality-bubble.visible {
    display: flex;
}

.pw-qb-bar {
    width: 3px;
    border-radius: 1.5px;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease;
}

.pw-qb-bar:nth-child(1) { height: 4px; }
.pw-qb-bar:nth-child(2) { height: 7px; }
.pw-qb-bar:nth-child(3) { height: 10px; }

.pw-qb-bar.active {
    background: #34d399;
}

/* === Numpad DTMF Mode (during call) === */
.pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn {
    background: var(--accent-soft, rgba(225, 29, 72, 0.06));
    border: 1px solid var(--accent-dim, rgba(225, 29, 72, 0.15));
}

.pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn:hover {
    background: var(--accent-soft, rgba(225, 29, 72, 0.12));
}

.pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn:active {
    background: var(--accent, #e11d48);
    color: #fff;
    transform: scale(0.92);
}

.dark .pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn {
    background: rgba(225, 29, 72, 0.1);
    border-color: rgba(225, 29, 72, 0.25);
}

/* === Post-Call Screen === */
.pw-post-call {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    gap: 12px;
    animation: pw-postcall-enter 0.3s ease;
    overflow-y: auto;
}

@keyframes pw-postcall-enter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pw-pc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-heading, #030712);
}

.pw-pc-header svg {
    color: var(--success, #10b981);
    stroke: currentColor;
    fill: none;
}

.dark .pw-pc-header {
    color: var(--text-heading, #f9fafb);
}

.pw-pc-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #111827);
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.dark .pw-pc-number {
    color: var(--text-primary, #e5e7eb);
}

.pw-pc-duration {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
    margin-top: -6px;
}

.pw-pc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-pc-field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #9ca3af);
}

.pw-pc-select {
    height: 38px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    font-size: 14px;
    font-weight: 500;
    padding: 0 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.pw-pc-select:focus {
    border-color: var(--accent, #e11d48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.dark .pw-pc-select {
    background: var(--bg-input, #141b2d);
    border-color: var(--border, #1e293b);
    color: var(--text-primary, #e5e7eb);
}

.pw-pc-textarea {
    min-height: 72px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    font-size: 13px;
    font-weight: 400;
    padding: 10px 12px;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

.pw-pc-textarea:focus {
    border-color: var(--accent, #e11d48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.dark .pw-pc-textarea {
    background: var(--bg-input, #141b2d);
    border-color: var(--border, #1e293b);
    color: var(--text-primary, #e5e7eb);
}

.pw-pc-callback-row {
    display: flex;
    gap: 8px;
}

.pw-pc-date-input,
.pw-pc-time-input {
    flex: 1;
    height: 38px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-input, #f3f4f6);
    color: var(--text-primary, #111827);
    font-size: 14px;
    font-weight: 500;
    padding: 0 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-pc-date-input:focus,
.pw-pc-time-input:focus {
    border-color: var(--accent, #e11d48);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

.dark .pw-pc-date-input,
.dark .pw-pc-time-input {
    background: var(--bg-input, #141b2d);
    border-color: var(--border, #1e293b);
    color: var(--text-primary, #e5e7eb);
}

/* For WebKit date/time picker icons */
.dark .pw-pc-date-input::-webkit-calendar-picker-indicator,
.dark .pw-pc-time-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.pw-pc-save {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: var(--accent, #e11d48);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    padding: 0;
    margin-top: 4px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.pw-pc-save:hover {
    background: #be123c;
}

.pw-pc-save:active {
    transform: scale(0.97);
}

.pw-pc-save svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.pw-pc-autoclose {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    margin-top: -4px;
}

/* === Enhanced Incoming Call === */
.pw-incoming-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(30,12,40,0.85));
    border-radius: 16px;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    backdrop-filter: blur(6px);
}

.pw-incoming-overlay.visible {
    display: flex;
}

/* Pulsing ring animation */
.pw-incoming-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--success, #10b981);
    animation: pw-ring-pulse 2s ease-out infinite;
    pointer-events: none;
}

.pw-incoming-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid var(--success, #10b981);
    opacity: 0.4;
    animation: pw-ring-pulse 2s ease-out infinite 0.3s;
}

.pw-incoming-ring::after {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 1px solid var(--success, #10b981);
    opacity: 0.2;
    animation: pw-ring-pulse 2s ease-out infinite 0.6s;
}

@keyframes pw-ring-pulse {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(1.8); opacity: 0; }
}

.pw-incoming-caller-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.pw-incoming-caller {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.pw-incoming-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 2px;
}

.pw-incoming-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.pw-incoming-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pw-incoming-btn:active {
    transform: scale(0.9);
}

.pw-incoming-btn.accept {
    background: var(--success, #10b981);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

.pw-incoming-btn.accept:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.pw-incoming-btn.silence {
    background: var(--warning, #f59e0b);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.pw-incoming-btn.silence:hover {
    transform: scale(1.1);
}

.pw-incoming-btn.reject {
    background: var(--danger, #ef4444);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.pw-incoming-btn.reject:hover {
    transform: scale(1.1);
}

.pw-incoming-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.pw-incoming-btn.accept svg {
    fill: currentColor;
    stroke: none;
}

/* === View container for multi-view panel === */
.pw-view {
    display: flex;
    flex-direction: column;
}

/* === Mobile Responsive Enhancements === */
@media (max-width: 767px) {
    .pw-call-controls {
        gap: 2px;
        padding: 6px 6px;
    }

    .pw-ctrl-btn {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .pw-ctrl-btn .pw-ctrl-icon {
        width: 20px;
        height: 20px;
    }

    .pw-ctrl-btn .pw-ctrl-label {
        font-size: 8px;
    }

    .pw-transfer-bar {
        padding: 6px 8px;
    }

    .pw-transfer-input {
        font-size: 16px; /* Prevent zoom on iOS */
        height: 40px;
    }

    .pw-transfer-confirm,
    .pw-transfer-cancel {
        width: 40px;
        height: 40px;
    }

    .pw-pc-select {
        font-size: 16px;
        height: 42px;
    }

    .pw-pc-textarea {
        font-size: 16px;
        min-height: 80px;
    }

    .pw-pc-date-input,
    .pw-pc-time-input {
        font-size: 16px;
        height: 42px;
    }

    .pw-pc-save {
        height: 48px;
        font-size: 16px;
    }

    .pw-incoming-btn {
        width: 60px;
        height: 60px;
    }

    .pw-incoming-btn svg {
        width: 26px;
        height: 26px;
    }

    .pw-incoming-actions {
        gap: 20px;
    }

    /* Larger numpad in DTMF mode on mobile */
    .pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn {
        height: 56px;
    }

    .pw-numpad.pw-numpad-dtmf-mode .pw-numpad-btn .pw-digit {
        font-size: 24px;
    }
}

/* === Print: hide widget === */
@media print {
    #phone-widget-bubble,
    #phone-widget-panel {
        display: none !important;
    }
}

/* === Panel max-height adjustment for pro features === */
#phone-widget-panel {
    max-height: 600px;
}

@media (max-width: 767px) {
    #phone-widget-panel {
        max-height: 85vh;
    }
}

/* === Scrollbar styling for post-call view === */
.pw-post-call::-webkit-scrollbar {
    width: 4px;
}

.pw-post-call::-webkit-scrollbar-track {
    background: transparent;
}

.pw-post-call::-webkit-scrollbar-thumb {
    background: var(--border, #e5e7eb);
    border-radius: 4px;
}

.dark .pw-post-call::-webkit-scrollbar-thumb {
    background: var(--border, #334155);
}

/* === Subtle transitions for all interactive elements === */
.pw-ctrl-btn,
.pw-pc-select,
.pw-pc-textarea,
.pw-pc-date-input,
.pw-pc-time-input,
.pw-transfer-input,
.pw-vmd-item,
.pw-pc-save {
    transition: all 0.2s ease;
}

/* === Focus ring accessibility === */
.pw-ctrl-btn:focus-visible,
.pw-pc-select:focus-visible,
.pw-pc-textarea:focus-visible,
.pw-pc-date-input:focus-visible,
.pw-pc-time-input:focus-visible,
.pw-transfer-input:focus-visible,
.pw-pc-save:focus-visible {
    outline: 2px solid var(--accent, #e11d48);
    outline-offset: 2px;
}

/* === Quality bars: dynamic colors based on quality level === */
.pw-quality-indicator[data-quality="3"] .pw-qi-bar.active,
.pw-quality-bubble[data-quality="3"] .pw-qb-bar.active {
    background: var(--success, #10b981);
}

.pw-quality-indicator[data-quality="2"] .pw-qi-bar.active,
.pw-quality-bubble[data-quality="2"] .pw-qb-bar.active {
    background: var(--warning, #f59e0b);
}

.pw-quality-indicator[data-quality="1"] .pw-qi-bar.active,
.pw-quality-bubble[data-quality="1"] .pw-qb-bar.active {
    background: var(--danger, #ef4444);
}