:root {
  --primary: #1f7a5a;
  --primary-dark: #145640;
  --secondary: #0f2744;
  --secondary-light: #17385f;
  --bg-light: #f4f7fb;
  --bg-white: #ffffff;
  --text-main: #1e293b;
  --text-soft: #64748b;
  --border: #dbe3ec;
  --shadow: 0 20px 50px rgba(15, 39, 68, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-main);
}

body {
  background: #f4f7fb;
  color: var(--text-main);
}

body.login-body {
  min-height: 100vh;
}

a {
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =========================
   Login Page
========================= */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.login-branding {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 39, 68, 0.88), rgba(31, 122, 90, 0.78)),
    url("../images/login-bg.jpg") center/cover no-repeat;
  color: #fff;
  padding: 60px;
  display: flex;
  align-items: center;
}

.branding-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(15, 39, 68, 0.55), rgba(15, 39, 68, 0.18));
}

.branding-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.brand-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}

.brand-title {
  font-size: 52px;
  line-height: 1.05;
  margin-bottom: 14px;
  font-weight: 800;
}

.brand-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 20px;
  font-weight: 600;
}

.brand-description {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  max-width: 580px;
  margin-bottom: 34px;
}

.brand-features {
  display: grid;
  gap: 16px;
}

.feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px;
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.login-panel {
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.login-panel-inner {
  width: 100%;
  max-width: 520px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.lang-switch {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--secondary);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
}

.lang-switch:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.login-box {
  background: var(--bg-white);
  border: 1px solid #edf2f7;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 42px;
}

.logo-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 22px;
}

.login-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 10px;
}

.login-text {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 28px;
}

.login-form {
  display: grid;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.12);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 84px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
}

.checkbox-wrap input {
  width: 16px;
  height: 16px;
}

.forgot-link {
  font-size: 14px;
  color: var(--primary);
  font-weight: 700;
}

.login-footer-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eef2f6;
}

.login-footer-note p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
}

.panel-footer {
  text-align: center;
  margin-top: 18px;
}

.panel-footer p {
  color: var(--text-soft);
  font-size: 13px;
}

/* =========================
   Global Buttons
========================= */

.btn-primary {
  height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 12px 24px rgba(15, 39, 68, 0.16);
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.97;
}

.btn-outline {
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 18px;
  min-width: 150px;
}

/* =========================
   App Layout
========================= */

.app-layout {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0f2744 0%, #15385d 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-top {
  margin-bottom: 28px;
}

.brand-mini {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mini-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #2aa67a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}

.brand-mini h2 {
  font-size: 16px;
  margin-bottom: 4px;
}

.brand-mini p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  padding: 13px 14px;
  border-radius: 14px;
  transition: var(--transition);
  font-weight: 600;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.logout-btn {
  display: block;
  text-align: center;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #e8eef5;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  border: none;
  background: #edf3f8;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
}

.page-title {
  font-size: 26px;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-soft);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--secondary);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.topbar-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: transparent;
  text-decoration: none;
}

.topbar-btn-primary:hover {
  opacity: 0.96;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbfd;
  border: 1px solid #e7edf5;
  padding: 8px 12px;
  border-radius: 14px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.user-box h4 {
  font-size: 14px;
  margin-bottom: 3px;
}

.user-box p {
  font-size: 12px;
  color: var(--text-soft);
}

.page-content {
  padding: 28px;
}

/* =========================
   Banners
========================= */

.welcome-banner {
  background: linear-gradient(135deg, #0f2744, #1f7a5a);
  color: #fff;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.welcome-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.welcome-banner h2 {
  font-size: 28px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.welcome-banner p {
  max-width: 760px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.welcome-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inner-page-banner {
  background: #ffffff;
  border: 1px solid #e7edf5;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.04);
}

.inner-page-banner h2 {
  font-size: 28px;
  color: var(--secondary);
  margin-bottom: 10px;
}

.inner-page-banner p {
  max-width: 760px;
  line-height: 1.8;
  color: var(--text-soft);
}

.banner-outline-dark {
  color: var(--secondary);
  border-color: #d7e1eb;
}

.banner-outline-dark:hover {
  background: #f5f8fb;
}

/* =========================
   Cards / Stats / Layout Grids
========================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.05);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eef7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-label {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card h3 {
  font-size: 30px;
  margin-bottom: 8px;
  color: var(--secondary);
}

.stat-meta {
  font-size: 13px;
  color: var(--text-soft);
}

.stat-meta.positive {
  color: #198754;
}

.stat-meta.warning {
  color: #d97706;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.dashboard-col-large,
.dashboard-col-small {
  display: grid;
  gap: 22px;
  align-content: start;
}

.card-box {
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.04);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.card-head h3 {
  font-size: 20px;
  color: var(--secondary);
}

.card-head a {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.overview-item {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.overview-item h4 {
  font-size: 16px;
  color: var(--secondary);
  margin-bottom: 8px;
}

.overview-item p {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.overview-item span {
  font-size: 13px;
  color: var(--text-soft);
}

.notes-box p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
}

/* =========================
   Tables / Badges / Pagination
========================= */

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
}

.data-table th {
  color: var(--secondary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  background: #e8f7ee;
  color: #198754;
}

.badge.warning {
  background: #fff4df;
  color: #b7791f;
}

.badge.danger {
  background: #fdecec;
  color: #dc3545;
}

.badge.info {
  background: #e8f1ff;
  color: #2563eb;
}

.table-title-wrap {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.table-title-wrap strong {
  font-size: 14px;
  color: var(--secondary);
}

.table-title-wrap span {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-soft);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f8fbfd;
  border: 1px solid #e7edf5;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.table-btn:hover {
  background: #eef7f3;
  border-color: #cfe8dd;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.priority-badge.high {
  background: #fdecec;
  color: #dc3545;
}

.priority-badge.medium {
  background: #fff4df;
  color: #b7791f;
}

.priority-badge.low {
  background: #e8f7ee;
  color: #198754;
}

.table-footer-bar {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.table-footer-bar p {
  font-size: 14px;
  color: var(--text-soft);
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e7edf5;
  background: #fff;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.page-btn.active,
.page-btn:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* =========================
   Alerts / Quick Actions
========================= */

.alert-list {
  display: grid;
  gap: 14px;
}

.alert-item {
  padding: 16px;
  border-radius: 16px;
  background: #fffaf0;
  border: 1px solid #f6e3b4;
}

.alert-item strong {
  display: block;
  color: #8a5a00;
  margin-bottom: 8px;
  font-size: 14px;
}

.alert-item p {
  font-size: 14px;
  line-height: 1.7;
  color: #6b7280;
}

.quick-actions {
  display: grid;
  gap: 12px;
}

.quick-btn {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
  color: var(--secondary);
  font-weight: 700;
  transition: var(--transition);
}

.quick-btn:hover {
  background: #eef7f3;
  border-color: #cfe8dd;
}

.quick-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  cursor: pointer;
  text-align: center;
}

.quick-btn-primary:hover {
  opacity: 0.97;
}

/* =========================
   Forms / Filters / Upload
========================= */

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: end;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field-wide {
  grid-column: span 2;
}

.filter-field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.filter-field input,
.filter-field select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.12);
}

.filter-actions {
  display: flex;
  align-items: end;
}

.filter-btn {
  min-width: 140px;
}

.form-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  align-items: start;
}

.form-main,
.form-side {
  display: grid;
  gap: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px;
  background: #fff;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
  font: inherit;
}

.form-field input,
.form-field select {
  min-height: 48px;
}

.form-field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.12);
}

.upload-box {
  border: 2px dashed #cfe0ec;
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  background: #f8fbfd;
}

.upload-box input[type="file"] {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

.upload-box p {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

.upload-box span {
  font-size: 13px;
  color: var(--text-soft);
}

.upload-box-spaced {
  margin-top: 16px;
}

/* =========================
   Details / View Pages
========================= */

.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.details-main,
.details-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.info-item {
  padding: 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.info-item label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.info-item p {
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary);
}

.content-block p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-soft);
}

.content-block-spaced {
  margin-top: 16px;
}

.checklist-list,
.evidence-list,
.timeline-list,
.attachment-list {
  display: grid;
  gap: 14px;
}

.checklist-item,
.evidence-item,
.attachment-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.checklist-item div,
.evidence-item,
.attachment-item div {
  flex: 1;
}

