/* BMW150 — Business Management Workstation Console
   Deliberately distinct from lo.orange.pl (no tables, no orange portal chrome). */

:root {
  --ink: #142033;
  --muted: #5a6b7d;
  --line: #c5d0db;
  --paper: #eef2f6;
  --rail: #0f2c3a;
  --rail-2: #164556;
  --accent: #1a9b8e;
  --accent-hot: #0e7c72;
  --warn: #b42318;
  --card: rgba(255, 255, 255, 0.92);
  --mono: "Lucida Console", "Consolas", "Courier New", monospace;
  --sans: "Trebuchet MS", "Gill Sans", "Century Gothic", Candara, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(145deg, #d9e4ec 0%, var(--paper) 42%, #dfe8ef 100%);
  background-attachment: fixed;
}

/* blueprint grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 44, 58, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 44, 58, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

.console-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(16rem, 34vw) 1fr;
  min-height: 100vh;
}

/* —— brand rail —— */
.brand-rail {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 155, 142, 0.35), transparent 55%),
    linear-gradient(165deg, var(--rail) 0%, var(--rail-2) 55%, #0b222c 100%);
  color: #e8f4f2;
  padding: 2.5rem 2rem;
  display: flex;
  align-items: stretch;
}

.brand-rail-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 22rem;
  margin: auto 0;
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 244, 242, 0.65);
}

.brand-mark {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.brand-mark span {
  color: var(--accent);
}

.brand-expand {
  margin: 0;
  display: grid;
  gap: 0.15rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c5e8e3;
}

.brand-expand span::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.55rem;
  border: 1.5px solid var(--accent);
  vertical-align: 0.1em;
}

.brand-meta {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.brand-meta > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.brand-meta dt {
  margin: 0;
  color: rgba(232, 244, 242, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-meta dd {
  margin: 0;
  color: #d7f0ec;
}

.brand-meta .live {
  color: #7de0d4;
}

/* —— workspace —— */
.workspace {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.25rem 1.5rem 0;
}

.workspace-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  animation: rise 0.55s 0.1s ease-out both;
}

.console-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.console-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.console-nav a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.console-nav a.is-active {
  color: var(--accent-hot);
  border-color: var(--accent);
  background: #fff;
}

.workspace-clock {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.workspace-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 2.5rem;
  animation: rise 0.65s 0.18s ease-out both;
}

.panel {
  width: min(28rem, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(20, 32, 51, 0.08);
  padding: 1.75rem 1.6rem 1.5rem;
}

.panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.panel-lead {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: #f7fafc;
  font: inherit;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(26, 155, 142, 0.35);
  border-color: var(--accent);
  background: #fff;
}

.field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--accent-hot);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-hot);
  border: 1px solid var(--accent);
}

.btn-ghost:hover {
  background: rgba(26, 155, 142, 0.08);
}

.alert {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  border-left: 3px solid var(--warn);
  background: #fef3f2;
  color: #7a271a;
}

.alert.ok {
  border-left-color: var(--accent);
  background: #eefaf7;
  color: #0f5132;
}

.hint {
  margin: 1.1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.hint a {
  color: var(--accent-hot);
}

.agent-box {
  border: 1px dashed var(--line);
  background: #f4f8fa;
  padding: 1rem;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink);
}

.console-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: lowercase;
}

.console-status .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(26, 155, 142, 0.5);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 155, 142, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(26, 155, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 155, 142, 0); }
}

.console-status .sep {
  opacity: 0.45;
}

@media (max-width: 820px) {
  .console-shell {
    grid-template-columns: 1fr;
  }

  .brand-rail {
    padding: 1.5rem 1.25rem 1.25rem;
    min-height: auto;
  }

  .brand-mark {
    font-size: 2.6rem;
  }

  .brand-expand {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 1rem 1rem 0;
  }
}
