/* ============================================================
   Global Reset
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: #f2f0e8;
  font-family: "Robinson", sans-serif;
  color: #1c1900;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   admin.php — Login Page
   ============================================================ */

body.page-login {
  background-image: url("../images/background.png");
}

#emp_code {
  text-transform: uppercase;
}

#password {
  padding-right: 44px;
}

.login-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

/* ── Card wrapper ── */
.login-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(130, 120, 0, 0.18);
  border-radius: 2px;
  padding: 56px 60px 52px;
  box-shadow:
    0 1px 0 0 rgba(130, 120, 0, 0.6),
    0 -1px 0 0 rgba(130, 120, 0, 0.15),
    0 30px 80px rgba(100, 90, 0, 0.14),
    0 6px 24px rgba(0, 0, 0, 0.07);
}

/* corner ornaments */
.login-card::before,
.login-card::after,
.corner-tl,
.corner-br {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
}

.corner-tl {
  top: 10px;
  left: 10px;
  border-top: 1.5px solid rgba(130, 120, 0, 0.55);
  border-left: 1.5px solid rgba(130, 120, 0, 0.55);
}

.corner-tr {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-top: 1.5px solid rgba(130, 120, 0, 0.55);
  border-right: 1.5px solid rgba(130, 120, 0, 0.55);
}

.corner-bl {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  border-bottom: 1.5px solid rgba(130, 120, 0, 0.55);
  border-left: 1.5px solid rgba(130, 120, 0, 0.55);
}

.login-card::after {
  bottom: 10px;
  right: 10px;
  border-bottom: 1.5px solid rgba(130, 120, 0, 0.55);
  border-right: 1.5px solid rgba(130, 120, 0, 0.55);
}

/* ── Emblem ── */
.emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.emblem-logo {
  max-width: 190px;
  height: auto;
  margin-bottom: 24px;
}

.emblem-sep {
  width: 40px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(130, 120, 0, 0.45),
    transparent
  );
  margin-bottom: 22px;
}

/* ── Title block ── */
.login-title {
  font-family: "Robinson", sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 12px;
  text-transform: uppercase;
  color: #6e6500;
  text-align: center;
  line-height: 1;
  margin-bottom: 10px;
}

.login-subtitle {
  text-align: center;
  font-family: "Robinson", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: #9d8f50;
  text-transform: uppercase;
}

/* ── Divider ── */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 32px;
}

.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 120, 0, 0.25));
}

.ornament-divider::after {
  background: linear-gradient(270deg, transparent, rgba(130, 120, 0, 0.25));
}

.ornament-divider .diamond {
  width: 6px;
  height: 6px;
  background: #827800;
  opacity: 0.5;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Input label style (Login Card) ── */
.field-group {
  margin-bottom: 20px;
}

.login-card .field-label {
  display: block;
  font-family: "Robinson", sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #9d8f50;
  margin-bottom: 8px;
  padding-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(130, 120, 0, 0.4);
  font-size: 14px;
  pointer-events: none;
  transition: color 0.25s;
}

.input-wrap .input-field {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 16px 0 !important;
  border: 1px solid rgba(130, 120, 0, 0.28);
  background: rgba(255, 255, 255, 0.95);
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #3d3500;
  outline: none;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
  box-shadow: inset 0 1px 3px rgba(130, 120, 0, 0.04);
}

.input-wrap .input-field::placeholder {
  color: rgba(130, 120, 0, 0.28);
}

.input-wrap .input-field:focus {
  border-color: rgba(130, 120, 0, 0.7);
  background: #fff;
  box-shadow:
    inset 0 1px 3px rgba(130, 120, 0, 0.04),
    0 0 0 3px rgba(130, 120, 0, 0.08);
}

.input-wrap:focus-within .input-icon {
  color: #827800;
}

.input-wrap .input-field.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12) !important;
  background: rgba(255, 245, 246, 0.95) !important;
}

.input-wrap.is-invalid .input-icon {
  color: #dc3545 !important;
}

.btn-eye {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: rgba(130, 120, 0, 0.4);
  font-size: 15px;
  line-height: 1;
  transition: color 0.2s;
}

.btn-eye:hover {
  color: #827800;
}