.check-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e8f7ee;
  color: #198754;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.checklist-item strong,
.evidence-item strong,
.attachment-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--secondary);
  font-size: 14px;
}

.checklist-item p,
.evidence-item p,
.attachment-item p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
}

.timeline-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  padding-left: 4px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--secondary);
  font-size: 14px;
}

.timeline-item p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.summary-panel {
  display: grid;
  gap: 18px;
}

.summary-score {
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}

.summary-score span {
  display: block;
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 6px;
}

.summary-score p {
  font-size: 14px;
  font-weight: 700;
}

.success-score {
  background: #e8f7ee;
  color: #198754;
}

.warning-score {
  background: #fff4df;
  color: #b7791f;
}

.summary-meta {
  display: grid;
  gap: 14px;
}

.summary-meta div {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e8eef5;
  background: #f8fbfd;
}

.summary-meta label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.summary-meta p {
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary);
}

/* =========================
   Audit / CAPA / Review Blocks
========================= */

.audit-checklist {
  display: grid;
  gap: 16px;
}

.audit-check-item {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.audit-check-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.audit-check-head strong {
  color: var(--secondary);
  font-size: 15px;
}

.audit-review-list,
.finding-list {
  display: grid;
  gap: 14px;
}

.audit-review-item,
.finding-item {
  padding: 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.audit-review-head,
.finding-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.audit-review-head strong,
.finding-head strong {
  color: var(--secondary);
  font-size: 14px;
}

.audit-review-item p,
.finding-item p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.progress-wrap {
  min-width: 120px;
  display: grid;
  gap: 6px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 999px;
}

.progress-wrap small {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}

/* =========================
   Reports / Attachments Center
========================= */

.report-filter-grid {
  grid-template-columns: repeat(4, 1fr);
}

.report-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.report-template-card {
  padding: 20px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.report-template-card h4 {
  font-size: 16px;
  color: var(--secondary);
  margin-bottom: 10px;
}

.report-template-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.report-template-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.attachment-upload-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 22px;
  align-items: start;
}

/* =========================
   Page-specific table alignment
========================= */

.audits-table td,
.capa-table td,
.reports-table td,
.attachments-table td {
  vertical-align: top;
}

.attachment-list-edit .attachment-item {
  align-items: center;
}

/* =========================
   Responsive
========================= */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .details-grid,
  .form-layout,
  .attachment-upload-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-field-wide {
    grid-column: span 3;
  }

  .report-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-template-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-branding {
    min-height: 420px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    z-index: 999;
    transition: 0.3s ease;
  }

  .sidebar.show {
    left: 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar {
    padding: 18px 20px;
  }

  .page-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .login-branding {
    padding: 34px 22px;
  }

  .login-panel {
    padding: 20px;
  }

  .login-box {
    padding: 28px 22px;
  }

  .brand-title {
    font-size: 36px;
  }

  .login-title {
    font-size: 24px;
  }

  .stats-grid,
  .overview-grid,
  .info-grid,
  .form-grid,
  .filter-grid,
  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-field-wide,
  .form-field-full {
    grid-column: span 1;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
  }

  .welcome-banner h2,
  .inner-page-banner h2 {
    font-size: 22px;
  }

  .page-title {
    font-size: 22px;
  }

  .table-footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .attachment-item,
  .checklist-item,
  .attachment-list-edit .attachment-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .chart-widget {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
}

.chart-widget-large {
  padding: 24px;
}

.chart-bars {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  min-height: 260px;
}

.chart-bars-wide {
  min-height: 320px;
}

.chart-bar-item {
  flex: 1;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.chart-bar-item span,
.chart-bar-item strong {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 700;
}

.chart-bar {
  width: 100%;
  max-width: 44px;
  height: 180px;
  border-radius: 14px;
  background: #e8eef5;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.chart-bar i {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 14px;
}

.chart-line-grid {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  min-height: 280px;
}

.chart-line-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.chart-line-area {
  position: relative;
  border-left: 2px solid #dbe3ec;
  border-bottom: 2px solid #dbe3ec;
  min-height: 280px;
  padding: 14px 12px 36px 12px;
}

.chart-line-points {
  position: relative;
  width: 100%;
  height: 100%;
}

.chart-line-points span {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(31, 122, 90, 0.15);
}

.chart-line-months {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.distribution-card {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid #e8eef5;
  display: grid;
  gap: 8px;
}

.distribution-card strong {
  color: var(--secondary);
  font-size: 15px;
}

.distribution-card p {
  color: var(--text-soft);
  font-size: 14px;
}

@media (max-width: 768px) {
  .chart-bars {
    gap: 8px;
  }

  .chart-bar {
    max-width: 34px;
  }

  .distribution-grid {
    grid-template-columns: 1fr;
  }
}
.hr-matrix-table td {
  vertical-align: top;
  white-space: nowrap;
}
.equipment-matrix-table td {
  vertical-align: top;
  white-space: nowrap;
}
.success-score {
  background: #e8f7ee;
  color: #198754;
}
@media print {
  .sidebar,
  .topbar .menu-toggle,
  .quick-actions,
  .welcome-actions,
  .sidebar-footer,
  .topbar-btn,
  .logout-btn {
    display: none !important;
  }

  .main-wrapper,
  .page-content,
  .card-box,
  .inner-page-banner {
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  body {
    background: #fff !important;
  }
}
}

/* =========================
   QMS Premium Login & Dashboard Enhancements
========================= */
body.login-body {
  background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}

.qms-login-page {
  position: relative;
}

.qms-login-branding::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -120px;
  background: radial-gradient(circle, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0) 72%);
  pointer-events: none;
}

.qms-login-box {
  position: relative;
  overflow: hidden;
}

.qms-login-box::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(31,122,90,0.10), rgba(31,122,90,0));
  pointer-events: none;
}

.qms-login-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.qms-login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #eef7f3;
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.qms-login-submit {
  height: 54px;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 16px 35px rgba(15, 39, 68, 0.18);
}

.login-impact-strip {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.impact-chip {
  min-width: 128px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
}

.impact-chip strong {
  display: block;
  font-size: 24px;
  margin-bottom: 6px;
}

.impact-chip span {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.qms-login-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.qms-meta-card {
  background: #f8fbfd;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 14px 16px;
}

.qms-meta-card span {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.qms-meta-card strong {
  font-size: 14px;
  color: var(--secondary);
}

.qms-dashboard-page {
  background:
    radial-gradient(circle at top right, rgba(31,122,90,0.10), transparent 28%),
    linear-gradient(180deg, #f5f8fc 0%, #edf3fa 100%);
  min-height: calc(100vh - 90px);
}

.qms-dashboard-hero {
  box-shadow: 0 24px 48px rgba(15,39,68,0.16);
}

.qms-exec-stats .stat-card {
  min-height: 144px;
}

.qms-stat-highlight {
  background: linear-gradient(135deg, #0f2744, #12385f);
  color: #fff;
  border-color: transparent;
}

.qms-stat-highlight .stat-label,
.qms-stat-highlight .stat-meta,
.qms-stat-highlight h3 {
  color: #fff;
}

.qms-stat-highlight .stat-icon {
  background: rgba(255,255,255,0.12);
}

.qms-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 22px;
}

.qms-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.qms-health-tile {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
  border: 1px solid #e7edf5;
  transition: var(--transition);
}

.qms-health-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15,39,68,0.08);
}

.qms-health-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.qms-health-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f3;
  font-size: 22px;
}

.qms-health-head h4 {
  font-size: 16px;
  color: var(--secondary);
  margin-bottom: 4px;
}

.qms-health-head p,
.qms-health-tile small {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.qms-health-score {
  font-size: 30px;
  font-weight: 800;
  color: var(--secondary);
}

.qms-progress,
.qms-bar-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef5;
}

.qms-progress span,
.qms-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f7a5a, #0f2744);
}

.qms-two-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: center;
}

.qms-ring-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.qms-ring-chart {
  --ring: 82;
  --ring-color: #1f7a5a;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--ring) * 1%), #e8eef5 0);
  display: grid;
  place-items: center;
  position: relative;
}

.qms-ring-chart::before {
  content: "";
  width: 164px;
  height: 164px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}

.qms-ring-chart div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  text-align: center;
}

.qms-ring-chart strong {
  font-size: 34px;
  color: var(--secondary);
}

