/* ==========================================================================
   Voyager ERP — Design System (Desktop Application Style)
   Dense, functional, low-chrome — modeled on traditional Windows business
   applications rather than a marketing-site SaaS aesthetic.
   ========================================================================== */

:root {
  --color-primary: #3262AB;
  --color-primary-dark: #244a80;
  --color-secondary: #7532A8;
  --color-bg-canvas: #F5F7FB;
  --color-bg-tint: #EAF0FB;
  --color-white: #FFFFFF;
  --color-border: #D6DCE5;
  --color-text-muted: #64748B;
  --color-text-dark: #1E293B;

  --color-success: #1E8E6D;
  --color-success-bg: #E4F5EF;
  --color-warning: #B5750E;
  --color-warning-bg: #FBF0DD;
  --color-danger: #B23A48;
  --color-danger-bg: #FBE9EB;

  --gradient-brand: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);

  --font-display: 'Segoe UI Semibold', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-body: 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --shadow-sm: 0 1px 2px rgba(30, 41, 59, 0.08);
  --shadow-md: 0 2px 6px rgba(30, 41, 59, 0.10);
  --shadow-lg: 0 4px 14px rgba(30, 41, 59, 0.16);

  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 4px;

  --topnav-height: 46px;
  --menubar-height: 27px;
  --sidebar-width: 216px;
  --sidebar-width-collapsed: 60px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg-canvas);
  color: var(--color-text-dark);
  font-size: 12.8px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-dark);
  margin: 0 0 0.35em;
  font-weight: 600;
}

.text-muted-custom { color: var(--color-text-muted) !important; }
.figure, .tabular-nums { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 1.5px solid var(--color-primary);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --------------------------------------------------------------------------
   Buttons — flat, bordered, Windows-toolbar style (no gradients/lift)
   -------------------------------------------------------------------------- */
.btn-brand {
  background: var(--color-primary);
  border: 1px solid var(--color-primary-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
}
.btn-brand:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-brand:active { background: #1d3a63; }

.btn-outline-brand {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-sm);
}
.btn-outline-brand:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-bg-tint); text-decoration: none; }

/* --------------------------------------------------------------------------
   Panels — flat, thin border, minimal shadow (no glass/blur)
   -------------------------------------------------------------------------- */
.card-glass {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.card-flat {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.card-pad { padding: 0.9rem 1.1rem; }

/* --------------------------------------------------------------------------
   Status pills
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase;
  padding: 0.16rem 0.5rem; border-radius: 2px;
}
.pill-success { background: var(--color-success-bg); color: var(--color-success); }
.pill-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.pill-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.pill-neutral { background: var(--color-bg-tint); color: var(--color-primary); }

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */
.field-label {
  font-size: 0.74rem; font-weight: 600; color: var(--color-text-muted);
  margin-bottom: 0.22rem; display: block;
}
.form-control-custom {
  width: 100%; padding: 0.36rem 0.55rem; border-radius: var(--radius-sm);
  border: 1px solid #B9C2CF; background: var(--color-white);
  font-family: var(--font-body); font-size: 0.82rem;
}
.form-control-custom:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(50, 98, 171, 0.15);
}
