/* ============================================================
   Nettbook Gear – Application CSS
   Design: Premium backoffice, modern, clean, confident
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --c-bg:        #F4F5F7;
  --c-surface:   #FFFFFF;
  --c-border:    #E2E6EA;
  --c-border-2:  #CBD3DA;

  --c-text-1:    #1A1D23;
  --c-text-2:    #3D4451;
  --c-text-3:    #7B8494;
  --c-text-inv:  #FFFFFF;

  --c-accent:    #2563EB;
  --c-accent-h:  #1D4ED8;
  --c-accent-lt: #EFF6FF;
  --c-accent-2:  #0EA5E9;

  --c-success:   #16A34A;
  --c-success-lt:#F0FDF4;
  --c-warning:   #D97706;
  --c-warning-lt:#FFFBEB;
  --c-danger:    #DC2626;
  --c-danger-lt: #FEF2F2;
  --c-info:      #0284C7;
  --c-info-lt:   #F0F9FF;

  --c-sidebar-bg:     #0F172A;
  --c-sidebar-text:   #94A3B8;
  --c-sidebar-active: #FFFFFF;
  --c-sidebar-hover:  #1E293B;
  --c-sidebar-accent: #3B82F6;

  --sidebar-w: 240px;
  --topbar-h:  56px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);

  --transition: 150ms ease;
}

[data-theme="dark"] {
  --c-bg:        #0F172A;
  --c-surface:   #1E293B;
  --c-border:    #334155;
  --c-border-2:  #475569;
  --c-text-1:    #F1F5F9;
  --c-text-2:    #CBD5E1;
  --c-text-3:    #64748B;
  --c-accent-lt: #1E3A5F;
  --c-success-lt:#052E16;
  --c-warning-lt:#431407;
  --c-danger-lt: #450A0A;
  --c-info-lt:   #0C1A2B;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  background: var(--c-bg);
  color: var(--c-text-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-h); text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────── */
.ng-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--c-sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}
.ng-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.ng-topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 100;
}
.ng-topbar-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--c-text-2);
  flex: 1;
}
.ng-topbar-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ng-content {
  flex: 1;
  padding: 1.75rem 2rem;
}

/* ── Sidebar brand ──────────────────────────────────────── */
.ng-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: .5rem;
}
.ng-brand-icon {
  width: 36px; height: 36px;
  background: var(--c-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.ng-brand-text {
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  line-height: 1.2;
}
.ng-brand-text small {
  display: block;
  font-weight: 400;
  font-size: .7rem;
  color: var(--c-sidebar-text);
}
.ng-brand:hover { text-decoration: none; }

/* ── Sidebar nav ────────────────────────────────────────── */
.ng-nav-section {
  padding: 1rem 1.25rem .35rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #475569;
}
.ng-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1.25rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--c-sidebar-text);
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  position: relative;
}
.ng-nav-link i { font-size: .95rem; flex-shrink: 0; width: 1rem; }
.ng-nav-link:hover {
  background: var(--c-sidebar-hover);
  color: var(--c-sidebar-active);
  text-decoration: none;
}
.ng-nav-link.active {
  background: rgba(59,130,246,.15);
  color: #93C5FD;
}
.ng-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--c-sidebar-accent);
  border-radius: 0 2px 2px 0;
}
.ng-nav-divider { height: 1px; background: rgba(255,255,255,.06); margin: .5rem 1.25rem; }

/* ── Page header ────────────────────────────────────────── */
.ng-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.ng-page-header-left {}
.ng-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--c-text-1);
  margin: 0;
  line-height: 1.25;
}
.ng-page-subtitle {
  font-size: .82rem;
  color: var(--c-text-3);
  margin: .25rem 0 0;
}
.ng-page-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

/* ── Cards ──────────────────────────────────────────────── */
.ng-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.ng-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.ng-card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-text-1);
  margin: 0;
}
.ng-card-body { padding: 1.25rem; }
.ng-card-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── KPI cards ──────────────────────────────────────────── */
.ng-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ng-kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.ng-kpi:hover { box-shadow: var(--shadow); }
.ng-kpi-icon {
  font-size: 1.5rem;
  margin-bottom: .4rem;
}
.ng-kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-text-1);
  line-height: 1;
}
.ng-kpi-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ng-kpi-sub {
  font-size: .75rem;
  color: var(--c-text-3);
  margin-top: .1rem;
}
.ng-kpi.kpi-success { border-top: 3px solid var(--c-success); }
.ng-kpi.kpi-warning { border-top: 3px solid var(--c-warning); }
.ng-kpi.kpi-danger  { border-top: 3px solid var(--c-danger);  }
.ng-kpi.kpi-info    { border-top: 3px solid var(--c-info);    }
.ng-kpi.kpi-accent  { border-top: 3px solid var(--c-accent);  }