.invalid-msg {
  display: none;
  font-family: "Robinson", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #dc3545;
  margin-top: 6px;
  padding-left: 4px;
}

.field-group.has-error .invalid-msg {
  display: block;
}

/* ── Button ── */
.btn-login {
  width: 100%;
  padding: 16px 12px;
  margin-top: 12px;
  font-family: "Robinson", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #9c9400 0%, #827800 45%, #6d6500 100%);
  border: none;
  border-radius: 16px 0 !important;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.3s,
    transform 0.15s;
}

.btn-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.btn-login::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-login:hover {
  box-shadow: 0 8px 30px rgba(130, 120, 0, 0.38);
  transform: translateY(-1px);
}

.btn-login:hover::after {
  left: 160%;
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 3px 12px rgba(130, 120, 0, 0.25);
}

/* ── Login Loading Overlay ── */
.login-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #fdfcf4 0%, #f5f0d8 50%, #ede8cc 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: fadeInOverlay 0.35s ease;
}

.login-loading.active {
  display: flex;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ll-logo {
  width: 170px;
  height: auto;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(8px);
  animation: llLogoIn 0.5s ease 0.1s forwards;
}

@keyframes llLogoIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ll-spinner-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
}

.ll-spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(130, 120, 0, 0.12);
  border-top-color: #827800;
  animation: llSpin 0.85s linear infinite;
}

.ll-spinner-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(130, 120, 0, 0.07);
  border-bottom-color: #b0a030;
  animation: llSpin 1.3s linear infinite reverse;
}

@keyframes llSpin {
  to {
    transform: rotate(360deg);
  }
}

.ll-diamond-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  opacity: 0;
  animation: llFadeUp 0.5s ease 0.3s forwards;
}

.ll-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(130, 120, 0, 0.35));
}

.ll-line.rev {
  background: linear-gradient(270deg, transparent, rgba(130, 120, 0, 0.35));
}

.ll-diamond-sm {
  width: 5px;
  height: 5px;
  background: rgba(130, 120, 0, 0.45);
  transform: rotate(45deg);
}

.ll-text {
  font-family: "Robinson", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(130, 120, 0, 0.55);
  opacity: 0;
  animation: llFadeUp 0.5s ease 0.45s forwards;
}

@keyframes llFadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   dashboard.php
   ============================================================ */

.content {
  margin-left: 256px;
  min-height: 100vh;
  padding: 36px 40px 60px;
}

/* ══════════════════════════
   PAGE HEADER
══════════════════════════ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(100, 92, 0, 0.5);
  margin-bottom: 6px;
}

.page-eyebrow i {
  font-size: 10px;
  opacity: 0.6;
}

.page-eyebrow a {
  color: rgba(100, 92, 0, 0.5);
  text-decoration: none;
}

.page-eyebrow a:hover {
  color: #7a7200;
}

.page-title {
  font-family: "Robinson", sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #2a2600;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.1;
}

#last-updated {
  font-size: 11px;
  color: #aaa89a;
}

/* ══════════════════════════
   FILTER BAR
══════════════════════════ */
.filter-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px 24px;
  margin-bottom: 24px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b6400;
  letter-spacing: 0.2px;
}

.input-date-wrap {
  position: relative;
}

.input-date-wrap .date-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(100, 92, 0, 0.4);
  font-size: 13px;
  pointer-events: none;
}

.input-date-wrap .input-field {
  padding: 9px 14px 9px 34px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fafaf8;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #1c1900;
  outline: none;
  min-width: 175px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.input-date-wrap .input-field:focus {
  border-color: #9c9400;
  box-shadow: 0 0 0 3px rgba(122, 114, 0, 0.1);
  background: #fff;
}

.btn-qsncc {
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  --bs-btn-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-bg: #7a7200 !important;
  --bs-btn-hover-bg: #9c9400 !important;
  --bs-btn-active-bg: #5e5800 !important;
  --bs-btn-border-color: #7a7200 !important;
  --bs-btn-hover-border-color: #9c9400 !important;
  border-radius: 8px !important;
  padding: 9px 22px;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  box-shadow:
    0 1px 3px rgba(122, 114, 0, 0.25),
    0 4px 12px rgba(122, 114, 0, 0.15);
}

.btn-qsncc:hover {
  box-shadow: 0 4px 16px rgba(122, 114, 0, 0.35);
  transform: translateY(-1px);
}

#btn-search .bi {
  margin-right: 6px;
}

