/* 3WX Área de Cliente — inspirada no Best Number One */
:root {
	--ac-bg: #121417;
	--ac-surface: #1b1f23;
	--ac-surface-2: #22272c;
	--ac-line: rgba(255, 255, 255, .08);
	--ac-line-2: rgba(255, 255, 255, .14);
	--ac-text: #eceef0;
	--ac-muted: #9aa3ab;
	--ac-accent: #e2231a;
	--ac-accent-2: #ff4a3d;
	--ac-ok: #3ccf8e;
	--ac-warn: #f5b13d;
	--ac-danger: #ff5d55;
	--ac-radius: 14px;
	--ac-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wx3ac-body { margin: 0; background: var(--ac-bg); color: var(--ac-text); font: 400 15px/1.55 var(--ac-font); -webkit-font-smoothing: antialiased; }
.ac, .ac * { box-sizing: border-box; }
.ac { font-family: var(--ac-font); color: var(--ac-text); }
.ac a { color: var(--ac-text); text-decoration: none; }
.ac a:hover { color: #fff; }
.ac h1 { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.ac h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.ac h3 { font-size: 16px; font-weight: 600; margin: 4px 0 10px; }
.ac-muted { color: var(--ac-muted); }
.ac-small { font-size: 13px; }
.ac-r { text-align: right; }

/* Logótipo */
.ac-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.ac-logo img { width: 120px; height: 56px; border-radius: 0; object-fit: cover; }
.ac-logo span { color: var(--ac-muted); font-weight: 500; }

/* Botões */
.ac-btn, .ac .button, .ac input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: var(--ac-accent); color: #fff !important; border: 0; border-radius: 10px;
	padding: 11px 18px; font: 600 14px/1 var(--ac-font); cursor: pointer; transition: background .15s;
}
.ac-btn:hover, .ac input[type="submit"]:hover { background: var(--ac-accent-2); }
.ac-btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; background: var(--ac-surface-2); border: 1px solid var(--ac-line-2); }
.ac-btn-sm:hover { background: var(--ac-accent); border-color: var(--ac-accent); }

/* ---------- Login ---------- */
.ac-login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px;
	background: radial-gradient(1200px 600px at 10% -10%, rgba(226, 35, 26, .18), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(226, 35, 26, .10), transparent 60%), var(--ac-bg); }
