/* Estilo comum do Atendimento WappSolution: base, topo, telas administrativas e login. A tela de atendimento soma atendimento.css. */
:root { --brand: #44546a; --brand-dark: #2f3a47; --brand-soft: #eef1f5; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; margin: 0; color: #111b21; font-size: 15px; }

/* Topo (igual em todas as telas) */
.topbar { background: var(--brand); color: #fff; padding: 0 20px; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; flex: none; font-size: 13.5px; }
.topbar .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .hello { opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .badge { background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.topbar a.back { background: rgba(255,255,255,.16); border-radius: 10px; padding: 7px 14px; font-weight: 700; white-space: nowrap; color: #fff; text-decoration: none; }
.topbar a.back:hover { background: rgba(255,255,255,.28); }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; }
.nav a, .nav summary, .nav .logout button { color: #fff; text-decoration: none; opacity: .92; padding: 6px 10px; border-radius: 8px; white-space: nowrap; cursor: pointer; list-style: none; }
.nav a:hover, .nav summary:hover, .nav .logout button:hover { background: rgba(255,255,255,.14); opacity: 1; }
.nav a.on { background: rgba(255,255,255,.18); opacity: 1; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: " ▾"; font-size: 10px; }
.nav .more { position: relative; }
.nav .more-menu { position: absolute; right: 0; top: 100%; z-index: 20; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; min-width: 150px; display: flex; flex-direction: column; }
.nav .more-menu a { color: #111b21; opacity: 1; }
.nav .more-menu a:hover { background: #f0f2f5; }
.nav .logout { margin: 0; display: inline-flex; }
.nav .logout button { background: none; border: 0; font: inherit; margin: 0; font-weight: 400; }
.test-note { background: rgba(0,0,0,.18); border-radius: 999px; padding: 4px 12px; font-size: 12px; white-space: nowrap; margin-right: 6px; }

/* Telas administrativas (body.page) */
body.page { background: #f0f2f0; }
.page main { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.page h1 { font-size: 20px; margin: 0 0 6px; }
.page h2 { font-size: 16px; margin: 22px 0 8px; }
.page .muted { color: #667781; font-size: 14px; margin: 0 0 16px; }
.page .panel { background: #fff; border: 1px solid #e9edef; border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.page label { display: block; font-weight: 600; font-size: 14px; margin: 10px 0 5px; }
.page input[type=text], .page input[type=date], .page input[type=password], .page input[type=url], .page input[type=email], .page input[type=datetime-local], .page select, .page textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 15px; background: #fff; }
.page textarea { min-height: 90px; resize: vertical; }
.page button, .page .btn { border: 0; background: var(--brand); color: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: none; display: inline-block; }
.page button.ghost { background: #fff; border: 1px solid #d0d5dd; color: #111b21; }
.page button.danger { background: #fff; border: 1px solid #fda29b; color: #b42318; }
.page table { width: 100%; border-collapse: collapse; font-size: 14px; }
.page th, .page td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef0f1; vertical-align: top; }
.page th { color: #667781; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.page .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.page .kpi { background: #fff; border: 1px solid #e9edef; border-radius: 12px; padding: 14px 16px; }
.page .kpi .n { font-size: 26px; font-weight: 800; color: var(--brand-dark); }
.page .kpi .l { color: #667781; font-size: 13px; }
.page .chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); margin: 0 4px 4px 0; }
.page .ok { background: #eef1f5; border: 1px solid #c3ccd8; color: #2f3a47; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.page .err { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.page .row2 { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.page .row2 > div { flex: 1; min-width: 160px; }
.page .bar { height: 10px; background: var(--brand); border-radius: 6px; }
.page code { background: #f2f4f7; padding: 2px 5px; border-radius: 4px; }
.page .empty { text-align: center; color: #98a2b3; padding: 20px 0; }
/* Listas de cadastros (usuários, tokens, segredos) */
.page .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid #e9edef; border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.page .item.expired { opacity: .55; }
.page .item-title { font-weight: 700; font-size: 14.5px; }
.page .item-meta { font-size: 12.5px; color: #667781; margin-top: 2px; }
.page .pill { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #eef1f5; color: #2f3a47; }
.page .pill.expired { background: #fef3f2; color: #b42318; }
.page .actions-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page .inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.page .inline-form input { width: 150px; padding: 7px 10px; font-size: 13.5px; }
.page .inline-form button { padding: 7px 12px; font-size: 13px; }

/* Login */
body.login-page { background: #f4f7f9; color: #1d2939; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; gap: 16px; }
.login-page form { background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; padding: 28px; width: 300px; box-shadow: 0 2px 8px rgba(16,24,40,.04); }
.login-page h1 { font-size: 18px; margin: 0 0 4px; }
.login-page .sub { color: #667085; font-size: 13.5px; margin: 0 0 8px; }
.login-page label { display: block; margin: 12px 0 5px; font-weight: 600; font-size: 14px; }
.login-page input { width: 100%; border: 1px solid #d0d5dd; border-radius: 7px; padding: 9px 10px; font: inherit; }
.login-page button { width: 100%; margin-top: 18px; background: #44546a; color: #fff; border: 0; border-radius: 7px; padding: 10px; font-weight: 600; cursor: pointer; }
.login-page button:hover { background: #2f3a47; }
.login-page .error { color: #b42318; font-size: 14px; margin-top: 10px; }
.login-page .ok { color: #2f3a47; font-size: 14px; margin-top: 10px; }

/* Ajuda da tela de login: como cada perfil usa o sistema e em que aparelho */
.login-page .login-ajuda { background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; padding: 20px; width: 320px; box-shadow: 0 2px 8px rgba(16,24,40,.04); }
.login-page .login-ajuda h2 { font-size: 16px; margin: 0 0 8px; }
.login-page .login-ajuda p { font-size: 13.5px; color: #475467; line-height: 1.5; margin: 0 0 8px; }
.login-page .login-ajuda p:last-child { margin-bottom: 0; }
.login-page .login-ajuda strong { color: #1d2939; }

/* Desenho do celular: mostra que o mesmo sistema abre no celular */
.login-page .celular { width: 150px; border: 3px solid #344054; border-radius: 20px; padding: 8px 6px; background: #fff; box-shadow: 0 2px 8px rgba(16,24,40,.10); }
.login-page .celular .tela { background: #eef1f5; border-radius: 12px; padding: 8px; min-height: 190px; }
.login-page .celular .topo { background: #44546a; color: #fff; border-radius: 8px 8px 0 0; padding: 5px 7px; font-size: 10px; font-weight: 700; }
.login-page .celular .fala { background: #fff; border-radius: 8px; padding: 6px 8px; font-size: 10px; color: #344054; margin: 8px 0; }
.login-page .celular .fala.mine { background: #d7e0ee; margin-left: 16px; }
.login-page .celular .caixa { display: flex; gap: 4px; align-items: center; margin-top: 8px; }
.login-page .celular .caixa span { flex: 1; background: #fff; border-radius: 10px; height: 20px; }
.login-page .celular .caixa b { background: #44546a; color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.login-page .ajuda-blocos { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }

/* Varinha magica (so estudo): botoes de entrada sem senha na tela de login. */
.login-page .login-varinha { background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; padding: 20px; width: 320px; margin-top: 16px; box-shadow: 0 2px 8px rgba(16,24,40,.04); }
.login-page .login-varinha h2 { font-size: 16px; margin: 0 0 4px; }
.login-page .login-varinha .sub { color: #667085; font-size: 13px; margin: 0 0 12px; }
.login-page .login-varinha form { background: none; border: 0; box-shadow: none; padding: 0; width: auto; margin: 0 0 8px; }
.login-page .login-varinha button.varinha-btn { width: 100%; margin: 0; background: #44546a; color: #fff; border: 0; border-radius: 7px; padding: 10px; font-weight: 600; cursor: pointer; }
.login-page .login-varinha button.varinha-btn:hover { background: #2f3a47; }