/* Quick filter pills */
.quick-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.quick-btn {
  font-family: "Robinson", sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(122, 114, 0, 0.2);
  background: transparent;
  color: #6b6400;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.quick-btn:hover,
.quick-btn.active {
  background: #7a7200;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(122, 114, 0, 0.25);
}

/* ══════════════════════════
   KPI CARDS
══════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
}

.kpi-card:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* top accent bar */
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.kpi-card.gold::before {
  background: linear-gradient(90deg, #9c9400, #c4b53a);
}
.kpi-card.green::before {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.kpi-card.blue::before {
  background: linear-gradient(90deg, #4f6ef5, #818cf8);
}
.kpi-card.amber::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}
.kpi-card.red::before {
  background: linear-gradient(90deg, #dc2626, #f87171);
}
.kpi-card.purple::before {
  background: linear-gradient(90deg, #9333ea, #c084fc);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #9a9888;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.kpi-icon.gold {
  background: rgba(122, 114, 0, 0.1);
  color: #7a7200;
}
.kpi-icon.green {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}
.kpi-icon.blue {
  background: rgba(79, 110, 245, 0.1);
  color: #4f6ef5;
}
.kpi-icon.amber {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}
.kpi-icon.red {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}
.kpi-icon.purple {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
}

.kpi-value {
  font-family: "Robinson", sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: #1c1900;
  line-height: 1;
}

.kpi-sub {
  font-size: 11px;
  color: #aaa89a;
}
.kpi-sub span {
  font-weight: 600;
}
.kpi-sub .up {
  color: #16a34a;
}
.kpi-sub .down {
  color: #dc2626;
}

/* ══════════════════════════
   CHART GRID
══════════════════════════ */
.chart-grid {
  display: grid;
  gap: 20px;
}

.chart-grid-1 {
  grid-template-columns: 1fr;
}
.chart-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.chart-grid-3 {
  grid-template-columns: 2fr 1fr;
}
.chart-grid.mb-row {
  margin-bottom: 20px;
}

.chart-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1c1900;
  letter-spacing: -0.2px;
}

.chart-card-subtitle {
  font-size: 11px;
  color: #aaa89a;
  margin-top: 2px;
}

.chart-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(122, 114, 0, 0.07);
  color: #6b6400;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.chart-card-body {
  padding: 20px 22px;
  position: relative;
}

.chart-wrapper {
  position: relative;
}

#wrap-monthly,
#wrap-cumulative {
  height: 240px;
}

#wrap-privacy,
#wrap-email {
  height: 160px;
}

#wrap-juristic {
  height: 300px;
}

/* ══════════════════════════
   COMPANY LIST
══════════════════════════ */
.company-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 340px;
  overflow-y: auto;
}

.company-list::-webkit-scrollbar {
  width: 4px;
}
.company-list::-webkit-scrollbar-track {
  background: transparent;
}
.company-list::-webkit-scrollbar-thumb {
  background: rgba(122, 114, 0, 0.2);
  border-radius: 99px;
}

.company-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
  transition: background 0.12s;
}

.company-item:last-child {
  border-bottom: none;
}
.company-item:hover {
  background: rgba(122, 114, 0, 0.04);
}

.company-item-no {
  font-size: 11px;
  color: #c4c2b0;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}

.company-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9c9400, #c4b53a);
  flex-shrink: 0;
}

.company-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #2a2600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.company-item-date {
  font-size: 10.5px;
  color: #aaa89a;
  white-space: nowrap;
  flex-shrink: 0;
}

.company-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  color: #c4c2b0;
  gap: 8px;
}

.company-list-empty i {
  font-size: 28px;
}
.company-list-empty p {
  font-size: 12px;
  margin: 0;
}

/* ══════════════════════════
   LOADING OVERLAY
══════════════════════════ */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(242, 240, 232, 0.7);
  backdrop-filter: blur(3px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(122, 114, 0, 0.15);
  border-top-color: #7a7200;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-text {
  font-size: 12px;
  font-weight: 600;
  color: #7a7200;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ══════════════════════════
   EMPTY STATE
══════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #c4c2b0;
  gap: 8px;
}

