/* yamocir web UI -- page-content styling loaded after the shared
   yetano-webui-template layout stylesheet (base/navbar/sidebar/footer
   chrome, incl. root theme variables and body/link colors, now lives
   there -- see ui.go's newPage/loadTemplates). This file only carries
   page-content styling: cards, tables, badges, buttons, forms, flash
   messages, the login card, the JSON details/pre viewer, stats,
   breadcrumbs, permission rows. Colors match the same dark palette the
   other Yetano ops tools share (yasta/yasl/yaiam/yakwui/yamase-web).
   Fixed dark theme only -- no prefers-color-scheme, no light mode. */

a { color: #4fc3f7; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Page heading ---------- */
.page-hd {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
}

/* ---------- Cards ---------- */
.card {
  background: #252830;
  border: 1px solid #303540;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color .15s;
}

.card-hd {
  padding: .85rem 1.5rem;
  border-bottom: 1px solid #303540;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.card-title {
  font-weight: 600;
  font-size: .95rem;
  margin: 0;
  flex: 1;
  color: #4fc3f7;
}

.card-body { padding: 1.25rem 1.5rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: .5rem 1.5rem;
  background: #1e2129;
  border-bottom: 1px solid #333;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a8190;
  font-weight: 600;
}

td {
  padding: .65rem 1.5rem;
  border-bottom: 1px solid #2a2d35;
  vertical-align: middle;
  font-size: .9rem;
  color: #c4ccd8;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(79, 195, 247, .06); }

/* ---------- Utilities ---------- */
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .8rem;
  color: #c8d0de;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: .15em .55em;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
}

.bg-blue   { background: #1d3a4a; color: #5ab4d8; }
.bg-purple { background: #3a1d4a; color: #b45ad8; }
.bg-teal   { background: #1d4a42; color: #5ad8c0; }
.bg-green  { background: #1d4a2e; color: #5ad880; }
.bg-gray   { background: #2a2d35; color: #8a9bb0; }
.bg-red    { background: #4a1820; color: #e07080; }

/* ---------- Buttons ---------- */
.actions { display: flex; gap: .4rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: .4rem .85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover { filter: brightness(1.12); text-decoration: none; }

.btn-primary { background: #2595c8; color: #fff; }
.btn-danger  { background: #8b2030; color: #fff; }
.btn-ghost   { background: transparent; color: #8a9bb0; border: 1px solid #3e4656; }
.btn-ghost:hover { background: #2e3545; color: #c8d4e4; filter: none; }
.btn-sm { padding: .25rem .6rem; font-size: .78rem; }

/* ---------- Flash messages ---------- */
.flash {
  padding: .7rem 1.5rem;
  font-size: .88rem;
  border-left: 4px solid;
}

.flash-success { background: #192e22; color: #7ecf98; border-color: #2a5c3a; }
.flash-error   { background: #2e1820; color: #e08090; border-color: #5c2a32; }
.flash-info    { background: #16232e; color: #7ecef7; border-color: #2a4a5c; }

/* ---------- Forms ---------- */
input[type=text],
input[type=password],
select {
  padding: .45rem .75rem;
  border: 1px solid #3e4656;
  border-radius: 6px;
  font-size: .9rem;
  width: 100%;
  outline: none;
  background: #1a1d23;
  color: #d4d8e0;
  transition: border-color .15s, box-shadow .15s;
}

input[type=text]:focus,
input[type=password]:focus,
select:focus {
  border-color: #4fc3f7;
  box-shadow: 0 0 0 3px rgba(79,195,247,.15);
}

.form-row   { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.fg1        { flex: 1; min-width: 120px; }

label { font-size: .82rem; font-weight: 500; color: #8a9bb0; }

.chk-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .4rem 0; }
.chk     { display: flex; align-items: center; gap: .35rem; font-size: .875rem; color: #c4ccd8; cursor: pointer; }
.chk input { width: auto; cursor: pointer; }

/* ---------- Login (login.html -- standalone, not part of the shared
   layout, see ui.go's renderLogin) ---------- */
body.login-page {
  background: #1a1d23;
  color: #d4d8e0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
}

.login-wrap { max-width: 380px; width: 100%; margin: 0 1rem; }

.login-card {
  background: #252830;
  border: 1px solid #303540;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  padding: 2.5rem;
}

.login-brand { font-size: 1.5rem; font-weight: 700; color: #4fc3f7; margin-bottom: .25rem; letter-spacing: 1px; }
.login-sub   { color: #8a9bb0; font-size: .9rem; margin-bottom: 2rem; }
.login-card .form-group { margin-bottom: 1rem; }

/* ---------- Details / JSON ---------- */
details summary  { cursor: pointer; color: #4fc3f7; font-size: .85rem; user-select: none; }

details pre {
  margin-top: .5rem;
  background: #0f1217;
  border: 1px solid #272d3a;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-size: .78rem;
  line-height: 1.6;
  max-height: 350px;
  color: #c8d0de;
}

/* ---------- Stats row ---------- */
.stat-row {
  display: flex;
  gap: 2.5rem;
  padding: 1rem 0 1.25rem;
  border-bottom: 1px solid #2a2d35;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.stat   { display: flex; flex-direction: column; gap: .1rem; }
.stat-v { font-size: 1.2rem; font-weight: 700; color: #4fc3f7; }
.stat-l { font-size: .75rem; color: #6e7e93; }

/* ---------- Breadcrumb ---------- */
.breadcrumb     { font-size: .85rem; color: #8a9bb0; margin-bottom: .75rem; }
.breadcrumb a   { color: #4fc3f7; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 3rem 1rem; color: #6e7e93; font-size: .9rem; }

/* ---------- Misc ---------- */
.w100  { width: 100%; }
.block { display: block; }

/* ---------- Permissions ---------- */
.perm-row {
  display: flex;
  gap: .5rem 1.5rem;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid #2a2d35;
  flex-wrap: wrap;
}

.perm-row:last-child { border-bottom: none; }

.perm-repo {
  font-family: ui-monospace, monospace;
  font-size: .85rem;
  flex: 0 0 140px;
  font-weight: 500;
}
