:root{
  --bw-bg:#0b0d0f;
  --bw-card:#12151a;
  --bw-text:#e7e7e7;
  --bw-muted:#9aa3ad;
  --bw-line:#1f2630;
  --bw-accent:#c48a4a; /* brew brown */
  --bw-radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial;background:var(--bw-bg);color:var(--bw-text)}
a{color:inherit;text-decoration:none}

.bw-shell{min-height:100vh;display:flex;flex-direction:column}
.bw-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--bw-line);position:sticky;top:0;background:rgba(11,13,15,0.92);backdrop-filter:blur(10px);z-index:9}
.bw-brand{display:flex;gap:12px;align-items:center}
.bw-logo{width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,var(--bw-accent),#6b4d2b);display:grid;place-items:center;font-weight:800;color:#12151a}
.bw-brandname{font-weight:900;letter-spacing:.4px}
.bw-tagline{font-size:12px;color:var(--bw-muted)}
.bw-top-actions{display:flex;gap:12px;align-items:center}
.bw-chip{padding:8px 10px;border:1px solid var(--bw-line);border-radius:999px;color:var(--bw-muted);font-size:12px}
.bw-link{color:var(--bw-accent);font-size:14px}

.bw-container{width:100%;max-width:860px;margin:0 auto;padding:16px}
.bw-footer{padding:16px;color:var(--bw-muted);text-align:center;border-top:1px solid var(--bw-line);margin-top:auto;font-size:12px}

.bw-card{background:var(--bw-card);border:1px solid var(--bw-line);border-radius:var(--bw-radius);padding:16px}
.bw-card-title{font-size:18px;font-weight:850}
.bw-muted{color:var(--bw-muted);margin-top:6px}

.bw-form{margin-top:14px;display:grid;gap:10px}
.bw-label{font-size:12px;color:var(--bw-muted)}
.bw-input{width:100%;padding:12px 12px;border-radius:14px;border:1px solid var(--bw-line);background:#0f1216;color:var(--bw-text);outline:none}

.bw-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;margin-top:14px}
.bw-btn{background:var(--bw-accent);border:1px solid rgba(255,255,255,0.08);color:#12151a;padding:11px 14px;border-radius:14px;font-weight:800;cursor:pointer}
.bw-btn:hover{filter:brightness(1.06)}
.bw-btn-ghost{background:transparent;color:var(--bw-text);border:1px solid var(--bw-line)}
.bw-btn-wide{width:100%}

.bw-alert{margin-top:12px;padding:12px;border-radius:14px;border:1px solid var(--bw-line)}
.bw-alert-danger{background:rgba(255,60,60,0.08)}

.bw-progress{height:10px;background:#0f1216;border:1px solid var(--bw-line);border-radius:999px;overflow:hidden;margin-bottom:14px}
.bw-progress-bar{height:100%;background:var(--bw-accent)}

.bw-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.bw-stat{background:#0f1216;border:1px solid var(--bw-line);border-radius:16px;padding:14px}
.bw-stat-label{color:var(--bw-muted);font-size:12px}
.bw-stat-value{font-size:20px;font-weight:900;margin-top:6px}

.bw-template{display:block;background:#0f1216;border:1px solid var(--bw-line);border-radius:18px;padding:14px;cursor:pointer}
.bw-template.is-active{border-color:rgba(196,138,74,0.8);box-shadow:0 0 0 2px rgba(196,138,74,0.2) inset}
.bw-template-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bw-template-name{font-weight:900}
.bw-template-tag{font-size:12px;color:var(--bw-muted)}
.bw-template-desc{margin-top:6px;color:var(--bw-muted);font-size:12px;line-height:1.35}
.bw-template-preview{margin-top:12px;height:64px;border-radius:14px;border:1px solid var(--bw-line)}
.bw-template-preview-minimal{background:linear-gradient(90deg,#ffffff22,#ffffff08)}
.bw-template-preview-dark{background:linear-gradient(90deg,#00000088,#ffffff06)}
.bw-template-preview-matcha{background:linear-gradient(90deg,#27ae601f,#ffffff08)}

.bw-auth{width:min(460px,92%);margin:0 auto}