.empty-state i {
  font-size: 32px;
}
.empty-state p {
  font-size: 13px;
  margin: 0;
}

/* ============================================================
   Shared Styles — Inputs, Buttons
   ============================================================ */

/* ── Modal inputs ── */
.input-field-modal {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fafaf8;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #1c1900;
  outline: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.input-field-modal:focus {
  border-color: #9c9400;
  box-shadow: 0 0 0 3px rgba(122, 114, 0, 0.1);
  background: #fff;
}

.input-field-close,
.input-field-save {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
}

.input-field-close {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}
.input-field-save {
  border: 1.5px solid #9c9400;
}

.select-option {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fafaf8;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #1c1900;
  outline: none;
}

/* ── Buttons ── */
.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 8px;
  border: none;
  background: #7a7200;
  color: #fff;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  box-shadow:
    0 1px 3px rgba(122, 114, 0, 0.25),
    0 4px 12px rgba(122, 114, 0, 0.15);
  white-space: nowrap;
}

.btn-create:hover {
  background: #9c9400;
  color: #fff;
  box-shadow: 0 4px 16px rgba(122, 114, 0, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-create i {
  font-size: 15px;
}

.btn-create-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #7a7200;
  border: none;
  border-radius: 9px;
  padding: 9px 18px;
  text-decoration: none;
  box-shadow:
    0 1px 3px rgba(122, 114, 0, 0.3),
    0 4px 12px rgba(122, 114, 0, 0.15);
  transition: all 0.18s;
}

.btn-create-user:hover {
  background: #9c9400;
  color: #fff;
  box-shadow: 0 4px 16px rgba(122, 114, 0, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ncc-disable {
  cursor: default !important;
  --bs-btn-color: rgba(255, 255, 255, 0.65);
  --bs-btn-bg: #d0cec7 !important;
  --bs-btn-hover-bg: #d0cec7 !important;
  --bs-btn-border-color: #d0cec7 !important;
  border-radius: 6px !important;
  font-size: 12px;
  padding: 4px 10px !important;
}

.btn-ncc-active {
  --bs-btn-color: #fff;
  --bs-btn-bg: #4f6ef5 !important;
  --bs-btn-hover-bg: #3d5ce8 !important;
  --bs-btn-border-color: #4f6ef5 !important;
  border-radius: 6px !important;
  font-size: 12px;
  padding: 4px 10px !important;
}

/* ============================================================
   Table Card & DataTable
   ============================================================ */

.table-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.table-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-card-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(122, 114, 0, 0.08);
  color: #6b6400;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.table-card-header-badge i {
  font-size: 11px;
}

.table-card-header-badge.badge-danger {
  background: rgba(220, 38, 38, 0.07);
  color: #991b1b;
}

.table-card-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #1c1900;
  letter-spacing: -0.2px;
}

.table-card-body {
  padding: 0;
}

.table-detail-w {
  white-space: nowrap;
}

/* ── DataTable bottom controls ── */
.dataTables_wrapper .dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dataTables_wrapper .dt-bottom .dataTables_info,
.dataTables_wrapper .dt-bottom .dataTables_paginate {
  padding: 0 !important;
  margin: 0 !important;
}

/* ── DataTable scroll fix ── */
.dataTables_scrollHead {
  background: #fafaf8 !important;
  border-bottom: none !important;
  overflow: hidden !important;
}
.dataTables_scrollHeadInner {
  background: #fafaf8 !important;
}
.dataTables_scrollBody {
  margin-top: 0 !important;
  border-top: none !important;
}

/* ── DataTable overrides ── */
table.dataTable {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}
table.dataTable thead tr {
  border-bottom: none !important;
}

table.dataTable thead th {
  font-family: "Robinson", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  color: #9a9888;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-top: none !important;
  padding: 11px 16px !important;
  background: #fafaf8;
  white-space: nowrap;
}

table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  color: rgba(100, 92, 0, 0.35);
  font-size: 9px;
}

table.dataTable tbody tr {
  transition: background 0.12s;
}

