/*
 * KOrder styles · public/css/01-base.css
 * Shared base: design tokens (:root), page shell, top nav, buttons, launcher dashboard.
 *
 * public/css/*.css used to be one public/styles.css. The files are cut from it in order
 * and index.html loads them in that same order, which is the CSS cascade order: do not
 * reorder the <link> tags, and add a rule to the file that owns its screen.
 * Map: public/css/README.md
 */
:root {
  color-scheme: light;
  --bg: #eef0ed;
  --ink: #171a1f;
  --muted: #69706f;
  --line: #d9ded8;
  --surface: #fbfaf6;
  --surface-strong: #ffffff;
  --teal: #0f766e;
  --teal-dark: #105f59;
  --coral: #d6533f;
  --amber: #c27a18;
  --green: #2f7d48;
  --graphite: #20242a;
  --graphite-2: #2c3138;
  --shadow: 0 18px 44px rgba(32, 36, 42, 0.11);
  --soft-shadow: 0 8px 22px rgba(32, 36, 42, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: weight;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 280px),
    radial-gradient(circle at 20% 0%, rgba(15, 118, 110, 0.08), transparent 300px),
    radial-gradient(circle at 90% 10%, rgba(214, 83, 63, 0.07), transparent 320px),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid rgba(217, 222, 216, 0.86);
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 136px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #17433f);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.24);
  font-weight: 900;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.brand-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.screen-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ops-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.ops-language-toggle button {
  min-width: 48px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.ops-language-toggle button.active {
  color: #fff;
  background: var(--teal);
}

.nav-link,
.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.nav-link {
  padding: 0 14px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 850;
}

.nav-link.active,
.button.primary {
  border-color: var(--teal);
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.button.primary:hover,
.nav-link.active:hover {
  background: var(--teal-dark);
}

.nav-link:hover,
.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: #bfb7aa;
  box-shadow: var(--soft-shadow);
}

.main {
  padding: clamp(16px, 3vw, 34px);
}

.admin-main {
  padding-top: 18px;
}

.dashboard {
  display: grid;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 104px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 244, 0.96));
  box-shadow: var(--soft-shadow);
}

.metric dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric dd {
  margin: 10px 0 0;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.launch {
  min-height: 164px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  background:
    linear-gradient(160deg, #ffffff, #faf7ef);
  text-decoration: none;
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.launch:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: var(--shadow);
}

.launch strong {
  display: block;
  font-size: 21px;
}

.launch span {
  display: block;
  margin-top: 42px;
  color: var(--muted);
  line-height: 1.45;
}

