/* Minimalistic UI Components */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* KPI Cards */
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.kpi-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

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

.btn-block {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-input, .form-select {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-main);
  background: var(--bg-surface);
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.1);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--bg-subtle);  color: var(--text-secondary); }
.badge-emerald { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-canvas);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

tr.clickable:hover td {
  background: var(--bg-canvas);
  cursor: pointer;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 9px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Progress Bars */
.progress-track {
  width: 100%;
  height: 7px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

/* Compliance / Info Banner */
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
}

/* Slide-Over Drawer & Modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 50;
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-main);
  color: #fff;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  z-index: 80;
}

/* Role Quick Cards on Login */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.role-pill {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.role-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.role-pill strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-main);
}

.role-pill span {
  font-size: 11px;
  color: var(--text-muted);
}

/* 14-Section Hub Cards */
.section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.section-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* Email Preview Frame */
.email-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.email-header {
  background: var(--bg-canvas);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.email-body {
  padding: 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #FECACA;
}

.btn-danger:hover {
  background: #FECACA;
}

.modal-lg {
  max-width: 980px;
}

.modal-pdf {
  max-width: 980px;
  height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Digilock Interactive A4 PDF Viewer (Chrome PDF Reader Style) */
.pdf-viewer-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #525659;
}

.pdf-toolbar {
  background: #323639;
  color: #F8FAFC;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  border-bottom: 1px solid #1E293B;
}

.pdf-canvas {
  flex: 1;
  padding: 28px 24px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pdf-page {
  width: 100%;
  max-width: 794px;
  min-height: 960px;
  background: #FFFFFF;
  color: #0F172A;
  padding: 48px 54px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.65;
  transform-origin: top center;
  display: flex;
  flex-direction: column;
}

.pdf-stamp {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
}