.qms-ring-chart span {
  color: var(--text-soft);
  font-size: 14px;
}

.qms-legend {
  list-style: none;
  display: grid;
  gap: 10px;
  width: 100%;
}

.qms-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
}

.qms-legend span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.qms-bars-panel {
  display: grid;
  gap: 16px;
}

.qms-bar-row {
  display: grid;
  gap: 10px;
}

.qms-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.qms-bar-label span {
  color: var(--secondary);
  font-weight: 700;
}

.qms-bar-label strong {
  color: var(--text-soft);
}

.qms-alert-list .alert-item {
  background: linear-gradient(180deg, #fffaf0 0%, #fff7e8 100%);
}

.qms-alert-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15,39,68,0.08);
  color: var(--secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.qms-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.qms-spotlight-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #f8fbfd;
  border: 1px solid #e7edf5;
}

.qms-spotlight-grid span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 8px;
}

.qms-spotlight-grid strong {
  font-size: 24px;
  color: var(--secondary);
}

.qms-notes-card .notes-box p {
  font-size: 14px;
}

.alert-success,
.alert-error {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}

.alert-success {
  background: #e8f7ee;
  color: #198754;
  border: 1px solid #ccebd7;
}

.alert-error {
  background: #fdecec;
  color: #b42318;
  border: 1px solid #f6d2d2;
}

@media (max-width: 1200px) {
  .qms-dashboard-grid,
  .qms-two-panel,
  .qms-health-grid {
    grid-template-columns: 1fr;
  }
  .qms-ring-panel {
    justify-items: start;
  }
}

@media (max-width: 900px) {
  .qms-login-meta,
  .qms-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Global Professional Shell Upgrade
========================= */

body:not(.login-body) {
  background:
    radial-gradient(circle at top left, rgba(31, 122, 90, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 39, 68, 0.07), transparent 30%),
    linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
}

.app-layout {
  position: relative;
}

.sidebar {
  width: 318px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 22%),
    linear-gradient(180deg, #0a1f37 0%, #102c4a 44%, #15395f 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 20px 0 60px rgba(10, 24, 43, 0.18);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-top {
  margin-bottom: 22px;
}

.brand-mini {
  margin-bottom: 18px;
}

.brand-mini-logo {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(31, 122, 90, 0.24);
}

.brand-mini h2 {
  font-size: 17px;
  letter-spacing: 0.2px;
}

.brand-mini p {
  max-width: 180px;
  line-height: 1.45;
}

.sidebar-summary-card,
.sidebar-support-card {
  border-radius: 18px;
  padding: 16px 16px 15px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sidebar-summary-card {
  margin-bottom: 8px;
}

.sidebar-summary-label,
.sidebar-support-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.78);
  margin-bottom: 10px;
}

.sidebar-summary-card strong,
.sidebar-support-card strong {
  display: block;
  color: #fff;
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 8px;
}

.sidebar-summary-card small,
.sidebar-support-card small {
  display: block;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
}

.sidebar-nav {
  gap: 14px;
}

.nav-section {
  display: grid;
  gap: 7px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.48);
  padding: 6px 10px;
  font-weight: 800;
}

.nav-item {
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid transparent;
  position: relative;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
  font-size: 16px;
}

.nav-label {
  line-height: 1.35;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(31,122,90,0.26), rgba(255,255,255,0.12));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #40d29a, #24a977);
}

.nav-item-featured {
  background: linear-gradient(135deg, rgba(31,122,90,0.2), rgba(27,95,201,0.12));
  border-color: rgba(64,210,154,0.12);
}

.sidebar-footer {
  padding-top: 18px;
  margin-top: 8px;
}

.sidebar-support-card {
  margin-bottom: 12px;
}

.logout-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
}

.logout-btn:hover {
  background: rgba(255,255,255,0.16);
}

.main-wrapper {
  min-height: 100vh;
}

.topbar {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(219,227,236,0.9);
  padding: 18px 28px;
  box-shadow: 0 12px 28px rgba(15, 39, 68, 0.06);
}

.topbar-overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1f7a5a;
}

.topbar-overline::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #65d5ae);
}

.page-title {
  letter-spacing: -0.02em;
}

.topbar-right {
  gap: 14px;
}

.topbar-status-pills,
.topbar-utility-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f5f8fb;
  border: 1px solid #dce6f0;
  color: var(--secondary);
  font-weight: 700;
  font-size: 13px;
}

.topbar-pill-live {
  background: rgba(31, 122, 90, 0.1);
  border-color: rgba(31, 122, 90, 0.18);
  color: var(--primary-dark);
}

.topbar-pill-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.topbar-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 39, 68, 0.04);
}

.topbar-btn:hover {
  background: #f5f8fb;
}

.topbar-btn-primary {
  height: 44px;
  padding-inline: 18px;
  box-shadow: 0 14px 26px rgba(31, 122, 90, 0.22);
}

.user-box {
  min-width: 190px;
  background: rgba(248,251,253,0.9);
  box-shadow: 0 10px 24px rgba(15, 39, 68, 0.06);
}

.page-content {
  padding: 30px;
}