/* ── Tables ─────────────────────────────────────────────── */
.ng-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  background: var(--c-surface);
}
.ng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}
.ng-table thead th {
  background: var(--c-bg);
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-3);
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.ng-table tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
  vertical-align: middle;
}
.ng-table tbody tr:last-child td { border-bottom: none; }
.ng-table tbody tr:hover td { background: var(--c-accent-lt); }
.ng-table .td-link { font-weight: 600; color: var(--c-text-1); }
.ng-table .td-link a { color: inherit; }
.ng-table .td-link a:hover { color: var(--c-accent); text-decoration: none; }
.ng-table .td-actions { white-space: nowrap; text-align: right; }
.ng-table .td-actions a,
.ng-table .td-actions button { font-size: .8rem; }

/* ── Status badges ──────────────────────────────────────── */
.ng-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-ledig       { background: #DCFCE7; color: #15803D; }
.badge-reservert   { background: #DBEAFE; color: #1D4ED8; }
.badge-disponert   { background: #F3E8FF; color: #7C3AED; }
.badge-vedlikehold { background: #FEF9C3; color: #854D0E; }
.badge-defekt      { background: #FEE2E2; color: #B91C1C; }
.badge-avsluttet   { background: #F1F5F9; color: #64748B; }
.badge-active      { background: #DCFCE7; color: #15803D; }
.badge-inactive    { background: #F1F5F9; color: #64748B; }
.badge-warning     { background: var(--c-warning-lt); color: var(--c-warning); }
.badge-danger      { background: var(--c-danger-lt); color: var(--c-danger); }
.badge-info        { background: var(--c-info-lt); color: var(--c-info); }
.badge-success     { background: var(--c-success-lt); color: var(--c-success); }
.badge-muted       { background: #F1F5F9; color: #64748B; }
.badge-secondary   { background: #F1F5F9; color: #64748B; }

/* Status dot (small inline indicator) */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-ledig       { background: var(--c-success); }
.dot-reservert   { background: var(--c-accent); }
.dot-disponert   { background: #7C3AED; }
.dot-vedlikehold { background: var(--c-warning); }
.dot-defekt      { background: var(--c-danger); }
.dot-avsluttet   { background: #94A3B8; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-ng {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-ng:hover { text-decoration: none; }

.btn-primary   { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-primary:hover { background: var(--c-accent-h); border-color: var(--c-accent-h); color: #fff; }

.btn-outline   { background: transparent; color: var(--c-text-2); border-color: var(--c-border-2); }
.btn-outline:hover { background: var(--c-bg); color: var(--c-text-1); }

.btn-ghost     { background: transparent; color: var(--c-text-3); border-color: transparent; }
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text-1); }

.btn-danger    { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-success   { background: var(--c-success); color: #fff; border-color: var(--c-success); }
.btn-success:hover { background: #15803D; color: #fff; }

.btn-warning   { background: var(--c-warning); color: #fff; border-color: var(--c-warning); }
.btn-warning:hover { background: #B45309; color: #fff; }

.btn-sm { padding: .3rem .65rem; font-size: .76rem; }
.btn-lg { padding: .65rem 1.25rem; font-size: .9rem; }
.btn-icon { padding: .4rem .5rem; }

/* ── Forms ──────────────────────────────────────────────── */
.ng-form-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.ng-form-section-title {
  padding: .875rem 1.25rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-3);
}
.ng-form-body { padding: 1.25rem; }
.ng-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.ng-form-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.ng-form-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.ng-field { display: flex; flex-direction: column; gap: .35rem; }
.ng-field.full { grid-column: 1 / -1; }
.ng-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--c-text-2);
}
.ng-label .req { color: var(--c-danger); margin-left: 2px; }
.ng-input, .ng-select, .ng-textarea {
  padding: .5rem .75rem;
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  font-size: .85rem;
  color: var(--c-text-1);
  background: var(--c-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.ng-input:focus, .ng-select:focus, .ng-textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.ng-textarea { resize: vertical; min-height: 80px; }
.ng-hint { font-size: .73rem; color: var(--c-text-3); }
.ng-error-msg { font-size: .73rem; color: var(--c-danger); }
.ng-input.is-invalid, .ng-select.is-invalid { border-color: var(--c-danger); }

/* ── Flash messages ─────────────────────────────────────── */
.ng-flash {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .84rem;
  font-weight: 500;
}
.ng-flash.success { background: var(--c-success-lt); color: var(--c-success); border: 1px solid #BBF7D0; }
.ng-flash.error   { background: var(--c-danger-lt);  color: var(--c-danger);  border: 1px solid #FECACA; }
.ng-flash.warning { background: var(--c-warning-lt); color: var(--c-warning); border: 1px solid #FDE68A; }
.ng-flash.info    { background: var(--c-info-lt);    color: var(--c-info);    border: 1px solid #BAE6FD; }
.ng-flash i { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.ng-flash-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  font-size: 1rem;
  padding: 0;
  flex-shrink: 0;
}
.ng-flash-close:hover { opacity: 1; }

/* ── Detail page header ─────────────────────────────────── */
.ng-detail-header {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.ng-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-text-1);
  margin: 0 0 .35rem;
}
.ng-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  align-items: center;
  font-size: .8rem;
  color: var(--c-text-3);
}
.ng-detail-meta i { font-size: .85rem; }
.ng-detail-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ── Empty state ────────────────────────────────────────── */
.ng-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--c-text-3);
}
.ng-empty-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
  opacity: .4;
}
.ng-empty h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: .35rem;
}
.ng-empty p { font-size: .83rem; margin: 0 0 1.25rem; }

/* ── Filter bar ─────────────────────────────────────────── */
.ng-filters {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.ng-filters .ng-field { min-width: 160px; flex: 1; max-width: 240px; }
.ng-filters .ng-field.search { min-width: 220px; max-width: 340px; }

/* ── Info grid (detail key-value pairs) ─────────────────── */
.ng-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .75rem 1.5rem;
}
.ng-info-item {}
.ng-info-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-3);
  margin-bottom: .2rem;
}
.ng-info-value {
  font-size: .88rem;
  font-weight: 500;
  color: var(--c-text-1);
}

/* ── Timeline / event log ───────────────────────────────── */
.ng-timeline { list-style: none; padding: 0; margin: 0; }
.ng-timeline-item {
  display: flex;
  gap: .875rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--c-border);
  font-size: .83rem;
}
.ng-timeline-item:last-child { border-bottom: none; }
.ng-timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-accent-lt);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--c-accent);
  flex-shrink: 0;
  margin-top: .05rem;
}
.ng-timeline-content { flex: 1; }
.ng-timeline-desc { color: var(--c-text-1); font-weight: 500; }
.ng-timeline-meta { color: var(--c-text-3); font-size: .75rem; margin-top: .15rem; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.ng-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--c-text-3);
  margin-bottom: 1rem;
}
.ng-breadcrumb a { color: var(--c-text-3); }
.ng-breadcrumb a:hover { color: var(--c-accent); text-decoration: none; }
.ng-breadcrumb .sep { color: var(--c-border-2); }
.ng-breadcrumb .current { color: var(--c-text-2); font-weight: 600; }

/* ── Login ──────────────────────────────────────────────── */
.ng-login-wrap {
  display: flex;
  min-height: 100vh;
}
.ng-login-bg {
  flex: 1;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
  display: flex;
  align-items: flex-end;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.ng-login-bg::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 140%;
  background: radial-gradient(circle, rgba(59,130,246,.15) 0%, transparent 70%);
  pointer-events: none;
}
.ng-login-bg-text { position: relative; z-index: 1; }
.ng-login-bg-tag {
  display: inline-block;
  background: rgba(59,130,246,.25);
  color: #93C5FD;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.ng-login-bg-text h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .75rem;
  line-height: 1.25;
}
.ng-login-bg-text p { color: #94A3B8; font-size: .9rem; margin: 0; }
.ng-login-panel {
  width: 440px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  flex-shrink: 0;
}
.ng-login-form-wrap { width: 100%; max-width: 360px; }
.ng-login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.ng-login-logo .logo-icon {
  width: 52px; height: 52px;
  background: var(--c-accent);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: .75rem;
}
.ng-login-logo h1 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 .2rem;
  color: var(--c-text-1);
}
.ng-login-logo p { font-size: .83rem; color: var(--c-text-3); margin: 0; }

/* ── Sidebar toggle (mobile) ────────────────────────────── */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--c-text-2);
  border-radius: 6px;
}
.sidebar-toggle:hover { background: var(--c-bg); }
.ng-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}

/* ── Misc utilities ─────────────────────────────────────── */
.text-muted { color: var(--c-text-3) !important; }
.text-danger { color: var(--c-danger) !important; }
.text-success { color: var(--c-success) !important; }
.text-warning { color: var(--c-warning) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

/* ── Bootstrap spacing shims (me, ms, mb, mt, pe, ps) ───── */
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.me-3 { margin-right: .75rem; }
.ms-1 { margin-left: .25rem; }
.ms-2 { margin-left: .5rem; }
.ms-auto { margin-left: auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-1 { margin-bottom: .25rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.d-sm-inline { display: inline; }
.hide-mobile { display: none; }
@media (min-width: 576px) { .hide-mobile { display: inline; } }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .ng-sidebar {
    transform: translateX(-100%);
  }
  .ng-sidebar.open {
    transform: translateX(0);
  }
  .ng-sidebar-overlay.open {
    display: block;
  }
  .ng-main {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: flex;
    align-items: center;
  }
  .ng-login-bg { display: none; }
  .ng-login-panel { width: 100%; }
  .ng-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ng-form-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .ng-form-grid.cols-2 { grid-template-columns: 1fr; }
  .ng-content { padding: 1.25rem 1rem; }
}
@media (max-width: 540px) {
  .ng-kpi-grid { grid-template-columns: 1fr 1fr; }
  .ng-form-grid { grid-template-columns: 1fr; }
}