table.dataTable tbody td {
  font-family: "Robinson", sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: #2a2600;
  padding: 11px 16px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045) !important;
  vertical-align: middle;
  background: #fff;
}

table.dataTable tbody tr:nth-child(even) td {
  background: #fdfcf8 !important;
}
table.dataTable tbody tr:last-child td {
  border-bottom: none !important;
}
table.dataTable tbody tr:hover td {
  background: rgba(122, 114, 0, 0.045) !important;
}

table td {
  font-weight: normal;
}

/* DataTable controls */
.dataTables_wrapper {
  font-family: "Robinson", sans-serif;
}

.dataTables_wrapper .dataTables_filter label {
  font-size: 13px;
  color: #6b6a5e;
  font-weight: 400;
  display: flex;
  align-items: center;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #1c1900;
  background: #fafaf8;
  outline: none;
  margin-left: 8px;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #9c9400;
  box-shadow: 0 0 0 3px rgba(122, 114, 0, 0.1);
  background: #fff;
}

.dataTables_wrapper .dataTables_length {
  font-size: 13px;
  color: #6b6a5e;
}

.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: "Robinson", sans-serif;
  font-size: 12px;
  color: #1c1900;
  background: #fafaf8;
  margin: 0 6px;
}

.dataTables_wrapper .dataTables_info {
  font-size: 12px;
  color: #9e9c8e;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  font-size: 12px;
  font-family: "Robinson", sans-serif;
  border-radius: 6px !important;
  padding: 5px 11px !important;
  color: #6b6a5e !important;
  transition: all 0.15s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: transparent !important;
  color: #1c1900 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #7a7200 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(122, 114, 0, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: rgba(0, 0, 0, 0.2) !important;
}

/* ── DataTable toolbar ── */
.dt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fafaf8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  gap: 12px;
  flex-wrap: wrap;
}

.dt-toolbar .dt-buttons {
  margin: 0;
}
.dt-toolbar .dataTables_filter {
  margin: 0;
  margin-left: auto;
}

.dt-toolbar .dataTables_filter label {
  font-size: 0;
  display: flex;
  align-items: center;
  margin: 0;
}

.dt-toolbar .dataTables_filter input {
  font-size: 13px !important;
  margin: 0 !important;
  padding-left: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%238a8878' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
}

.dt-buttons .dt-button {
  font-family: "Robinson", sans-serif;
  font-size: 12px;
  font-weight: 600;
  background: rgba(122, 114, 0, 0.07) !important;
  color: #6b6400 !important;
  border: 1.5px solid rgba(122, 114, 0, 0.2) !important;
  border-radius: 8px !important;
  padding: 7px 16px !important;
  transition: all 0.18s;
  box-shadow: none !important;
}

.dt-buttons .dt-button:hover {
  background: #7a7200 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(122, 114, 0, 0.3) !important;
}

/* ============================================================
   Status Badges & Action Buttons
   ============================================================ */

.badge-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-x {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.policy-check {
  color: #166534;
  font-size: 15px;
}
.policy-x {
  color: #991b1b;
  font-size: 15px;
}
.policy-center {
  text-align: center;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(122, 114, 0, 0.08);
  color: #6b6400;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.status-badge.active {
  background: rgba(74, 150, 45, 0.1);
  color: #3a7a1e;
}
.status-badge.inactive {
  background: rgba(192, 57, 43, 0.08);
  color: #c0392b;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.active .status-dot {
  background: #4a962d;
}
.status-badge.inactive .status-dot {
  background: #c0392b;
}

/* ── Action buttons ── */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}

.btn-action + .btn-action {
  margin-left: 4px;
}

.btn-action-edit {
  background: rgba(122, 114, 0, 0.08);
  color: #6b6400;
}
.btn-action-edit:hover {
  background: #7a7200;
  color: #fff;
  box-shadow: 0 3px 10px rgba(122, 114, 0, 0.3);
}

.btn-action-delete {
  background: rgba(192, 57, 43, 0.08);
  color: #c0392b;
}
.btn-action-delete:hover {
  background: #c0392b;
  color: #fff;
  box-shadow: 0 3px 10px rgba(192, 57, 43, 0.3);
}