.card-box,
.stat-card,
.table-wrap,
.form-card,
.detail-card,
.filter-card,
.notes-box {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(219,227,236,0.9);
  box-shadow: 0 18px 40px rgba(15, 39, 68, 0.08);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.card-head h3 {
  font-size: 18px;
  color: var(--secondary);
}

.card-head a {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.data-table thead th {
  background: #f5f8fb;
  color: #37506d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge.success { background: rgba(16, 185, 129, 0.12); color: #0f8b64; }
.badge.warning { background: rgba(245, 158, 11, 0.12); color: #b76d00; }
.badge.danger { background: rgba(239, 68, 68, 0.12); color: #c13636; }
.badge.info { background: rgba(59, 130, 246, 0.12); color: #1f5ec9; }

.form-card,
.detail-card,
.filter-card,
.table-wrap,
.notes-box,
.card-box {
  border-radius: 22px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  border-radius: 14px;
  border: 1px solid #d6e0ea;
  background: #fff;
}

button,
.btn-primary,
.btn-outline,
.action-btn,
.quick-btn {
  border-radius: 14px;
}

.quick-btn {
  box-shadow: 0 10px 24px rgba(15, 39, 68, 0.06);
}

.flash-message {
  margin: 16px 28px 0;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(15, 39, 68, 0.06);
}

@media (max-width: 1180px) {
  .sidebar {
    width: 290px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    justify-content: flex-end;
  }
}

@media (max-width: 992px) {
  .sidebar-summary-card,
  .sidebar-support-card {
    display: none;
  }

  .topbar {
    padding: 16px 18px;
  }

  .page-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-status-pills {
    width: 100%;
  }

  .topbar-utility-links {
    order: 3;
  }

  .user-box {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }
}


/* Professional login enhancement */
.qms-login-page-pro {
  min-height: 100vh;
}

.qms-login-branding-pro {
  position: relative;
  overflow: hidden;
}

.qms-login-branding-pro .branding-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 90%);
  pointer-events: none;
}

.pro-branding-content {
  max-width: 720px;
  gap: 22px;
}

.pro-brand-badge {
  backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.brand-hero-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo-shell {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 42px rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.55);
  flex-shrink: 0;
}

.brand-logo-image {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.brand-logo-fallback span {
  font-size: 2rem;
  font-weight: 800;
  color: #0f766e;
}

.pro-brand-title {
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin-bottom: 4px;
}

.pro-brand-subtitle {
  margin: 0;
  font-size: 1.02rem;
  color: rgba(255,255,255,0.82);
}

.pro-brand-description {
  max-width: 62ch;
  color: rgba(255,255,255,0.84);
}

.pro-brand-features {
  gap: 14px;
}

.pro-feature-card {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.pro-feature-card .feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pro-impact-strip {
  margin-top: 8px;
}

.pro-impact-chip {
  min-width: 152px;
  background: rgba(255,255,255,0.11);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(12px);
}

.qms-login-panel-pro {
  background:
    radial-gradient(circle at top right, rgba(20,184,166,0.12), transparent 38%),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f8 100%);
}

.pro-login-panel-inner {
  max-width: 560px;
}

.pro-top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15,118,110,0.08);
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(15,118,110,0.12);
}

.qms-login-box-pro {
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
}

.qms-login-header-pro {
  margin-bottom: 8px;
}

.qms-login-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  box-shadow: 0 14px 30px rgba(20,184,166,0.28);
  color: #fff;
  overflow: hidden;
}

.qms-login-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.pro-login-form .form-group label {
  font-weight: 700;
  color: #0f172a;
}

.pro-login-form input {
  border-radius: 16px;
  min-height: 52px;
}

.pro-qms-login-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trust-item {
  padding: 14px;
  border-radius: 18px;
  background: #f7fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.trust-item strong,
.trust-item span {
  display: block;
}

.trust-item strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.trust-item span {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 4px;
}

.login-footer-note code {
  font-family: inherit;
  font-size: 0.86rem;
  color: #0f766e;
  background: rgba(15,118,110,0.07);
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 1100px) {
  .brand-hero-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .pro-qms-login-meta,
  .trust-strip {
    grid-template-columns: 1fr;
  }
}


/* UI shell hardening: accordion sidebar, back button, branded login */
.brand-mini-rich {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mini-logo-image-shell {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mini-logo-image {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.sidebar-nav-accordion {
  display: grid;
  gap: 12px;
}

.nav-group {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  overflow: hidden;
}

.nav-group-toggle {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  cursor: pointer;
}

.nav-group-toggle:hover {
  background: rgba(255,255,255,0.04);
}

.nav-group-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.nav-group-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.nav-group-meta strong,
.nav-group-meta small {
  display: block;
}

.nav-group-meta strong {
  color: #fff;
  font-size: 14px;
}

.nav-group-meta small {
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group-chevron {
  color: rgba(255,255,255,0.76);
  font-size: 18px;
  transition: transform .2s ease;
}

.nav-group-panel {
  display: none;
  padding: 0 10px 12px;
  gap: 6px;
}

.nav-group.is-open .nav-group-panel {
  display: grid;
}

.nav-group.is-open .nav-group-chevron {
  transform: rotate(180deg);
}

.nav-group .nav-item {
  padding: 10px 12px;
  border-radius: 14px;
}

.nav-group .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 14px;
}

.topbar-enterprise {
  background: linear-gradient(180deg, rgba(12,34,57,0.95), rgba(18,48,78,0.92));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-enterprise .topbar-overline,
.topbar-enterprise .page-title,
.topbar-enterprise .page-subtitle,
.topbar-enterprise .page-breadcrumbs,
.topbar-enterprise .page-breadcrumbs span {
  color: #e6eef6;
}

.topbar-enterprise .page-subtitle {
  color: rgba(230,238,246,0.72);
}

.topbar-enterprise .topbar-overline::before {
  background: linear-gradient(90deg, #40d29a, #8de7c5);
}

.topbar-brand-chip {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(255,255,255,0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 24px rgba(0,0,0,0.14);
  overflow: hidden;
  flex-shrink: 0;
}

.topbar-brand-logo {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.topbar-brand-fallback {
  font-weight: 800;
  color: #0f766e;
}

.page-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.topbar-pill-module {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #eff6ff;
}

.topbar-btn-back {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

.topbar-btn-back:hover {
  background: rgba(255,255,255,0.16);
}

.topbar-enterprise .topbar-btn {
  background: rgba(255,255,255,0.92);
}

.topbar-enterprise .user-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
}

.topbar-enterprise .user-box h4,
.topbar-enterprise .user-box p {
  color: #f8fafc;
}

.login-footer-note-rich {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid rgba(148,163,184,0.16);
}

.login-footer-note-rich p {
  margin: 0 0 8px;
}

.login-note-muted {
  color: #64748b;
  font-size: 0.88rem;
}

.pro-qms-login-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .pro-qms-login-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .nav-group.is-open .nav-group-panel {
    display: grid;
  }
  .topbar-enterprise {
    padding: 16px 18px;
  }
}

/* ===== Login page stabilization patch ===== */
body.login-body {
  background: #f1f5f9;
}

.enterprise-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.enterprise-login-brand {
  position: relative;
  overflow: hidden;
  padding: 56px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 29, 52, 0.96), rgba(12, 68, 104, 0.9)),
    url('../images/login-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
}

.enterprise-brand-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 28%),
              linear-gradient(180deg, rgba(255,255,255,0.04), transparent 45%);
}

.enterprise-brand-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 88%);
  pointer-events: none;
}

.enterprise-brand-content,
.enterprise-login-panel-inner {
  position: relative;
  z-index: 2;
}

.enterprise-brand-content {
  width: 100%;
  max-width: 720px;
}

.enterprise-brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.enterprise-brand-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.enterprise-brand-logo-box {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 24px 50px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.enterprise-brand-logo {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.enterprise-brand-fallback {
  font-size: 30px;
  font-weight: 800;
  color: #0f766e;
}

.enterprise-brand-copy h1 {
  margin: 0 0 8px;
  font-size: 50px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.enterprise-brand-copy p,
.enterprise-brand-story p {
  max-width: 60ch;
  color: rgba(255,255,255,0.88);
  line-height: 1.75;
  font-size: 16px;
}

.enterprise-brand-story {
  margin-bottom: 24px;
}

.enterprise-brand-panels {
  display: grid;
  gap: 14px;
}

.enterprise-story-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(0,0,0,0.14);
}

.enterprise-story-index {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #14b8a6, #22c55e);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.enterprise-story-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.enterprise-story-card p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  font-size: 14px;
}

.enterprise-brand-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.enterprise-metric-chip {
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
}

.enterprise-metric-chip strong,
.enterprise-metric-chip span {
  display: block;
}

.enterprise-metric-chip strong {
  font-size: 18px;
  font-weight: 800;
}

.enterprise-metric-chip span {
  margin-top: 4px;
  color: rgba(255,255,255,0.78);
  font-size: 12px;
}

.enterprise-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.1), transparent 32%),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f8 100%);
}

.enterprise-login-panel-inner {
  width: 100%;
  max-width: 560px;
}

.enterprise-login-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.enterprise-security-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  border: 1px solid rgba(15, 118, 110, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.enterprise-lang-switch {
  min-width: 54px;
  text-align: center;
}

.enterprise-login-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(226,232,240,0.9);
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
  padding: 34px;
}

.enterprise-login-card-header {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 24px;
}

.enterprise-login-badge {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(20,184,166,0.24);
  font-weight: 800;
}

.enterprise-login-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.enterprise-login-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enterprise-login-card-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.05;
  color: #0f172a;
}

.enterprise-login-card-header p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.enterprise-login-form .form-group label {
  font-weight: 700;
  color: #0f172a;
}

.enterprise-login-form input {
  min-height: 54px;
  border-radius: 16px;
}

.enterprise-login-submit {
  min-height: 54px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
}

.enterprise-login-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.enterprise-info-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid rgba(148,163,184,0.16);
}

.enterprise-info-card span,
.enterprise-info-card strong {
  display: block;
}

.enterprise-info-card span {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}

.enterprise-info-card strong {
  color: #0f172a;
  line-height: 1.5;
  font-size: 14px;
}

.enterprise-login-footnote {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid rgba(148,163,184,0.16);
}

.enterprise-login-footnote p {
  margin: 0 0 8px;
  line-height: 1.7;
}

.enterprise-login-footnote p:last-child,
.enterprise-panel-footer p {
  margin-bottom: 0;
}

.enterprise-muted {
  color: #64748b;
}

