:root{font-family:Arial,sans-serif;color:#26353d;background:#f2f6f8;font-size:14px;letter-spacing:0}
*{box-sizing:border-box}
html{height:100%}
body{margin:0;height:100%;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
[hidden]{display:none!important}
button,input{font:inherit}
button{cursor:pointer;border:1px solid #c8d6de;border-radius:5px;min-height:40px;padding:8px 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:white;color:#26444e;font-weight:600;max-width:100%;white-space:normal}
button:disabled{opacity:.55;cursor:default}
button:hover:not(:disabled){background:#edf6f6}
.primary{background:#119c9d;border-color:#119c9d;color:white}
.primary:hover:not(:disabled){background:#087e80}
.icon-button{width:40px;padding:8px;flex-shrink:0}
svg{width:19px;height:19px;flex-shrink:0}
.topbar{flex:none;width:100%;padding:calc(12px + env(safe-area-inset-top,0px)) max(28px,env(safe-area-inset-right,0px)) 12px max(28px,env(safe-area-inset-left,0px));background:white;border-bottom:1px solid #d6e0e6;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:center;z-index:2}
.brand,#account{display:flex;gap:12px;align-items:center;min-width:0}
.brand img{flex:none}
.brand strong{font-size:21px}
#account{justify-content:flex-end}
#account-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main{width:100%;max-width:1200px;margin:0 auto;min-height:0;flex:1;overflow-y:auto;overscroll-behavior-y:contain;padding:24px max(28px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(28px,env(safe-area-inset-left,0px))}
h1{font-size:22px;margin:0 0 8px}
h2{font-size:18px}
#login-view{width:100%;max-width:280px;margin:20px auto}
#login-form{display:grid;gap:12px}
#login-form h1{font-size:18px;margin:0 0 2px}
label{display:grid;gap:5px;font-weight:600;font-size:13px}
input{font-size:16px;border:1px solid #b9cbd5;border-radius:5px;padding:8px 10px;width:100%;height:38px;background:white;min-width:0}
input:focus,button:focus-visible{outline:2px solid #168f99;outline-offset:2px}
#login-error{color:#c62f40;margin:0;font-size:13px}
#login-error:empty{display:none}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;border-bottom:1px solid #d4dfe5;padding-bottom:16px}
.toolbar>div,.actions>button>span{min-width:0;overflow-wrap:anywhere}
.actions{display:flex;gap:8px;align-items:center}
#connection,#push-status{font-size:13px;color:#61717e}
#push-status{min-height:18px;margin:12px 0;overflow-wrap:anywhere}
#count{font-size:15px;color:#0a8587;margin-left:6px}
#calls{list-style:none;padding:0;margin:0;background:white;border-top:1px solid #d5dfe5}
.call{display:grid;grid-template-columns:32px minmax(0,1fr) 80px;align-items:center;gap:12px;border-bottom:1px solid #d5dfe5;border-left:3px solid #109c9d;padding:10px 16px;overflow-wrap:anywhere;min-width:0}
.call.ended{border-left-color:#a4b2ba}
.call.connected{border-left-color:#418453}
.call>div{min-width:0}
.call-identity{display:flex;flex-direction:column;align-items:flex-start}
.phone{font-size:17px;font-weight:700;margin:0 0 3px;padding:3px 0;min-height:32px;border:0;background:transparent;border-radius:0;color:#176378;justify-content:flex-start;text-align:left;overflow-wrap:anywhere}
.phone:hover:not(:disabled){background:transparent;text-decoration:underline}
.caller-type{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;color:#296b53;background:#e9f3ed}
.caller-type.new{color:#9b6717;background:#fff3dc}
.caller-type.unknown{color:#61717e;background:#eef2f5}
.state{font-size:12px;font-weight:600;color:#098789}
.ended .state{color:#62747f}
.connected .state{color:#317043}
.time{display:flex;flex-direction:column;align-items:flex-end;text-align:right;gap:4px;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;color:#26353d;white-space:nowrap}
.date{font-size:11px;font-weight:400;color:#61717e}
.kind{font-size:14px;font-weight:700;margin:0 0 5px}
.kind.new{color:#a26311}
.order{display:flex;flex-direction:column;gap:5px;padding:12px 0;border-bottom:1px solid #e1e8ed;font-size:14px}
.order:last-child{border-bottom:0}
.order span{color:#586b77}
.note{white-space:pre-wrap;line-height:1.4;margin:5px 0;font-size:13px}
.line{font-size:11px;color:#61717e;margin-top:6px}
#empty{text-align:center;padding:60px 12px;color:#70838e}
#empty svg{width:36px;height:36px;color:#119c9d}
#initial-status{text-align:center}
.error{color:#bc3343!important}
#call-dialog{width:calc(100% - 32px);max-width:400px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 48px);padding:16px 18px;border:1px solid #c8d6de;border-radius:8px;color:#26353d;background:white;overflow:auto;overflow-wrap:anywhere;box-shadow:0 8px 32px #26353d24}
#call-dialog::backdrop{background:#162b3c66}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e1e8ed;padding-bottom:10px;margin-bottom:14px}
.dialog-heading h2{font-size:18px;margin:0;min-width:0}
.close-icon{display:flex;transform:rotate(45deg)}
@media(max-width:600px){
  .topbar{padding:calc(10px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 10px max(14px,env(safe-area-inset-left,0px));gap:8px}
  .brand,#account{gap:8px}.brand strong{font-size:18px}#account-name{font-size:12px}
  main{padding:18px max(12px,env(safe-area-inset-right,0px)) calc(18px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
  .toolbar{align-items:flex-start;flex-direction:column;gap:12px}h1{font-size:20px}
  .actions{width:100%}#push-toggle{flex:1;min-width:0}
  .call{grid-template-columns:28px minmax(0,1fr) 66px;padding:9px 8px;gap:8px}
  .caller-type{width:28px;height:28px}.phone{font-size:16px}.time{font-size:12px}
  #login-view{margin:12px auto}
}