.btn-action-delete-disabled {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
}

.btn-action-email {
  background: rgba(79, 110, 245, 0.08);
  color: #3d5ce8;
}
.btn-action-email:hover {
  background: #4f6ef5;
  color: #fff;
  box-shadow: 0 3px 10px rgba(79, 110, 245, 0.3);
}

.btn-action-email-done {
  background: rgba(0, 0, 0, 0.04);
  color: #aaa;
  cursor: default;
}

.btn-action-revert {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}
.btn-action-revert:hover {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.3);
}

/* ── Password mask ── */
.pwd-mask {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(122, 114, 0, 0.06);
  border: 1px solid rgba(122, 114, 0, 0.15);
  border-radius: 6px;
  padding: 3px 10px 3px 8px;
  font-size: 12px;
  color: #7a7200;
  letter-spacing: 2px;
  white-space: nowrap;
}

.pwd-mask i {
  font-size: 11px;
  letter-spacing: 0;
  opacity: 0.7;
}

.pwd-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-pwd-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 5px;
  background: rgba(122, 114, 0, 0.07);
  color: #7a7200;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-pwd-copy:hover {
  background: #7a7200;
  color: #fff;
  box-shadow: 0 2px 8px rgba(122, 114, 0, 0.3);
}
.btn-pwd-copy.copied {
  background: #16a34a;
  color: #fff;
}

/* ── Misc ── */
.font-weight {
  font-weight: normal;
}
.color-ncc {
  background-color: #7a7200;
}
.select2 {
  width: 100% !important;
}

/* ============================================================
   Modals
   ============================================================ */

.modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 22px 26px 18px;
}

.modal-title {
  font-family: "Robinson", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #1c1900;
  letter-spacing: -0.3px;
}

.modal-body {
  padding: 20px 26px 24px;
  background: #fff;
}

.modal-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(100, 92, 0, 0.45);
  padding: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-section:first-child {
  padding-top: 4px;
}

.modal-section::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
}

.modal-body .col-form-label {
  font-family: "Robinson", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #6b6a5e;
  padding-bottom: 5px;
  letter-spacing: 0;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafaf8;
  padding: 14px 26px;
  gap: 10px;
}

.modal-narrow {
  max-width: 420px;
}

.delete-warning {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.12);
  border-radius: 10px;
  margin-top: 4px;
}

.delete-warning i {
  font-size: 24px;
  color: #dc2626;
  flex-shrink: 0;
}

.delete-warning p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #450a0a;
  line-height: 1.5;
}

.delete-warning p span {
  font-size: 12px;
  font-weight: 400;
  color: rgba(185, 28, 28, 0.55);
  display: block;
  margin-top: 2px;
}

.revert-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(22, 163, 74, 0.05);
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 10px;
  margin-top: 4px;
}

.revert-notice i {
  font-size: 24px;
  color: #16a34a;
  flex-shrink: 0;
}

.revert-notice p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #14532d;
  line-height: 1.5;
}

.revert-notice p span {
  font-size: 12px;
  font-weight: 400;
  color: rgba(21, 128, 61, 0.6);
  display: block;
  margin-top: 2px;
}

/* ── Modal buttons ── */
.btn-modal-close {
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px !important;
  padding: 9px 20px;
}

.btn-modal-save {
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px !important;
  padding: 9px 24px;
  background: #7a7200;
  color: #fff;
  border: none;
  box-shadow:
    0 1px 3px rgba(122, 114, 0, 0.3),
    0 4px 12px rgba(122, 114, 0, 0.15);
  transition: all 0.18s;
}