.enterprise-panel-footer {
  margin-top: 18px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .enterprise-login-shell {
    grid-template-columns: 1fr;
  }

  .enterprise-login-brand {
    min-height: auto;
    padding: 42px 28px;
  }

  .enterprise-login-panel {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .enterprise-login-brand,
  .enterprise-login-panel {
    padding: 20px;
  }

  .enterprise-brand-header,
  .enterprise-login-card-header,
  .enterprise-login-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .enterprise-brand-header {
    gap: 16px;
  }

  .enterprise-brand-copy h1 {
    font-size: 36px;
  }

  .enterprise-login-card {
    padding: 24px;
    border-radius: 24px;
  }

  .enterprise-login-grid,
  .enterprise-brand-metrics {
    grid-template-columns: 1fr;
    display: grid;
  }
}


/* ===== Professional compact shell refinement ===== */
.sidebar {
  width: 286px;
  background: linear-gradient(180deg, #10243b 0%, #122b45 52%, #16314d 100%);
  box-shadow: 14px 0 36px rgba(15, 23, 42, 0.12);
}

.sidebar-top {
  padding: 22px 18px 12px;
}

.brand-mini-logo-image-shell {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.brand-mini h2 {
  font-size: 15px;
  margin-bottom: 2px;
}

.brand-mini p {
  font-size: 12px;
  color: rgba(255,255,255,0.68);
}

.sidebar-summary-card,
.sidebar-support-card {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.sidebar-summary-label,
.sidebar-support-title {
  margin-bottom: 7px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.sidebar-summary-card strong,
.sidebar-support-card strong {
  font-size: 13px;
  margin-bottom: 5px;
  line-height: 1.45;
}

.sidebar-summary-card small,
.sidebar-support-card small {
  font-size: 11.5px;
  line-height: 1.45;
}

.sidebar-nav-accordion {
  gap: 10px;
  padding: 0 8px;
}

.nav-group {
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.nav-group-toggle {
  padding: 11px 12px;
}

.nav-group-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
}

.nav-group-meta strong {
  font-size: 13px;
}

.nav-group-meta small {
  font-size: 10px;
}

.nav-group-panel {
  padding: 0 8px 10px;
  gap: 4px;
}

.nav-group .nav-item {
  padding: 8px 10px;
  border-radius: 12px;
  gap: 10px;
}

.nav-group .nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
}

.nav-label {
  font-size: 13px;
}

.sidebar-footer {
  padding: 16px 16px 20px;
}

.logout-btn {
  min-height: 40px;
}

.topbar.topbar-enterprise {
  padding: 12px 22px;
  min-height: 88px;
  background: linear-gradient(180deg, rgba(20,40,61,0.96), rgba(24,47,71,0.94));
}

.topbar-left {
  gap: 14px;
  align-items: flex-start;
}

.topbar-heading-stack {
  display: grid;
  gap: 5px;
}

.topbar-heading-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-module-chip,
.topbar-date-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar-module-chip {
  background: rgba(81, 196, 145, 0.14);
  color: #dff8ec;
  border: 1px solid rgba(81, 196, 145, 0.2);
}

.topbar-date-chip {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.1);
}

.topbar-enterprise .page-title {
  font-size: 1.9rem;
  line-height: 1.05;
}

.topbar-enterprise .page-subtitle {
  max-width: 580px;
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}

.topbar-enterprise .page-breadcrumbs {
  margin-top: 0;
  font-size: 11px;
  color: rgba(255,255,255,0.62);
}

.topbar-right {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.topbar-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-enterprise .topbar-btn,
.topbar-lang-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.18);
  color: #16314d;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.topbar-btn-back {
  background: rgba(255,255,255,0.08) !important;
  color: #f8fafc !important;
}

.topbar-btn-ghost {
  background: rgba(255,255,255,0.16) !important;
  color: #f8fafc !important;
}

.topbar-lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 11px;
  padding: 3px;
}

.topbar-lang-btn {
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.78);
}

.topbar-lang-btn.is-active {
  background: #ffffff;
  color: #10243b;
}

.user-box.user-box-compact {
  min-width: 158px;
  padding: 9px 12px;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: none;
}

.user-box.user-box-compact .user-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.user-box.user-box-compact h4 {
  font-size: 14px;
}

.user-box.user-box-compact p {
  font-size: 11px;
  opacity: 0.78;
}

.page-content.qms-dashboard-page {
  padding: 22px;
}

.qms-dashboard-hero {
  padding: 28px 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, #12334f 0%, #18415e 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  min-height: auto;
}

.welcome-badge {
  background: rgba(255,255,255,0.12);
  color: #ebf4ff;
  padding: 7px 12px;
  font-size: 11px;
}

.welcome-banner h2 {
  font-size: 2rem;
  line-height: 1.12;
  max-width: 16ch;
}

.welcome-banner p {
  max-width: 70ch;
  color: rgba(255,255,255,0.82);
  font-size: 0.97rem;
  line-height: 1.65;
}

.welcome-actions {
  align-items: center;
  gap: 10px;
}

.btn-primary,
.btn-outline,
.action-btn,
.quick-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
}

.stats-grid.qms-exec-stats {
  margin-top: 18px;
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.qms-dashboard-grid {
  margin-top: 18px;
  gap: 18px;
}

.card-box,
.table-wrap,
.form-card,
.detail-card,
.filter-card,
.notes-box {
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.card-head h3 {
  font-size: 16px;
}

.qms-health-grid {
  gap: 12px;
}

.qms-health-tile {
  padding: 16px;
  border-radius: 16px;
}

.qms-health-score {
  font-size: 1.55rem;
}

.qms-ring-chart {
  width: 180px;
  height: 180px;
}

.enterprise-login-shell {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.88fr);
}

.enterprise-login-brand {
  padding: 42px;
  background: linear-gradient(135deg, rgba(13, 31, 52, 0.97), rgba(18, 54, 83, 0.92)), url('../images/login-bg.jpg') center/cover no-repeat;
}

.enterprise-brand-pill {
  padding: 8px 14px;
  margin-bottom: 22px;
  font-size: 12px;
}

.enterprise-brand-logo-box {
  width: 84px;
  height: 84px;
  border-radius: 20px;
}

.enterprise-brand-copy h1 {
  font-size: 42px;
}

.enterprise-brand-copy p,
.enterprise-brand-story p {
  font-size: 15px;
  line-height: 1.65;
}

.enterprise-brand-panels {
  gap: 12px;
}

.enterprise-story-card {
  padding: 16px;
  border-radius: 18px;
}

.enterprise-brand-metrics {
  margin-top: 18px;
}

.enterprise-metric-chip {
  min-width: 136px;
  padding: 12px 14px;
}

.enterprise-login-panel {
  padding: 28px;
}

.enterprise-login-panel-inner {
  max-width: 520px;
}

.enterprise-login-card {
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.1);
}

.enterprise-login-card-header h2 {
  font-size: 26px;
}

.enterprise-login-grid {
  gap: 10px;
}

.enterprise-info-card,
.enterprise-login-footnote {
  border-radius: 16px;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 270px;
  }
  .topbar.topbar-enterprise {
    padding: 12px 16px;
  }
  .topbar-enterprise .page-title {
    font-size: 1.6rem;
  }
  .welcome-banner h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 992px) {
  .topbar.topbar-enterprise {
    min-height: auto;
  }
  .topbar-right {
    width: 100%;
    justify-items: stretch;
  }
  .topbar-action-row {
    justify-content: flex-start;
  }
  .user-box.user-box-compact {
    width: 100%;
  }
  .qms-dashboard-hero {
    padding: 22px;
  }
}

/* =========================
   Executive Dashboard Refresh
========================= */

.qms-dashboard-page {
  background:
    radial-gradient(circle at top right, rgba(164, 143, 103, 0.08), transparent 24%),
    radial-gradient(circle at top left, rgba(64, 79, 93, 0.06), transparent 28%),
    linear-gradient(180deg, #f6f3ee 0%, #eee9e0 100%);
}

.page-content.qms-dashboard-page {
  padding: 24px;
}

.qms-dashboard-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 24px 26px;
  border-radius: 24px;
  border: 1px solid rgba(202, 188, 164, 0.16);
  background: linear-gradient(135deg, #202e39 0%, #283743 56%, #31424f 100%);
  box-shadow: 0 20px 42px rgba(30, 34, 38, 0.08);
  position: relative;
  overflow: hidden;
}

.qms-dashboard-masthead::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 179, 140, 0.22) 0%, rgba(201, 179, 140, 0) 72%);
  pointer-events: none;
}

.qms-masthead-copy,
.qms-masthead-side {
  position: relative;
  z-index: 1;
}

.qms-masthead-copy {
  display: grid;
  gap: 12px;
  align-content: start;
  max-width: 640px;
}

.qms-dashboard-page .welcome-badge {
  background: rgba(185, 160, 118, 0.14);
  border: 1px solid rgba(210, 190, 154, 0.18);
  color: #e6d8bd;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qms-masthead-copy h2 {
  margin: 0;
  font-size: 1.88rem;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #f7f2e8;
}

.qms-masthead-copy p {
  margin: 0;
  max-width: 58ch;
  color: rgba(236, 229, 216, 0.82);
  font-size: 0.96rem;
  line-height: 1.65;
}

