:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#2b2435;background:#f6f4f8;font-size:16px;line-height:1.55;--purple:#54217a;--gold:#e9b74b;--line:#ded8e5;--muted:#6d6277}
*{box-sizing:border-box}body{margin:0}a{color:var(--purple);text-underline-offset:4px}button,input,textarea,select{font:inherit}button,a,input,textarea,select,summary{touch-action:manipulation}:focus-visible{outline:3px solid #b86f00;outline-offset:4px}button{border:1px solid transparent;border-radius:9px;background:var(--purple);color:white;font-weight:650;padding:.65rem 1.1rem;cursor:pointer;min-height:44px}button:hover{filter:brightness(1.12)}button.secondary{color:var(--purple);background:#eee7f4}button.danger{background:#fff;color:#a52c37;border-color:#e6bbc0}button.quiet{background:transparent;color:inherit;padding:.4rem 0;text-align:left}label{display:flex;flex-direction:column;gap:.35rem;font-weight:600;min-width:0;margin-bottom:1rem}input,textarea,select{width:100%;border:1px solid #b9afc4;border-radius:8px;background:white;color:inherit;padding:.65rem .8rem;min-width:0;min-height:44px}textarea{resize:vertical}input[type=checkbox]{width:20px;min-height:20px;accent-color:var(--purple)}input[type=file]{font-size:.9rem}.check{flex-direction:row;align-items:center;font-weight:400;gap:.6rem}fieldset{border:1px solid var(--line);border-radius:9px;margin:1rem 0;padding:1rem}legend{padding:0 .4rem;font-weight:650}
.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#482067;color:#fff;padding:2rem 1.4rem;overflow:auto;display:flex;flex-direction:column}.brand{display:block}.brand img{width:190px;height:auto;max-height:75px}.eyebrow{font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;font-weight:700;color:var(--muted)}.sidebar .eyebrow{color:#ddc8ed;margin-top:1.6rem}.sidebar nav{display:flex;flex-direction:column;gap:.3rem}.sidebar nav a{color:#f4eafc;text-decoration:none;padding:.65rem .8rem;border-radius:8px}.sidebar nav a:hover{background:#ffffff12}.sidebar nav a[aria-current]{background:#e9b74b;color:#342040;font-weight:700}.account{margin-top:auto;padding:2rem .8rem 0}.account small{display:block;color:#ddc8ed}.account form{display:inline-block;margin-right:1rem}.workspace{margin-left:248px;padding:2.7rem clamp(1.3rem,4vw,4rem);max-width:1550px}header{margin-bottom:2rem}header .eyebrow{margin:0 0 .4rem}h1{font-size:clamp(1.7rem,3vw,2.4rem);line-height:1.2;letter-spacing:-.025em;margin:.4rem 0 .7rem}h2{font-size:1.3rem;line-height:1.35;margin:1.7rem 0 1rem}h3{font-size:1.1rem;margin:0}.panel{background:white;border:1px solid var(--line);border-radius:14px;padding:1.5rem;margin:1.2rem 0;box-shadow:0 3px 14px #39284904}.panel h2:first-child{margin-top:0}.card-heading{display:flex;align-items:baseline;justify-content:space-between;gap:1rem}.card-heading h2{margin:0}time,.muted{color:var(--muted);font-size:.9rem}.preserve{white-space:pre-wrap;overflow-wrap:anywhere}.notice{border-left:3px solid var(--purple);background:#ece6f2;border-radius:0 8px 8px 0;padding:.9rem 1rem}.warning{border-color:#a16809;background:#fff3d8}.form-row,.filters{display:flex;gap:1rem;align-items:end;flex-wrap:wrap}.form-row>label,.filters>label{flex:1 1 180px}.filters button{margin-bottom:1rem}.inline{display:flex;align-items:center;gap:.5rem}.inline select{width:auto}.delete-form{border-top:1px solid var(--line);margin-top:1.5rem;padding-top:1rem;display:flex;gap:1rem;justify-content:space-between;align-items:center;flex-wrap:wrap}.delete-form .check{margin:0}details>summary{cursor:pointer;font-weight:650;color:var(--purple);padding:.4rem 0;min-height:44px}details[open]>summary{margin-bottom:1rem}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:white;margin:1rem 0}table{border-collapse:collapse;width:100%;font-size:.9rem}th,td{padding:.9rem 1rem;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}th{background:#f0ecf4;color:#64526f;font-size:.8rem;font-weight:700}tr:last-child td{border-bottom:0}td small{display:block;color:var(--muted)}.badge{display:inline-block;border-radius:6px;padding:.25rem .6rem;font-size:.8rem;background:#eee8f3;color:#54217a}.badges{display:flex;gap:.5rem;flex-wrap:wrap}.badge.sent,.badge.resolved{background:#e0f2e9;color:#276444}.badge.failed{background:#fbe6e9;color:#a22d3a}.badge.pending,.badge.new{background:#fff0cf;color:#785311}.badge.skipped{background:#eee;color:#5a535f}.tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}.tabs a{padding:.55rem .9rem;border:1px solid var(--line);border-radius:8px;text-decoration:none;background:white}.tabs a[aria-current]{border-color:var(--purple);background:#ece4f2;font-weight:650}.pagination{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin:1.5rem 0;font-size:.9rem}.empty{padding:2.5rem 1rem;text-align:center;color:var(--muted);border:1px dashed #c8bdd2;border-radius:12px}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.metric{background:white;border:1px solid var(--line);border-radius:12px;padding:1.2rem}.metric strong{display:block;color:var(--purple);font-size:2.3rem;line-height:1.2;margin:.5rem 0}.metric span{font-size:.85rem;color:var(--muted)}progress{width:100%;height:12px;accent-color:var(--purple)}.chart{width:100%;height:auto;max-height:220px;overflow:visible}.chart polyline{fill:none;stroke:var(--purple);stroke-width:3;stroke-linejoin:round}.chart circle{fill:var(--purple)}.chart line{stroke:var(--line)}.village-list{list-style:none;padding:0}.village-list li{display:flex;justify-content:space-between;padding:.65rem 0;border-bottom:1px solid var(--line)}.auth-layout{min-height:100dvh;display:grid;place-items:center;padding:2rem;background:radial-gradient(ellipse at top left,#efe3fa,transparent 60%),#f6f4f8}.auth-card{width:100%;max-width:470px;background:white;border:1px solid var(--line);border-radius:18px;padding:2rem;box-shadow:0 12px 45px #48206712}.auth-brand{background:var(--purple);padding:1.2rem;border-radius:10px;margin-bottom:1.6rem}.auth-brand img{display:block;max-width:240px;max-height:70px;width:100%;margin:auto}.auth-card button{width:100%}.code-list{background:#f4eff8;padding:1.5rem;border:1px solid var(--line);border-radius:9px;line-height:1.9;overflow:auto;font-size:1.05rem}.skip{position:fixed;top:-100px;left:1rem;z-index:10;background:white;padding:1rem}.skip:focus{top:1rem}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:210px}.brand img{width:165px}.workspace{margin-left:210px;padding:2rem 1.5rem}}
@media(max-width:720px){.sidebar{position:static;width:100%;padding:1rem}.brand img{width:145px;max-height:50px}.sidebar .eyebrow{display:none}.sidebar nav{flex-direction:row;overflow:auto;padding:.8rem 0;gap:.3rem}.sidebar nav a{white-space:nowrap;font-size:.85rem}.account{padding:.2rem 0 0;display:flex;gap:1rem;align-items:center;flex-wrap:wrap}.account small{display:none}.account form{margin:0}.account button{min-height:32px;font-size:.85rem}.workspace{margin:0;padding:1.5rem 1rem}.panel{padding:1.1rem}.card-heading{align-items:start;flex-direction:column;gap:.3rem}.metric{padding:1rem}.metric strong{font-size:2rem}.auth-layout{padding:1rem}.auth-card{padding:1.5rem}.pagination{flex-wrap:wrap}h1{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background-color .15s,color .15s}}

.section-title{display:flex;align-items:center;justify-content:space-between;gap:1rem}.pill{display:inline-block;background:#eee8f3;color:var(--purple);border-radius:6px;padding:.2rem .6rem;font-size:.85rem}.village-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:0 2rem}.village-grid>div{display:flex;justify-content:space-between;gap:.8rem;border-bottom:1px solid var(--line);padding:.7rem 0}.chart text{fill:var(--muted);font-size:12px}.metric small{font-size:1rem;color:var(--muted)}

.chart-dates{display:none}@media(max-width:720px){.chart text{display:none}.chart-dates{display:flex;justify-content:space-between;gap:1rem;color:var(--muted);font-size:.8rem}}