.btn-modal-save:hover {
  background: #9c9400;
  box-shadow: 0 4px 16px rgba(122, 114, 0, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

.btn-modal-delete {
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px !important;
  padding: 9px 24px;
  background: #dc2626;
  color: #fff;
  border: none;
  transition: all 0.18s;
}

.btn-modal-delete:hover {
  background: #b91c1c;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

.btn-modal-revert {
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px !important;
  padding: 9px 24px;
  background: #16a34a;
  color: #fff;
  border: none;
  box-shadow:
    0 1px 3px rgba(22, 163, 74, 0.3),
    0 4px 12px rgba(22, 163, 74, 0.15);
  transition: all 0.18s;
}

.btn-modal-revert:hover {
  background: #15803d;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* ============================================================
   Form Pages (form_role.php, form_users.php)
   ============================================================ */

.form-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* ── form_role header (icon style) ── */
.form-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafaf8;
}

.form-card-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #9c9400, #6d6500);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(122, 114, 0, 0.28);
  flex-shrink: 0;
}

.form-card-header-icon i {
  color: #fff;
  font-size: 16px;
}

.form-card-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #1c1900;
  letter-spacing: -0.2px;
}

.form-card-header-sub {
  font-size: 12px;
  color: #9a9888;
  margin-top: 2px;
}

/* ── form_users header (badge style) ── */
.form-card-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(122, 114, 0, 0.08);
  color: #6b6400;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.form-card-body {
  padding: 28px;
}

/* ── Form field label (form pages) ── */
.form-card-body .field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #6b6a5e;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.field-required {
  color: #c0392b;
  margin-left: 3px;
}

.field-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: #fafaf8;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  color: #1c1900;
  outline: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.field-input:focus {
  border-color: #9c9400;
  box-shadow: 0 0 0 3px rgba(122, 114, 0, 0.1);
  background: #fff;
}

.field-input:disabled {
  background: #f5f4ef;
  color: #9a9888;
  cursor: not-allowed;
}

.field-input.is-error,
.field-input.field-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
  background: #fff8f8;
}

.field-input.emp-found {
  border-color: #5a8a00;
}
.field-input.emp-not-found {
  border-color: #c0392b;
}

.field-error {
  display: none;
  font-size: 11.5px;
  color: #c0392b;
  margin-top: 5px;
}

/* ── Employee code row ── */
.emp-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.emp-code-wrapper {
  position: relative;
  flex: 1;
}

.emp-code-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  display: none;
}

.emp-code-status.found {
  color: #5a8a00;
  display: block;
}
.emp-code-status.not-found {
  color: #c0392b;
  display: block;
}

/* ── Status radio ── */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #2a2600;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  accent-color: #7a7200;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Section divider / label ── */
.section-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin: 24px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: #9a9888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.error-class {
  display: none;
  font-size: 11px;
  color: #c0392b;
  margin-top: 5px;
}

/* ── Permissions table ── */
.perm-table {
  width: 100%;
  border-collapse: collapse;
}

.perm-table thead th {
  font-size: 10.5px;
  font-weight: 600;
  color: #9a9888;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 9px 14px;
  background: #fafaf8;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  text-align: left;
}

.perm-table thead th:last-child {
  text-align: center;
}

.perm-table tbody td {
  font-size: 13px;
  color: #2a2600;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.045);
}

.perm-table tbody tr:last-child td {
  border-bottom: none;
}
.perm-table tbody tr:hover td {
  background: rgba(122, 114, 0, 0.03);
}
.perm-table tbody td:first-child {
  color: #aaa89a;
  font-size: 11.5px;
  width: 48px;
}
.perm-table tbody td:last-child {
  text-align: center;
}

/* ── Switch toggle ── */
.form-check-input {
  width: 36px;
  height: 20px;
  cursor: pointer;
  accent-color: #7a7200;
}

.form-check-input:checked {
  background-color: #7a7200;
  border-color: #7a7200;
}

/* ── Form actions / footer ── */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 28px;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #7a7200;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  box-shadow: 0 1px 3px rgba(122, 114, 0, 0.25);
}

.btn-search:hover:not(:disabled) {
  background: #9c9400;
  box-shadow: 0 4px 14px rgba(122, 114, 0, 0.3);
  transform: translateY(-1px);
}

.btn-search:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6b6a5e;
  background: rgba(0, 0, 0, 0.05);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 9px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-cancel:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #1c1900;
  text-decoration: none;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Robinson", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #7a7200;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  cursor: pointer;
  box-shadow:
    0 1px 3px rgba(122, 114, 0, 0.3),
    0 4px 12px rgba(122, 114, 0, 0.15);
  transition: all 0.18s;
}