.qms-masthead-side {
  display: grid;
  gap: 14px;
  align-content: space-between;
}

.qms-masthead-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.qms-masthead-chip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(223, 211, 188, 0.14);
  backdrop-filter: blur(10px);
}

.qms-masthead-chip span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 212, 195, 0.72);
}

.qms-masthead-chip strong {
  font-size: 1.62rem;
  line-height: 1;
  color: #fbf7ef;
}

.qms-masthead-chip small {
  color: rgba(232, 225, 214, 0.78);
  line-height: 1.45;
}

.qms-masthead-actions {
  justify-content: flex-end;
}

.qms-dashboard-page .btn-primary,
.qms-dashboard-page .btn-outline,
.qms-dashboard-page .quick-btn {
  min-height: 44px;
  border-radius: 14px;
  transition: var(--transition);
}

.qms-dashboard-page .btn-primary {
  border: 1px solid rgba(184, 155, 104, 0.42);
  background: linear-gradient(135deg, #b59a6d 0%, #8e7245 100%);
  color: #fff8ec;
  box-shadow: 0 12px 24px rgba(73, 58, 35, 0.16);
}

.qms-dashboard-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(73, 58, 35, 0.18);
}

.qms-dashboard-page .btn-outline {
  border: 1px solid rgba(219, 207, 184, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: #f2ebdf;
}

.qms-dashboard-page .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.stats-grid.qms-exec-stats {
  margin-top: 16px;
  gap: 16px;
}

.qms-exec-stats .stat-card {
  min-height: 0;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(220, 212, 201, 0.92);
  box-shadow: 0 16px 28px rgba(34, 31, 27, 0.04);
}

.qms-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #314250;
  background: #ece7de;
}

.qms-stat-highlight .qms-stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #fff7ea;
}

.qms-stat-icon--health {
  background: #e8efe8;
  color: #4b6756;
}

.qms-stat-icon--actions {
  background: #f5ebda;
  color: #8e6c3d;
}

.qms-stat-icon--reviews {
  background: #e8ecef;
  color: #4b6076;
}

.qms-stat-highlight {
  background: linear-gradient(135deg, #263542 0%, #334556 100%);
  box-shadow: 0 18px 32px rgba(28, 32, 38, 0.08);
}

.qms-dashboard-grid {
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 0.95fr);
  margin-top: 18px;
  gap: 18px;
  align-items: start;
}

.dashboard-col-large,
.dashboard-col-small {
  gap: 18px;
}

.qms-dashboard-page .card-box,
.qms-dashboard-page .table-wrap {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(220, 212, 201, 0.9);
  box-shadow: 0 14px 30px rgba(34, 31, 27, 0.04);
}

.qms-dashboard-grid .card-head {
  margin-bottom: 16px;
  align-items: flex-start;
}

.qms-dashboard-page .card-head h3,
.qms-dashboard-page .stat-card h3,
.qms-dashboard-page .qms-health-score,
.qms-dashboard-page .qms-spotlight-grid strong {
  color: #273744;
}

.qms-dashboard-page .card-head a {
  color: #836845;
}

.qms-dashboard-page .card-head a:hover {
  color: #6a5233;
}

.qms-card-heading {
  display: grid;
  gap: 4px;
}

.qms-card-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

.qms-health-grid {
  gap: 14px;
}

.qms-health-tile {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfaf6 0%, #f6f1e8 100%);
  border-color: #e4dccf;
}

.qms-health-tile:hover {
  transform: translateY(-2px);
  border-color: #d8cdbd;
  box-shadow: 0 16px 28px rgba(42, 38, 31, 0.06);
}

.qms-health-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.qms-health-icon--emerald {
  background: #e7ede6;
  color: #526957;
}

.qms-health-icon--blue {
  background: #e7ebf0;
  color: #56677a;
}

.qms-health-icon--violet {
  background: #ede8ef;
  color: #675a73;
}

.qms-health-icon--amber {
  background: #f5ecde;
  color: #8f7346;
}

.qms-health-icon--rose {
  background: #f0e7e7;
  color: #7d5f63;
}

.qms-health-score {
  font-size: 1.72rem;
}

.qms-progress,
.qms-bar-track {
  background: #e9e2d7;
}

.qms-two-panel {
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 24px;
  align-items: center;
}

.qms-ring-chart {
  width: 168px;
  height: 168px;
}

.qms-command-card {
  background: linear-gradient(180deg, rgba(250, 247, 241, 0.98) 0%, rgba(244, 239, 231, 0.95) 100%);
  border-color: rgba(222, 213, 199, 0.95);
}

.qms-command-divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, rgba(95, 83, 61, 0.04), rgba(95, 83, 61, 0.18), rgba(95, 83, 61, 0.04));
}

.qms-command-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qms-dashboard-page .quick-btn {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(217, 209, 197, 0.95);
  color: #344554;
  box-shadow: none;
}

.qms-dashboard-page .quick-btn:hover {
  transform: translateY(-1px);
  border-color: #ccbda5;
  background: rgba(255, 255, 255, 0.92);
}

.qms-dashboard-page .quick-btn-primary {
  background: linear-gradient(135deg, #283744 0%, #364756 100%);
  border-color: rgba(40, 55, 68, 0.9);
  color: #f8f3e9;
}

.qms-command-actions .quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-align: center;
}

.qms-spotlight-grid {
  gap: 12px;
}

.qms-spotlight-grid div {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(222, 214, 201, 0.92);
}

.qms-alert-list {
  gap: 12px;
}

.qms-alert-list .alert-item {
  background: linear-gradient(180deg, #fbf8f0 0%, #f5efe4 100%);
  border-color: #e7dbc7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.qms-alert-list .alert-item strong {
  color: #67523a;
}

.qms-alert-tag {
  background: rgba(62, 73, 85, 0.08);
  color: #4d5c69;
}

.qms-dashboard-page .data-table thead th {
  background: #f2eee7;
  color: #556474;
}

@media (max-width: 1320px) {
  .qms-dashboard-masthead {
    grid-template-columns: 1fr;
  }

  .qms-masthead-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 992px) {
  .page-content.qms-dashboard-page {
    padding: 18px;
  }

  .qms-dashboard-masthead {
    padding: 20px;
  }

  .qms-masthead-copy h2 {
    font-size: 1.65rem;
  }

  .qms-masthead-insights,
  .qms-command-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Topbar Refinement
========================= */

.topbar.topbar-enterprise {
  padding: 14px 22px;
  min-height: 84px;
  background:
    radial-gradient(circle at 88% 16%, rgba(180, 146, 86, 0.18), transparent 18%),
    linear-gradient(135deg, #17324b 0%, #1b4856 62%, #23555b 100%);
  border-bottom: 1px solid rgba(203, 180, 138, 0.16);
  box-shadow: 0 14px 30px rgba(16, 27, 37, 0.14);
}

.topbar-dashboard-focus {
  background:
    radial-gradient(circle at 88% 18%, rgba(186, 154, 94, 0.22), transparent 18%),
    linear-gradient(135deg, #18344c 0%, #1c4958 58%, #245a57 100%);
}

.topbar-enterprise .menu-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f6f8fb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.topbar-left {
  gap: 14px;
  align-items: center;
}

.topbar-heading-stack {
  gap: 6px;
}

.topbar-heading-meta {
  gap: 10px;
}

.topbar-module-chip,
.topbar-date-chip {
  height: 28px;
  padding: 0 12px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topbar-module-chip {
  background: rgba(77, 177, 145, 0.14);
  color: #e4f4ef;
  border: 1px solid rgba(77, 177, 145, 0.24);
}

.topbar-date-chip {
  background: rgba(186, 154, 94, 0.14);
  color: #f2e6cf;
  border: 1px solid rgba(186, 154, 94, 0.2);
}

.topbar-enterprise .page-title {
  margin: 0;
  font-size: 1.82rem;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #f8fbfd;
}

.topbar-enterprise .page-subtitle {
  max-width: 520px;
  margin: 0;
  font-size: 0.91rem;
  line-height: 1.45;
  color: rgba(233, 239, 244, 0.76);
}

.topbar-enterprise .page-breadcrumbs {
  gap: 6px;
  font-size: 11px;
  color: rgba(232, 237, 242, 0.58);
}

.topbar-right {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 12px;
}

.topbar-action-row {
  gap: 10px;
}

.topbar-enterprise .topbar-btn,
.topbar-enterprise .topbar-lang-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 11px;
  background: rgba(250, 252, 251, 0.94);
  border: 1px solid rgba(233, 224, 208, 0.86);
  color: #1d3448;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(13, 25, 35, 0.06);
}

.topbar-enterprise .topbar-btn:hover,
.topbar-enterprise .topbar-lang-btn:hover {
  background: #ffffff;
  border-color: rgba(190, 160, 110, 0.78);
  color: #143043;
}

.topbar-btn-back {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f9fbfc !important;
}

.topbar-btn-back:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(201, 181, 147, 0.32) !important;
}

.topbar-btn-ghost {
  background: rgba(183, 151, 98, 0.16) !important;
  border-color: rgba(201, 181, 147, 0.24) !important;
  color: #fcf7ee !important;
}

.topbar-btn-ghost:hover {
  background: rgba(183, 151, 98, 0.24) !important;
}

.topbar-lang-btn-single {
  min-width: 46px;
}

.topbar-lang-btn-single.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: #18344c;
}

.user-box.user-box-compact {
  min-width: 230px;
  padding: 10px 12px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(212, 193, 157, 0.14);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(14, 25, 34, 0.08);
}

.user-box.user-box-compact .user-avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
  background: linear-gradient(135deg, #1f8c74 0%, #17486a 72%);
  box-shadow: inset 0 0 0 1px rgba(219, 196, 157, 0.18);
}

.user-box-content {
  min-width: 0;
  display: grid;
  gap: 4px;
  flex: 1;
}

.user-box-head,
.user-box-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-box.user-box-compact h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  color: #f8fbfd;
}

.user-box.user-box-compact p {
  margin: 0;
  font-size: 11px;
  color: rgba(239, 244, 247, 0.72);
  letter-spacing: 0.08em;
}

.user-access-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(77, 177, 145, 0.14);
  border: 1px solid rgba(77, 177, 145, 0.2);
  color: #ddf3eb;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.user-box-link {
  color: #e7d5b4;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.user-box-link:hover {
  color: #f6e8cd;
}

