:root {
  --nav-height: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #10151b;
  --panel: rgba(20, 27, 34, 0.97);
  --panel-soft: #1b242d;
  --text: #f4f7f8;
  --muted: #9caab4;
  --line: rgba(255,255,255,.12);
  --accent: #8fd3ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.view {
  position: absolute;
  inset:
    0
    0
    calc(var(--nav-height) + var(--safe-bottom))
    0;
  display: none;
  overflow: hidden;
  background: var(--bg);
}

.view.active {
  display: block;
}

.map-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d1820;
}

.placeholder {
  overflow: auto;
}

.placeholder-content {
  min-height: 100%;
  padding: 28px 22px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.placeholder-content h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 46px);
  font-weight: 650;
}

.subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 17px;
}

.placeholder-content p {
  max-width: 520px;
  line-height: 1.5;
  color: var(--muted);
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);

  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));

  background: rgba(12, 17, 22, .96);
  border-top: 1px solid var(--line);

  z-index: 1000;
}

.nav-button {
  border: 0;
  margin: 0;
  padding: 5px 2px 3px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-width: 0;

  background: transparent;
  color: var(--muted);

  font-size: 10px;
  line-height: 1.05;
}

.nav-button.active {
  color: var(--accent);
}

.nav-icon {
  display: block;
  min-height: 21px;
  margin-bottom: 2px;

  font-size: 20px;
  line-height: 20px;
}

.scrim {
  position: absolute;
  inset: 0 0 calc(var(--nav-height) + var(--safe-bottom)) 0;

  display: none;
  background: rgba(0,0,0,.38);
  z-index: 1100;
}

.scrim.open {
  display: block;
}

.sheet {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);

  display: none;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;

  box-shadow: 0 16px 50px rgba(0,0,0,.42);
  z-index: 1200;
}

.sheet.open {
  display: block;
}

.detail-sheet {
  max-height: min(70vh, 620px);
  overflow-y: auto;
}

.sheet-row {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  gap: 12px;

  border: 0;
  border-bottom: 1px solid var(--line);

  background: transparent;
  color: var(--text);

  text-align: left;
}

.sheet-row:last-child {
  border-bottom: 0;
}

.sheet-icon {
  width: 28px;
  font-size: 20px;
  color: var(--accent);
}

.sheet-title-row {
  position: sticky;
  top: 0;

  min-height: 54px;
  padding: 0 10px 0 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.close-sheet {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
}

.settings-section {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.settings-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.settings-card {
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-soft);
}

.settings-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.settings-card span {
  color: var(--muted);
}

.toggle-row {
  margin-top: 10px;
  padding-top: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border-top: 1px solid var(--line);
}

.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.language-grid button {
  min-height: 42px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: var(--panel-soft);
  color: var(--text);
}

.language-grid button.active {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 390px) {
  :root {
    --nav-height: 54px;
  }

  .nav-button {
    font-size: 9px;
  }

  .nav-icon {
    font-size: 18px;
  }
}


/* ================================================================
   ARGOS CLIENT WORKSPACES v0.4
   ================================================================ */

.cockpit-view,
.weather-view,
.navigation-view {
  overflow: auto;
  background: #10151b;
}

.instrument-grid {
  min-height: 100%;
  padding: 8px;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  grid-auto-rows:
    minmax(150px, auto);

  gap: 8px;
}

.instrument-card {
  min-width: 0;
  min-height: 150px;

  overflow: hidden;

  border:
    1px solid
    rgba(255,255,255,.10);

  border-radius: 12px;

  background: #161e25;
}

.instrument-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
}

.instrument-main {
  grid-column: 1 / -1;
  min-height: 300px;
}

.metric-card {
  padding: 16px;

  display: grid;
  grid-template-columns:
    1fr auto;
  grid-template-rows:
    auto 1fr;

  align-items: center;
}

.metric-card span {
  grid-column: 1 / -1;

  color: #9caab4;
  font-size: 13px;
}

.metric-card strong {
  align-self: end;

  font-size:
    clamp(38px, 13vw, 72px);

  line-height: 1;
}

.metric-card small {
  align-self: end;

  padding-bottom: 5px;

  color: #9caab4;
  font-size: 15px;
}

.workspace-frame {
  display: block;

  width: 100%;
  height: 100%;

  border: 0;

  background: #10151b;
}

.navigation-summary {
  padding: 8px;

  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 8px;
}

.nav-metric {
  min-height: 94px;
  padding: 12px;

  display: flex;
  flex-direction: column;

  border:
    1px solid
    rgba(255,255,255,.10);

  border-radius: 12px;

  background: #161e25;
}

.nav-metric span {
  color: #9caab4;
  font-size: 12px;
}

.nav-metric strong {
  margin-top: auto;

  font-size:
    clamp(22px, 7vw, 38px);
}

.navigation-empty {
  margin: 8px;
  padding: 24px;

  border:
    1px dashed
    rgba(255,255,255,.18);

  border-radius: 12px;

  color: #9caab4;

  text-align: center;
}


@media (min-width: 700px) {

  .instrument-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .instrument-main {
    grid-column:
      span 2;

    grid-row:
      span 2;
  }

}
