/* Estilo comum do Cushman: base, topo, telas administrativas e login. A tela de atendimento soma atendimento.css. */
:root { --green: #15803d; --green-dark: #14532d; --green-soft: #dcfce7; }
* { 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(--green); 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(--green); 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(--green-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(--green-soft); color: var(--green-dark); margin: 0 4px 4px 0; }
.page .ok { background: #ecfdf3; border: 1px solid #a6f4c5; color: #067647; 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(--green); 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: #ecfdf3; color: #027a48; }
.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; align-items: center; justify-content: center; min-height: 100vh; }
.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: #087443; color: #fff; border: 0; border-radius: 7px; padding: 10px; font-weight: 600; cursor: pointer; }
.login-page button:hover { background: #066238; }
.login-page .error { color: #b42318; font-size: 14px; margin-top: 10px; }