@media (max-width: 1200px) {
  .topbar.topbar-enterprise {
    padding: 14px 18px;
  }

  .topbar-enterprise .page-title {
    font-size: 1.58rem;
  }
}

@media (max-width: 992px) {
  .topbar-right {
    width: 100%;
    justify-items: stretch;
  }

  .topbar-action-row {
    justify-content: flex-start;
  }

  .user-box.user-box-compact {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar-heading-meta,
  .topbar-action-row,
  .user-box-head,
  .user-box-foot {
    flex-wrap: wrap;
  }

  .topbar-enterprise .page-title {
    font-size: 1.42rem;
  }
}

/* =========================
   Green Nature Login Refresh
========================= */

body.login-body.gns-login-page {
  background:
    radial-gradient(circle at top left, rgba(26, 111, 96, 0.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(180, 145, 82, 0.08), transparent 24%),
    linear-gradient(180deg, #f4f8f5 0%, #edf2ef 100%);
}

.gns-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.gns-login-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 56px;
  color: #f8fbf9;
  background:
    linear-gradient(135deg, rgba(14, 43, 57, 0.98), rgba(21, 82, 78, 0.92)),
    url('../images/login-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
}

.gns-login-brand-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(195, 158, 92, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 50%);
  pointer-events: none;
}

.gns-login-brand-content,
.gns-login-panel-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.gns-login-brand-content {
  max-width: 720px;
}

.gns-brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(195, 158, 92, 0.24);
  color: #eadfc9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gns-brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.gns-brand-logo-shell {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 20px 44px rgba(0,0,0,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gns-brand-logo {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.gns-brand-fallback {
  font-size: 28px;
  font-weight: 800;
  color: #0f6a5f;
}

.gns-brand-copy h1 {
  margin: 0 0 10px;
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.gns-brand-copy p,
.gns-brand-summary p {
  margin: 0;
  max-width: 58ch;
  color: rgba(244, 248, 246, 0.84);
  line-height: 1.72;
  font-size: 16px;
}

.gns-brand-summary {
  margin-bottom: 24px;
}

.gns-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gns-brand-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
}

.gns-brand-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: #ffffff;
}

.gns-brand-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(240, 245, 243, 0.76);
}

.gns-brand-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.gns-brand-proof span {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(195, 158, 92, 0.18);
  color: #eadfc9;
  font-size: 12px;
  font-weight: 700;
}

.gns-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(180deg, #f8fbf8 0%, #edf3ef 100%);
}

.gns-login-panel-inner {
  max-width: 520px;
}

.gns-login-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(215,225,220,0.9);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.1);
}

.gns-login-header {
  margin-bottom: 24px;
}

.gns-login-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 106, 95, 0.08);
  border: 1px solid rgba(15, 106, 95, 0.12);
  color: #0f6a5f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gns-login-header h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #102433;
}

.gns-login-header p {
  margin: 0;
  color: #617384;
  line-height: 1.68;
}

.gns-login-form .form-group label {
  font-weight: 700;
  color: #102433;
}

.gns-login-form input {
  min-height: 54px;
  border-radius: 16px;
}

.gns-login-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  border-radius: 16px;
  background: linear-gradient(135deg, #146b63 0%, #1b4a79 70%, #b48b4e 100%);
  box-shadow: 0 18px 36px rgba(20, 70, 91, 0.18);
}

.gns-login-meta {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gns-meta-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fbf9;
  border: 1px solid rgba(197,208,202,0.7);
}

.gns-meta-card span,
.gns-meta-card strong {
  display: block;
}

.gns-meta-card span {
  margin-bottom: 6px;
  font-size: 12px;
  color: #6b7c8a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gns-meta-card strong {
  color: #143247;
  line-height: 1.5;
}

.gns-meta-card a {
  color: #0f6a5f;
  font-weight: 700;
}

.gns-login-footnote {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7eef0;
}

.gns-login-footnote p {
  margin: 0 0 6px;
}

.gns-login-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.gns-login-contact a {
  color: #0f6a5f;
  font-weight: 700;
  text-decoration: none;
}

.gns-login-contact a:hover {
  color: #1b4a79;
}

.gns-login-muted,
.gns-panel-footer {
  color: #6b7c8a;
}

.gns-panel-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .gns-login-shell {
    grid-template-columns: 1fr;
  }

  .gns-login-brand-panel {
    min-height: auto;
    padding: 40px 28px;
  }

  .gns-login-panel {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .gns-login-brand-panel,
  .gns-login-panel {
    padding: 20px;
  }

  .gns-brand-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .gns-brand-copy h1 {
    font-size: 36px;
  }

  .gns-brand-grid,
  .gns-login-meta {
    grid-template-columns: 1fr;
  }

  .gns-login-card {
    padding: 24px;
    border-radius: 24px;
  }
}

/* =========================
   Login Stability Overrides
========================= */

.gns-login-shell {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
}

.gns-login-brand-panel {
  padding: 40px;
}

.gns-login-brand-content {
  max-width: 640px;
}

.gns-brand-pill {
  margin-bottom: 22px;
  padding: 9px 14px;
}

.gns-brand-lockup {
  margin-bottom: 18px;
}

.gns-brand-logo-shell {
  width: 78px;
  height: 78px;
  border-radius: 20px;
}

.gns-brand-copy h1 {
  margin-bottom: 8px;
  font-size: 38px;
}

.gns-brand-copy p,
.gns-brand-summary p {
  font-size: 15px;
  line-height: 1.62;
}

.gns-brand-summary {
  margin-bottom: 18px;
}

.gns-brand-list {
  display: grid;
  gap: 10px;
}

.gns-brand-list-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.gns-brand-list-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #ffffff;
}

.gns-brand-list-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
  color: rgba(240, 245, 243, 0.76);
}

.gns-brand-proof {
  margin-top: 18px;
}

.gns-login-panel {
  padding: 28px;
}

.gns-login-panel-inner {
  max-width: 480px;
}

.gns-login-card {
  padding: 26px;
  border-radius: 22px;
}

.gns-login-header {
  margin-bottom: 18px;
}

.gns-login-header h2 {
  font-size: 26px;
}

.gns-login-header p {
  font-size: 14px;
  line-height: 1.6;
}

.gns-login-form .form-group {
  margin-bottom: 16px;
}

.gns-login-form input {
  min-height: 50px;
}

