:root {
  --ink: #182230;
  --muted: #667085;
  --paper: #f6f8fb;
  --surface: #ffffff;
  --line: #e3e8ef;
  --gold: #f5b942;
  --green: #2563eb;
  --red: #dc4c64;
  --blue: #0f9f6e;
  --shadow: 0 18px 48px rgba(24, 34, 48, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.login-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.login-brand { padding: clamp(36px, 8vw, 110px); background: #111827; color: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.login-brand h1 { max-width: 720px; margin: 18px 0; font-family: Georgia, serif; font-size: clamp(42px, 6vw, 82px); line-height: .98; font-weight: 500; letter-spacing: 0; }
.login-brand .eyebrow { color: var(--gold); }
.login-copy { font-size: 18px; color: #cbd5e1; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 12px 30px; color: #cbd5e1; font-size: 13px; }
.trust-strip span::before { content: "✓"; color: var(--gold); margin-right: 8px; }
.login-panel { background: var(--surface); display: grid; place-items: center; padding: 32px; }
.login-form { width: min(100%, 420px); display: grid; gap: 22px; }
.login-form h2 { font: 500 32px Georgia, serif; margin: 0; }
label { display: grid; gap: 8px; color: #344054; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 13px 14px; color: var(--ink); background: #fff; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
textarea { resize: vertical; min-height: 84px; }
.button { min-height: 44px; border: 0; border-radius: 6px; padding: 0 18px; font-weight: 800; color: var(--ink); background: #e9eef5; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button.primary { color: white; background: var(--green); }
.button.dark { color: white; background: var(--ink); }
.button.danger { color: var(--red); background: #fff0f2; }
.button.wide { width: 100%; }
.button.compact { min-height: 40px; }
.button:disabled { opacity: .55; cursor: wait; }
.demo-note, .form-error { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.form-error { color: var(--red); }
.app-shell { min-height: 100vh; }
.sidebar { width: 224px; position: fixed; inset: 0 auto 0 0; z-index: 5; padding: 24px 16px; background: #111827; color: white; display: flex; flex-direction: column; }
.brand { color: white; text-decoration: none; display: flex; align-items: center; gap: 11px; padding: 0 8px 28px; font-weight: 800; line-height: 1.05; }
.brand img { border: 1px solid #334155; border-radius: 9px; }
.desktop-nav { display: grid; gap: 5px; }
.desktop-nav a { color: #aebbd0; text-decoration: none; border-radius: 6px; padding: 12px 13px; display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 700; }
.desktop-nav a.active { color: white; background: #263653; box-shadow: inset 3px 0 var(--gold); }
.desktop-nav a span { width: 20px; text-align: center; font-size: 18px; }
.sidebar-foot { margin-top: auto; padding: 14px 6px 0; border-top: 1px solid #334155; display: grid; grid-template-columns: 36px 1fr 32px; align-items: center; gap: 9px; }
.sidebar-foot strong, .sidebar-foot small { display: block; max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot strong { font-size: 12px; }.sidebar-foot small { color: #94a3b8; font-size: 11px; text-transform: capitalize; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.icon-button { width: 32px; height: 32px; border: 0; color: #cbd5e1; background: transparent; font-size: 20px; }
.content-shell { min-height: 100vh; margin-left: 224px; }
.topbar { height: 86px; padding: 0 clamp(22px, 4vw, 58px); border-bottom: 1px solid var(--line); background: rgba(246, 248, 251, .94); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 4; backdrop-filter: blur(10px); }
.topbar h2 { margin: 0; font: 500 27px Georgia, serif; }
.page { max-width: 1360px; margin: 0 auto; padding: 34px clamp(22px, 4vw, 58px) 70px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.welcome h1 { margin: 0 0 7px; font: 500 clamp(30px, 4vw, 44px) Georgia, serif; }
.welcome p { margin: 0; color: var(--muted); }
.date-chip { flex: none; color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); margin-bottom: 30px; }
.stat { min-height: 132px; padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.stat:last-child { border-right: 0; }
.stat small { color: var(--muted); font-weight: 700; }
.stat strong { font: 500 clamp(24px, 3vw, 36px) Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .trend { color: var(--green); font: 700 11px ui-sans-serif, system-ui; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 14px; }
.section-head h3 { margin: 0; font: 500 22px Georgia, serif; }
.text-link { color: var(--green); font-size: 13px; font-weight: 800; text-decoration: none; }
.client-list { border-top: 1px solid var(--ink); }
.client-row { width: 100%; min-height: 78px; border: 0; border-bottom: 1px solid var(--line); padding: 13px 8px; background: transparent; display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(120px, .7fr) minmax(130px, .7fr) 120px 32px; gap: 20px; align-items: center; text-align: left; }
.client-row:hover { background: rgba(255,255,255,.88); }
.client-main { display: flex; align-items: center; min-width: 0; gap: 12px; }
.client-badge { flex: none; width: 42px; height: 42px; background: #e8efff; color: var(--green); border-radius: 50%; display: grid; place-items: center; font-weight: 900; }
.client-main strong, .client-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-main small, .cell small { color: var(--muted); margin-top: 3px; }
.cell { min-width: 0; font-size: 13px; }.cell strong,.cell small { display:block; }
.amount { font: 500 18px Georgia, serif; }
.status { justify-self: start; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--red); background: #fff0f2; }
.status.paid { color: var(--blue); background: #e5f8f1; }
.chevron { color: var(--muted); font-size: 22px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 14px; }
.account-card { padding: 20px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.account-card h3 { margin: 0 0 5px; font: 500 21px Georgia,serif; }.account-card p { margin: 0 0 18px; color:var(--muted); font-size:13px; }
.account-meta { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding-top:13px; border-top:1px solid var(--line); font-size:12px; }.account-meta span:last-child { grid-column:1 / -1; padding-top:12px; border-top:1px solid var(--line); }.account-meta strong { display:block; font-size:16px; }
.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:-8px 0 30px; }
.quick-action { min-height:82px; padding:16px 18px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--surface); text-align:left; text-decoration:none; display:grid; grid-template-columns:40px 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; }
.quick-action>span { grid-row:1/3; width:40px; height:40px; border-radius:50%; color:#fff; background:var(--green); display:grid; place-items:center; font-size:21px; }.quick-action strong,.quick-action small{display:block}.quick-action small{color:var(--muted);margin-top:3px}.quick-action:hover{border-color:#9bb5f5;box-shadow:0 8px 24px rgba(37,99,235,.08)}
.import-shell{max-width:1100px}.import-shell .welcome{margin-bottom:22px}.upload-zone{min-height:260px;border:2px dashed #b7c5d8;border-radius:8px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;cursor:pointer;transition:.2s ease}.upload-zone:hover{border-color:var(--green);background:#f8faff}.upload-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#e8efff;color:var(--green);font-size:28px;margin-bottom:5px}.upload-zone strong{font-size:18px}.upload-zone small,.subtle{color:var(--muted);font-size:13px}.import-help{margin-top:18px;padding:20px;border:1px solid var(--line);background:var(--surface)}.import-help>div{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}.import-help span{padding:7px 10px;border-radius:4px;background:#edf3ff;color:#244da6;font-size:12px;font-weight:800}.import-help p{margin:0;color:var(--muted);font-size:13px}.step-line{display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:28px;border-bottom:1px solid var(--line)}.step-line span{padding:12px 4px;color:var(--muted);font-size:12px;font-weight:800;border-bottom:3px solid transparent}.step-line .done{color:var(--blue)}.step-line .active{color:var(--green);border-color:var(--green)}.mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:20px;border:1px solid var(--line);background:var(--surface);margin-bottom:28px}.mapping-grid label{position:relative}.mapping-grid label b{position:absolute;right:0;top:0;color:var(--red);font-size:10px}.preview-wrap h3{font:500 20px Georgia,serif}.table-scroll{max-width:100%;overflow:auto;border:1px solid var(--line);background:var(--surface)}.import-table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}.import-table th{position:sticky;top:0;padding:11px 12px;background:#eef2f7;color:#475467;text-align:left}.import-table td{max-width:280px;padding:11px 12px;border-top:1px solid var(--line);overflow:hidden;text-overflow:ellipsis}.import-table tr:hover td{background:#fafcff}.validation-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.validation-stats>div{padding:17px;border:1px solid var(--line);background:var(--surface);border-left:4px solid}.validation-stats .ready{border-left-color:var(--blue)}.validation-stats .duplicate{border-left-color:var(--gold)}.validation-stats .error{border-left-color:var(--red)}.validation-stats strong{display:block;font:500 30px Georgia,serif}.validation-stats span{color:var(--muted);font-size:12px;font-weight:800}.row-status{padding:4px 7px;border-radius:99px;font-weight:800}.row-status.ready{color:#087755;background:#e5f8f1}.row-status.duplicate{color:#8a6410;background:#fff6da}.row-status.error{color:#b32943;background:#fff0f2}.confirm-bar{position:sticky;bottom:14px;margin-top:16px;padding:14px 16px;border:1px solid var(--line);border-radius:7px;background:rgba(255,255,255,.96);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:flex-end;gap:10px;backdrop-filter:blur(10px)}.confirm-bar>div{margin-right:auto}.confirm-bar strong,.confirm-bar small{display:block}.confirm-bar small{color:var(--muted);margin-top:3px}.import-loading{min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.import-loading span{width:38px;height:38px;border:4px solid #d9e3f4;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}.import-loading small{color:var(--muted)}@keyframes spin{to{transform:rotate(360deg)}}
.reminder-page{max-width:1100px}.channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:30px}.channel-grid article{min-height:130px;padding:18px;border:1px solid var(--line);background:var(--surface);border-radius:6px}.channel-grid article>div{display:flex;align-items:center;gap:9px}.channel-grid article>p{margin:14px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.channel-icon{width:34px;height:34px;border-radius:6px;display:grid;place-items:center;color:#fff;background:var(--green);font-weight:900;font-size:13px}.channel-icon.sms{background:#7c5cc4;font-size:9px}.channel-icon.whatsapp{background:#12a66a}.channel-state{margin-left:auto;padding:4px 7px;border-radius:99px;font-size:9px;font-weight:900;text-transform:uppercase}.channel-state.live{color:#087755;background:#e5f8f1}.channel-state.pending{color:#8a6410;background:#fff6da}.channel-state.off{color:var(--muted);background:#edf1f6}.reminder-list{border-top:1px solid var(--ink)}.reminder-row{min-height:76px;padding:12px 7px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:minmax(180px,1fr) 150px auto;gap:18px;align-items:center}.reminder-actions{display:flex;gap:7px;align-items:center}.whatsapp-button{color:#fff;background:#12a66a}.pause-button{border-radius:6px;background:#edf1f6;color:var(--muted);font-size:15px}.activity-head{margin-top:32px}.activity-list{border-top:1px solid var(--line)}.activity-list>div{padding:12px 5px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.activity-list p,.activity-list strong,.activity-list small{margin:0;display:block}.activity-list small{margin-top:3px;color:var(--muted);font-size:11px;text-transform:capitalize}.activity-channel{width:76px;padding:5px 7px;border-radius:4px;text-align:center;font-size:9px;font-weight:900;text-transform:uppercase;color:#244da6;background:#e8efff}.activity-channel.whatsapp{color:#087755;background:#e5f8f1}.activity-channel.sms{color:#6744a4;background:#f0ebfb}.channel-toggle{min-height:68px;padding:12px;border:1px solid var(--line);border-radius:6px;display:grid;grid-template-columns:24px 1fr;grid-template-rows:auto auto;gap:2px 8px;align-items:center}.channel-toggle input{grid-row:1/3;width:20px;height:20px}.channel-toggle span{font-weight:800}.channel-toggle small{color:var(--muted);font-weight:500}.template-help{margin:0;color:var(--muted);font-size:11px}
.search { flex: 1; position: relative; }.search input { padding-left: 40px; background: var(--surface); }.search::before { content: "⌕"; position: absolute; left: 14px; top: 8px; color: var(--muted); font-size: 22px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }
.modal { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 28px); border: 0; border-radius: 8px; padding: 0; box-shadow: var(--shadow); color: var(--ink); }
.modal::backdrop { background: rgba(15,23,42,.66); backdrop-filter: blur(3px); }
.modal-head { padding: 22px 24px 16px; display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 500 27px Georgia, serif; }.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.close-button { width: 38px; height: 38px; border: 0; background: #edf1f6; border-radius: 50%; font-size: 20px; }
.form-body { padding: 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; overflow-y: auto; }
.full { grid-column: 1 / -1; }.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: end; padding-top: 8px; }
.balance-panel { margin: 20px 24px 0; padding: 18px; color: white; background: var(--ink); border-radius: 6px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.balance-panel small { color: #cbd5e1; display: block; margin-bottom: 5px; }.balance-panel strong { font: 500 30px Georgia, serif; }
.payment-list { margin: 0 24px 24px; }.payment-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }.payment-row strong { color: var(--green); }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 20; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 6px; color: white; background: var(--ink); opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }.stat:nth-child(2) { border-right: 0; }.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .client-row { grid-template-columns: minmax(180px, 1.4fr) minmax(120px, .7fr) minmax(130px, .7fr) 32px; }.client-row .assigned { display:none; }
}
@media (max-width: 720px) {
  .login-view { display: block; background: var(--surface); }.login-brand { min-height: 42vh; padding: 34px 24px; gap: 24px; }.login-brand h1 { font-size: 42px; }.login-copy { font-size: 15px; }.trust-strip { display:none; }.login-panel { padding: 28px 24px 44px; place-items: start center; }
  .sidebar { display: none; }.content-shell { margin: 0; }.topbar { height: 74px; padding: 0 18px; }.topbar .eyebrow { display:none; }.topbar h2 { font-size: 23px; }.topbar .button { font-size: 0; width: 42px; padding: 0; }.topbar .button span { font-size: 20px; }
  .page { padding: 24px 16px 100px; }.welcome { align-items: start; }.welcome h1 { font-size: 31px; }.date-chip { display:none; }
  .stats { gap: 0; margin-inline: 0; }.stat { min-height: 108px; padding: 16px; }.stat strong { font-size: 23px; }
  .client-row { min-height: 72px; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 9px; }.client-row .phone,.client-row .assigned { display:none; }.amount { font-size: 16px; }.status { display:none; }
  .mobile-nav { position: fixed; z-index: 8; inset: auto 0 0; height: 72px; padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); display: grid; grid-template-columns: repeat(5, 1fr); backdrop-filter: blur(12px); }
  .mobile-nav a,.mobile-nav button { color: var(--muted); text-decoration: none; border:0; background:transparent; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:10px; font-weight:700; }.mobile-nav span { font-size:20px; line-height:1; }.mobile-nav .active { color: var(--green); }.mobile-nav button[data-action="add-client"] span { width:44px; height:44px; margin-top:-27px; border:4px solid var(--paper); border-radius:50%; background:var(--green); color:white; display:grid; place-items:center; font-size:25px; }
  .form-body { grid-template-columns: 1fr; padding: 18px; }.full,.form-actions { grid-column: auto; }.form-actions { flex-direction: column-reverse; }.modal-head { padding: 18px; }.balance-panel { margin: 16px 18px 0; }.payment-list { margin-inline:18px; }
  .toast { bottom: 88px; width: calc(100% - 32px); text-align:center; }
  .account-grid { grid-template-columns: 1fr; }
  .quick-actions{grid-template-columns:1fr}.mapping-grid{grid-template-columns:1fr;padding:16px}.step-line span{font-size:10px}.validation-stats{grid-template-columns:repeat(3,1fr)}.validation-stats>div{padding:12px}.validation-stats strong{font-size:24px}.confirm-bar{bottom:78px;align-items:stretch;flex-direction:column}.confirm-bar>div{margin-right:0}.confirm-bar .button{width:100%}.upload-zone{min-height:230px}.toolbar .button{padding-inline:12px;font-size:12px}
  .channel-grid{grid-template-columns:1fr}.reminder-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.reminder-row>.amount{grid-column:1}.reminder-actions{grid-column:2;grid-row:1/3;flex-direction:column}.whatsapp-button{padding-inline:12px}.activity-list>div{align-items:flex-start}
}
