:root {
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #2563eb;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 260px;
  --topbar-h: 65px;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-border: #bfdbfe;
  --success: #10b981;
  --success-dark: #047857;
  --success-soft: #ecfdf5;
  --danger: #ef4444;
  --danger-dark: #b91c1c;
  --danger-soft: #fef2f2;
  --warning: #f59e0b;
  --warning-dark: #92400e;
  --warning-soft: #fffbeb;
  --info: #0ea5e9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --placeholder: #94a3b8;
  --font-sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.1);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
  color: var(--text);
  line-height: 1.5;
  font-size: 0.9375rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

small,
.text-muted {
  color: var(--muted) !important;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control,
.form-select,
textarea.form-control {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  min-height: 42px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:hover,
.form-select:hover,
textarea.form-control:hover {
  border-color: var(--border-strong);
}

.form-control::placeholder,
textarea.form-control::placeholder {
  color: var(--placeholder);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
  background: var(--surface);
}

.form-control:disabled,
.form-select:disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

.form-check-input {
  border: 1.5px solid var(--border-strong);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  box-shadow: var(--focus-ring);
}

.input-group-text {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-sm {
  border-radius: 9px;
}

.btn-lg {
  border-radius: 12px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary,
.btn-outline-danger,
.btn-outline-success,
.btn-outline-secondary {
  border-width: 1.5px;
}

.btn-outline-primary {
  color: var(--primary-dark);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.alert {
  border-radius: 12px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.alert-success {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: var(--success-dark);
}

.alert-danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger-dark);
}

.alert-warning {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: var(--warning-dark);
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.modal-content {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.2);
}

.modal-header,
.modal-footer {
  border-color: #f1f5f9;
}

.modal-title {
  font-weight: 700;
  color: var(--text);
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.brand-sub {
  color: var(--sidebar-text);
  font-size: 0.72rem;
}

.sidebar-menu {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-group-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  padding: 0.55rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-group-btn:hover {
  color: #fff;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}

.sidebar-link.sub {
  padding-left: 2.35rem;
  font-size: 0.84rem;
}

.sidebar-link.sub.report-child {
  padding-left: 3.15rem;
  font-size: 0.8rem;
}

.sidebar-link.sub.report-child i {
  display: none;
}

.sidebar-link.sidebar-link-parent {
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-link.sidebar-link-parent .bi-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.sidebar-link.sidebar-link-parent[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.sidebar-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-radius: 0 30px 30px 0;
  margin-right: 12px;
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  background: var(--sidebar-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.8rem;
}

.sidebar-user-name {
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar-user-role {
  color: var(--muted);
  font-size: 0.7rem;
}

.topbar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.topbar-user-role {
  font-size: 0.7rem;
  color: var(--muted);
}

.menu-toggle-icon {
  font-size: 1.3rem;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.15s;
}

.sidebar-logout-btn:hover {
  background: rgba(185, 28, 28, 0.35);
  color: #fff;
  border-color: rgba(252, 165, 165, 0.55);
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 900;
  gap: 1rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.topbar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
}

.topbar-brand-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.1;
}

.topbar-brand-sub {
  font-size: 0.68rem;
  color: var(--muted);
}

.topbar-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-search {
  min-width: 220px;
  max-width: 360px;
}

.topbar-search .form-control {
  border-radius: 999px;
  padding-left: 2.2rem;
  min-height: 38px;
}

.topbar-search i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--placeholder);
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  text-decoration: none;
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #fecaca;
  background: var(--danger-soft);
  color: var(--danger-dark);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-logout-btn:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

.content-inner {
  padding: 1.25rem;
  max-width: 1440px;
  margin: 0 auto;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.card-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header-box {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: var(--surface);
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

.card-body-box {
  padding: 1.1rem;
}

.page-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-header h4 {
  margin: 0;
  font-weight: 700;
}

.breadcrumb {
  margin: 0;
  font-size: 0.82rem;
}

.badge {
  font-weight: 600;
}

.badge-in,
.badge-out,
.badge-low,
.badge-active,
.badge-inactive,
.badge-walkin {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-in,
.badge-active {
  background: #d1fae5;
  color: #065f46;
}

.badge-out,
.badge-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.badge-low {
  background: #fef3c7;
  color: #92400e;
}

.badge-walkin {
  background: var(--surface-muted);
  color: var(--muted);
}

.table-custom {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
}

.table-custom thead th {
  background: #dbeafe;
  color: #1e3a8a;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  border-bottom: 2px solid #93c5fd;
  border-right: 1px solid #bfdbfe;
  padding: 0.8rem 0.75rem;
}

.table-custom thead th:last-child {
  border-right: 0;
}

.table-custom tbody td {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid #f1f5f9;
  background: #fff;
  vertical-align: middle;
  font-size: 0.9rem;
  padding: 0.8rem 0.75rem;
}

.table-custom tbody td:last-child {
  border-right: 0;
}

.table-custom tbody tr:nth-child(even) td {
  background: var(--surface-soft);
}

.table-custom tbody tr:hover td {
  background: var(--primary-soft);
}

.table-custom tfoot td {
  background: #e2e8f0;
  color: var(--text);
  border-top: 2px solid #94a3b8;
  font-weight: 700;
}

.report-table tfoot td {
  background: var(--surface-soft);
  font-weight: 700;
  border-top: 2px solid var(--border);
}

.dataTables_wrapper {
  color: var(--text);
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
  color: var(--text-secondary);
  font-weight: 600;
}

.dt-buttons .btn {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  border-width: 1.5px;
  font-weight: 600;
}

.dt-buttons .btn-outline-primary {
  color: var(--primary-dark);
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.dt-buttons .btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: #fff;
}

.dt-buttons .btn-outline-success {
  color: var(--success-dark);
  border-color: #6ee7b7;
  background: var(--success-soft);
}

.dt-buttons .btn-outline-danger {
  color: var(--danger-dark);
  border-color: #fca5a5;
  background: var(--danger-soft);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  background: #fff;
  color: var(--text);
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  border-color: #93c5fd !important;
}

.nav-tabs {
  border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-link {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.8rem;
  color: #475569;
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  background: #e8f0ff;
  color: var(--primary-dark);
}

.stock-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.stock-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

.stock-zero {
  color: var(--danger);
  font-weight: 700;
}

.profit-pos {
  color: #065f46;
  font-weight: 700;
}

.profit-neg {
  color: #991b1b;
  font-weight: 700;
}

.profit-zero {
  color: var(--muted);
}

.report-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.quick-range .btn {
  border-radius: 999px;
  font-size: 0.78rem;
}

.filter-btn {
  border-radius: 20px;
  font-size: 0.82rem;
  padding: 5px 14px;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.filter-btn.active {
  color: #fff !important;
}

.filter-btn-all {
  border-color: #94a3b8;
  color: var(--muted);
}

.filter-btn-all.active {
  background: var(--muted);
}

.filter-btn-out {
  border-color: var(--danger);
  color: var(--danger);
}

.filter-btn-out.active {
  background: var(--danger);
}

.filter-btn-low {
  border-color: var(--warning);
  color: var(--warning);
}

.filter-btn-low.active {
  background: var(--warning);
}

.filter-btn-ok {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn-ok.active {
  background: #3b82f6;
}

.filter-btn-good {
  border-color: var(--success);
  color: var(--success);
}

.filter-btn-good.active {
  background: var(--success);
}

code {
  background: var(--surface-muted);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 7px;
}

tr.row-out td {
  background: #fff5f5 !important;
  border-left: 4px solid var(--danger);
}

tr.row-low td {
  background: #fffbeb !important;
  border-left: 4px solid var(--warning);
}

tr.row-out:hover td {
  background: #fee2e2 !important;
}

tr.row-low:hover td {
  background: #fef3c7 !important;
}

body.auth-login-page {
  min-height: 100vh;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(14, 165, 233, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef2f7 100%);
}

.login-page {
  min-height: calc(100vh - 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-shell {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
  background: var(--surface);
}

.login-brand {
  position: relative;
  padding: 2.4rem 2.2rem;
  background: linear-gradient(155deg, #0f172a 0%, #1e3a8a 58%, #2563eb 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
}

.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-brand::before {
  width: 260px;
  height: 260px;
  top: -90px;
  right: -70px;
  background: rgba(255, 255, 255, 0.08);
}

.login-brand::after {
  width: 180px;
  height: 180px;
  left: -50px;
  bottom: -60px;
  background: rgba(59, 130, 246, 0.18);
}

.brand-top,
.brand-bottom,
.feature-grid {
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-brand h1 {
  margin: 0 0 0.45rem;
  color: #fff;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-brand p {
  margin: 0;
  max-width: 360px;
  color: #cbd5e1;
  line-height: 1.55;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  backdrop-filter: blur(6px);
}

.feature-card i {
  color: #bfdbfe;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  display: block;
}

.feature-card span {
  display: block;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 600;
}

.brand-bottom {
  font-size: 0.78rem;
  color: #94a3b8;
}

.login-card {
  padding: 2rem 2.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.login-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.login-card-top h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.login-card-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 360px;
  line-height: 1.5;
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.lang-switch a {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: #475569;
}

.lang-switch a.active {
  background: var(--primary);
  color: #fff;
}

.login-alert {
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: #991b1b;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.login-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 0 0.85rem;
  min-height: 48px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input-shell:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--focus-ring);
}

.input-shell i {
  color: var(--placeholder);
  font-size: 1rem;
}

.input-shell input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  min-height: 46px;
}

.input-shell input::placeholder {
  color: var(--placeholder);
}

.toggle-password {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-login {
  margin-top: 1.1rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.btn-login:disabled {
  opacity: 0.8;
  transform: none;
  cursor: wait;
}

.login-meta {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}

.settings-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
}

.settings-nav .list-group-item {
  border: 1px solid var(--border);
  border-radius: 12px !important;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.settings-nav .list-group-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: var(--primary-border);
}

.settings-panel {
  min-height: 520px;
}

.settings-save-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border);
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.user-avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.permission-matrix th,
.permission-matrix td {
  text-align: center;
  vertical-align: middle;
}

.permission-matrix th:first-child,
.permission-matrix td:first-child {
  text-align: left;
}

.audit-create {
  color: var(--success-dark);
  background: var(--success-soft);
}

.audit-update {
  color: var(--primary-dark);
  background: #dbeafe;
}

.audit-delete {
  color: var(--danger-dark);
  background: var(--danger-soft);
}

.audit-view {
  color: var(--text-secondary);
  background: var(--border);
}

.dashboard-page .dash-hero {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #1e3a8a 55%, var(--primary) 100%);
  border-radius: 20px;
  padding: 1.25rem 1.35rem;
  color: #fff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
  margin-bottom: 1rem;
}

.dashboard-page .dash-hero-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dashboard-page .dash-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}

.dashboard-page .dash-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dashboard-page .dash-hero-sub {
  color: #dbeafe;
  font-size: 0.9rem;
}

.dashboard-page .dash-hero-date {
  color: #dbeafe;
}

.dashboard-page .dash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.dashboard-page .dash-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 600;
}

.dashboard-page .dash-quick .btn {
  border-radius: 999px;
  font-weight: 600;
}

.dashboard-page .dash-kpi {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.dashboard-page .dash-kpi .stat-value {
  font-size: 1.55rem;
  line-height: 1.1;
}

.dashboard-page .dash-kpi .stat-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-page .dash-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.dashboard-page .dash-kpi-icon--primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.dashboard-page .dash-kpi-icon--success {
  background: var(--success-soft);
  color: var(--success);
}

.dashboard-page .dash-kpi-icon--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.dashboard-page .dash-kpi-icon--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-pill {
  border-radius: 20px;
}

.badge-tone-primary {
  background: #dbeafe;
  color: var(--primary-dark);
}

.badge-tone-success {
  background: #d1fae5;
  color: var(--success-dark);
}

.badge-tone-danger {
  background: var(--danger-soft);
  color: var(--danger-dark);
}

.badge-tone-warning {
  background: #fef3c7;
  color: var(--warning-dark);
}

.dashboard-page .dash-panel .card-header-box {
  background: var(--surface-soft);
}

.dashboard-page .dash-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-page .dash-feed li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--surface-muted);
}

.dashboard-page .dash-feed li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-page .dash-feed-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.dashboard-page .dash-feed-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-page .dash-empty {
  text-align: center;
  color: var(--placeholder);
  padding: 1.5rem 0.5rem;
  font-size: 0.88rem;
}

.stock-qty-critical {
  color: var(--danger);
}

.stock-qty-low {
  color: var(--warning);
}

@media (max-width: 992px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }
}

@media print {
  .sidebar,
  .topbar,
  .erp-filter-panel,
  .reports-filter,
  .no-print,
  .dt-buttons,
  .dataTables_filter,
  .dataTables_length,
  .dataTables_paginate {
    display: none !important;
  }

  .main-content,
  .content-inner {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .card-box {
    box-shadow: none;
    border: 1px solid var(--border);
  }
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .login-brand {
    display: none;
  }

  .login-card {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 0 10px 40px rgba(2, 6, 23, 0.35);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar,
  .main-content {
    left: 0;
    margin-left: 0;
  }

  .topbar {
    padding: 0.5rem 0.8rem;
    height: auto;
    min-height: var(--topbar-h);
  }

  .topbar-title {
    font-size: 0.95rem;
  }

  .content-inner {
    padding: 1rem;
  }
}
