/* Denim Fitter ERP — dark green and white (owner brief, 17 Nov 2026) */
:root {
  --df-green-900: #0b3d2c;
  --df-green-800: #0f4d38;
  --df-green-700: #155e45;
  --df-green-600: #1d7556;
  --df-green-100: #e7f3ec;
  --df-green-50: #f3f9f5;
  --df-ink: #15211b;
  --df-muted: #5b6b62;
  --df-line: #d9e6de;
  --bs-primary: #155e45;
  --bs-primary-rgb: 21, 94, 69;
  --bs-link-color: #155e45;
  --bs-link-hover-color: #0b3d2c;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--df-ink);
  --bs-body-bg: #f7faf8;
}
body { min-height: 100vh; font-size: 15px; }
.btn-primary { --bs-btn-bg: var(--df-green-700); --bs-btn-border-color: var(--df-green-700); --bs-btn-hover-bg: var(--df-green-800); --bs-btn-hover-border-color: var(--df-green-800); --bs-btn-active-bg: var(--df-green-900); --bs-btn-disabled-bg: var(--df-green-600); }
.btn-outline-primary { --bs-btn-color: var(--df-green-700); --bs-btn-border-color: var(--df-green-700); --bs-btn-hover-bg: var(--df-green-700); --bs-btn-hover-border-color: var(--df-green-700); --bs-btn-active-bg: var(--df-green-800); }
.btn, .form-control, .form-select { min-height: 44px; }
.btn-sm { min-height: 36px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--df-green-600); box-shadow: 0 0 0 .2rem rgba(21, 94, 69, .2); }
.form-check-input:checked, .form-check-input:indeterminate { background-color: var(--df-green-700); border-color: var(--df-green-700); }
@media (pointer: coarse) { .form-control, .form-select { font-size: 16px; } }

/* Layout: fixed sidebar on desktop, off-canvas on phones */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 264px; flex: none; background: var(--df-green-900); color: #e6f0ea; }
.sidebar .brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem .9rem; color: #fff; text-decoration: none; }
.sidebar .brand img { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; }
.sidebar .brand b { font-family: "Libre Baskerville", Baskerville, Georgia, serif; font-weight: 400; letter-spacing: .08em; font-size: 15px; }
.sidebar .brand small { display: block; font-size: 11px; color: #a9c7b6; letter-spacing: .14em; text-transform: uppercase; }
.sidebar .sec { padding: .9rem 1.1rem .3rem; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8fb3a0; }
.sidebar .nav-link { color: #e6f0ea; display: flex; align-items: center; gap: .65rem; padding: .55rem 1.1rem; min-height: 44px; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav-link.active { background: rgba(255, 255, 255, .1); border-left-color: #8ee0b5; color: #fff; font-weight: 600; }
.sidebar .nav-link.soon { color: #9fbcad; }
.sidebar .nav-link .badge { margin-left: auto; font-weight: 500; background: rgba(255, 255, 255, .12); color: #cfe3d7; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--df-line); padding: .6rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.25rem; max-width: 1400px; width: 100%; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0; }
.breadcrumb { font-size: 13px; margin-bottom: .25rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--df-green-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
@media (max-width: 991.98px) { .sidebar-desktop { display: none; } .content { padding: 1rem; } }
.offcanvas.sidebar { width: 280px; }
.sidebar-desktop { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.barcode svg { max-width: 100%; height: auto; }

/* Content */
.card { border-color: var(--df-line); border-radius: 12px; }
.card-header { background: #fff; border-bottom-color: var(--df-line); font-weight: 600; }
.stat { padding: 1rem 1.1rem; }
.stat .label { font-size: 13px; color: var(--df-muted); }
.stat .value { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.table { --bs-table-striped-bg: var(--df-green-50); --bs-table-hover-bg: var(--df-green-100); font-variant-numeric: tabular-nums; }
.table thead th { background: var(--df-green-100); color: var(--df-green-900); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-bottom-color: var(--df-line); }
.text-muted, .form-text { color: var(--df-muted) !important; }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: 12.5px; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { background: #e3f4ea; color: #146c43; }
.status.off { background: #eef0ef; color: #59615c; }
.status.warn { background: #fff3cd; color: #7a5a00; }
.status.bad { background: #f8e1df; color: #9b2c22; }
.perm-grid th, .perm-grid td { text-align: center; }
.perm-grid td:first-child, .perm-grid th:first-child { text-align: left; }
.diff { font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; max-width: 420px; }

/* Sign-in */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--df-green-900), var(--df-green-700)); padding: 1rem; }
.auth-card { width: 100%; max-width: 410px; border: 0; border-radius: 16px; }
.auth-card .logo { width: 64px; height: 64px; border-radius: 50%; }
.brand-name { font-family: "Libre Baskerville", Baskerville, Georgia, serif; letter-spacing: .1em; color: var(--df-green-900); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .content { padding: 0; } }
