
/* Soile Guide — Cloudflare Pages static PWA
   No external CSS dependencies. */

:root{
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;

  --accent: #2563eb;      /* Blue */
  --accent2:#0ea5e9;      /* Cyan */
  --danger:#ef4444;       /* Red */
  --success:#16a34a;      /* Green */
  --warn:#f59e0b;         /* Amber */

  --shadow: 0 12px 30px rgba(2,6,23,.10);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

html[data-theme="dark"]{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.08);
  --text: #e2e8f0;
  --muted: rgba(226,232,240,0.70);
  --border: rgba(148,163,184,0.22);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a{ color: inherit; }
a.link{
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,.35);
  text-underline-offset: 3px;
}
a.link:hover{ text-decoration-color: rgba(37,99,235,.85); }

::selection{
  background: rgba(14,165,233,.25);
}

.container{
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-badge{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.brand-badge svg{ width: 22px; height: 22px; }
.brand-title{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title strong{
  font-family: var(--mono);
  letter-spacing: .6px;
  font-size: 14px;
}
.brand-title span{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 82%, transparent);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--muted);
}
.pill .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 18%, transparent);
}
.pill.offline .dot{ background: var(--warn); box-shadow: 0 0 0 3px color-mix(in oklab, var(--warn) 18%, transparent); }

.btn{
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .55; cursor: not-allowed; }

.btn-primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 0;
  color: white;
}
.btn-primary:hover{ opacity: .95; }
.btn-ghost{
  background: transparent;
}

.kbd{
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 80%, transparent);
  color: var(--muted);
}

.hero{
  padding: 38px 0 24px;
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.h1{
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  margin: 0 0 10px 0;
  letter-spacing: -.6px;
}
.lead{
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 18px 0;
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card.pad{ padding: 18px; }

.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .grid-2{ grid-template-columns: 1fr; }
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--border));
  background: color-mix(in oklab, var(--accent) 10%, var(--panel));
  color: color-mix(in oklab, var(--accent) 70%, var(--text));
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.badge.red{
  border-color: color-mix(in oklab, var(--danger) 22%, var(--border));
  background: color-mix(in oklab, var(--danger) 10%, var(--panel));
  color: color-mix(in oklab, var(--danger) 70%, var(--text));
}
.badge.green{
  border-color: color-mix(in oklab, var(--success) 22%, var(--border));
  background: color-mix(in oklab, var(--success) 10%, var(--panel));
  color: color-mix(in oklab, var(--success) 70%, var(--text));
}

hr.sep{
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.small{
  font-size: 12px;
  color: var(--muted);
}

.footer{
  margin-top: 28px;
  padding: 22px 0 36px;
  color: var(--muted);
  font-size: 12px;
}
.footer strong{ color: var(--text); }

.app-shell{
  padding: 16px 0 90px;
}

.app-layout{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px){
  .app-layout{ grid-template-columns: 1fr; }
}

.sidebar{
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 16px;
}
@media (max-width: 980px){
  .sidebar{ position: static; }
}

.nav{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.nav button{
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav button .label{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav button .label b{ font-size: 13px; }
.nav button .label span{ font-size: 12px; color: var(--muted); font-weight: 600; }
.nav button.active{
  border-color: color-mix(in oklab, var(--accent) 45%, var(--border));
  background: color-mix(in oklab, var(--accent) 6%, var(--panel));
}

.view{
  padding: 16px;
}
.view h2{
  margin: 0 0 4px 0;
  letter-spacing: -.3px;
}
.view p{
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.input, .select, textarea{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 92%, transparent);
  color: var(--text);
  outline: none;
}
textarea{ min-height: 110px; resize: vertical; }
.input:focus, .select:focus, textarea:focus{
  border-color: color-mix(in oklab, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent2) 18%, transparent);
}

.toolbar{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar .grow{ flex: 1 1 auto; }

.list{
  display: grid;
  gap: 10px;
}
.item{
  padding: 14px;
}
.item h3{
  margin: 0 0 6px 0;
  font-size: 15px;
}
.item .meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.item .meta span{
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 88%, transparent);
}

.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.35);
  z-index: 90;
}
.modal.open{ display: flex; }
.modal .sheet{
  width: min(720px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.modal .sheet .head{
  position: sticky;
  top: 0;
  background: color-mix(in oklab, var(--panel) 92%, transparent);
  border-bottom: 1px solid var(--border);
  padding: 14px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal .sheet .body{
  padding: 14px;
}

.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .two-col{ grid-template-columns: 1fr; }
}

.notice{
  border: 1px dashed color-mix(in oklab, var(--warn) 55%, var(--border));
  background: color-mix(in oklab, var(--warn) 10%, var(--panel));
  padding: 12px 12px;
  border-radius: 14px;
  font-size: 12px;
  color: color-mix(in oklab, var(--text) 92%, var(--muted));
}

.toast-wrap{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 28px));
}
.toast{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.toast b{ display: block; margin-bottom: 2px; }
.toast span{ font-size: 12px; color: var(--muted); }
.toast.ok{ border-color: color-mix(in oklab, var(--success) 30%, var(--border)); }
.toast.warn{ border-color: color-mix(in oklab, var(--warn) 40%, var(--border)); }
.toast.err{ border-color: color-mix(in oklab, var(--danger) 40%, var(--border)); }

.bottom-nav{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.bottom-nav .inner{
  width: min(1120px, calc(100% - 20px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px 0;
}
.bottom-nav button{
  font-size: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.bottom-nav button.active{
  color: var(--text);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  background: color-mix(in oklab, var(--accent) 7%, var(--panel));
}
@media (min-width: 981px){
  .bottom-nav{ display: none; }
}
