/* App-specific styles ONLY. The Odarius frame + tokens come from the linked
   PortalOS base (--bg, --text, --accent, cards, buttons, forms, .shell, etc.).
   Keep this file small; do not redeclare base tokens. */

/* ---- login / boot panels (Slice 2) ------------------------------------ */
.app-login {
  max-width: 420px;
  margin: 12vh auto;
  padding: 28px;
  text-align: center;
}
.app-login h1 { margin: 0 0 8px; }
.app-login p  { color: var(--muted, #9aa3ad); margin: 0 0 20px; }
.app-login .btn { display: block; width: 100%; margin: 10px 0 0; }

/* ---- app shell (Slice 4) ---------------------------------------------- */
.ros { max-width: 1100px; margin: 0 auto; padding: 16px; }
.ros-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border, #2a2f37);
}
.ros-brand { display: flex; flex-direction: column; line-height: 1.1; }
.ros-brand strong { font-size: 1.15rem; }
.ros-brand span { color: var(--muted, #9aa3ad); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ros-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.ros-tab {
  background: transparent; border: 1px solid transparent; color: var(--muted, #9aa3ad);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600;
}
.ros-tab:hover { color: var(--text, #e8eaed); }
.ros-tab.on { background: var(--accent, #007bff); color: #fff; }
.ros-user { display: flex; align-items: center; gap: 8px; }
.ros-user .who { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--muted, #9aa3ad); }

.ros-body { min-height: 60vh; }
.card.pad { padding: 20px; }
.ros-body h2 { margin: 0 0 6px; font-size: 1.1rem; }
.muted { color: var(--muted, #9aa3ad); }
.sm { font-size: 0.82rem; }
.ctr { text-align: center; }
.narrow { width: 5.5em; }
code { font-family: 'IBM Plex Mono', monospace; font-size: 0.85em; }

.ros-note { padding: 12px 0; color: var(--muted, #9aa3ad); }
.ros-note.err, .err { color: var(--danger, #e5484d); }

/* ---- sync -------------------------------------------------------------- */
.ros-sync { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.ros-stats { display: flex; gap: 22px; margin-top: 14px; color: var(--muted, #9aa3ad); font-size: 0.9rem; }
.ros-stats b { color: var(--text, #e8eaed); }

/* ---- rows / chips / search -------------------------------------------- */
.ros-rowflex { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ros-chips { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.ros-chip {
  background: transparent; border: 1px solid var(--border, #2a2f37); color: var(--muted, #9aa3ad);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.82rem;
}
.ros-chip.on { background: var(--accent, #007bff); border-color: var(--accent, #007bff); color: #fff; }
.ros-find { margin-left: auto; min-width: 180px; }

/* ---- tables ------------------------------------------------------------ */
.ros-tablewrap { overflow-x: auto; }
.ros-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ros-table th, .ros-table td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--border, #2a2f37); vertical-align: middle; }
.ros-table th { color: var(--muted, #9aa3ad); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ros-table input, .ros-table select { width: 100%; max-width: 11em; }
.ros-table input.narrow { width: 5.5em; }
.ros-table tr.saved { animation: rosSaved 0.6s ease; }
@keyframes rosSaved { from { background: color-mix(in srgb, var(--accent, #007bff) 22%, transparent); } to { background: transparent; } }

.ros-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent, #007bff) 16%, transparent); color: var(--accent, #4ea1ff); }
.ros-badge.ok   { background: color-mix(in srgb, #1f9d55 22%, transparent); color: #54d28a; }
.ros-badge.warn { background: color-mix(in srgb, #d99a00 22%, transparent); color: #f0c040; }
.ros-badge.bad  { background: color-mix(in srgb, #e5484d 20%, transparent); color: #f2767a; }

/* ---- recipes split / builder ------------------------------------------ */
.ros-split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .ros-split { grid-template-columns: 1fr; } }
.ros-recipes { list-style: none; margin: 10px 0 0; padding: 0; max-height: 66vh; overflow-y: auto; }
.ros-reci { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ros-reci:hover { background: color-mix(in srgb, var(--text, #fff) 6%, transparent); }
.ros-reci.on { background: color-mix(in srgb, var(--accent, #007bff) 18%, transparent); }
.ros-reci .nm { font-weight: 600; }
.ros-reci .meta { color: var(--muted, #9aa3ad); font-size: 0.8rem; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.ros-reci .stale { color: #f0c040; }

.ros-name { font-size: 1.1rem; font-weight: 650; min-width: 220px; flex: 1; }
.ros-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 12px 0; color: var(--muted, #9aa3ad); }
.ros-meta label { display: flex; align-items: center; gap: 6px; }
.ros-table.builder select, .ros-table.builder input { max-width: none; }
.lnk { background: none; border: none; color: var(--muted, #9aa3ad); cursor: pointer; font: inherit; padding: 2px 6px; }
.lnk:hover { color: var(--text, #e8eaed); }
.lnk.danger:hover { color: var(--danger, #e5484d); }
.cost { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; white-space: nowrap; }

.ros-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
#builder-cost { color: var(--muted, #9aa3ad); }
.big { font-size: 1.25rem; font-weight: 700; color: var(--text, #e8eaed); }

/* ---- flash card -------------------------------------------------------- */
.ros-flash { max-width: 460px; margin-top: 16px; border: 1px solid var(--border, #2a2f37); border-radius: 14px; padding: 20px; }
.ros-flash header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border, #2a2f37); padding-bottom: 10px; }
.ros-flash header h3 { margin: 0; font-size: 1.25rem; }
.ros-flash .cat { color: var(--muted, #9aa3ad); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ros-flashlines { list-style: none; margin: 14px 0; padding: 0; }
.ros-flashlines li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border, #2a2f37); }
.ros-flashlines .q { font-family: 'IBM Plex Mono', monospace; min-width: 6.5em; color: var(--accent, #4ea1ff); }
.ros-flash footer { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border, #2a2f37); color: var(--muted, #9aa3ad); }
.ros-flash footer b { color: var(--text, #e8eaed); }
