.attendance-body { min-height: 100vh; color: var(--ink); background: #f1f3ef; }
.attendance-header { height: 76px; position: sticky; z-index: 30; top: 0; padding: 0 clamp(22px, 6vw, 88px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.97); border-bottom: 1px solid #e1e6e1; backdrop-filter: blur(14px); }
.attendance-header .brand img { width: 176px; }
.attendance-header nav { display: flex; align-items: center; gap: 25px; color: #6b7980; font-size: 12px; font-weight: 600; }
.attendance-header nav .button { color: var(--navy); font-size: 11px; }
.attendance-header nav a:hover, .attendance-footer a:hover { color: var(--blue); }
.attendance-header nav span { color: var(--blue); }
.attendance-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 66px 0 80px; }
.attendance-intro { min-height: 220px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; padding: 32px clamp(25px, 5vw, 62px); color: #fff; background: var(--navy); }
.attendance-intro::after { position: absolute; inset: 0; content: ''; background: radial-gradient(ellipse at 92% 20%, rgba(22,162,160,.38), transparent 36%), linear-gradient(110deg, transparent 60%, rgba(255,255,255,.035)); pointer-events: none; }
.attendance-intro .eyebrow { color: #b9ddd5; }
.attendance-intro h1 { margin: 14px 0 9px; font: 700 clamp(38px, 5vw, 58px)/1.08 var(--font-display); letter-spacing: -.06em; }
.attendance-intro h1 span { color: #c8e4df; }
.attendance-intro p { margin: 0; color: rgba(255,255,255,.7); font-size: 14px; }
.intro-mark { width: 150px; height: 150px; position: relative; display: grid; place-items: center; margin-right: 3vw; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: rgba(255,255,255,.75); font: 700 29px var(--font-display); }
.intro-mark::before, .intro-mark::after { position: absolute; inset: 13px; content: ''; border: 1px solid rgba(22,162,160,.5); border-radius: 50%; }
.intro-mark::after { inset: -10px; border-color: rgba(255,255,255,.09); }
.intro-mark i { position: absolute; right: -3px; top: 33px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 6px rgba(239,170,77,.15); }
.attendance-card { padding: 26px 30px; background: #fff; border: 1px solid #e1e6e1; box-shadow: 0 12px 40px rgba(17,43,55,.035); }
.login-card { max-width: 620px; margin: 0 auto; padding: 36px clamp(22px, 5vw, 54px); }
.login-heading, .portal-title, .card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.login-heading h2, .portal-title h2 { margin: 7px 0 0; font: 700 30px/1.2 var(--font-display); letter-spacing: -.045em; }
.secure-mark { padding: 8px 10px; color: var(--blue); border: 1px solid #dce9e4; font-size: 9px; font-weight: 700; line-height: 1.5; letter-spacing: .12em; }
.login-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 26px 0 22px; padding: 4px; background: #f1f4f1; }
.login-tab { min-height: 41px; border: 0; color: #63717a; background: transparent; font-weight: 600; cursor: pointer; }
.login-tab.active { color: var(--navy); background: #fff; box-shadow: 0 2px 7px rgba(12,31,42,.08); }
.login-form, .stack-form { display: grid; gap: 14px; }
.attendance-body label { display: grid; gap: 6px; color: #415361; font-size: 12px; font-weight: 600; }
.attendance-body input, .attendance-body select, .attendance-body textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #d7dfdc; border-radius: 2px; outline: none; font-size: 13px; }
.attendance-body input:focus, .attendance-body select:focus, .attendance-body textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,127,140,.1); }
.attendance-body textarea { resize: vertical; }
.portal-status { min-height: 20px; margin: 0; color: #53636d; font-size: 12px; }
.portal-status.error { color: #a63835; }
.portal-status.success { color: #087448; }
.link-button { align-self: flex-start; margin: 2px 0 0; padding: 0; border: 0; background: none; color: #087448; font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.link-button:hover { color: #045c39; }
.location-note { margin: 23px 0 0; padding-top: 16px; border-top: 1px solid #e8ece9; color: #748087; font-size: 11px; line-height: 1.65; }
.location-note span { margin-right: 5px; color: var(--blue); }
.hidden { display: none!important; }
.portal-title { align-items: center; margin: 4px 0 25px; }
.portal-title h2 span { color: var(--blue); }
.portal-title p { margin: 7px 0 0; }
.muted { color: var(--muted); font-size: 13px; }
.employee-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.card-heading { align-items: center; margin-bottom: 21px; }
.card-heading h3, .attendance-card > h3 { margin: 5px 0 0; font: 700 21px/1.3 var(--font-display); letter-spacing: -.03em; }
.status-pill { padding: 6px 10px; color: #777f81; background: #eef1ef; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pill.present { color: #13734b; background: #e3f3e9; }
.status-pill.leave { color: #895a0a; background: #fff1d6; }
.clock-row { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 23px; padding: 18px 0; border-top: 1px solid #e8ece9; border-bottom: 1px solid #e8ece9; }
.clock-row div { display: grid; gap: 8px; }
.clock-row small, .metric-card small { color: #879197; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.clock-row strong { color: var(--navy); font: 700 18px var(--font-display); }
.clock-divider { width: 1px; height: 34px; background: #d9e0dc; }
.work-total { display: flex; justify-content: space-between; padding: 16px 0; color: #6e7a80; font-size: 12px; }
.work-total strong { color: var(--navy); font-size: 13px; }
.attendance-actions { display: flex; gap: 10px; }
.attendance-actions .button { flex: 1; }
.attendance-body button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.policy-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: #fafbf8; }
.policy-card h3 { max-width: 290px; margin: 14px 0 9px; font: 700 23px/1.28 var(--font-display); letter-spacing: -.04em; }
.policy-card p, .restore-note p { max-width: 430px; margin: 0; color: #66767c; font-size: 12px; line-height: 1.85; }
.privacy-rule { width: 43px; height: 2px; margin: 22px 0 12px; background: var(--amber); }
.policy-card small { color: #869197; font-size: 10px; }
.records-card, .correction-card, .admin-records, .correction-admin, .restore-note { margin-top: 18px; }
.table-wrap { width: 100%; overflow-x: auto; }
.attendance-body table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.attendance-body th { padding: 12px 13px; color: #748188; background: #f5f7f4; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.attendance-body td { padding: 13px; border-bottom: 1px solid #edf0ed; vertical-align: top; }
.attendance-body td small { display: block; margin-top: 4px; color: #839095; font-size: 10px; }
.record-status { color: #14734b; font-weight: 700; }
.record-status.leave { color: #93610e; }
.time-location { min-width: 175px; }
.map-link { display: inline-block; margin-top: 4px; color: var(--blue); font-size: 10px; font-weight: 700; }
.inline-form { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; align-items: end; }
.wide-label { grid-column: 1 / -1; }
.inline-form .button { justify-self: start; }
.backup-reminder { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 13px 17px; color: #74551d; background: #fff8e8; border: 1px solid #f0dfb5; font-size: 12px; }
.filter-card { display: grid; grid-template-columns: repeat(5, minmax(115px,1fr)) auto; align-items: end; gap: 12px; padding: 18px; }
.filter-card label { font-size: 10px; }
.filter-card input, .filter-card select { min-height: 40px; padding: 8px; font-size: 11px; }
.filter-card .button { min-height: 40px; padding: 0 14px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 14px 0; }
.metric-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 1px solid #e1e6e1; }
.metric-card strong { color: var(--navy); font: 700 28px var(--font-display); }
.metric-card span { color: #859095; font-size: 10px; }
.report-heading { align-items: center; }
.download-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.download-actions .button { min-height: 39px; padding: 0 12px; font-size: 10px; }
.button-backup { color: #fff; background: var(--navy); }
.button-backup:hover { background: var(--blue); }
.admin-records td { min-width: 95px; }
/* ==========================================================================
   ADMIN MANAGEMENT GRID & CARDS ENHANCED STYLES
   ========================================================================== */
.admin-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

.admin-card {
  position: relative;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e1e7e4;
  box-shadow: 0 4px 20px -2px rgba(10, 37, 64, 0.05), 0 2px 6px -1px rgba(10, 37, 64, 0.03);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
}

.admin-card:hover {
  border-color: #cedad4;
  box-shadow: 0 10px 30px -4px rgba(10, 37, 64, 0.08), 0 4px 10px -2px rgba(10, 37, 64, 0.04);
}

/* Card Top Colored Accent Borders */
.admin-card-team::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #087f8c 0%, #16a2a0 100%);
}

.admin-card-sites::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #071b31 0%, #087f8c 100%);
}

.admin-card-leave::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e08b22 0%, #f39c12 100%);
}

.admin-card-corrections::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
}

/* Card Header & Icon */
.admin-card .card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-heading-title {
  flex: 1;
}

.card-heading-title h3 {
  margin: 5px 0 0;
  font: 700 20px/1.3 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--navy);
}

.card-heading-title .muted {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: #6c7c88;
}

.card-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f4f7f6;
  border: 1px solid #e2ebe6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.admin-card:hover .card-header-icon {
  transform: scale(1.06);
  background: #eaf1ee;
}

/* Eyebrow & Colored Indicator Dots */
.card-badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.16);
  margin-right: 7px;
  vertical-align: middle;
}

.card-badge-dot.dot-teal {
  background: #16a2a0;
  box-shadow: 0 0 0 3px rgba(22, 162, 160, 0.18);
}

.card-badge-dot.dot-amber {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(239, 170, 77, 0.2);
}

.card-badge-dot.dot-purple {
  background: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.card-badge-dot.dot-navy {
  background: var(--navy);
  box-shadow: 0 0 0 3px rgba(7, 27, 49, 0.15);
}

/* Modern Form Styling */
.modern-form {
  display: grid;
  gap: 13px;
  background: #f8faf9;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid #e7edea;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modern-form label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #3b505f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modern-form input,
.modern-form select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #d0dbd6;
  border-radius: 6px;
  outline: none;
  transition: all 0.2s ease;
}

.modern-form input::placeholder {
  color: #9cb0a8;
  font-size: 12px;
}

.modern-form input:focus,
.modern-form select:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.13);
}

/* Enhanced Buttons */
.button-enhanced {
  width: 100%;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 6px;
  background: linear-gradient(135deg, #087f8c 0%, #0a6974 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(8, 127, 140, 0.22);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(8, 127, 140, 0.32);
  background: linear-gradient(135deg, #098e9c 0%, #087f8c 100%);
}

.button-enhanced:active {
  transform: translateY(0);
}

.button-teal {
  background: linear-gradient(135deg, #0f8684 0%, #076d6b 100%);
  box-shadow: 0 2px 8px rgba(15, 134, 132, 0.22);
}

.button-teal:hover {
  background: linear-gradient(135deg, #129996 0%, #0f8684 100%);
  box-shadow: 0 4px 14px rgba(15, 134, 132, 0.32);
}

.button-amber {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e08b22 0%, #cc7714 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224, 139, 34, 0.22);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-amber:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #f09526 0%, #e08b22 100%);
  box-shadow: 0 4px 14px rgba(224, 139, 34, 0.32);
}

/* Status message alert box */
.portal-status:not(:empty) {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: block;
  animation: fadeInStatus 0.25s ease both;
}

@keyframes fadeInStatus {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-status.success {
  background: #ebf7f0;
  color: #0b6941;
  border: 1px solid #b7e3ca;
}

.portal-status.error {
  background: #fdf2f2;
  color: #a82828;
  border: 1px solid #f6c0c0;
}

/* Subhead bar with count badge */
.subhead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9efec;
}

.subhead-bar h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
}

.list-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: #e4f2f4;
  border-radius: 10px;
  margin-left: 8px;
}

/* Scrollable Container for Lists */
.styled-item-scroll {
  max-height: 275px;
  overflow-y: auto;
  padding-right: 4px;
  display: grid;
  gap: 8px;
}

.styled-item-scroll::-webkit-scrollbar {
  width: 5px;
}

.styled-item-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.styled-item-scroll::-webkit-scrollbar-thumb {
  background: #ccd7d2;
  border-radius: 4px;
}

.styled-item-scroll::-webkit-scrollbar-thumb:hover {
  background: #b5c4bd;
}

/* Compact Item Enhanced Card */
.compact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #fbfdfc;
  border: 1px solid #e7ede9;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.compact-item:hover {
  background: #ffffff;
  border-color: #d1ded8;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(7, 27, 49, 0.04);
}

.item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #071b31 0%, #087f8c 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.item-avatar.site-avatar {
  border-radius: 8px;
  background: linear-gradient(135deg, #102941 0%, #16a2a0 100%);
  font-size: 16px;
}

.item-avatar.correction-avatar {
  border-radius: 8px;
  background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
  font-size: 16px;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-details b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-name-sub {
  font-weight: 500;
  color: #556c7a;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #637580;
  flex-wrap: wrap;
}

.item-handle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #3b505f;
  background: #eef2f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.item-site-tag {
  color: var(--blue);
  background: #e7f4f5;
  padding: 1px 7px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 10px;
}

.item-site-tag.unassigned {
  color: #8c989b;
  background: #eff2f1;
}

.item-address {
  color: #5d707c;
  font-size: 11px;
}

.record-status.active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: #0b6941;
  background: #e4f5ed;
  border: 1px solid #c7ebda;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0b6941;
  box-shadow: 0 0 0 2px rgba(11, 105, 65, 0.2);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; }
  50% { opacity: 0.35; }
  100% { opacity: 1; }
}

/* Correction Requests Item Styles */
.correction-date {
  font-size: 11px;
  font-weight: 600;
  color: #556c7a;
  margin-left: 6px;
}

.time-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.time-chip.in-chip {
  background: #e8f5ed;
  color: #0b6941;
}

.time-chip.out-chip {
  background: #eef2f5;
  color: #3b505f;
}

.correction-note {
  display: block;
  margin-top: 3px;
  color: #72848f;
  font-style: italic;
  font-size: 11px;
}

.compact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.compact-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.compact-actions button.approve {
  background: #0b7a48;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(11, 122, 72, 0.25);
}

.compact-actions button.approve:hover {
  background: #09633a;
  transform: translateY(-1px);
}

.compact-actions button.reject {
  background: #c53030;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(197, 48, 48, 0.25);
}

.compact-actions button.reject:hover {
  background: #a32424;
  transform: translateY(-1px);
}

/* Empty State Container */
.empty-list-state {
  padding: 24px 16px;
  text-align: center;
  background: #f8faf9;
  border-radius: 8px;
  border: 1px dashed #d5e0dc;
  margin-top: 12px;
}

.empty-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.empty-list-state .muted {
  margin: 0;
  font-size: 11px;
  color: #758690;
}

.empty-list-state.clean-state {
  background: #f4faf6;
  border-color: #c9e6d6;
}

/* Restore Note Card Upgrade */
.restore-note {
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e1e7e4;
  border-left: 4px solid var(--navy);
  box-shadow: 0 4px 18px rgba(7, 27, 49, 0.04);
  padding: 24px 28px;
  margin-top: 24px;
}

.restore-note .card-heading {
  margin-bottom: 12px;
}

.restore-note p {
  color: #556c7a;
  font-size: 13px;
  line-height: 1.7;
  max-width: 960px;
  margin: 0;
}

.restore-note code {
  color: var(--navy);
  background: #eef3f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.attendance-footer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(22px, 6vw, 88px); color: #758187; background: #fff; border-top: 1px solid #e1e6e1; font-size: 11px; }
.attendance-footer a { color: var(--navy); font-weight: 700; }
@media (max-width: 900px) {
  .admin-management-grid { grid-template-columns: 1fr; gap: 18px; }
  .filter-card { grid-template-columns: repeat(3, minmax(130px,1fr)); }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .download-actions { justify-content: flex-start; }
}
@media (max-width: 680px) {
  .attendance-header { height: 68px; padding: 0 18px; }
  .attendance-header .brand img { width: 145px; }
  .attendance-header nav { gap: 10px; font-size: 10px; }
  .attendance-header nav .button { min-height: 36px; padding: 0 9px; }
  .attendance-main { width: calc(100% - 30px); padding: 28px 0 48px; }
  .attendance-intro { min-height: 205px; margin-bottom: 18px; padding: 25px 22px; }
  .attendance-intro h1 { font-size: 39px; }
  .attendance-intro p { max-width: 300px; font-size: 12px; }
  .intro-mark { width: 74px; height: 74px; margin-right: 3px; font-size: 18px; }
  .intro-mark::before { inset: 7px; }
  .intro-mark::after { inset: -5px; }
  .intro-mark i { top: 12px; right: 0; }
  .attendance-card { padding: 21px 17px; }
  .login-card { padding: 28px 20px; }
  .portal-title { align-items: flex-start; }
  .portal-title h2 { font-size: 24px; }
  .portal-title .button { min-height: 38px; padding: 0 10px; font-size: 10px; }
  .employee-layout, .admin-management-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-grid-2 { grid-template-columns: 1fr; gap: 10px; }
  .admin-card { padding: 20px 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric-card { padding: 13px; }
  .metric-card strong { font-size: 24px; }
  .filter-card { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 14px; }
  .filter-card .button { grid-column: 1 / -1; }
  .report-heading { display: block; }
  .download-actions { margin-top: 13px; }
  .download-actions .button { flex: 1 1 auto; }
  .inline-form { grid-template-columns: 1fr 1fr; gap: 10px; }
  .attendance-actions { flex-direction: column; }
  .backup-reminder { align-items: flex-start; flex-direction: column; }
  .attendance-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
@media (max-width: 400px) {
  .attendance-intro h1 { font-size: 34px; }
  .intro-mark { width: 60px; height: 60px; }
  .attendance-header nav a { max-width: 80px; }
}

/* ==========================================================================
   EMPLOYEE REGISTRATION & DOCUMENT GENERATOR STYLES
   ========================================================================== */
.reg-doc-hero-card {
  margin-top: 24px;
  margin-bottom: 24px;
  background: #ffffff;
  border-left: 4px solid var(--blue);
}
.hero-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reg-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 18px 0 16px;
  padding: 12px 16px;
  background: #f7faf8;
  border: 1px solid #e1e7e4;
  border-radius: 4px;
}
.search-input-wrap {
  flex: 1;
}
.search-input-wrap input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #cbd5d0;
  border-radius: 4px;
}
.reg-count-tag {
  font-size: 11px;
  font-weight: 700;
  color: #2b5569;
  background: #e2eff5;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.reg-table {
  width: 100%;
  border-collapse: collapse;
}
.reg-table th {
  background: #f2f6f4;
  font-size: 10px;
  font-weight: 700;
  color: #4b616d;
  padding: 12px 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.reg-table td {
  padding: 12px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1ee;
  font-size: 12px;
}
.emp-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.emp-thumb-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dbe5e1;
  background: #e9eeea;
  flex-shrink: 0;
}
.emp-id-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  background: #e4ebe7;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 2px;
}
.doc-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 3px;
  border: 1px solid #cbd7d2;
  background: #fff;
  color: #2d4554;
  cursor: pointer;
  transition: all .15s ease;
}
.doc-btn:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.doc-btn-all {
  background: #e6f4f2;
  color: #0b6873;
  border-color: #abd8d2;
}
.doc-btn-all:hover {
  background: #087f8c;
  color: #fff;
  border-color: #087f8c;
}
.action-icon-btn {
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #d4deda;
  background: #fbfdfc;
  border-radius: 3px;
  cursor: pointer;
  transition: background .15s;
}
.action-icon-btn:hover {
  background: #e4eae6;
}
.action-icon-btn.delete-btn {
  color: #b33939;
  border-color: #f1cccc;
}
.action-icon-btn.delete-btn:hover {
  background: #fdf0f0;
}

/* --- REGISTRATION MODAL STYLES --- */
.reg-modal-card {
  width: min(940px, 96vw);
  max-height: 92vh;
  padding: 28px 32px;
  border-radius: 6px;
}
.reg-modal-header {
  margin-bottom: 20px;
}
.reg-modal-header h2 {
  font-size: 26px;
  margin: 6px 0;
}
.reg-nav-steps {
  display: flex;
  border-bottom: 2px solid #e5ece8;
  margin-bottom: 22px;
  overflow-x: auto;
  gap: 4px;
}
.reg-step-btn {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #5d6f79;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
}
.reg-step-btn:hover {
  color: var(--navy);
}
.reg-step-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: rgba(8,127,140,.04);
}
.reg-section-title {
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dce4e0;
}
.reg-section-title h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--navy);
}
.title-with-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: #f7f9f7;
  border: 1px solid #e2e8e5;
  border-radius: 4px;
}
.photo-preview-wrap {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #c9d8d1;
  background: #fff;
  flex-shrink: 0;
}
.photo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-file-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}
.reg-grid {
  display: grid;
  gap: 14px 16px;
  margin-bottom: 16px;
}
.reg-grid-1 { grid-template-columns: 1fr; }
.reg-grid-2 { grid-template-columns: 1fr 1fr; }
.reg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.reg-grid-4 { grid-template-columns: repeat(4, 1fr); }
.label-with-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inline-checkbox, .inline-check {
  font-size: 11px;
  color: #087f8c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dynamic-rows-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}
.dynamic-rows-table th {
  background: #f1f5f3;
  padding: 8px 10px;
  font-size: 10px;
  color: #4b606c;
  text-align: left;
}
.dynamic-rows-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e7ecea;
}
.dynamic-rows-table input {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 11px;
}
.remove-row-btn {
  background: #fee;
  color: #b00;
  border: 1px solid #fcc;
  border-radius: 3px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}
.fresher-toggle-box {
  display: flex;
  gap: 25px;
  padding: 12px 16px;
  background: #f8faf8;
  border: 1px solid #e2e8e4;
  border-radius: 4px;
  margin-bottom: 15px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  cursor: pointer;
}
.sig-pad-box {
  background: #fafbf9;
  border: 1px solid #cedad4;
  border-radius: 4px;
  padding: 10px;
  display: inline-block;
  margin-top: 6px;
}
#regSigCanvas {
  background: #ffffff;
  border: 1px dashed #b8c9c1;
  display: block;
  cursor: crosshair;
}
.sig-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.portal-account-opt-in {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f2f8f6;
  border: 1px solid #d2e4de;
  border-radius: 4px;
}
.checkbox-box-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.checkbox-box-label p {
  margin: 3px 0 0;
  font-size: 11px;
}
.reg-form-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e1e7e4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.reg-form-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- WEBCAM MODAL --- */
.camera-card {
  width: min(440px, 94vw);
  text-align: center;
}
.webcam-viewport {
  margin: 16px auto;
  width: 320px;
  height: 240px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.webcam-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   DOCUMENT VIEWER & PRINT LAYOUT STYLES
   ========================================================================== */
.doc-preview-modal-card {
  width: min(980px, 98vw);
  max-height: 94vh;
  padding: 24px;
  background: #eef2f0;
}
.doc-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #d6deda;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(10,30,40,.04);
}
.doc-info-badge h3 {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
}
.doc-type-tabs {
  display: flex;
  gap: 6px;
}
.doc-tab {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cbd7d2;
  background: #f8faf9;
  color: #384d59;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s ease;
}
.doc-tab.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}
.doc-actions-wrap {
  display: flex;
  gap: 10px;
}

/* --- DOCUMENT SHEETS (SCREEN SIMULATION) --- */
.document-print-area {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.sheet {
  width: 210mm;
  min-height: 297mm;
  padding: 18mm 20mm;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
  color: #1a2a34;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
  position: relative;
}

/* --- 1. RESUME SHEET --- */
.resume-sheet {
  font-size: 12px;
  line-height: 1.55;
}
.resume-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid #071b31;
}
.resume-photo-box {
  width: 95px;
  height: 115px;
  border: 2px solid #071b31;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f3f1;
}
.resume-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resume-title-box h1 {
  margin: 0;
  font-size: 26px;
  font-family: var(--font-display);
  color: #071b31;
  letter-spacing: -.03em;
}
.resume-title-box .designation-title {
  margin: 4px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #087f8c;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.resume-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  font-size: 11px;
  color: #435560;
}
.resume-section {
  margin-top: 16px;
}
.resume-sec-heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #071b31;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding-bottom: 4px;
  border-bottom: 1px solid #dce4e0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.resume-sec-heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 12px;
  background: #087f8c;
  border-radius: 1px;
}
.resume-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
}
.resume-table th, .resume-table td {
  border: 1px solid #dbe2df;
  padding: 6px 8px;
  text-align: left;
}
.resume-table th {
  background: #f4f7f5;
  font-weight: 700;
  color: #2b3d47;
}
.exp-entry {
  margin-bottom: 10px;
}
.exp-entry h4 {
  margin: 0;
  font-size: 12px;
  color: #071b31;
  display: flex;
  justify-content: space-between;
}
.exp-entry small {
  color: #087f8c;
  font-weight: 600;
}
.exp-entry p {
  margin: 4px 0 0;
  color: #4d5f69;
  font-size: 11px;
}
.resume-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 20px;
  font-size: 11px;
}
.resume-declaration {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed #d5deda;
  font-size: 11px;
  color: #4b5d67;
}
.resume-sign-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 25px;
}
.sign-box-img {
  max-width: 130px;
  max-height: 45px;
  object-fit: contain;
}

/* --- 2. APPOINTMENT LETTER SHEET --- */
.letter-sheet {
  font-size: 12.5px;
  line-height: 1.65;
}
.letterhead-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid #071b31;
  margin-bottom: 20px;
}
.letterhead-logo img {
  width: 180px;
}
.letterhead-company-info {
  text-align: right;
  font-size: 10.5px;
  color: #4c5e69;
  line-height: 1.45;
}
.letterhead-company-info strong {
  font-size: 13px;
  color: #071b31;
  display: block;
}
.letter-meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 11.5px;
}
.letter-recipient {
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.45;
}
.letter-subject {
  font-weight: 800;
  color: #071b31;
  text-decoration: underline;
  margin: 14px 0 16px;
  font-size: 13px;
}
.letter-terms-list {
  margin: 12px 0;
  padding-left: 20px;
}
.letter-terms-list li {
  margin-bottom: 8px;
}
.letter-signature-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 36px;
  padding-top: 15px;
}
.sign-authority {
  text-align: right;
  font-size: 11.5px;
}
.seal-stamp-img {
  width: 80px;
  height: 80px;
  margin: 6px auto;
  opacity: .85;
}

/* --- 3. ID CARD SHEET & STYLING --- */
.idcard-sheet {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 30px 20px;
}
.idcard-badge {
  width: 85.6mm;
  height: 125mm;
  background: #ffffff;
  border: 1px solid #c9d5cf;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(10,30,40,.09);
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.idcard-badge-header {
  background: linear-gradient(135deg, #071b31, #0c3558);
  color: #ffffff;
  padding: 12px 10px;
  text-align: center;
  border-bottom: 3px solid #087f8c;
}
.idcard-badge-header img {
  width: 130px;
  display: block;
  margin: 0 auto 4px;
  filter: brightness(100);
}
.idcard-badge-header span {
  font-size: 8.5px;
  letter-spacing: .14em;
  color: #aedae2;
  font-weight: 700;
  text-transform: uppercase;
}
.idcard-badge-body {
  padding: 14px 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.idcard-photo-frame {
  width: 85px;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  border: 3px solid #087f8c;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  margin-bottom: 10px;
  background: #f1f4f2;
}
.idcard-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idcard-badge-body h3 {
  margin: 0;
  font-size: 16px;
  color: #071b31;
  font-weight: 800;
}
.idcard-desig-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #087f8c;
  background: #e6f5f7;
  padding: 3px 8px;
  border-radius: 12px;
  margin: 4px 0 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.idcard-details-table {
  width: 100%;
  font-size: 10px;
  text-align: left;
  border-collapse: collapse;
  margin-top: auto;
}
.idcard-details-table td {
  padding: 3px 4px;
  border-top: 1px dashed #e1eae6;
}
.idcard-details-table td:first-child {
  color: #62747e;
  font-weight: 600;
  width: 45%;
}
.idcard-details-table td:last-child {
  color: #071b31;
  font-weight: 700;
}
.idcard-badge-footer {
  background: #f4f8f6;
  border-top: 1px solid #dce4e0;
  padding: 5px;
  text-align: center;
  font-size: 8.5px;
  color: #556a75;
  font-weight: 600;
}

/* ID Card Back Side */
.idcard-back {
  background: #fbfdfc;
}
.idcard-back-body {
  padding: 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.idcard-qr-box {
  margin: 10px auto;
  width: 105px;
  height: 105px;
  padding: 6px;
  background: #fff;
  border: 1px solid #d7e0dc;
  border-radius: 4px;
  display: grid;
  place-items: center;
}
.idcard-qr-box svg, .idcard-qr-box img {
  width: 100%;
  height: 100%;
}
.idcard-address-box {
  font-size: 9px;
  color: #4b606c;
  line-height: 1.45;
}
.idcard-address-box strong {
  color: #071b31;
  display: block;
  font-size: 10px;
  margin-bottom: 2px;
}
.idcard-instructions {
  font-size: 8px;
  color: #71838d;
  margin: 8px 0;
  padding: 5px;
  background: #f1f6f4;
  border-radius: 3px;
  line-height: 1.35;
}
.idcard-back-sign {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 8.5px;
  color: #3b505c;
  padding-top: 4px;
  border-top: 1px solid #e0e8e4;
}

/* --- PRINT RULES (Exact A4 & Document only) --- */
@page {
  size: A4 portrait;
  margin: 10mm;
}

/* --- COMPANY SETTINGS MODAL --- */
.company-settings-card {
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
}
.settings-fieldset {
  border: 1px solid #dce4e0;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: #ffffff;
}
.settings-fieldset legend {
  font-size: 13px;
  font-weight: 700;
  color: #071b31;
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.logo-config-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.logo-preview-box {
  width: 200px;
  height: 90px;
  border: 1px dashed #bcd0c8;
  border-radius: 6px;
  background: #f8faf9;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
}
.logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-controls {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slider-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.slider-control input[type="range"] {
  width: 100%;
  accent-color: #087f8c;
}
.position-control {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.radio-group-inline {
  display: flex;
  gap: 16px;
  font-size: 13px;
}
.radio-group-inline label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* --- LIVE EDIT MODE --- */
.live-edit-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 6px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-edit-active [contenteditable="true"] {
  outline: 1.5px dashed #087f8c !important;
  background-color: rgba(8, 127, 140, 0.04) !important;
  cursor: text !important;
  transition: background-color .15s ease;
}
.live-edit-active [contenteditable="true"]:focus {
  outline: 2px solid #087f8c !important;
  background-color: rgba(8, 127, 140, 0.09) !important;
}

/* Logo Position classes for letterhead */
.letterhead-header.pos-center {
  flex-direction: column;
  text-align: center;
}
.letterhead-header.pos-center .letterhead-logo {
  margin-bottom: 10px;
}
.letterhead-header.pos-center .letterhead-company-info {
  text-align: center;
}
.letterhead-header.pos-right {
  flex-direction: row-reverse;
}
.letterhead-header.pos-right .letterhead-company-info {
  text-align: left;
}

/* ID Card Themes */
.idcard-badge.theme-navy .idcard-badge-header {
  background: linear-gradient(135deg, #071b31, #0c3558);
  border-bottom: 3px solid #087f8c;
}
.idcard-badge.theme-sapphire .idcard-badge-header {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-bottom: 3px solid #60a5fa;
}
.idcard-badge.theme-slate .idcard-badge-header {
  background: linear-gradient(135deg, #0f172a, #334155);
  border-bottom: 3px solid #94a3b8;
}
.idcard-badge.theme-emerald .idcard-badge-header {
  background: linear-gradient(135deg, #064e3b, #047857);
  border-bottom: 3px solid #34d399;
}

/* Clean ID Card Back (No QR Code) */
.idcard-back-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #071b31;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #dce4e0;
}
.idcard-back-holder-details {
  background: #f4f8f6;
  border: 1px solid #dbe5e0;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 9.5px;
  text-align: left;
}
.holder-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.holder-row:last-child {
  margin-bottom: 0;
}
.holder-row span {
  color: #5d707c;
}
.holder-row strong {
  color: #071b31;
}
.sign-line {
  border-top: 1px solid #333;
  width: 90px;
  margin-bottom: 2px;
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .app-header,
  .app-main,
  .attendance-footer,
  #employeeRegModal,
  #cameraModal,
  #companySettingsModal,
  .modal:not(#documentPreviewModal) {
    display: none !important;
  }
  #documentPreviewModal {
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    display: block !important;
  }
  .doc-preview-modal-card {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    width: 100% !important;
    max-height: none !important;
  }
  .no-print,
  .close,
  .doc-preview-toolbar,
  .live-edit-banner {
    display: none !important;
  }
  [contenteditable="true"] {
    outline: none !important;
    background: transparent !important;
  }
  .sheet {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 10mm 15mm !important;
    width: 100% !important;
    min-height: auto !important;
    page-break-after: always;
    break-after: page;
  }
  .sheet:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }
  .idcard-sheet {
    page-break-inside: avoid;
    padding: 10mm 0 !important;
  }
}

@media (max-width: 768px) {
  .reg-grid-2, .reg-grid-3, .reg-grid-4 {
    grid-template-columns: 1fr;
  }
  .doc-preview-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .doc-type-tabs {
    flex-wrap: wrap;
  }
  .sheet {
    width: 100%;
    min-height: auto;
    padding: 15px;
  }
  .idcard-sheet {
    flex-direction: column;
    align-items: center;
  }
}

/* ==========================================================================
   ROLE MANAGEMENT & AUDIT LOG ENHANCED STYLES
   ========================================================================== */
.admin-greeting-tag {
  font-size: 16px;
  font-weight: 500;
  color: #64748b;
  margin-left: 6px;
}

.role-permission-notice {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0284c7;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role-badge-admin {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
}

.role-badge-ceo {
  background: #581c87;
  color: #fef08a;
  border: 1px solid #7e22ce;
}

.role-badge-manager {
  background: #064e3b;
  color: #a7f3d0;
  border: 1px solid #047857;
}

.role-badge-hr {
  background: #0c4a6e;
  color: #bae6fd;
  border: 1px solid #0284c7;
}

.role-badge-executive {
  background: #78350f;
  color: #fef3c7;
  border: 1px solid #b45309;
}

.role-badge-employee {
  background: #334155;
  color: #f1f5f9;
  border: 1px solid #475569;
}

.item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill-inactive {
  font-size: 9px;
  padding: 2px 6px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.self-tag {
  font-size: 10px;
  color: #059669;
  font-weight: 700;
}

.item-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

.btn-action-edit {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-edit:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.btn-action-delete {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-delete:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* User Role Edit Modal */
.user-edit-modal-card {
  max-width: 620px;
  width: 100%;
}

/* Audit Log Card & Table */
.audit-log-card {
  margin-top: 24px;
  padding: 26px 30px;
}

.audit-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 20px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.audit-search-wrap {
  flex: 1;
  min-width: 240px;
}

.audit-search-wrap input {
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
}

.audit-filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.audit-filters-group select,
.audit-filters-group input {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  background: #fff;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.audit-table th {
  background: #f1f5f9;
  color: #475569;
  padding: 11px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #cbd5e1;
  white-space: nowrap;
}

.audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.audit-table tr:hover td {
  background: #f8fafc;
}

.audit-time-cell {
  font-family: monospace;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.audit-user-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.audit-user-sub {
  display: flex;
  align-items: center;
  gap: 6px;
}

.audit-uname {
  font-family: monospace;
  font-size: 10px;
  color: #94a3b8;
}

.action-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  text-transform: uppercase;
  white-space: nowrap;
}

.action-badge-teal {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.action-badge-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.action-badge-blue {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.action-badge-red {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.action-badge-amber {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.action-badge-default {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.category-chip {
  display: inline-block;
  padding: 2px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 10px;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
}

.audit-details-cell {
  font-size: 12px;
  color: #1e293b;
  line-height: 1.45;
  max-width: 380px;
  word-break: break-word;
}

.audit-ip-cell {
  font-family: monospace;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.audit-footer-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.audit-count-badge {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