.ac-login-card { width: 100%; max-width: 420px; background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: 20px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.ac-login-card h1 { margin-top: 22px; font-size: 22px; }
.ac-login-card > p { margin: 6px 0 20px; }
.ac-login form p { margin: 0 0 14px; }
.ac-login label { display: block; font-size: 13px; color: var(--ac-muted); margin-bottom: 6px; }
.ac-login input[type="text"], .ac-login input[type="password"], .ac-login input[type="email"] {
	width: 100%; background: var(--ac-bg); border: 1px solid var(--ac-line-2); color: var(--ac-text); border-radius: 10px; padding: 12px 14px; font: 400 15px var(--ac-font);
}
.ac-login input:focus { outline: none; border-color: var(--ac-accent); box-shadow: 0 0 0 3px rgba(226, 35, 26, .25); }
.ac-login .login-remember label { display: flex; gap: 8px; align-items: center; color: var(--ac-text); }
.ac-login .login-submit input { width: 100%; padding: 13px; }
.ac-login-links { margin: 6px 0 18px; font-size: 14px; }
.ac-login-links a { color: var(--ac-accent-2); }
.ac-login .ac-small a { color: var(--ac-text); }
.ac-back { margin-top: 18px; font-size: 14px; }
.ac-back a { color: var(--ac-muted); }
.ac-alert { background: rgba(255, 93, 85, .12); border: 1px solid rgba(255, 93, 85, .35); color: #ffb3ae; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }

/* ---------- App ---------- */
.ac-app { min-height: 100vh; display: flex; flex-direction: column; }
.ac-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; min-height: 81px; box-sizing: border-box; background: rgba(18, 20, 23, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ac-line); }
.ac-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ac-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ac-accent); display: grid; place-items: center; font-weight: 600; flex: 0 0 auto; }
.ac-user-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ac-user-name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-user-name small { color: var(--ac-muted); font-size: 12px; }
.ac-logout { font-size: 13px; color: var(--ac-muted) !important; border: 1px solid var(--ac-line-2); padding: 6px 12px; border-radius: 8px; }
.ac-logout:hover { border-color: var(--ac-accent); color: #fff !important; }

.ac-preview { background: rgba(245, 177, 61, .12); color: #ffd58a; border-bottom: 1px solid rgba(245, 177, 61, .3); padding: 8px 24px; font-size: 13px; }
.ac-preview a { color: #ffd58a !important; text-decoration: underline; }

.ac-tabs { display: flex; gap: 4px; padding: 10px 24px 0; border-bottom: 1px solid var(--ac-line); overflow-x: auto; scrollbar-width: none; }
.ac-tabs::-webkit-scrollbar { display: none; }
.ac-tabs a { white-space: nowrap; padding: 10px 14px 12px; font-size: 14px; font-weight: 500; color: var(--ac-muted) !important; border-bottom: 2px solid transparent; }
.ac-tabs a:hover { color: var(--ac-text) !important; }
.ac-tabs a.is-active { color: #fff !important; border-bottom-color: var(--ac-accent); }
.ac-tabs em { font-style: normal; background: var(--ac-accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }

.ac-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.ac-panel > .ac-muted { margin: 0 0 22px; }
.ac-panel > * + .ac-card, .ac-cards + .ac-card { margin-top: 16px; }
.ac-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ac-head .ac-muted { margin: 0; }

.ac-card { background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 20px; }
.ac-card-link { display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.ac-card-link:hover { border-color: var(--ac-accent); transform: translateY(-1px); }
.ac-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ac-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ac-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.ac-empty { background: var(--ac-surface); border: 1px dashed var(--ac-line-2); border-radius: var(--ac-radius); padding: 24px; color: var(--ac-muted); }
.ac-empty a { color: var(--ac-accent-2) !important; }

.ac-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ac-muted); font-weight: 500; }
.ac-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ac-stat { background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ac-stat > strong { font-size: 26px; font-weight: 600; line-height: 1.1; }
.ac-stat > strong small, .ac-big small { font-size: 14px; color: var(--ac-muted); font-weight: 500; }
.ac-stat .ac-strong-sm { font-size: 16px; overflow-wrap: anywhere; }
.ac-big { font-size: 28px; font-weight: 600; margin: 4px 0 10px; }

.ac-bar { height: 8px; background: var(--ac-surface-2); border-radius: 99px; overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: var(--ac-ok); border-radius: inherit; transition: width .6s ease; }
.ac-bar.ac-warnbar i { background: var(--ac-warn); }
.ac-bar.ac-over i { background: var(--ac-danger); }
.ac-card .ac-bar + .ac-muted { margin: 8px 0 0; }
.ac-desc { color: var(--ac-muted); font-size: 14px; margin: 10px 0 0; }

.ac-badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.ac-ok { background: rgba(60, 207, 142, .12); color: #7fe3b4; border-color: rgba(60, 207, 142, .3); }
.ac-warn { background: rgba(245, 177, 61, .12); color: #ffd58a; border-color: rgba(245, 177, 61, .3); }
.ac-danger { background: rgba(255, 93, 85, .12); color: #ffb3ae; border-color: rgba(255, 93, 85, .35); }
.ac-neutral { background: var(--ac-surface-2); color: var(--ac-muted); border-color: var(--ac-line-2); }

.ac-list { list-style: none; margin: 0; padding: 0; }
.ac-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--ac-line); }
.ac-list li:first-child { border-top: 0; padding-top: 0; }
.ac-list li > div { display: flex; flex-direction: column; min-width: 0; }
.ac-list li strong { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.ac-hours { font-weight: 600; color: var(--ac-text); white-space: nowrap; }

.ac-dl { margin: 14px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-dl dt { font-size: 12px; color: var(--ac-muted); }
.ac-dl dd { margin: 0; font-weight: 500; font-size: 14px; }

.ac-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ac-table th { text-align: left; font-weight: 500; color: var(--ac-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 0 12px 10px; border-bottom: 1px solid var(--ac-line-2); }
.ac-table th.ac-r { text-align: right; }
.ac-table td { padding: 12px; border-bottom: 1px solid var(--ac-line); vertical-align: top; }
.ac-table tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.ac-table tfoot td { font-weight: 600; border-bottom: 0; padding-top: 14px; }
.ac-table th:first-child, .ac-table td:first-child { padding-left: 0; }
.ac-table th:last-child, .ac-table td:last-child { padding-right: 0; }

.ac-month { display: flex; align-items: center; gap: 8px; }
.ac-month label { font-size: 13px; color: var(--ac-muted); }
.ac-month select { background: var(--ac-surface); color: var(--ac-text); border: 1px solid var(--ac-line-2); border-radius: 10px; padding: 9px 12px; font: 500 14px var(--ac-font); }

.ac-foot { text-align: center; padding: 22px 16px 28px; font-size: 13px; color: var(--ac-muted); border-top: 1px solid var(--ac-line); }
.ac-foot a { color: var(--ac-text); }

[hidden] { display: none !important; }

/* Menu lateral (estilo BestNumberOne) */
.ac-shell { display: flex; flex: 1; align-items: flex-start; }
.ac-content { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 81px); }
.ac-side { flex: 0 0 260px; width: 260px; position: sticky; top: 81px; height: calc(100vh - 81px); overflow-y: auto; background: var(--ac-surface); border-right: 1px solid var(--ac-line); padding: 16px 12px 24px; }
.ac-side-user { display: flex; align-items: center; gap: 12px; padding: 8px 10px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--ac-line); }
.ac-side .ac-tabs { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; overflow: visible; }
.ac-side .ac-tabs a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; font-size: 14px; white-space: normal; }
.ac-side .ac-tabs a:hover { background: var(--ac-surface-2); }
.ac-side .ac-tabs a.is-active { background: var(--ac-surface-2); box-shadow: inset 3px 0 0 var(--ac-accent); }
.ac-side .ac-tabs a.is-active .ac-ico { color: var(--ac-accent-2); }
.ac-side .ac-tabs em { margin-left: auto; }
.ac-ico { flex: 0 0 20px; opacity: .9; }
.ac-side-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ac-muted); padding: 18px 12px 6px; }
.ac-has-side .ac-top .ac-avatar, .ac-has-side .ac-top .ac-user-name { display: none; }
.ac-has-side .ac-main { margin: 0; max-width: 1100px; }
.ac-burger, .ac-overlay { display: none; }
@media (max-width: 860px) {
	.ac-shell { display: block; }
	.ac-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 8px; padding: 0; background: transparent; border: 1px solid var(--ac-line-2); border-radius: 10px; color: var(--ac-text); cursor: pointer; flex: 0 0 auto; }
	.ac-has-side .ac-top { justify-content: flex-start; }
	.ac-has-side .ac-top .ac-user { margin-left: auto; }
	.ac-side { position: fixed; left: 0; top: 81px; bottom: 0; height: auto; width: 280px; max-width: 86vw; z-index: 30; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
	.ac-menu-open .ac-side { transform: none; visibility: visible; }
	.ac-overlay { display: block; position: fixed; inset: 81px 0 0 0; z-index: 25; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
	.ac-menu-open .ac-overlay { opacity: 1; pointer-events: auto; }
	.ac-content { min-height: 0; }
	.ac-has-side .ac-main { margin: 0 auto; }
}

@media (max-width: 960px) {
	.ac-stats { grid-template-columns: 1fr 1fr; }
	.ac-two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.ac-top { padding: 10px 16px; }
	.ac-logo span, .ac-user-name { display: none; }
	.ac-tabs { padding: 6px 8px 0; }
	.ac-main { padding: 20px 16px 40px; }
	.ac h1 { font-size: 22px; }
	.ac-stats { grid-template-columns: 1fr; }
	.ac-stat > strong { font-size: 22px; }
	.ac-cards { grid-template-columns: 1fr; }
	/* Tabelas viram cartões */
	.ac-table thead { display: none; }
	.ac-table, .ac-table tbody, .ac-table tr, .ac-table td, .ac-table tfoot { display: block; width: 100%; }
	.ac-table tr { border-bottom: 1px solid var(--ac-line); padding: 10px 0; }
	.ac-table td { border: 0; padding: 4px 0 !important; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; }
	.ac-table td[data-label]::before { content: attr(data-label); color: var(--ac-muted); font-size: 12px; flex: 0 0 auto; }
	.ac-table tfoot tr { display: flex; justify-content: space-between; border: 0; }
	.ac-table tfoot td { width: auto; }
}

/* ---------- Lista de clientes (pré-visualização do gestor) ---------- */
.ac [hidden] { display: none !important; }
.ac-gestor-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.ac-gestor-head .ac-btn-sm { background: var(--ac-accent); border-color: var(--ac-accent); }
.ac-filtros { display: flex; gap: 10px; margin-bottom: 16px; }
.ac-filtros input, .ac-filtros select { height: 42px; background: var(--ac-surface); color: var(--ac-text); border: 1px solid var(--ac-line-2); border-radius: 10px; padding: 0 12px; font: 400 14px var(--ac-font); }
.ac-filtros input { flex: 1; min-width: 0; }
.ac-filtros input:focus, .ac-filtros select:focus { outline: none; border-color: var(--ac-accent); }
.ac-clist { display: flex; flex-direction: column; gap: 12px; }
.ac-crow { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr) 210px; gap: 24px; align-items: start; background: var(--ac-surface); border: 1px solid var(--ac-line); border-radius: var(--ac-radius); padding: 20px; transition: border-color .15s; }
.ac-crow:hover { border-color: var(--ac-line-2); }
.ac-crow-id { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.ac-avatar { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(226, 35, 26, .14); color: var(--ac-accent-2); font-weight: 600; font-size: 14px; border: 1px solid rgba(226, 35, 26, .3); }
.ac h2.ac-crow-nome { font-size: 16px; margin: 2px 0 6px; word-break: break-word; }
.ac-crow-meta { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--ac-muted); display: grid; gap: 2px; }
.ac-crow-meta a { color: var(--ac-muted); word-break: break-all; }
.ac-crow-servs .ac-label { margin-bottom: 8px; }
.ac-slist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ac-s { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 8px 10px; background: var(--ac-bg); border: 1px solid var(--ac-line); border-left: 3px solid var(--ac-muted); border-radius: 8px; font-size: 14px; }
.ac-s strong { font-weight: 500; }
.ac-s .ac-small { flex-basis: 100%; }
.ac-s-tipo { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ac-muted); }
.ac-s-avenca { border-left-color: var(--ac-accent); }
.ac-s-social { border-left-color: #b26bff; }
.ac-s-googleads { border-left-color: #f5b83f; }
.ac-s-marketing, .ac-s-avenca { border-left-color: var(--ac-accent); }
.ac-s-programacao { border-left-color: #6b8bff; }
.ac-s-manutencao { border-left-color: #ff8a3d; }
.ac-s-iaads { border-left-color: #2ed8c3; }
.ac-s-alojamento { border-left-color: #3fa9f5; }
.ac-s-dominio { border-left-color: var(--ac-ok); }
.ac-crow-side { display: flex; flex-direction: column; gap: 14px; }
.ac-crow-side dl { margin: 0; display: grid; gap: 10px; }
.ac-crow-side dt { font-size: 12px; color: var(--ac-muted); }
.ac-crow-side dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.ac-crow-acoes { display: flex; flex-direction: column; gap: 8px; }
.ac-btn-main { width: 100%; background: var(--ac-accent) !important; border-color: var(--ac-accent) !important; padding: 10px 12px; }
.ac-link-sm { font-size: 13px; color: var(--ac-muted) !important; text-align: center; }
.ac-link-sm:hover { color: #fff !important; }
@media (max-width: 960px) {
	.ac-crow { grid-template-columns: 1fr 1fr; }
	.ac-crow-servs { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
	.ac-crow { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
	.ac-crow-servs { grid-row: auto; }
	.ac-gestor-head { flex-direction: column; align-items: flex-start; }
	.ac-filtros { flex-direction: column; }
}

/* Relatórios em texto */
.ac-reports { display: grid; gap: 10px; }
.ac-report { background: var(--ac-bg); border: 1px solid var(--ac-line); border-radius: 12px; }
.ac-report[open] { border-color: var(--ac-line-2); }
.ac-report summary { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; cursor: pointer; list-style: none; position: relative; padding-right: 40px; }
.ac-report summary::-webkit-details-marker { display: none; }
.ac-report summary::after { content: "+"; position: absolute; right: 16px; top: 14px; font-size: 20px; line-height: 1; color: var(--ac-muted); }
.ac-report[open] summary::after { content: "–"; }
.ac-report-mes { font-weight: 500; font-size: 15px; text-transform: capitalize; }
.ac-report-body { padding: 0 16px 16px; border-top: 1px solid var(--ac-line); }
.ac-report-body p { margin: 12px 0 0; line-height: 1.65; overflow-wrap: anywhere; }
.ac-report-body a { color: var(--ac-accent-2) !important; text-decoration: underline; }

.ac-side .ac-side-user .ac-user-name { display: flex; }