.gns-login-submit {
  min-height: 50px;
  box-shadow: 0 14px 28px rgba(20, 70, 91, 0.16);
}

.gns-login-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gns-meta-card {
  padding: 12px 14px;
  border-radius: 14px;
}

.gns-login-footnote {
  margin-top: 16px;
  padding-top: 14px;
}

@media (max-width: 1180px) {
  .gns-login-shell {
    grid-template-columns: 1fr;
  }

  .gns-login-brand-panel {
    padding: 28px 24px;
  }
}

@media (max-width: 720px) {
  .gns-login-panel,
  .gns-login-brand-panel {
    padding: 18px;
  }

  .gns-brand-copy h1 {
    font-size: 32px;
  }

  .gns-login-meta {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Login Commercial Polish
========================= */

body.login-body.gns-login-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(15, 48, 87, 0.14), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(20, 91, 115, 0.12), transparent 22%),
    linear-gradient(135deg, #eef3f8 0%, #f8fafc 52%, #e7eef5 100%);
}

.gns-login-brand-panel {
  background:
    linear-gradient(145deg, rgba(9, 30, 55, 0.96) 0%, rgba(15, 48, 87, 0.92) 42%, rgba(20, 91, 115, 0.9) 100%);
}

.gns-login-brand-layer {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(152, 218, 205, 0.16), transparent 22%);
}

.gns-brand-pill {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
  color: #f4fbff;
}

.gns-brand-logo-shell {
  box-shadow: 0 22px 46px rgba(3, 12, 24, 0.28);
}

.gns-brand-fallback {
  color: #145b73;
}

.gns-brand-list-item {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.gns-brand-proof span {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.16);
  color: #f7fbff;
}

.gns-login-panel {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.86) 0%, rgba(236, 242, 248, 0.92) 100%);
}

.gns-login-card {
  background: rgba(255,255,255,0.95);
  border-color: rgba(210, 221, 232, 0.96);
  box-shadow: 0 28px 64px rgba(16, 36, 51, 0.12);
}

.gns-login-kicker,
.gns-login-promo-kicker {
  background: rgba(15, 48, 87, 0.08);
  color: #0f3057;
}

.gns-login-header h2,
.gns-meta-card strong,
.gns-login-promo h3 {
  color: #102433;
}

.gns-login-header p,
.gns-login-muted,
.gns-panel-footer,
.gns-login-promo p,
.gns-login-promo-contact {
  color: #5a6c7c;
}

.gns-login-form input {
  border-color: #d4dee8;
  background: #fbfdff;
}

.gns-login-form input:focus {
  border-color: #145b73;
  box-shadow: 0 0 0 4px rgba(20, 91, 115, 0.12);
}

.gns-login-submit {
  border: 0;
  background: linear-gradient(135deg, #0f3057 0%, #145b73 56%, #0f766e 100%);
  box-shadow: 0 16px 30px rgba(15, 48, 87, 0.18);
}

.gns-login-submit:hover,
.gns-login-submit:focus {
  background: linear-gradient(135deg, #0c294a 0%, #124f64 56%, #0d6b64 100%);
}

.gns-meta-card {
  background: linear-gradient(180deg, #f8fbfd 0%, #f1f6fa 100%);
  border: 1px solid #dce6ee;
}

.gns-meta-card a,
.gns-login-contact a,
.gns-login-promo-contact a {
  color: #145b73;
}

.gns-meta-card a:hover,
.gns-login-contact a:hover,
.gns-login-promo-contact a:hover {
  color: #0f3057;
}

.gns-login-promo {
  margin-top: 16px;
  padding: 18px 18px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #f1f6fb 0%, #f8fbfd 100%);
  border: 1px solid #d7e3ee;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.gns-login-promo-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gns-login-promo h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.3;
}

.gns-login-promo p {
  margin: 0;
  line-height: 1.7;
}

.gns-login-promo-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.gns-login-promo-contact a {
  text-decoration: none;
}

.gns-login-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.gns-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #c9d7e3;
  background: #ffffff;
  color: #12324b;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(16, 36, 51, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.gns-promo-btn:hover,
.gns-promo-btn:focus {
  transform: translateY(-1px);
  border-color: #94aec2;
  color: #0f3057;
  box-shadow: 0 14px 24px rgba(16, 36, 51, 0.1);
}

.gns-promo-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0f3057 0%, #145b73 56%, #0f766e 100%);
  color: #ffffff;
}

.gns-promo-btn-primary:hover,
.gns-promo-btn-primary:focus {
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(15, 48, 87, 0.2);
}

@media (max-width: 720px) {
  .gns-login-promo {
    padding: 16px;
  }

  .gns-login-promo-actions,
  .gns-login-promo-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .gns-login-promo-contact span {
    display: none;
  }

  .gns-promo-btn {
    width: 100%;
  }
}

/* =========================
   Login Layout Refresh
========================= */

.gns-login-shell {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
}

.gns-login-brand-panel {
  align-items: flex-start;
  padding: 28px 34px 24px;
}

.gns-login-brand-watermark {
  position: absolute;
  inset: auto -40px -40px auto;
  width: min(42vw, 420px);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.gns-login-brand-watermark-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.8);
}

.gns-login-brand-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gns-brand-pill {
  margin-bottom: 10px;
}

.gns-brand-lockup {
  margin-bottom: 0;
}

.gns-brand-summary {
  margin-bottom: 0;
}

.gns-login-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.98fr);
  gap: 14px;
  align-items: stretch;
}

.gns-brand-list {
  gap: 12px;
}

.gns-brand-list-item {
  min-height: 112px;
}

.gns-login-promo-left {
  margin-top: 0;
  padding: 20px;
  background: rgba(248, 251, 254, 0.1);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 22px 46px rgba(5, 18, 34, 0.18);
  backdrop-filter: blur(16px);
}

.gns-login-promo-left .gns-login-promo-kicker {
  background: rgba(255,255,255,0.12);
  color: #f6fbff;
}

.gns-login-promo-left h3,
.gns-login-promo-left p,
.gns-login-promo-left .gns-login-promo-contact,
.gns-login-promo-left .gns-login-promo-contact a {
  color: #f3f8fc;
}

.gns-login-promo-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.gns-login-promo-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
}

.gns-login-promo-item span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(227, 238, 247, 0.72);
}

.gns-login-promo-item strong {
  display: block;
  color: #ffffff;
  line-height: 1.55;
}

.gns-login-promo-left .gns-promo-btn {
  background: rgba(255,255,255,0.94);
  border-color: rgba(255,255,255,0.18);
  color: #0f3057;
}

.gns-login-promo-left .gns-promo-btn-primary {
  background: linear-gradient(135deg, #0f3057 0%, #145b73 56%, #0f766e 100%);
  color: #ffffff;
}

.gns-login-promo-left .gns-promo-btn-primary:hover,
.gns-login-promo-left .gns-promo-btn-primary:focus {
  color: #ffffff;
}

.gns-brand-proof {
  margin-top: 0;
}

.gns-login-panel {
  align-items: flex-start;
  padding: 26px 30px 18px;
}

.gns-login-panel-inner {
  display: grid;
  gap: 14px;
  max-width: 500px;
}

.gns-login-card {
  padding: 24px 24px 22px;
}

.gns-login-meta {
  margin-top: 0;
}

.gns-meta-card {
  min-height: 88px;
}

.gns-panel-footer {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .gns-login-brand-panel,
  .gns-login-panel {
    padding-top: 22px;
  }

  .gns-login-showcase {
    grid-template-columns: 1fr;
  }

  .gns-login-brand-watermark {
    width: 280px;
  }
}

@media (max-width: 720px) {
  .gns-login-brand-panel,
  .gns-login-panel {
    padding: 18px 16px 16px;
  }

  .gns-login-brand-content {
    gap: 12px;
  }

  .gns-login-showcase {
    gap: 12px;
  }

  .gns-login-promo-left {
    padding: 16px;
  }

  .gns-login-brand-watermark {
    width: 200px;
    inset: auto -24px -18px auto;
  }
}

.commercial-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.commercial-module-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d9e2ec;
  background: #f8fafc;
  color: #102433;
  cursor: pointer;
}

.commercial-module-pill input {
  width: 16px;
  height: 16px;
}

.commercial-module-pill span {
  font-size: 14px;
  font-weight: 600;
}
