/* ============================================================================
   MargaLume Pass — Shared Design System (Brand Pack v3 · WCAG 2.1 AA)
   Pathlume Informatics
   - Palette strictly within Brand Pack v3 (<= 24 hex values)
   - Bright Red (#EB1926) is NEVER used for body text or button labels
   - Red / amber / green text always sits on white, never on #E9EBEE
   - Type scale: 6 sizes · Radius scale: 3 values (4px, 8px, 12px) · Zero emojis
   ============================================================================ */

@font-face {
  font-family: 'Noto Sans Malayalam';
  src: url('../assets/fonts/NotoSansMalayalam.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ml-red: #DB1826;
  --ml-red-deep: #990911;
  --ml-charcoal: #252C31;
  --ml-grey: #5F666C;
  --ml-surface: #E9EBEE;
  --ml-bg: #F8F9FA;
  --ml-white: #FFFFFF;
  --ml-border: #D5D9DF;
  --ml-amber: #B45309;
  --ml-green: #15803D;
  --font-head: 'Poppins', 'Noto Sans Malayalam', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans Malayalam', system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--ml-bg);
  color: var(--ml-charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.topbar {
  background: var(--ml-charcoal);
  color: var(--ml-white);
  border-bottom: 3px solid var(--ml-red);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-logo {
  height: 30px;
  width: auto;
  display: block;
}

.topbar-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--ml-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.shell-mobile {
  max-width: 520px;
}

.panel {
  background: var(--ml-white);
  border: 1px solid var(--ml-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.panel-accent {
  border-top: 3px solid var(--ml-red);
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ml-charcoal);
  margin: 0 0 8px;
  line-height: 1.3;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

p { margin: 0 0 12px; color: var(--ml-grey); font-size: 14px; }

.tag {
  display: inline-block;
  background: var(--ml-surface);
  color: var(--ml-charcoal);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.status-ok { color: var(--ml-green); font-weight: 600; font-size: 14px; }
.status-warn { color: var(--ml-amber); font-weight: 600; font-size: 14px; }
.status-err { color: var(--ml-red-deep); font-weight: 600; font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ml-red);
  color: var(--ml-white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ml-red-deep);
}

.btn-quiet {
  background: var(--ml-white);
  color: var(--ml-charcoal);
  border-color: var(--ml-border);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

.confirm-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.confirm-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--ml-charcoal);
}

.idle-warning {
  background: var(--ml-white);
  border: 2px solid var(--ml-amber);
  color: var(--ml-charcoal);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.disclaimer {
  font-size: 12px;
  color: var(--ml-grey);
  border-top: 1px solid var(--ml-border);
  padding-top: 12px;
  margin-top: 20px;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.meta-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--ml-surface);
  font-size: 14px;
  color: var(--ml-charcoal);
}

.meta-list li:last-child {
  border-bottom: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}

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

.field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ml-charcoal);
}

.field-row input,
.field-row select,
.field-row textarea {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid var(--ml-border);
  border-radius: 4px;
  background: var(--ml-white);
  color: var(--ml-charcoal);
}

.tab-row,
.stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.field-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
}

.mfa-qr {
  width: 180px;
  height: 180px;
  display: block;
  margin: 12px 0;
}

.demo-banner {
  background: var(--ml-surface);
  color: var(--ml-charcoal);
  border-bottom: 2px solid var(--ml-amber);
  padding: 8px 16px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
