/* Identidade existente em layouts.app e auth.login. */
:root {
    --cyan: #00AEEF;
    --cyan-dark: #0090c8;
    --green: #22c55e;
    --primary: #1E40AF;
    --primary-dark: #1e3a8a;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg: #f0f4f8;
    --brand-accent: linear-gradient(90deg, var(--cyan), #00c9a7 60%, var(--green));
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { position: relative; margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 15% 20%, #00aeef12, transparent 65%), radial-gradient(ellipse at 85% 85%, #22c55e0d, transparent 65%), var(--bg); }
body::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; z-index: 10; background: linear-gradient(90deg, var(--cyan), #00c9a7 50%, #f59e0b); }
.site-header { background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 6px #0000000f; }
.header-inner, main, .site-footer { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 190px; height: auto; }
.environment-label { border-left: 1px solid var(--border); padding-left: 24px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
nav, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
nav { margin-left: auto; font-size: 14px; font-weight: 600; }
nav form { margin: 0; }
main { flex: 1; padding-top: 32px; padding-bottom: 36px; min-width: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.18; margin: 18px 0; overflow-wrap: anywhere; }
h2 { font-size: 21px; letter-spacing: -.4px; line-height: 1.35; margin: 0 0 14px; }
h3 { font-size: 17px; line-height: 1.4; }
p { line-height: 1.7; margin: 14px 0 20px; }
.muted, small { color: var(--text-muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 22px; }
.grid > * { min-width: 0; }
.card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin-bottom: 22px; box-shadow: 0 4px 24px #0000000a, 0 1px 3px #00000005; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 18px 18px 0 0; background: var(--brand-accent); }
.card > :last-child { margin-bottom: 0; }
.card > .badge { margin-bottom: 16px; }
.hero { padding: 16px 0 20px; }
.hero h1 { max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.badge { display: inline-block; background: #e0f2fe; color: #075985; padding: 8px 12px; border-radius: 24px; font-size: 12px; line-height: 1.5; font-weight: 700; }
label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 7px; }
input, select, textarea { display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 14px; background: #f8fafc; color: var(--text); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--cyan); box-shadow: 0 0 0 3px #00aeef1f; outline: none; }
input[type=checkbox] { width: 16px; height: 16px; display: inline; margin-right: 8px; vertical-align: middle; accent-color: var(--primary); }
button, .button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; background: var(--primary); color: #fff; border: 1px solid transparent; border-radius: 10px; padding: 12px 18px; font: inherit; font-size: 14px; line-height: 1.4; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
button:hover, .button:hover { background: var(--primary-dark); box-shadow: 0 4px 14px #1e40af1f; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.secondary { background: #fff; color: var(--primary); border-color: #cbd5e1; }
.secondary:hover { background: #eff6ff; color: var(--primary-dark); }
a { color: var(--primary); text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.notice { background: #ecfdf5; border: 1px solid #bbf7d0; border-left: 4px solid var(--green); border-radius: 10px; color: #166534; padding: 16px; margin-bottom: 20px; line-height: 1.6; }
.error { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; color: #991b1b; }
.resource { border-top: 1px solid var(--border); padding: 14px 0 20px; }
summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600; line-height: 1.6; }
.row { display: flex; gap: 14px; align-items: end; }
.row > div { flex: 1; min-width: 0; }
.count { font-size: 38px; font-weight: 800; display: block; margin: 12px 0; }
.list { padding-left: 20px; line-height: 2; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f8fafc; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.scroll { overflow: auto; }
.screen-code, .ticket-code { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; color: var(--primary); }
.screen-code { font-size: clamp(60px, 10vw, 140px); font-weight: 700; letter-spacing: 2px; line-height: 1.25; margin: 20px 0; overflow-wrap: anywhere; }
.center { text-align: center; }
.narrow { max-width: 540px; margin: 28px auto; }
.help { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.site-footer { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 18px; padding-bottom: 24px; color: var(--text-muted); font-size: 12px; }
.site-footer img { width: 120px; height: auto; }
.ticket-logo { width: 160px; height: auto; display: block; margin: 0 auto 20px; }
.admin-heading { margin: 10px 0 28px; }
.admin-heading h1 { margin-bottom: 14px; }
.customer-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.summary-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #fff; text-decoration: none; box-shadow: 0 3px 14px #00000005; }
.summary-card:hover { border-color: var(--cyan); }
.summary-card strong { font-size: 32px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.summary-card span { font-size: 13px; color: var(--text-muted); }
.customer-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.customer-filters .search-field, .filter-actions { grid-column: 1 / -1; }
.filter-actions { margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-heading h2 { margin: 0; }
.customer-table { min-width: 880px; }
.customer-table td { padding-top: 20px; padding-bottom: 20px; }
.customer-table .help { margin: 8px 0; }
.customer-name { font-weight: 700; overflow-wrap: anywhere; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fff7ed; color: #9a3412; }
.text-warning { color: #9a3412; font-weight: 600; }
.customer-facts { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.3fr); gap: 12px 18px; font-size: 14px; line-height: 1.6; }
.customer-facts dt { color: var(--text-muted); }
.customer-facts dd { margin: 0; overflow-wrap: anywhere; }
.usage-counts { display: flex; gap: 28px; margin: 24px 0; }
.usage-counts > div { flex: 1; }
.usage-counts strong { display: block; font-size: 34px; color: var(--primary); }
.usage-counts span { font-size: 13px; color: var(--text-muted); }
.contact-entry { border-top: 1px solid var(--border); padding: 20px 0 4px; }
.contact-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-pagination { justify-content: center; margin: 22px 0 0; }
.spaced-button { margin-top: 16px; }
.empty-state { padding: 24px 0; text-align: center; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
    .header-inner, main { padding: 16px; }
    .header-inner { gap: 12px; flex-wrap: wrap; min-height: 74px; }
    .brand img { width: 150px; }
    .environment-label { display: none; }
    nav { gap: 10px; font-size: 12px; }
    nav .secondary { padding: 8px 12px; min-height: 40px; }
    .card { padding: 22px 18px; border-radius: 14px; }
    .card::before { border-radius: 14px 14px 0 0; }
    .row { display: block; }
    .grid { gap: 16px; }
    .site-footer { gap: 12px; flex-wrap: wrap; }
    .customer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .summary-card { padding: 16px; }
    .summary-card strong { font-size: 28px; }
    .customer-filters { grid-template-columns: minmax(0, 1fr); }
    .customer-facts { grid-template-columns: minmax(0, 1fr); gap: 5px; }
    .customer-facts dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
@media print {
    :root { background: #fff; }
    body { display: block; min-height: 0; background: #fff; }
    body::after, .site-header, .site-footer, .no-print, .card::before { display: none !important; }
    .card { box-shadow: none; }
    .ticket-code { color: #000; }
    .ticket-logo { width: 35mm; filter: grayscale(1); }
}