.btn-save:hover {
  background: #9c9400;
  box-shadow: 0 4px 16px rgba(122, 114, 0, 0.35);
  transform: translateY(-1px);
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   report.php — Stat Cards
   ============================================================ */

.stat-cards {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 220px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.055);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 8px 28px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
}

.stat-card-bar {
  height: 3px;
}

.stat-card-bar.green {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.stat-card-bar.blue {
  background: linear-gradient(90deg, #4f6ef5, #818cf8);
}

.stat-card-body {
  padding: 18px 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.stat-card-icon.green {
  background: linear-gradient(
    135deg,
    rgba(22, 163, 74, 0.12),
    rgba(74, 222, 128, 0.08)
  );
  border: 1px solid rgba(22, 163, 74, 0.15);
}

.stat-card-icon.blue {
  background: linear-gradient(
    135deg,
    rgba(79, 110, 245, 0.12),
    rgba(129, 140, 248, 0.08)
  );
  border: 1px solid rgba(79, 110, 245, 0.15);
}

.stat-card-icon i {
  font-size: 20px;
}
.stat-card-icon.green i {
  color: #16a34a;
}
.stat-card-icon.blue i {
  color: #4f6ef5;
}

.stat-card-content {
  flex: 1;
  min-width: 0;
}

.stat-card-label {
  font-family: "Robinson", sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #a8a598;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.stat-card-counts {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}

.stat-count {
  font-family: "Robinson", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-count.green {
  color: #166534;
}
.stat-count.blue {
  color: #3d5ce8;
}

.stat-total {
  font-size: 12px;
  color: #b0ae9e;
  font-weight: 400;
}

.stat-progress {
  height: 5px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 99px;
  overflow: hidden;
}

.stat-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-progress-bar.green {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.stat-progress-bar.blue {
  background: linear-gradient(90deg, #4f6ef5, #818cf8);
}

.stat-pct {
  font-size: 10px;
  color: #a8a598;
  margin-top: 5px;
  font-weight: 500;
}

/* ============================================================
   report.php — Expand Row (Contact Person Cards)
   ============================================================ */

.expand-row {
  padding: 16px 20px 20px;
  background: #fafaf5;
}

.expand-flex {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.person-card {
  flex: 1;
  min-width: 260px;
  background: #fff;
  border: 1px solid rgba(130, 120, 0, 0.12);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.person-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(130, 120, 0, 0.1);
}

.person-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9c9400, #6d6500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.person-avatar.p2 {
  background: linear-gradient(135deg, #b0a800, #8a8000);
}

.person-avatar i {
  color: #fff;
  font-size: 13px;
}

.person-label {
  font-family: "Robinson", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #827800;
}

.person-label.p2 {
  color: #9d8f50;
}

.person-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.person-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.person-field-icon {
  color: #aaa89a;
  font-size: 13px;
  margin-top: 1px;
  width: 14px;
  flex-shrink: 0;
}

.person-field-label {
  font-size: 10px;
  color: #aaa89a;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.person-field-value {
  font-size: 13px;
  font-weight: 500;
  color: #2a2600;
}

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

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

@media (max-width: 768px) {
  .content {
    margin-left: 0;
    padding: 74px 16px 48px;
  }
  .page-title {
    font-size: 22px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 16px;
  }
  .filter-group {
    width: 100%;
  }
  .input-date-wrap .input-field {
    min-width: unset;
    width: 100%;
  }
  .btn-qsncc {
    width: 100%;
    text-align: center;
  }
  .table-card-header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .table-card-header-title {
    font-size: 14px;
  }
  .dt-toolbar {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dt-toolbar .dataTables_filter input {
    min-width: 140px;
  }
  .dataTables_wrapper .dt-bottom {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  table.dataTable thead th {
    padding: 10px 12px !important;
    font-size: 10px;
  }
  table.dataTable tbody td {
    padding: 10px 12px !important;
    font-size: 12px;
  }
  .form-card-body {
    padding: 20px 16px;
  }
  .field-input {
    max-width: 100%;
  }
  .stat-cards {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .page-eyebrow {
    font-size: 10px;
  }
  .page-title {
    font-size: 20px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .table-card-header-badge {
    font-size: 10px;
  }
  .dt-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .dt-toolbar .dataTables_filter input {
    min-width: unset;
    width: 100%;
  }
}
