:root {
  --bg: #f5efe5;
  --bg-soft: #f9f5ee;
  --panel: rgba(255, 251, 245, 0.95);
  --line: #dccfbe;
  --text: #1f2430;
  --muted: #6a6e7f;
  --accent: #8b4726;
  --accent-dark: #5f2e18;
  --accent-soft: #e7d3c6;
  --green: #2c6d4b;
  --red: #a53737;
  --shadow: rgba(20, 24, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 3.2rem;
  color: var(--text);
  background: #f5efe5;
}

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

.app-shell {
  width: min(100%, calc(100vw - 24px));
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 40px;
}

body.resource-layout .app-shell {
  width: calc(100% - 24px);
  max-width: none;
}

body.resource-layout .dashboard-screen {
  gap: 16px;
}

body.resource-layout .panel,
body.resource-layout .topbar {
  border-radius: 22px;
}

body.resource-layout #entry-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
}

body.resource-layout #entry-form > label:not(.wide-field) {
  max-width: 340px;
}

body.resource-layout #entry-form > button {
  max-width: 220px;
}

.login-screen {
  width: 100vw;
  min-height: 100vh;
  margin: -18px 0 -40px calc((100% - 100vw) / 2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0;
  background: #f3f4f8;
  box-shadow: none;
}

.auth-stack {
  display: grid;
  gap: 22px;
  align-self: stretch;
  align-content: center;
  justify-items: center;
  padding: 52px 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(219, 70, 69, 0.08), transparent 26%),
    radial-gradient(circle at 20% 84%, rgba(33, 39, 54, 0.06), transparent 28%),
    linear-gradient(135deg, #f8f9fc 0%, #eceff6 100%);
}

.auth-stack::before {
  content: "";
  position: absolute;
  top: -92px;
  right: -82px;
  width: 250px;
  height: 250px;
  border: 28px solid rgba(219, 70, 69, 0.92);
  border-radius: 50%;
}

.auth-stack::after {
  content: "";
  position: absolute;
  left: -88px;
  bottom: -88px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(219, 70, 69, 0.13), rgba(219, 70, 69, 0.02));
}

.auth-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(760px, 100%);
  justify-self: center;
  z-index: 2;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-switch-button {
  border: 1px solid rgba(219, 70, 69, 0.28);
  border-radius: 4px;
  background: #fff;
  color: #d94a48;
  font-weight: 700;
  padding: 22px 26px;
  font-size: 1.9rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(28, 30, 38, 0.08);
}

.auth-switch-button.active {
  background: #db4645;
  color: #fff;
  box-shadow: 0 10px 24px rgba(219, 70, 69, 0.24);
}

.location-map-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.location-search-field {
  display: grid;
  gap: 6px;
  min-width: 320px;
  max-width: 460px;
}

.location-search-field span {
  font-weight: 700;
  color: var(--accent-dark);
}

.survey-workspace {
  display: grid;
  gap: 12px;
}

.survey-app-layout {
  display: grid;
  gap: 0;
}

.survey-map-card,
.survey-upload-card,
.survey-analysis-results,
.survey-command-panel {
  border-radius: 8px;
  border: 1px solid rgba(220, 207, 190, 0.78);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 8px 18px rgba(116, 74, 41, 0.07);
  overflow: hidden;
}

.survey-map-card {
  position: relative;
}

.survey-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(220, 207, 190, 0.78);
  background: rgba(238, 225, 207, 0.45);
}

.survey-map-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.survey-map-tools .ghost-button {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 1.15rem;
  white-space: nowrap;
}

.survey-map-head > div:first-child {
  display: grid;
  gap: 2px;
}

.survey-map-head strong {
  color: var(--text);
  font-size: 1.2rem;
}

.survey-map-head span {
  color: var(--muted);
  font-size: 0.95rem;
}

.survey-map-canvas {
  width: 100%;
  min-height: min(62vh, 620px);
}

.survey-khata-type-legend {
  position: absolute;
  right: 14px;
  bottom: 16px;
  z-index: 450;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100% - 28px));
  max-height: min(44vh, 360px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
  color: #1f2937;
  font-size: 1.15rem;
}

.survey-khata-type-legend-head,
.survey-khata-type-legend-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.survey-khata-type-legend-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.survey-khata-type-legend-head span {
  color: var(--muted);
  font-size: 1rem;
  white-space: nowrap;
}

.survey-khata-type-legend-section {
  display: grid;
  gap: 7px;
}

.survey-khata-type-legend strong {
  font-size: 1.25rem;
  color: #111827;
}

.survey-khata-type-legend-title .compact-action {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 1rem;
}

.survey-khata-type-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.survey-khata-type-legend-item {
  display: grid;
  grid-template-columns: 14px 16px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  line-height: 1.25;
  cursor: pointer;
}

.survey-khata-type-legend-item input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.survey-khata-type-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 4px;
}

.survey-khata-type-swatch--hatch {
  background-size: 7px 7px;
}

.survey-khata-type-count {
  color: var(--muted);
  font-size: 1.05rem;
  white-space: nowrap;
}

.survey-upload-card {
  display: none;
}

.survey-app-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: center;
  width: 100%;
}

.survey-label-select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--accent-dark);
  font-weight: 700;
  padding: 0 10px;
}

.survey-inline-check {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf4;
  color: var(--accent-dark);
  font-weight: 700;
  padding: 0 10px;
}

.survey-inline-meta {
  margin: 0;
}

.survey-inline-message {
  margin: 0;
}

.survey-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

.survey-status-grid .survey-inline-meta {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(220, 207, 190, 0.72);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
  color: #5c667a;
  font-size: 0.96rem;
}

.survey-analysis-panel {
  margin-top: 14px;
}

.survey-analysis-tab {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 12px;
}

.survey-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.survey-tab-head span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(139, 71, 38, 0.1);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.survey-tab-head strong {
  color: var(--text);
  font-size: 1.55rem;
}

.survey-tab-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.survey-reports-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.survey-reports-grid .survey-analysis-results {
  min-width: 0;
}

.survey-analysis-results .panel-head {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(220, 207, 190, 0.72);
}

.survey-polygon-label {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(11, 99, 255, 0.28);
  border-radius: 8px;
  color: #0b2f7e;
  box-shadow: 0 6px 12px rgba(11, 99, 255, 0.12);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 2px 6px;
  max-width: 84px;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.survey-polygon-label--medium {
  font-size: 1.05rem;
  max-width: 72px;
  padding: 2px 5px;
}

.survey-polygon-label--long {
  font-size: 0.92rem;
  max-width: 62px;
  padding: 1px 4px;
}

.pkn-sequence-label {
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #075985;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 1px 4px;
}

.ocm-polygon-label {
  background: rgba(255, 245, 250, 0.92);
  border: 1px solid rgba(232, 82, 160, 0.32);
  border-radius: 8px;
  color: #9a1f63;
  box-shadow: 0 6px 12px rgba(232, 82, 160, 0.12);
  font-size: 1.02rem;
  font-weight: 700;
  padding: 2px 5px;
  max-width: 72px;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.survey-analysis-alert-row td {
  background: rgba(214, 74, 74, 0.12) !important;
}

.survey-analysis-alert-row:hover td {
  background: rgba(214, 74, 74, 0.18) !important;
}

.khata-diff-row td {
  background: rgba(255, 253, 249, 0.96) !important;
}

.khata-diff-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  padding: 12px;
}

.khata-diff-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.khata-diff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.khata-diff-tags span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(139, 71, 38, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

.summary-table tr.over-workload-row td {
  background: rgba(165, 55, 55, 0.12);
}

.summary-table tr.over-workload-row:hover td {
  background: rgba(165, 55, 55, 0.18);
}

.over-workload-target-cell,
.over-workload-actual-cell,
.over-workload-rework-cell {
  font-weight: 800;
}

.over-workload-actual-cell {
  color: var(--red);
  box-shadow: inset 3px 0 0 var(--red);
}

.over-workload-rework-cell {
  color: #7a351b;
}

.over-workload-actual-chip,
.over-workload-inline {
  color: var(--red);
  font-weight: 900;
}

.over-workload-card {
  border-color: rgba(165, 55, 55, 0.42) !important;
  background: rgba(165, 55, 55, 0.08) !important;
}

.survey-analysis-alert-cell {
  color: #8f1f1f;
  font-weight: 800;
}

.survey-analysis-warn-cell {
  color: #9b5a00;
  font-weight: 700;
}

.summary-table tr.survey-analysis-multi-category-row td {
  background: #fff3b8;
}

.brand-panel,
.login-card,
.panel,
.stat-card,
.topbar {
  background: var(--panel);
  border: 1px solid rgba(220, 207, 190, 0.85);
  box-shadow: 0 18px 45px var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-panel,
.login-card,
.panel,
.topbar {
  border-radius: 20px;
}

.brand-panel {
  min-height: 660px;
  padding: 72px 76px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  background:
    linear-gradient(90deg, rgba(7, 20, 34, 0.72), rgba(7, 20, 34, 0.35)),
    url("/login-bg.jpg") center / cover no-repeat;
  color: #fff;
  border: 0;
  box-shadow: none;
}

.brand-panel > * {
  position: relative;
  z-index: 1;
}

.rajasthan-map-art {
  position: absolute;
  top: 34px;
  right: 42px;
  width: 118px;
  height: 118px;
  pointer-events: none;
  opacity: 0.96;
}

.brand-panel::before {
  content: "";
  position: absolute;
  top: 78px;
  left: 44px;
  width: 170px;
  height: 120px;
  opacity: 0.42;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.95) 2px, transparent 2px);
  background-size: 22px 22px;
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: 62px;
  bottom: -80px;
  width: 210px;
  height: 210px;
  border: 5px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  box-shadow: inset 0 0 0 34px rgba(255, 255, 255, 0.72);
  opacity: 0.62;
}

.brand-panel .eyebrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -16px;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
}

.map-glow {
  display: none;
}

.map-card {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
  border: 0;
  box-shadow: 0 18px 36px rgba(116, 31, 31, 0.22);
  transform: none;
}

.map-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 24px 24px 24px 72px;
  border: 1px dashed rgba(139, 71, 38, 0.14);
}

.map-card::after {
  display: none;
}

.map-shape {
  width: 78%;
  height: 78%;
  filter:
    drop-shadow(0 18px 24px rgba(111, 55, 29, 0.18))
    drop-shadow(0 4px 8px rgba(255, 255, 255, 0.28));
}

.eyebrow {
  position: relative;
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.82);
}

.login-title-mark {
  width: max-content;
  margin-bottom: 26px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  box-shadow:
    0 14px 28px rgba(18, 24, 36, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  text-shadow: 0 10px 22px rgba(64, 14, 18, 0.28);
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.developer-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.developer-name {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  max-width: 560px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(5.6rem, 6vw, 7.2rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 18px 38px rgba(97, 24, 24, 0.2);
}

h2 {
  font-size: clamp(5.2rem, 5.4vw, 6.4rem);
}

h3 {
  font-size: clamp(4.4rem, 4.6vw, 5.4rem);
}

.lead {
  margin-top: 24px;
  max-width: 470px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  font-size: 1.72rem;
}

.login-card {
  width: min(760px, 100%);
  justify-self: center;
  position: relative;
  z-index: 2;
  padding: 70px 74px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  box-shadow:
    0 30px 70px rgba(30, 34, 48, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.login-hint {
  margin-top: 28px;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f9efe5, #f4e0d4);
  border-radius: 18px;
}

.login-card {
  display: grid;
  gap: 28px;
}

.login-card h2 {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 22px;
  color: #23262f;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(3.2rem, 3.4vw, 4.1rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 18px;
  text-align: center;
}

.login-card h2::before {
  display: none;
}

.resource-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  background: rgba(18, 35, 58, 0.36);
  backdrop-filter: blur(6px);
}

.resource-photo-card {
  width: min(560px, calc(100vw - 32px));
  padding: 24px;
  display: grid;
  gap: 16px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.99), rgba(255, 248, 241, 0.96)),
    var(--panel);
  border: 1px solid rgba(220, 207, 190, 0.88);
  box-shadow: 0 22px 60px rgba(18, 35, 58, 0.24);
}

.resource-photo-card h3 {
  font-size: 1.55rem;
}

.resource-photo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.resource-photo-actions button {
  flex: 1;
  min-width: 140px;
}

.resource-camera-box {
  border: 1px dashed rgba(139, 71, 38, 0.28);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.78);
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.resource-photo-video,
.resource-photo-preview {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.resource-photo-file-fallback {
  font-size: 0.9em;
}

.compact-filter-grid {
  margin: 0 0 12px;
}

.registration-card .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registration-card {
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 8px;
}

.registration-card input[type="file"] {
  padding: 12px;
}

.daily-entry-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  align-items: start;
  gap: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(220, 207, 190, 0.75);
  box-shadow: 0 10px 24px rgba(116, 74, 41, 0.08);
}

.daily-entry-grid .entry-inline-field {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.daily-entry-grid .entry-task-field,
.daily-entry-grid .wide-field,
.daily-entry-grid button,
.daily-entry-grid .status-message {
  grid-column: 1 / -1;
}

.daily-entry-grid .entry-location-field,
.daily-entry-grid .entry-activity-field,
.daily-entry-grid .entry-meta-field {
  grid-column: span 1;
}

.daily-entry-grid .entry-status-field {
  grid-column: span 2;
}

.entry-overtime-box {
  display: grid;
  grid-template-columns: 1.1fr auto 1.1fr auto 1fr;
  gap: 8px;
  align-items: end;
  margin: 8px;
  padding: 12px;
  border: 1px solid #d8e8e4;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.9), rgba(255, 247, 237, 0.72));
}

.entry-overtime-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
}

.entry-overtime-head strong {
  font-size: 1.15rem;
}

.entry-overtime-head span {
  color: #64748b;
  font-size: 0.86rem;
}

.entry-overtime-box label {
  display: grid;
  gap: 4px;
}

.entry-overtime-box label span {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.entry-overtime-box .ghost-button {
  width: auto;
  min-width: 132px;
  margin: 0;
}

.entry-overtime-box input[readonly] {
  background: #eef7ff;
  cursor: default;
}

@media (max-width: 900px) {
  .entry-overtime-box,
  body.resource-layout .entry-overtime-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-overtime-box .ghost-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .entry-overtime-box,
  body.resource-layout .entry-overtime-box {
    grid-template-columns: 1fr;
  }
}

#daily-entry-panel .panel-head {
  margin-bottom: 10px;
}

#daily-entry-panel h3 {
  letter-spacing: -0.02em;
}

#daily-entry-panel .muted-text {
  max-width: 720px;
}

#daily-entry-panel {
  width: 100%;
}

#daily-entry-panel .feature-panel,
#daily-entry-panel form {
  width: 100%;
}

.daily-entry-grid select,
.daily-entry-grid input,
.daily-entry-grid textarea {
  width: 100%;
  min-height: 40px;
  padding: 6px 9px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  border: 0;
  border-right: 1px solid rgba(220, 207, 190, 0.78);
  border-top: 1px solid rgba(220, 207, 190, 0.78);
  box-shadow: none;
}

.daily-entry-grid textarea {
  min-height: 82px;
}

.daily-entry-grid button {
  align-self: end;
  min-width: 180px;
  margin: 8px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(95, 46, 24, 0.14);
}

#work-update-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 1fr);
  align-items: stretch;
}

#work-update-grid #daily-entry-panel {
  min-width: 0;
}

#work-update-grid #daily-entry-panel .daily-entry-grid {
  width: 100%;
}

#work-update-grid > .panel {
  align-self: stretch;
}

#bulk-submission-panel {
  min-width: 0;
}

#bulk-submission-panel .form-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px 12px;
}

#bulk-submission-panel button[type="submit"] {
  width: 100%;
  max-width: 320px;
}

#daily-entry-panel {
  overflow-x: auto;
}

#daily-entry-panel #entry-form {
  min-width: 0;
}

#entry-form input[type="hidden"] {
  display: none;
}

.daily-entry-grid > label > span {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  background: linear-gradient(180deg, #efe2cf, #ead8c1);
  border-right: 1px solid rgba(220, 207, 190, 0.78);
  color: #6d4b2c;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.daily-entry-grid .entry-status-field > span,
.daily-entry-grid .entry-status-field select {
  border-right: 0;
}

.daily-entry-grid .entry-task-field > span,
.daily-entry-grid .entry-task-field select {
  border-right: 0;
}

.daily-entry-grid > label textarea {
  border-right: 0;
}

#remarks-field > span {
  border-right: 0;
}

#remarks-field textarea {
  border-right: 0;
}

.daily-entry-grid .entry-inline-field select,
.daily-entry-grid .entry-inline-field input {
  font-size: 1.45rem;
}

.daily-entry-grid .wide-field textarea {
  font-size: 1.45rem;
}

.daily-entry-grid .status-message {
  margin: 0 8px 8px;
}

body.resource-layout #daily-entry-panel {
  overflow-x: visible;
}

body.resource-layout #daily-entry-panel #entry-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
  min-width: 0;
  width: 100%;
}

body.resource-layout #entry-form > label:not(.wide-field) {
  max-width: none;
}

body.resource-layout #entry-form > button {
  max-width: none;
  width: calc(100% - 36px);
}

body.resource-layout .daily-entry-grid .entry-task-field,
body.resource-layout .daily-entry-grid .wide-field,
body.resource-layout .daily-entry-grid button,
body.resource-layout .daily-entry-grid .status-message {
  grid-column: 1 / -1;
}

body.resource-layout .daily-entry-grid .entry-location-field,
body.resource-layout .daily-entry-grid .entry-activity-field,
body.resource-layout .daily-entry-grid .entry-status-field,
body.resource-layout .daily-entry-grid .entry-meta-field {
  grid-column: span 1;
}

body.resource-layout .entry-overtime-box {
  grid-template-columns: 1fr auto 1fr auto;
}

body.resource-layout .entry-overtime-box label:last-child {
  grid-column: 1 / -1;
}

body.resource-layout .daily-entry-grid > label > span {
  min-height: 52px;
  padding: 12px 14px;
  font-size: 2.1rem;
}

body.resource-layout .daily-entry-grid select,
body.resource-layout .daily-entry-grid input,
body.resource-layout .daily-entry-grid textarea {
  min-height: 62px;
  padding: 14px 16px;
  font-size: 2.2rem;
}

body.resource-layout .daily-entry-grid textarea {
  min-height: 110px;
}

body.resource-layout #recent-entries-panel table {
  width: max-content;
  min-width: 2800px;
  table-layout: fixed;
}

body.resource-layout #recent-entries-panel th,
body.resource-layout #recent-entries-panel td {
  font-size: 1.85rem;
  line-height: 1.4;
  padding: 14px 18px;
  white-space: nowrap;
}

body.resource-layout #recent-entries-panel th:nth-child(1),
body.resource-layout #recent-entries-panel td:nth-child(1) {
  min-width: 180px;
}

body.resource-layout #recent-entries-panel th:nth-child(2),
body.resource-layout #recent-entries-panel td:nth-child(2) {
  min-width: 220px;
}

body.resource-layout #recent-entries-panel th:nth-child(3),
body.resource-layout #recent-entries-panel td:nth-child(3) {
  min-width: 220px;
}

body.resource-layout #recent-entries-panel th:nth-child(4),
body.resource-layout #recent-entries-panel td:nth-child(4) {
  min-width: 430px;
}

body.resource-layout #recent-entries-panel th:nth-child(5),
body.resource-layout #recent-entries-panel td:nth-child(5) {
  min-width: 520px;
}

body.resource-layout #recent-entries-panel th:nth-child(6),
body.resource-layout #recent-entries-panel td:nth-child(6),
body.resource-layout #recent-entries-panel th:nth-child(7),
body.resource-layout #recent-entries-panel td:nth-child(7) {
  min-width: 160px;
}

body.resource-layout #recent-entries-panel th:nth-child(8),
body.resource-layout #recent-entries-panel td:nth-child(8),
body.resource-layout #recent-entries-panel th:nth-child(9),
body.resource-layout #recent-entries-panel td:nth-child(9) {
  min-width: 150px;
}

body.resource-layout #recent-entries-panel th:nth-child(10),
body.resource-layout #recent-entries-panel td:nth-child(10) {
  min-width: 240px;
}

body.resource-layout #recent-entries-panel th:nth-child(11),
body.resource-layout #recent-entries-panel td:nth-child(11) {
  min-width: 420px;
}

.login-card label,
.stack-form label,
.form-grid label {
  display: grid;
  gap: 8px;
}

.login-card label span,
.stack-form label span,
.form-grid label span {
  font-size: inherit;
  font-weight: 700;
  line-height: 1.2;
  color: #5f2e18;
}

.login-card label span {
  color: #22242b;
  font-weight: 500;
}

.login-card input,
.login-card select {
  min-height: 76px;
  border: 1px solid rgba(220, 224, 234, 0.88);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(27, 31, 43, 0.08);
}

.login-card input,
.login-card select,
.login-card label span {
  font-size: 2rem;
}

.login-card input:focus,
.login-card select:focus {
  border-color: rgba(219, 70, 69, 0.48);
  box-shadow:
    0 12px 26px rgba(27, 31, 43, 0.1),
    0 0 0 4px rgba(219, 70, 69, 0.1);
}

.login-card button[type="submit"] {
  min-height: 78px;
  margin-top: 22px;
  border-radius: 14px;
  font-size: 2rem;
  background: linear-gradient(135deg, #e34a49, #bd242b);
  box-shadow: 0 18px 32px rgba(219, 70, 69, 0.28);
}

.auth-link-button {
  border: 0;
  background: transparent;
  color: #d94a48;
  font-weight: 800;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
}

.auth-link-button:hover {
  text-decoration: underline;
}

.change-password-card {
  max-width: 460px;
}

.password-reset-cell {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.password-reset-value {
  display: inline-block;
  padding: 5px 8px;
  border: 1px dashed rgba(139, 71, 38, 0.45);
  border-radius: 7px;
  background: rgba(255, 250, 244, 0.9);
  color: var(--accent-dark);
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-screen {
  display: grid;
  gap: 14px;
}

body.admin-layout #recent-entries-panel {
  order: 999;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 220px;
  background: linear-gradient(135deg, rgba(139, 71, 38, 0.12), transparent 72%);
  pointer-events: none;
}

.topbar-copy {
  position: relative;
  z-index: 1;
}

.topbar-copy h2 {
  font-size: clamp(1.9rem, 2.3vw, 2.6rem);
  font-weight: 700;
}

.table-action-button {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f2;
  font-weight: 700;
  cursor: pointer;
}

.table-action-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.table-action-button.danger {
  background: #dc2626;
  color: #fff;
}

.table-action-button.reject {
  background: #b42318;
  color: #fff;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.05;
}

.verification-badge.pending {
  background: #fff4d6;
  color: #9a5a00;
  border: 1px solid #f0c66c;
}

.verification-badge.verified {
  background: #dff7e9;
  color: #0b6b37;
  border: 1px solid #8cd7ac;
}

.verification-badge.rejected {
  background: #ffe3e3;
  color: #b42318;
  border: 1px solid #ffaaaa;
}

.verification-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.verification-actions .table-action-button {
  padding: 7px 12px;
  font-size: 0.76rem;
}

.verification-actions .table-action-button.reject {
  background: #b42318;
}

.salary-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.document-cell {
  display: grid;
  gap: 4px;
  min-width: 140px;
}

.document-cell span {
  font-weight: 700;
  color: var(--text);
}

.salary-input {
  width: 180px;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 71, 38, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

.save-salary-button {
  padding-inline: 14px;
  white-space: nowrap;
}

.empty-state-card {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.88);
  border: 1px dashed rgba(139, 71, 38, 0.16);
  color: var(--muted);
  text-align: center;
}

.admin-control-panel {
  display: grid;
  gap: 16px;
}

.admin-control-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  gap: 12px;
}

.admin-control-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(139, 71, 38, 0.14);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.72);
}

.admin-control-card span {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-control-card strong {
  color: var(--ink);
  font-size: 2.8rem;
  line-height: 1;
}

.admin-control-card small {
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1.35;
}

.admin-control-card .table-action-button {
  width: max-content;
  min-width: 92px;
  padding: 9px 14px;
}

.admin-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-overview-panel {
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at 88% 8%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(245, 158, 11, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 249, 0.97));
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-overview-card,
.dashboard-graphic-card {
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 34px rgba(35, 49, 58, 0.08);
}

.dashboard-overview-card {
  min-height: 118px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.dashboard-overview-card span,
.dashboard-graphic-head span {
  color: #5e6a75;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-overview-card strong {
  color: #13202f;
  font-size: 3.4rem;
  line-height: 1;
}

.dashboard-overview-card small {
  color: #66758a;
  font-size: 1.2rem;
  font-weight: 700;
}

.dashboard-overview-graphics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.dashboard-graphic-card {
  padding: 18px;
}

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

.dashboard-graphic-head h4 {
  margin: 0;
  color: #13202f;
  font-size: 1.8rem;
}

.overview-progress-track {
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ef;
}

.overview-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22c55e);
  transition: width 0.25s ease;
}

.overview-progress-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: #728096;
  font-size: 1.15rem;
  font-weight: 800;
}

.overview-task-bars {
  display: grid;
  gap: 12px;
}

.overview-task-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(160px, 1.4fr) minmax(70px, auto);
  align-items: center;
  gap: 12px;
}

.overview-task-row span {
  overflow: hidden;
  color: #223047;
  font-size: 1.25rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-task-row strong {
  color: #13202f;
  font-size: 1.25rem;
  text-align: right;
}

.overview-task-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf2;
}

.overview-task-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.overview-tehsil-card {
  display: grid;
  gap: 18px;
}

.overview-tehsil-feature {
  padding: 18px;
  border-color: rgba(15, 118, 110, 0.16);
  background:
    radial-gradient(circle at 14% 10%, rgba(20, 184, 166, 0.10), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 253, 250, 0.94)),
    #ffffff;
  box-shadow:
    0 22px 55px rgba(15, 50, 58, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.overview-tehsil-feature .dashboard-graphic-head {
  margin-bottom: 8px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.14);
}

.overview-tehsil-feature .dashboard-graphic-head h4 {
  font-size: 2rem;
}

.overview-tehsil-feature .dashboard-graphic-head span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.10);
  color: #0f766e;
}

.overview-tehsil-head-tools {
  max-width: min(760px, 68%);
  display: grid;
  justify-items: end;
  gap: 8px;
}

.overview-tehsil-head-tools > span {
  width: max-content;
}

.overview-filter-dropdown {
  width: min(320px, 100%);
  position: relative;
  display: grid;
  gap: 4px;
  color: #6b4a35;
  font-size: 1.1rem;
  font-weight: 800;
}

.dashboard-overview-panel > .panel-head {
  align-items: end;
}

.dashboard-overview-panel > .panel-head .overview-filter-dropdown {
  min-width: 300px;
  justify-self: end;
}

.overview-filter-dropdown > span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #6b4a35;
}

.overview-tehsil-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  position: absolute;
  z-index: 55;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background: #fffaf4;
  box-shadow: 0 18px 34px rgba(52, 37, 26, 0.18);
}

.overview-tehsil-filter .checkbox-inline {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  background: transparent;
  color: #2b2118;
  font-size: 1.05rem;
  font-weight: 800;
}

.overview-tehsil-filter .checkbox-inline:hover {
  background: rgba(139, 71, 38, 0.08);
}

.overview-tehsil-filter .checkbox-inline input {
  accent-color: #0f766e;
}

.overview-task-count-chart {
  max-height: 420px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 96% 10%, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.84));
}

.overview-task-count-plot {
  display: grid;
  gap: 9px;
}

.overview-task-count-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(220px, 1.4fr) 52px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.overview-task-count-row span {
  overflow: hidden;
  color: #173047;
  font-size: 1.1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-task-count-row strong {
  color: #0f766e;
  font-size: 1.15rem;
  text-align: right;
}

.overview-task-count-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.10);
}

.overview-task-count-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.overview-tehsil-chart {
  overflow-x: auto;
  padding: 16px 14px 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 253, 250, 0.8)),
    repeating-linear-gradient(to top, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 42px);
}

.overview-tehsil-chart-plot {
  min-height: 260px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(74px, 1fr);
  align-items: end;
  gap: 12px;
  min-width: max-content;
  padding: 8px 2px 0;
}

.overview-tehsil-chart-item {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  gap: 8px;
  height: 260px;
  text-align: center;
}

.overview-tehsil-chart-item > strong {
  color: #0f766e;
  font-size: 1.2rem;
  line-height: 1;
}

.overview-tehsil-chart-bar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 999px 999px 10px 10px;
  background: rgba(15, 118, 110, 0.08);
}

.overview-tehsil-chart-bar span {
  width: min(54px, 72%);
  height: var(--bar-height);
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

.overview-tehsil-chart-item small {
  overflow: hidden;
  color: #334155;
  font-size: 1.05rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-tehsil-chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 118, 110, 0.16);
  color: #64748b;
  font-size: 1.05rem;
  font-weight: 900;
}

.overview-tehsil-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  max-height: none;
  overflow-y: auto;
  padding: 4px 8px 6px 4px;
}

.overview-workflow-progress-card {
  grid-column: 1 / -1;
  padding: 16px 20px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.overview-workflow-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #07172d;
  font-size: 1.65rem;
  font-weight: 950;
}

.overview-workflow-title::before {
  content: "";
  width: 18px;
  height: 18px;
  display: inline-block;
  background:
    radial-gradient(circle at 35% 35%, transparent 0 3px, #07172d 3.5px 4.5px, transparent 5px),
    radial-gradient(circle at 70% 35%, transparent 0 3px, #07172d 3.5px 4.5px, transparent 5px),
    radial-gradient(ellipse at 34% 92%, transparent 0 6px, #07172d 6.5px 7.5px, transparent 8px),
    radial-gradient(ellipse at 72% 92%, transparent 0 6px, #07172d 6.5px 7.5px, transparent 8px);
}

.overview-workflow-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.overview-workflow-steps {
  display: grid;
  grid-template-columns: repeat(12, minmax(82px, 1fr));
  gap: 16px;
  min-width: 1080px;
}

.overview-workflow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.overview-workflow-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 42px;
  right: -14px;
  color: #334155;
  font-size: 1.55rem;
  font-weight: 700;
}

.overview-workflow-number {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #94a3b8;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
}

.overview-workflow-step.is-complete .overview-workflow-number {
  background: #00a83b;
}

.overview-workflow-step.is-progress .overview-workflow-number {
  background: #f6a11a;
}

.overview-workflow-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 2rem;
  font-weight: 950;
}

.overview-workflow-icon::before {
  line-height: 1;
}

.overview-workflow-icon-people {
  background: #d8f5df;
  color: #16a34a;
}

.overview-workflow-icon-people::before,
.overview-workflow-icon-people-orange::before {
  content: "grp";
  font-size: 0.88rem;
}

.overview-workflow-icon-people-orange {
  background: #ffe7bf;
  color: #f59e0b;
}

.overview-workflow-icon-doc-green {
  background: #d8f5df;
  color: #16a34a;
}

.overview-workflow-icon-doc-orange {
  background: #ffe7bf;
  color: #f59e0b;
}

.overview-workflow-icon-doc-gray {
  background: #e2e8f0;
  color: #64748b;
}

.overview-workflow-icon-doc-green::before,
.overview-workflow-icon-doc-orange::before,
.overview-workflow-icon-doc-gray::before {
  content: "doc";
  font-size: 0.86rem;
}

.overview-workflow-icon-hammer {
  background: #e2e8f0;
  color: #475569;
}

.overview-workflow-icon-hammer::before {
  content: "obj";
  font-size: 0.86rem;
}

.overview-workflow-icon-globe {
  background: #e2e8f0;
  color: #475569;
}

.overview-workflow-icon-globe::before {
  content: "gis";
  font-size: 0.86rem;
}

.overview-workflow-step strong {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07172d;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.12;
}

.overview-workflow-step small {
  color: #334155;
  font-size: 0.98rem;
  font-weight: 600;
}

.overview-workflow-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe5ec;
}

.overview-workflow-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: #94a3b8;
}

.overview-workflow-step.is-complete .overview-workflow-track span {
  background: #00a83b;
}

.overview-workflow-step.is-progress .overview-workflow-track span {
  background: #ff9900;
}

.overview-workflow-step em {
  color: #07172d;
  font-size: 0.98rem;
  font-style: normal;
  font-weight: 950;
}

.overview-workflow-progress-card {
  padding: 24px 28px 22px;
}

.overview-workflow-title {
  margin-bottom: 18px;
  font-size: 2.2rem;
}

.overview-workflow-steps {
  grid-template-columns: repeat(12, minmax(132px, 1fr));
  gap: 22px;
  min-width: 1580px;
}

.overview-workflow-step {
  gap: 13px;
  min-height: 112px;
}

.overview-workflow-step:not(:last-child)::after {
  content: none !important;
}

.overview-workflow-number {
  display: none;
}

.overview-workflow-icon {
  display: none;
}

.overview-workflow-step strong {
  min-height: 48px;
  font-size: 1.56rem;
  max-width: 144px;
}

.overview-workflow-step small {
  font-size: 1.52rem;
  font-weight: 750;
  color: #475569;
}

.overview-workflow-track {
  height: 9px;
  min-width: 118px;
}

.overview-workflow-step em {
  font-size: 1.52rem;
  font-weight: 950;
}

.overview-insight-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.overview-insight-card {
  min-height: 310px;
  padding: 24px 24px 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.overview-insight-card h4 {
  margin: 0 0 20px;
  color: #07172d;
  font-size: 1.65rem;
  font-weight: 950;
}

.overview-comparison-chart {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  row-gap: 9px;
  align-items: center;
}

.overview-comparison-row {
  display: contents;
}

.overview-comparison-row > span {
  overflow: hidden;
  padding-right: 8px;
  color: #6b4a35;
  font-size: 1.45rem;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-comparison-row > div {
  height: 28px;
  border-left: 2px solid #111827;
  background: transparent;
}

.overview-comparison-row i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 0 9px 9px 0;
  background: #000000;
}

.overview-comparison-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  padding-top: 5px;
  border-top: 1px solid #7d8793;
  color: #64748b;
  font-size: 1.35rem;
  font-weight: 500;
}

.overview-funnel-chart {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 2px 0;
}

.overview-funnel-step {
  width: var(--width);
  min-width: 240px;
  max-width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 950;
}

.overview-funnel-blue {
  background: #214be5;
}

.overview-funnel-teal {
  background: #0f9b8e;
}

.overview-funnel-orange {
  background: #ff6608;
}

.overview-funnel-purple {
  background: #6d5dfc;
}

.overview-funnel-amber {
  background: #f5a400;
}

.overview-funnel-green {
  background: #08aa43;
}

.overview-activity-combo-card {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(430px, 0.95fr) minmax(460px, 1.05fr);
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.overview-mini-card {
  min-height: 300px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.overview-mini-card h4 {
  margin-bottom: 20px;
}

.overview-mini-card h4 span {
  color: #334155;
  font-size: 1.35rem;
  font-weight: 800;
}

.overview-attendance-layout {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 230px;
  height: 100%;
}

.overview-attendance-donut {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background: conic-gradient(var(--attendance-gradient, #0f9b72 0 75%, #ef4444 75% 92%, #94a37f 92% 100%));
  box-shadow: inset 0 0 0 36px #ffffff, 0 18px 34px rgba(15, 23, 42, 0.14);
}

.overview-attendance-legend {
  display: grid;
  gap: 18px;
  align-content: center;
}

.overview-attendance-legend span {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #1f2937;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 900;
  white-space: nowrap;
}

.overview-attendance-legend i {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex: 0 0 auto;
}

.overview-attendance-legend strong {
  color: #475569;
  font-weight: 900;
}

.overview-activity-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  align-items: end;
  gap: 18px;
  min-height: 210px;
  padding: 8px 4px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.overview-activity-bar-item {
  display: grid;
  grid-template-rows: 28px 140px 36px;
  align-items: end;
  justify-items: center;
  gap: 8px;
  color: #334155;
  font-size: 1.18rem;
  font-weight: 800;
  text-align: center;
}

.overview-activity-bar-item strong {
  color: #1e293b;
  font-size: 1.32rem;
  font-weight: 950;
}

.overview-activity-bar-item div {
  width: 42px;
  height: 140px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-bottom: 2px solid rgba(148, 163, 184, 0.32);
}

.overview-activity-bar-item i {
  width: 34px;
  min-height: 6px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #2489e7, #0967c2);
  box-shadow: 0 8px 16px rgba(9, 103, 194, 0.22);
}

.overview-activity-bar-item span {
  max-width: 98px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-alert-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff0000 !important;
}

.overview-alert-title::before {
  content: "!";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #ff0000;
  border-radius: 50%;
  color: #ff0000;
  font-size: 1.4rem;
  font-weight: 950;
  line-height: 1;
}

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

.overview-alert-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 850;
}

.overview-alert-clickable {
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.16s ease, transform 0.16s ease;
}

.overview-alert-clickable:hover {
  background: rgba(245, 158, 11, 0.10);
  transform: translateX(3px);
}

.overview-alert-row > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.55);
}

.overview-map-card-hidden {
  display: none;
}

.overview-bottom-alert-card {
  min-height: 360px;
}

.overview-alert-list-large {
  gap: 22px;
}

.overview-alert-list-large .overview-alert-row {
  font-size: 1.75rem;
}

.overview-alert-list-large .overview-alert-row > span {
  width: 18px;
  height: 18px;
}

.overview-alert-danger {
  color: #ff0000;
}

.overview-alert-danger > span {
  background: linear-gradient(135deg, #ff7181, #c81e3b);
}

.overview-alert-warning {
  color: #ff5a00;
}

.overview-alert-warning > span {
  background: linear-gradient(135deg, #ffb17a, #ff5a00);
}

.overview-alert-info {
  color: #003cff;
}

.overview-alert-info > span {
  background: linear-gradient(135deg, #78b7ff, #1d64d8);
}

.overview-alert-success {
  color: #00a83b;
}

.overview-alert-success > span {
  background: linear-gradient(135deg, #86efac, #00a83b);
}

.overview-critical-alert-card {
  background:
    radial-gradient(circle at 94% 18%, rgba(239, 68, 68, 0.08), transparent 30%),
    #ffffff;
}

.overview-critical-alert-card .overview-alert-list-large {
  gap: 18px;
}

.overview-critical-alert-card .overview-alert-row {
  min-height: 38px;
  padding: 4px 0;
  font-size: 1.48rem;
}

.overview-bottom-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.85fr);
  gap: 20px;
}

.overview-form-summary-card {
  grid-column: 1 / -1;
}

.overview-bottom-card {
  min-height: 286px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.overview-bottom-card h4 {
  margin: 0 0 14px;
  color: #0f2f6e;
  font-size: 1.9rem;
  font-weight: 950;
  text-transform: uppercase;
}

.overview-form-summary-title,
.overview-map-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-form-summary-title::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  background:
    linear-gradient(#2f80ed 0 0) left 2px top 2px / 4px 4px no-repeat,
    linear-gradient(#2f80ed 0 0) center top 2px / 4px 4px no-repeat,
    linear-gradient(#2f80ed 0 0) right 2px top 2px / 4px 4px no-repeat,
    linear-gradient(#2f80ed 0 0) left 2px bottom 2px / 4px 4px no-repeat,
    linear-gradient(#2f80ed 0 0) center bottom 2px / 4px 4px no-repeat,
    linear-gradient(#2f80ed 0 0) right 2px bottom 2px / 4px 4px no-repeat;
}

.overview-map-title::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid #2f80ed;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #ffffff;
  background: #2f80ed;
}

.overview-form-table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid #d8e5f5;
  border-radius: 10px;
}

.overview-form-summary-table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  table-layout: auto;
}

.overview-form-summary-table th,
.overview-form-summary-table td {
  padding: 18px 22px;
  border: 1px solid #d8e5f5;
  color: #0f172a;
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
  white-space: nowrap;
}

.overview-form-summary-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eaf3ff;
  color: #123a7a;
  font-size: 2.55rem;
  font-weight: 950;
}

.overview-form-summary-table tbody tr:nth-child(even) {
  background: #f8fbff;
}

.overview-form-summary-table td:first-child,
.overview-form-summary-table th:first-child {
  text-align: left;
  min-width: max-content;
}

.overview-form-summary-table td:first-child {
  font-size: 2.2rem;
}

.overview-table-complete {
  color: #00a83b !important;
}

.overview-table-progress-text {
  color: #ff6500 !important;
}

.overview-table-pending {
  color: #ff0000 !important;
}

.overview-table-progress {
  display: grid;
  grid-template-columns: 82px 116px;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.overview-table-progress > span {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6500, #00a83b);
}

.overview-table-progress > strong {
  min-width: 108px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 0, 0, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #fff1f1);
  color: #ff0000;
  font-size: 2.2rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  box-shadow: 0 5px 12px rgba(255, 0, 0, 0.10);
}

.overview-form-summary-table th:nth-child(6),
.overview-form-summary-table td:nth-child(6) {
  width: auto;
  min-width: max-content;
}

.overview-map-layout {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 14px;
  min-height: 220px;
}

.overview-map-tools {
  display: grid;
  gap: 8px;
  align-self: center;
}

.overview-map-tools span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d8e5f5;
  border-radius: 4px;
  background: #ffffff;
  color: #335273;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.overview-map-shape {
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 3px;
  max-width: 430px;
  padding: 12px;
  justify-self: center;
}

.overview-map-cell {
  aspect-ratio: 1.35;
  display: block;
  border-radius: 40% 60% 48% 52%;
  transform: rotate(var(--angle, -8deg));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 2px 3px rgba(15, 23, 42, 0.06);
}

.overview-map-cell:nth-child(2n) {
  --angle: 8deg;
}

.overview-map-cell:nth-child(3n) {
  --angle: -16deg;
}

.overview-map-complete,
.overview-map-cell.overview-map-complete {
  background: #7bc96f;
}

.overview-map-progress,
.overview-map-cell.overview-map-progress {
  background: #ffbd3d;
}

.overview-map-pending,
.overview-map-cell.overview-map-pending {
  background: #ff6a5e;
}

.overview-map-not-started,
.overview-map-cell.overview-map-not-started {
  background: #cfd2d4;
}

.overview-map-legend {
  display: grid;
  gap: 13px;
  color: #334155;
  font-size: 1.02rem;
  font-weight: 850;
}

.overview-map-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-map-legend i {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 50%;
}

.overview-tehsil-node {
  --progress: 0;
  display: grid;
  gap: 16px;
  min-height: 226px;
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(90deg, #0f766e, #14b8a6, #86efac) top left / 100% 5px no-repeat,
    radial-gradient(circle at 92% 22%, rgba(20, 184, 166, 0.22), transparent 32%),
    radial-gradient(circle at 0% 110%, rgba(15, 118, 110, 0.10), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f8fffd 48%, #eefbf8 100%);
  box-shadow:
    0 18px 40px rgba(15, 50, 58, 0.11),
    0 2px 0 rgba(255, 255, 255, 0.92) inset;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.overview-tehsil-node::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(20, 184, 166, 0.12) 0 42%, transparent 44%),
    rgba(20, 184, 166, 0.04);
  pointer-events: none;
}

.overview-tehsil-node:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.26);
  box-shadow:
    0 26px 58px rgba(15, 50, 58, 0.15),
    0 2px 0 rgba(255, 255, 255, 0.94) inset;
}

.overview-tehsil-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.overview-progress-badge {
  width: 88px;
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 253, 249, 0.92)),
    conic-gradient(#14b8a6 calc(var(--progress) * 1%), #e0f2ee 0);
  box-shadow:
    0 14px 24px rgba(15, 118, 110, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: center;
}

.overview-progress-badge strong {
  color: #0f3f3b;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.overview-progress-badge span {
  color: #5f7a75;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.overview-tehsil-ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 52%, transparent 54%),
    conic-gradient(#0f766e calc(var(--progress) * 1%), #dbeeea 0);
  color: #0f3f3b;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08), 0 10px 22px rgba(15, 118, 110, 0.12);
}

.overview-tehsil-ring strong {
  grid-area: 1 / 1;
  margin-top: -5px;
  font-size: 1.35rem;
  line-height: 1;
}

.overview-tehsil-ring span {
  grid-area: 1 / 1;
  align-self: end;
  margin-bottom: 15px;
  color: #5f7a75;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-tehsil-node-copy {
  min-width: 0;
}

.overview-tehsil-node-copy h5 {
  margin: 0 0 4px;
  overflow: visible;
  color: #10223a;
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1.12;
  text-overflow: clip;
  white-space: normal;
}

.overview-tehsil-node-copy p {
  margin: 0 0 3px;
  color: #0f766e;
  font-size: 1.22rem;
  font-weight: 900;
}

.overview-tehsil-node-copy small {
  color: #64748b;
  font-size: 1.05rem;
  font-weight: 700;
}

.overview-form-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-form-metrics article {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 80px;
  padding: 12px 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 251, 0.82));
  box-shadow:
    0 10px 22px rgba(15, 50, 58, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.overview-form-metrics span {
  overflow: hidden;
  color: #667b78;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-form-metrics strong {
  color: #10223a;
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1.05;
}

.overview-form-metrics article:nth-child(2) strong {
  color: #0f766e;
}

.overview-form-metrics article:nth-child(3) strong {
  color: #b45309;
}

.overview-form-metrics article:nth-child(4) strong {
  color: #be123c;
}

.overview-tehsil-task-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
}

.overview-tehsil-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.05);
}

.overview-tehsil-task span {
  overflow: hidden;
  color: #334155;
  font-size: 0.98rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-tehsil-task strong {
  min-width: 22px;
  color: #0f766e;
  font-size: 1rem;
  text-align: right;
}

.overview-tehsil-empty {
  grid-column: 1 / -1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(15, 118, 110, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: #718096;
  font-size: 0.95rem;
  font-weight: 800;
}

.tehsil-progress-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.tehsil-progress-actions > label,
.tehsil-filter-block {
  display: grid;
  gap: 4px;
  min-width: 170px;
  color: #6b4a35;
  font-size: 1.1rem;
  font-weight: 800;
}

.tehsil-progress-actions select {
  height: 38px;
  border: 1px solid rgba(139, 71, 38, 0.28);
  border-radius: 8px;
  background: #fffaf4;
  color: #2b2118;
  font-weight: 800;
}

.tehsil-filter-block {
  min-width: 260px;
  position: relative;
}

.tehsil-filter-toggle {
  width: 100%;
  min-height: 38px;
  padding: 8px 34px 8px 12px;
  border: 1px solid rgba(139, 71, 38, 0.28);
  border-radius: 8px;
  background: #fffaf4 !important;
  color: #2b2118;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  position: relative;
  box-shadow: none;
}

.tehsil-filter-toggle::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b4726;
}

.tehsil-checkbox-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid rgba(139, 71, 38, 0.28);
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: 0 18px 34px rgba(52, 37, 26, 0.18);
}

.tehsil-checkbox-list .checkbox-inline {
  width: 100%;
  gap: 6px;
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #2b2118;
  font-size: 1.05rem;
  font-weight: 700;
}

.tehsil-checkbox-list .checkbox-inline:hover {
  background: rgba(139, 71, 38, 0.08);
}

.tehsil-checkbox-list .checkbox-inline span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tehsil-weekly-comparison {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 94% 8%, rgba(20, 184, 166, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.82));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.weekly-comparison-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weekly-comparison-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 950;
}

.weekly-comparison-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 1.15rem;
  font-weight: 700;
}

.weekly-trend-pill,
.weekly-change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 950;
}

.weekly-trend-pill.up,
.weekly-change.up {
  color: #047857;
  background: #d1fae5;
}

.weekly-trend-pill.down,
.weekly-change.down {
  color: #b91c1c;
  background: #fee2e2;
}

.weekly-trend-pill.flat,
.weekly-change.flat {
  color: #475569;
  background: #e2e8f0;
}

.weekly-comparison-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.weekly-comparison-cards article {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.weekly-comparison-cards span,
.weekly-comparison-cards small {
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 800;
}

.weekly-comparison-cards strong {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 950;
}

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

.weekly-comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.weekly-comparison-table th,
.weekly-comparison-table td {
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  font-weight: 850;
  text-align: center;
}

.weekly-comparison-table th {
  color: #115e59;
  background: rgba(204, 251, 241, 0.7);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.weekly-comparison-table td:first-child,
.weekly-comparison-table th:first-child {
  text-align: left;
}

#tehsil-progress-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
}

#tehsil-progress-table th,
#tehsil-progress-table td {
  border: 1px solid rgba(95, 46, 24, 0.32);
  white-space: normal;
  word-break: break-word;
  vertical-align: middle;
  text-align: center;
  padding: 7px 5px;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.18;
}

#tehsil-progress-table th {
  background: #ead8bd;
  color: #2b2118;
  font-weight: 800;
  height: 150px;
  padding: 8px 3px;
  vertical-align: bottom;
}

#tehsil-progress-table th:nth-child(1),
#tehsil-progress-table td:nth-child(1) {
  width: 1%;
  min-width: max-content;
  white-space: nowrap;
  text-align: left;
}
#tehsil-progress-table th:nth-child(2),
#tehsil-progress-table td:nth-child(2) {
  width: 1%;
  min-width: max-content;
  white-space: nowrap;
  text-align: left;
}
#tehsil-progress-table th:nth-child(3),
#tehsil-progress-table td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
}
#tehsil-progress-table th:nth-child(4),
#tehsil-progress-table td:nth-child(4) {
  width: 1%;
  white-space: nowrap;
}
#tehsil-progress-table th:nth-child(n+5),
#tehsil-progress-table td:nth-child(n+5) {
  width: 4.2%;
  min-width: 0;
}

#tehsil-progress-table th.tehsil-fixed-col,
#tehsil-progress-table td.tehsil-fixed-col {
  width: 1%;
  min-width: max-content;
  white-space: nowrap;
  text-align: left;
}

#tehsil-progress-table th.tehsil-number-col,
#tehsil-progress-table td.tehsil-number-col {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

#tehsil-progress-table th.tehsil-task-col,
#tehsil-progress-table td.tehsil-task-col {
  width: 4.2%;
  min-width: 0;
  text-align: center;
}

#tehsil-progress-table .tehsil-fixed-head,
#tehsil-progress-table .tehsil-task-head {
  display: inline-block;
  max-height: 140px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

#tehsil-progress-table td:nth-child(n+5) > span {
  display: block;
  font-size: 2rem;
  font-weight: 400;
}

.tehsil-progress-meter {
  display: inline-flex;
  width: 130px;
  height: 10px;
  margin-right: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(139, 71, 38, 0.14);
  vertical-align: middle;
}

.tehsil-progress-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b4726, #d1864a);
}

#tehsil-progress-table .task-percent {
  display: block;
  width: max-content;
  margin: 3px auto 0;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(139, 71, 38, 0.1);
  color: #5f2e18;
  font-size: 1.6rem;
  font-weight: 400;
  text-align: center;
}

#tehsil-progress-table .tehsil-total-row td {
  background: #f2dfbd;
  color: #2f1f12;
  font-weight: 900;
  border-top: 2px solid rgba(95, 46, 24, 0.75);
  border-bottom: 2px solid rgba(95, 46, 24, 0.75);
}

#tehsil-progress-table .tehsil-total-row .task-percent {
  background: rgba(95, 46, 24, 0.18);
}

#tehsil-progress-table.village-list-table th,
#tehsil-progress-table.village-list-table td {
  padding: 6px 7px;
  font-size: 1.12rem;
  line-height: 1.22;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

#tehsil-progress-table.village-list-table tbody td {
  min-height: 46px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.45;
  vertical-align: middle;
}

#tehsil-progress-table.village-list-table th {
  height: 42px;
  min-height: 0;
  vertical-align: middle;
}

.table-wrap.village-list-scroll {
  max-height: min(72vh, 780px);
  overflow: auto !important;
  position: relative;
}

#tehsil-progress-table.village-list-table {
  border-collapse: separate;
  border-spacing: 0;
}

#tehsil-progress-table.village-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #ead8bd;
  box-shadow: inset 0 -1px 0 rgba(95, 46, 24, 0.22), 0 2px 5px rgba(57, 40, 24, 0.08);
}

#tehsil-progress-table.village-list-table thead tr:first-child th {
  height: 42px;
  padding-top: 5px;
  padding-bottom: 5px;
}

#tehsil-progress-table.village-list-table thead tr:nth-child(2) th {
  top: var(--village-list-header-top, 42px);
  height: 74px;
  z-index: 13;
  background: #f2e4cf;
}

#tehsil-progress-table.village-list-table th[rowspan="2"] {
  height: 116px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: middle;
  z-index: 14;
}

#tehsil-progress-table.village-list-table th.tehsil-fixed-col,
#tehsil-progress-table.village-list-table td.tehsil-fixed-col {
  min-width: 110px;
  max-width: 180px;
  white-space: normal;
}

#tehsil-progress-table.village-list-table th.tehsil-serial-col,
#tehsil-progress-table.village-list-table td.tehsil-serial-col {
  width: 1%;
  min-width: 66px;
  max-width: 82px;
  text-align: center;
  white-space: nowrap;
}

#tehsil-progress-table.village-list-table th.tehsil-number-col,
#tehsil-progress-table.village-list-table td.tehsil-number-col {
  width: auto;
  min-width: 118px;
  max-width: 140px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  text-align: center;
}

#tehsil-progress-table.village-list-table th.tehsil-task-col,
#tehsil-progress-table.village-list-table td.tehsil-task-col {
  min-width: 92px;
  max-width: 128px;
  white-space: normal;
}

#tehsil-progress-table.village-list-table th.form05-self-col,
#tehsil-progress-table.village-list-table td.form05-self-col {
  min-width: 132px;
  max-width: 170px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
}

#tehsil-progress-table.village-list-table th.form05-self-date-col,
#tehsil-progress-table.village-list-table td.form05-self-date-col {
  min-width: 92px;
  max-width: 106px;
  white-space: normal;
  word-break: break-word;
}

#tehsil-progress-table.village-list-table th.form05-self-status-col,
#tehsil-progress-table.village-list-table td.form05-self-status-col {
  min-width: 108px;
  max-width: 126px;
  white-space: normal;
}

#tehsil-progress-table.village-list-table th.submission-date-col,
#tehsil-progress-table.village-list-table td.submission-date-col {
  min-width: 118px;
  max-width: 142px;
  white-space: normal;
  word-break: break-word;
}

#tehsil-progress-table.village-list-table th.submission-status-col,
#tehsil-progress-table.village-list-table td.submission-status-col {
  min-width: 108px;
  max-width: 126px;
  white-space: normal;
}

#tehsil-progress-table.village-list-table th.form05-group-head {
  min-width: 440px;
  height: 42px;
  padding: 5px 8px;
  background: #ead8bd;
  text-align: center;
  vertical-align: middle;
}

#tehsil-progress-table.village-list-table th.form05-group-head .tehsil-task-head {
  font-size: 1.12rem;
  font-weight: 950;
}

#tehsil-progress-table.village-list-table th.gram-sabha-group-head {
  min-width: 370px;
}

#tehsil-progress-table.village-list-table th.submission-group-head {
  min-width: 238px;
  height: 42px;
  padding: 5px 8px;
  background: #ead8bd;
  text-align: center;
  vertical-align: middle;
}

#tehsil-progress-table.village-list-table th.submission-group-head .tehsil-task-head {
  font-size: 1.12rem;
  font-weight: 950;
}

#tehsil-progress-table.village-list-table th.form05-child-head {
  height: 74px;
  padding: 6px 6px;
  background: #f2e4cf;
  vertical-align: middle;
}

#tehsil-progress-table.village-list-table .tehsil-fixed-head {
  writing-mode: horizontal-tb;
  transform: none;
  max-height: none;
  font-size: 1.14rem;
}

#tehsil-progress-table.village-list-table .tehsil-task-head {
  display: block;
  max-height: none;
  writing-mode: horizontal-tb;
  transform: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  line-height: 1.12;
}

#tehsil-progress-table.village-list-table .form05-subhead {
  display: block;
  margin-top: 5px;
  color: #5f2e18;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.1;
}

#tehsil-progress-table.village-list-table .village-task-filter {
  display: block;
  width: 100%;
  min-width: 76px;
  margin-top: 5px;
  padding: 5px 28px 5px 9px;
  border: 1px solid #a7b7c7;
  border-radius: 3px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #1f2937 50%) calc(100% - 14px) 52% / 5px 5px no-repeat,
    linear-gradient(135deg, #1f2937 50%, transparent 50%) calc(100% - 9px) 52% / 5px 5px no-repeat,
    linear-gradient(180deg, #ffffff, #eef4fb);
  color: #5f2e18;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

#tehsil-progress-table.village-list-table .village-excel-filter {
  position: relative;
  width: 100%;
}

#tehsil-progress-table.village-list-table .village-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  min-height: 28px;
  padding: 5px 8px;
  max-width: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
}

#tehsil-progress-table.village-list-table .village-filter-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tehsil-progress-table.village-list-table .village-filter-button.active {
  border-color: #0f766e;
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  color: #065f46;
}

#tehsil-progress-table.village-list-table .village-filter-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 80;
  width: max(190px, 100%);
  max-width: 270px;
  padding: 8px;
  border: 1px solid rgba(31, 41, 55, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
  text-align: left;
}

#tehsil-progress-table.village-list-table .village-filter-options {
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

#tehsil-progress-table.village-list-table .village-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 5px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

#tehsil-progress-table.village-list-table .village-filter-option:hover {
  background: #f1f5f9;
}

#tehsil-progress-table.village-list-table .village-filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
}

#tehsil-progress-table.village-list-table .village-filter-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#tehsil-progress-table.village-list-table .village-filter-all {
  margin-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  color: #7c3f1f;
}

#tehsil-progress-table.village-list-table .village-filter-empty {
  padding: 8px 5px;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 800;
}

#tehsil-progress-table.village-list-table .village-task-filter:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
  border-color: #3b82f6;
}

#tehsil-progress-table.village-list-table td.tehsil-task-col > span {
  font-size: 1.22rem;
  font-weight: 800;
}

.village-status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 74px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.village-status-pill.done {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.village-status-pill.ip {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.village-status-pill.not-started {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.village-status-pill.submitted {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.village-status-pill.not-submitted {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

#tehsil-progress-table.village-list-table .submission-date-cell small {
  display: block;
  margin-top: 3px;
  color: #8b4726;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

#attendance-matrix-table {
  width: max-content;
  min-width: 1600px;
  table-layout: fixed;
  border-collapse: collapse;
}

#attendance-panel .form-grid {
  grid-template-columns: minmax(320px, 460px);
  justify-content: start;
  margin-bottom: 18px;
}

#attendance-panel .form-grid label span {
  font-size: 2rem;
  font-weight: 800;
}

#attendance-month-select {
  width: 460px;
  max-width: 460px;
  min-width: 460px;
  height: 48px;
  font-size: 1.65rem;
  padding: 8px 14px;
  line-height: 1.2;
}

#attendance-panel .table-wrap {
  clear: both;
  overflow-x: auto;
  overflow-y: visible;
}

#attendance-matrix-table th,
#attendance-matrix-table td {
  text-align: center;
  white-space: nowrap;
  font-size: 1.9rem;
  padding: 12px 14px;
  border: 1px solid rgba(139, 71, 38, 0.14);
}

#attendance-matrix-table thead th {
  background: #2f5b88;
  color: #fff;
  font-weight: 700;
  vertical-align: middle;
}

#attendance-head-row-2 th {
  background: #e9dcc7;
  color: #5c412e;
  font-size: 1.55rem;
  font-weight: 700;
}

#attendance-head-row-1 th {
  height: 58px;
}

#attendance-head-row-2 th {
  height: 48px;
}

#attendance-matrix-table tbody td {
  background: rgba(255, 251, 245, 0.92);
}

#attendance-matrix-table th:nth-child(1),
#attendance-matrix-table td:nth-child(1) { min-width: 110px; }
#attendance-matrix-table th:nth-child(2),
#attendance-matrix-table td:nth-child(2) { min-width: 260px; text-align: left; }
#attendance-matrix-table th:nth-child(3),
#attendance-matrix-table td:nth-child(3) { min-width: 190px; }
#attendance-matrix-table th:nth-child(4),
#attendance-matrix-table td:nth-child(4) { min-width: 250px; }

#attendance-matrix-table th:nth-child(n+5),
#attendance-matrix-table td:nth-child(n+5) {
  min-width: 62px;
  width: 62px;
  padding-inline: 8px;
}

#attendance-head-row-1 th:nth-child(n+5) {
  min-width: 62px !important;
  width: 62px !important;
  padding-inline: 8px !important;
  position: static !important;
  left: auto !important;
  z-index: 1 !important;
  box-shadow: none !important;
}

#attendance-head-row-1 th:nth-child(6),
#attendance-head-row-1 th:nth-child(7),
#attendance-head-row-1 th:nth-child(8) {
  min-width: 62px !important;
  width: 62px !important;
  padding-inline: 8px !important;
}

#attendance-head-row-2 th {
  min-width: 62px;
  width: 62px;
  padding-inline: 8px;
}

#attendance-head-row-2 th:nth-child(2),
#attendance-head-row-2 th:nth-child(3),
#attendance-head-row-2 th:nth-child(4) {
  min-width: 62px !important;
  width: 62px !important;
  padding-inline: 8px !important;
}

#attendance-matrix-table th:nth-child(1),
#attendance-matrix-table td:nth-child(1),
#attendance-matrix-table th:nth-child(2),
#attendance-matrix-table td:nth-child(2),
#attendance-matrix-table th:nth-child(3),
#attendance-matrix-table td:nth-child(3),
#attendance-matrix-table th:nth-child(4),
#attendance-matrix-table td:nth-child(4) {
  position: sticky;
  z-index: 2;
}

#attendance-head-row-2 th {
  position: static !important;
  left: auto !important;
  z-index: 1 !important;
  box-shadow: none !important;
}

#attendance-matrix-table th:nth-child(1),
#attendance-matrix-table td:nth-child(1) { left: 0; }
#attendance-matrix-table th:nth-child(2),
#attendance-matrix-table td:nth-child(2) { left: 110px; }
#attendance-matrix-table th:nth-child(3),
#attendance-matrix-table td:nth-child(3) { left: 370px; }
#attendance-matrix-table th:nth-child(4),
#attendance-matrix-table td:nth-child(4) { left: 560px; }

#attendance-matrix-table tbody td:nth-child(-n+4) {
  background: #fffaf4;
}

#attendance-matrix-table thead th:nth-child(-n+4) {
  z-index: 4;
}

#attendance-matrix-table th:nth-child(4),
#attendance-matrix-table td:nth-child(4) {
  box-shadow: 6px 0 10px rgba(47, 91, 136, 0.08);
}

.attendance-status-cell {
  min-width: 62px;
  font-weight: 700;
}

.attendance-status-cell.status-p {
  background: rgba(74, 130, 95, 0.16);
  color: #215d37;
}

.attendance-status-cell.status-hd {
  background: rgba(99, 102, 241, 0.15);
  color: #3740a3;
}

.attendance-status-cell.status-late {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.attendance-status-cell.status-l {
  background: rgba(184, 148, 66, 0.16);
  color: #805f12;
}

.attendance-status-cell.status-a {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.attendance-status-cell.status-h {
  background: rgba(96, 109, 129, 0.16);
  color: #435166;
}

#resource-logins-panel .salary-cell {
  gap: 8px;
  flex-wrap: wrap;
}

#resource-logins-panel .table-wrap {
  overflow-x: auto;
}

#resource-logins-table {
  width: max-content;
  min-width: 5200px;
  table-layout: fixed;
}

#resource-logins-table th,
#resource-logins-table td {
  white-space: nowrap;
  word-break: normal;
  font-size: 1.5rem;
  line-height: 1.35;
  padding: 12px 14px;
  vertical-align: middle;
}

#resource-logins-table th:nth-child(1),
#resource-logins-table td:nth-child(1) { min-width: 220px; }
#resource-logins-table th:nth-child(2),
#resource-logins-table td:nth-child(2) { min-width: 160px; }
#resource-logins-table th:nth-child(3),
#resource-logins-table td:nth-child(3) { min-width: 140px; }
#resource-logins-table th:nth-child(4),
#resource-logins-table td:nth-child(4) { min-width: 180px; }
#resource-logins-table th:nth-child(5),
#resource-logins-table td:nth-child(5) { min-width: 120px; }
#resource-logins-table th:nth-child(6),
#resource-logins-table td:nth-child(6) { min-width: 240px; }
#resource-logins-table th:nth-child(7),
#resource-logins-table td:nth-child(7) { min-width: 220px; }
#resource-logins-table th:nth-child(8),
#resource-logins-table td:nth-child(8) { min-width: 170px; }
#resource-logins-table th:nth-child(9),
#resource-logins-table td:nth-child(9) { min-width: 180px; }
#resource-logins-table th:nth-child(10),
#resource-logins-table td:nth-child(10) { min-width: 220px; }
#resource-logins-table th:nth-child(11),
#resource-logins-table td:nth-child(11) { min-width: 160px; }
#resource-logins-table th:nth-child(12),
#resource-logins-table td:nth-child(12) { min-width: 150px; }
#resource-logins-table th:nth-child(13),
#resource-logins-table td:nth-child(13) { min-width: 280px; }
#resource-logins-table th:nth-child(14),
#resource-logins-table td:nth-child(14) { min-width: 160px; }
#resource-logins-table th:nth-child(15),
#resource-logins-table td:nth-child(15) { min-width: 170px; }
#resource-logins-table th:nth-child(16),
#resource-logins-table td:nth-child(16) { min-width: 220px; }
#resource-logins-table th:nth-child(17),
#resource-logins-table td:nth-child(17) { min-width: 220px; }
#resource-logins-table th:nth-child(18),
#resource-logins-table td:nth-child(18) { min-width: 260px; }
#resource-logins-table th:nth-child(19),
#resource-logins-table td:nth-child(19) { min-width: 260px; }
#resource-logins-table th:nth-child(20),
#resource-logins-table td:nth-child(20) { min-width: 260px; }
#resource-logins-table th:nth-child(21),
#resource-logins-table td:nth-child(21),
#resource-logins-table th:nth-child(22),
#resource-logins-table td:nth-child(22) { min-width: 140px; }

#resource-logins-panel .salary-input {
  width: 140px;
  min-width: 140px;
  font-size: 1.1rem;
  padding: 8px 10px;
}

#resource-logins-panel .save-salary-button {
  font-size: 1.05rem;
  padding: 8px 12px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.muted-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1.55rem;
  line-height: 1.35;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) repeat(9, minmax(118px, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 12px 14px;
  border-radius: 18px;
  min-height: 72px;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 71, 38, 0.75), rgba(139, 71, 38, 0.05));
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(20, 24, 40, 0.14);
  border-color: rgba(139, 71, 38, 0.26);
}

.primary-stat {
  background:
    linear-gradient(180deg, rgba(255, 248, 240, 0.98), rgba(255, 251, 245, 0.95)),
    var(--panel);
}

.stat-card span {
  display: block;
  margin-bottom: 5px;
  color: #8b7058;
  font-size: 1.45rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.stat-card strong {
  font-size: clamp(1.45rem, 1.8vw, 1.95rem);
  line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
  color: #12233a;
}

.stat-user-card {
  display: grid;
  align-content: center;
  gap: 5px;
  background:
    linear-gradient(135deg, rgba(47, 111, 115, 0.12), rgba(255, 253, 249, 0.98));
}

.stat-user-card .stat-live-label {
  margin: 0;
  color: #9a4f28;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
}

.stat-user-card strong {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.65rem, 1.25vw, 2.25rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: capitalize;
}

.stat-user-card small {
  color: #546173;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 14px;
  align-items: stretch;
}

body.admin-layout .panel-grid {
  grid-template-columns: minmax(420px, 1fr) minmax(520px, 1fr);
}

body.admin-layout #upload-panel,
body.admin-layout #resource-panel {
  min-height: 178px;
}

body.admin-layout #upload-panel {
  align-content: start;
}

body.admin-layout #upload-panel .stack-form {
  display: grid;
  gap: 10px;
}

body.admin-layout #resource-form {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

body.admin-layout #resource-form button[type="submit"] {
  height: 48px;
  align-self: end;
}

#role-assignment-panel .form-grid {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  align-items: end;
}

#role-assignment-panel button[type="submit"] {
  height: 48px;
}

#role-assignment-message {
  margin-top: 0;
}

#work-update-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.95fr);
  gap: 14px;
  align-items: start;
}

#target-actual-chart-panel {
  align-self: start;
  min-width: 0;
  width: 100%;
}

.target-actual-chart {
  display: grid;
  gap: 22px;
}

.target-actual-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: stretch;
  gap: 14px;
}

.target-actual-inline-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.target-actual-stat,
.target-actual-metric,
.target-actual-overall-card {
  min-width: 0;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background:
    radial-gradient(circle at 88% 12%, rgba(20, 184, 166, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.86));
  border-radius: 18px;
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.target-actual-metric,
.target-actual-overall-card {
  min-width: 0;
}

.target-actual-stat span,
.target-actual-metric span,
.target-actual-overall-card span {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #0f766e;
}

.target-actual-stat strong,
.target-actual-metric strong,
.target-actual-overall-card strong {
  font-size: 2rem;
  line-height: 1.1;
  color: #12233a;
  font-family: Georgia, "Times New Roman", serif;
  word-break: break-word;
  font-weight: 800;
}

.target-actual-bars {
  display: grid;
  gap: 8px;
}

.target-actual-track {
  position: relative;
  height: 24px;
  border-radius: 999px;
  background: rgba(227, 216, 203, 0.7);
  overflow: hidden;
}

.target-actual-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
}

.target-actual-bar.target-bar {
  width: 100%;
  background: linear-gradient(90deg, rgba(143, 111, 88, 0.45), rgba(143, 111, 88, 0.22));
}

.target-actual-bar.actual-bar {
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
}

.target-actual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #6e7787;
  font-size: 1.05rem;
  font-weight: 600;
}

.target-actual-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.target-swatch {
  background: rgba(143, 111, 88, 0.55);
}

.actual-swatch {
  background: #0f766e;
}

.performance-rework-message {
  padding: 14px 16px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 247, 237, 0.92));
  color: #991b1b;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.35;
}

.performance-rework-message strong {
  color: #7f1d1d;
}

.overall-performance-block {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 12%, rgba(20, 184, 166, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 253, 246, 0.92));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.overall-performance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.16);
}

.overall-performance-head h4 {
  margin: 0;
  color: #12233a;
  font-size: 2.35rem;
}

.overall-performance-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 1.35rem;
  font-weight: 700;
}

.overall-performance-head strong {
  flex: 0 0 auto;
  min-width: 150px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #ffffff;
  font-size: 1.8rem;
  text-align: center;
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.24);
}

.overall-performance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.overall-performance-grid article {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 -28px 48px rgba(20, 184, 166, 0.06);
}

.overall-performance-grid span {
  color: #667085;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overall-performance-grid strong {
  color: #12233a;
  font-size: 2.1rem;
  line-height: 1;
}

.overall-performance-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(236, 253, 245, 0.92);
  color: #0f766e;
  font-size: 1.45rem;
  font-weight: 800;
}

.overall-performance-message.has-rework {
  background: rgba(255, 247, 237, 0.95);
  color: #9a3412;
}

.taskwise-progress-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(220, 207, 190, 0.85);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 238, 229, 0.94));
}

.taskwise-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.taskwise-progress-head h4 {
  margin: 0;
  font-size: 2.4rem;
  color: #12233a;
}

.taskwise-progress-head span {
  font-size: 1.8rem;
  font-weight: 700;
  color: #8b4726;
}

.taskwise-progress-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  min-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.taskwise-progress-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 207, 190, 0.85);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.taskwise-progress-copy {
  display: grid;
  gap: 4px;
}

.taskwise-progress-copy strong {
  font-size: 2rem;
  color: #12233a;
}

.taskwise-progress-copy span,
.taskwise-progress-values span,
.taskwise-progress-percent {
  font-size: 1.75rem;
  color: #6e7787;
}

.taskwise-progress-bar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.taskwise-progress-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(227, 216, 203, 0.75);
}

.taskwise-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b4726, #c97948);
}

.taskwise-progress-values {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

body.resource-layout #work-update-grid {
  grid-template-columns: 1fr;
}

body.resource-layout #target-actual-chart-panel {
  position: static;
  grid-column: 1 / -1;
  min-height: calc(100vh - 180px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 10%, rgba(20, 184, 166, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.9));
}

body.resource-layout #target-actual-chart-panel .panel-head h3 {
  font-size: 3rem;
}

body.resource-layout #target-actual-chart-panel .muted-text {
  font-size: 1.45rem;
}

@media (max-width: 1180px) {
  .target-actual-summary,
  .target-actual-inline-row,
  .overall-performance-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .target-actual-summary,
  .target-actual-inline-row,
  .overall-performance-grid {
    grid-template-columns: 1fr;
  }

  .overall-performance-head {
    align-items: stretch;
    flex-direction: column;
  }

  .overall-performance-head strong {
    width: 100%;
  }
}

#assignment-work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

#assignment-panel {
  align-self: start;
  height: fit-content;
}

#assignment-followup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

body.admin-layout #assignment-followup-grid {
  grid-template-columns: 1fr;
}

body.admin-layout #next-assignment-alerts-panel,
body.admin-layout #assignment-history-panel {
  width: 100%;
}

#assignment-history-panel,
#next-assignment-alerts-panel {
  align-self: start;
  height: fit-content;
}

#next-assignment-alerts-panel .table-wrap,
#assignment-history-panel .table-wrap {
  max-height: 285px;
  overflow: auto;
}

#next-assignment-alerts-table {
  min-width: 1500px;
}

#next-assignment-alerts-table th,
#next-assignment-alerts-table td {
  font-size: 1.35rem;
  padding: 10px 12px;
}

body.admin-layout #next-assignment-alerts-panel .table-wrap,
body.admin-layout #assignment-history-panel .table-wrap {
  max-height: 320px;
}

#assignment-history-panel .panel-head h3 {
  font-size: 2.1rem;
}

#assignment-history-panel .muted-text {
  font-size: 1.55rem;
}

#assignment-history-panel th,
#assignment-history-panel td {
  font-size: 1.6rem;
  line-height: 1.35;
  padding: 12px 14px;
}

.panel {
  padding: 18px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(139, 71, 38, 0.75), rgba(139, 71, 38, 0.12), transparent);
  pointer-events: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(220, 207, 190, 0.65);
}

.panel-toggle-button {
  min-width: 160px;
  white-space: nowrap;
}

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

.option-card-body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 92px;
}

.page-open-button,
.page-back-button {
  min-width: 240px;
}

.detail-page {
  width: 100%;
}

.detail-page-head {
  align-items: center;
}

.dashboard-screen.detail-mode > section:not(.detail-page) {
  display: none !important;
}

.dashboard-screen.detail-mode > .detail-page.hidden {
  display: none !important;
}

.dashboard-screen.detail-mode > .detail-page {
  display: block !important;
}

.panel-head h3 {
  font-size: 2.1rem;
  font-weight: 700;
}

.panel-filter-field {
  display: grid;
  gap: 6px;
  min-width: 240px;
  max-width: 340px;
}

.panel-filter-field span {
  color: #6d4b2c;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-filter-field select {
  width: 100%;
  min-height: 42px;
}

.feature-panel {
  background:
    radial-gradient(circle at top right, rgba(241, 225, 205, 0.38), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 251, 245, 0.95)),
    var(--panel);
  border: 1px solid rgba(220, 207, 190, 0.8);
  box-shadow: 0 18px 40px rgba(89, 56, 28, 0.08);
}

#assignment-panel .panel-head h3 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.08;
}

#assignment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: end;
}

#assignment-form > button,
#assignment-form > .status-message {
  grid-column: 1 / -1;
}

#assignment-form > button {
  width: 100%;
  margin-top: 0;
}

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

.stack-form {
  display: grid;
  gap: 14px;
}

.wide-field {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--text);
  font-size: 1.45rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(139, 71, 38, 0.45);
  box-shadow: 0 0 0 4px rgba(139, 71, 38, 0.1);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  cursor: pointer;
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(95, 46, 24, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(95, 46, 24, 0.22);
}

.ghost-button {
  color: var(--accent-dark);
  background: #f7ede4;
  border: 1px solid var(--line);
  box-shadow: none;
}

.status-message {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 1.6rem;
}

.status-message.success {
  color: var(--green);
}

.status-message.warning {
  color: #9a6400;
}

.status-message.error {
  color: var(--red);
}

.status-message.warning {
  color: #8a5a00;
}

.floating-alert {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  cursor: pointer;
  display: grid;
  gap: 6px;
  max-width: 460px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(163, 82, 40, 0.28);
  background: linear-gradient(135deg, rgba(255, 249, 240, 0.98), rgba(255, 239, 219, 0.96));
  box-shadow: 0 18px 36px rgba(71, 48, 27, 0.22);
  color: #4a2f1f;
}

.floating-alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(71, 48, 27, 0.26);
}

.floating-alert strong {
  font-size: 1.9rem;
  font-weight: 800;
}

.floating-alert span {
  font-size: 1.5rem;
  line-height: 1.45;
}

.floating-alert.warning {
  border-color: rgba(163, 115, 30, 0.38);
  background: linear-gradient(135deg, rgba(255, 247, 225, 0.98), rgba(255, 237, 190, 0.95));
}

.floating-alert.success {
  border-color: rgba(36, 123, 67, 0.34);
  background: linear-gradient(135deg, rgba(238, 255, 242, 0.98), rgba(215, 246, 222, 0.95));
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(220, 207, 190, 0.75);
  background: rgba(255, 253, 249, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.village-check-panel {
  padding: 18px;
  border: 1px dashed rgba(139, 71, 38, 0.3);
  border-radius: 18px;
  background: rgba(255, 250, 245, 0.8);
}

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

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-inline input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
}

.checkbox-inline span {
  font-size: 1.2rem;
  font-weight: 600;
  color: #5f2e18;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.summary-table {
  width: 100%;
  min-width: 100%;
  table-layout: auto;
}

.summary-table th,
.summary-table td {
  white-space: nowrap;
  word-break: normal;
}

.workflow-summary-table th,
.workflow-summary-table td {
  width: 14mm;
  min-width: 14mm;
  max-width: 14mm;
}

.workflow-summary-table th:nth-child(-n+4),
.workflow-summary-table td:nth-child(-n+4) {
  width: 18mm;
  min-width: 18mm;
  max-width: 18mm;
}

#workflow-summary-panel-part-1 th,
#workflow-summary-panel-part-1 td,
#workflow-summary-panel-part-2 th,
#workflow-summary-panel-part-2 td,
#workflow-summary-panel-part-3 th,
#workflow-summary-panel-part-3 td,
#workflow-summary-panel-part-4 th,
#workflow-summary-panel-part-4 td {
  font-size: 2.4rem;
  line-height: 1.5;
  padding: 18px 20px;
  text-align: center;
  vertical-align: middle;
}

#workflow-summary-panel-part-1 th,
#workflow-summary-panel-part-2 th,
#workflow-summary-panel-part-3 th,
#workflow-summary-panel-part-4 th {
  font-size: 2.1rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.workflow-grand-total-row td {
  background: #f4e4cf;
  color: #4c2a17;
  font-weight: 900;
  border-top: 2px solid rgba(139, 71, 38, 0.32);
}

#workflow-summary-panel-part-1 .form-grid label span {
  font-size: 3.2rem;
  font-weight: 700;
}

#workflow-summary-panel-part-1 .form-grid select {
  font-size: 3rem;
  min-height: 76px;
  padding: 16px 20px;
}

#workflow-summary-panel-part-1 .form-grid {
  gap: 10px;
}

#workflow-summary-panel-part-1 .form-grid label span {
  font-size: 2rem;
}

#workflow-summary-panel-part-1 .form-grid select {
  font-size: 1.8rem;
  min-height: 50px;
  padding: 8px 12px;
}

thead {
  background: linear-gradient(180deg, #f2e8dc, #eadcc9);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #eadfd2;
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}

th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.48rem;
  color: #5f452f;
}

td {
  font-size: 1.7rem;
}

#recent-entries-panel .table-wrap,
#resource-logins-panel .table-wrap,
#assignment-history-panel .table-wrap {
  overflow-x: auto;
}

#recent-entries-panel table {
  width: max-content;
  min-width: 6200px;
  table-layout: fixed;
}

#recent-entries-panel th,
#recent-entries-panel td {
  white-space: nowrap;
  word-break: normal;
  font-size: 2.4rem;
  line-height: 1.5;
  padding: 18px 20px;
  vertical-align: middle;
}

#recent-entries-panel th {
  font-size: 2.1rem;
}

#recent-entries-panel th:nth-child(1),
#recent-entries-panel td:nth-child(1) {
  min-width: 120px;
}

#recent-entries-panel th:nth-child(2),
#recent-entries-panel td:nth-child(2) {
  min-width: 120px;
}

#recent-entries-panel th:nth-child(3),
#recent-entries-panel td:nth-child(3) {
  min-width: 260px;
}

#recent-entries-panel th:nth-child(4),
#recent-entries-panel td:nth-child(4) {
  min-width: 170px;
}

#recent-entries-panel th:nth-child(5),
#recent-entries-panel td:nth-child(5) {
  min-width: 150px;
}

#recent-entries-panel th:nth-child(6),
#recent-entries-panel td:nth-child(6) {
  min-width: 150px;
}

#recent-entries-panel th:nth-child(7),
#recent-entries-panel td:nth-child(7) {
  min-width: 100px;
}

#recent-entries-panel th:nth-child(8),
#recent-entries-panel td:nth-child(8),
#recent-entries-panel th:nth-child(9),
#recent-entries-panel td:nth-child(9) {
  min-width: 90px;
}

#recent-entries-panel th:nth-child(10),
#recent-entries-panel td:nth-child(10) {
  min-width: 180px;
}

#recent-entries-panel th:nth-child(11),
#recent-entries-panel td:nth-child(11),
#recent-entries-panel th:nth-child(12),
#recent-entries-panel td:nth-child(12) {
  min-width: 90px;
}

#recent-entries-panel th:nth-child(13),
#recent-entries-panel td:nth-child(13) {
  min-width: 120px;
}

#recent-entries-panel th:nth-child(14),
#recent-entries-panel td:nth-child(14) {
  min-width: 130px;
}

#recent-entries-panel th:nth-child(15),
#recent-entries-panel td:nth-child(15) {
  min-width: 160px;
}

#resource-logins-panel table,
#assignment-history-panel table {
  width: max-content;
  min-width: 3600px;
  table-layout: fixed;
}

#resource-logins-panel th,
#resource-logins-panel td,
#assignment-history-panel th,
#assignment-history-panel td {
  white-space: nowrap;
  word-break: normal;
  font-size: 2.3rem;
  line-height: 1.45;
  padding: 18px 20px;
}

#assignment-history-panel table {
  min-width: 1700px;
}

#assignment-history-panel th,
#assignment-history-panel td {
  font-size: 1.6rem;
  line-height: 1.3;
  padding: 10px 12px;
}

#assignment-history-panel th:nth-child(1),
#assignment-history-panel td:nth-child(1) { min-width: 150px; }
#assignment-history-panel th:nth-child(2),
#assignment-history-panel td:nth-child(2) { min-width: 130px; }
#assignment-history-panel th:nth-child(3),
#assignment-history-panel td:nth-child(3) { min-width: 110px; }
#assignment-history-panel th:nth-child(4),
#assignment-history-panel td:nth-child(4) { min-width: 110px; }
#assignment-history-panel th:nth-child(5),
#assignment-history-panel td:nth-child(5) { min-width: 140px; }
#assignment-history-panel th:nth-child(6),
#assignment-history-panel td:nth-child(6) { min-width: 170px; }
#assignment-history-panel th:nth-child(7),
#assignment-history-panel td:nth-child(7) { min-width: 130px; }
#assignment-history-panel th:nth-child(8),
#assignment-history-panel td:nth-child(8) { min-width: 90px; }

#resource-logins-panel th {
  letter-spacing: 0.02em;
}

#resource-logins-panel th:nth-child(1),
#resource-logins-panel td:nth-child(1) {
  min-width: 260px;
}

#resource-logins-panel th:nth-child(2),
#resource-logins-panel td:nth-child(2) {
  min-width: 220px;
}

#resource-logins-panel th:nth-child(3),
#resource-logins-panel td:nth-child(3) {
  min-width: 180px;
}

#resource-logins-panel th:nth-child(4),
#resource-logins-panel td:nth-child(4) {
  min-width: 220px;
}

#resource-logins-panel th:nth-child(5),
#resource-logins-panel td:nth-child(5) {
  min-width: 260px;
}

#resource-logins-panel th:nth-child(6),
#resource-logins-panel td:nth-child(6) {
  min-width: 260px;
}

#resource-logins-panel th:nth-child(7),
#resource-logins-panel td:nth-child(7) {
  min-width: 240px;
}

#resource-logins-panel th:nth-child(8),
#resource-logins-panel td:nth-child(8) {
  min-width: 340px;
}

#resource-logins-panel th:nth-child(9),
#resource-logins-panel td:nth-child(9) {
  min-width: 420px;
}

#recent-entries-panel th:nth-child(1),
#recent-entries-panel td:nth-child(1) {
  min-width: 180px;
}

#recent-entries-panel th:nth-child(2),
#recent-entries-panel td:nth-child(2) {
  min-width: 180px;
}

#recent-entries-panel th:nth-child(3),
#recent-entries-panel td:nth-child(3) {
  min-width: 420px;
}

#recent-entries-panel td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

#recent-entries-panel th:nth-child(4),
#recent-entries-panel td:nth-child(4) {
  min-width: 260px;
}

#recent-entries-panel th:nth-child(5),
#recent-entries-panel td:nth-child(5) {
  min-width: 220px;
}

#recent-entries-panel th:nth-child(6),
#recent-entries-panel td:nth-child(6) {
  min-width: 220px;
}

#recent-entries-panel th:nth-child(7),
#recent-entries-panel td:nth-child(7) {
  min-width: 140px;
}

#recent-entries-panel th:nth-child(8),
#recent-entries-panel td:nth-child(8),
#recent-entries-panel th:nth-child(9),
#recent-entries-panel td:nth-child(9) {
  min-width: 120px;
}

#recent-entries-panel th:nth-child(10),
#recent-entries-panel td:nth-child(10) {
  min-width: 360px;
}

#recent-entries-panel th:nth-child(11),
#recent-entries-panel td:nth-child(11),
#recent-entries-panel th:nth-child(12),
#recent-entries-panel td:nth-child(12) {
  min-width: 170px;
}

#recent-entries-panel th:nth-child(13),
#recent-entries-panel td:nth-child(13) {
  min-width: 180px;
}

#recent-entries-panel th:nth-child(14),
#recent-entries-panel td:nth-child(14) {
  min-width: 220px;
}

#recent-entries-panel th:nth-child(15),
#recent-entries-panel td:nth-child(15) {
  min-width: 360px;
  width: 360px;
  max-width: 360px;
}

#recent-entries-panel th:nth-child(16),
#recent-entries-panel td:nth-child(16) {
  min-width: 300px;
  width: 300px;
  max-width: 300px;
}

#recent-entries-panel th:nth-child(17),
#recent-entries-panel td:nth-child(17) {
  min-width: 420px;
  width: 420px;
  max-width: 420px;
}

#recent-entries-panel th:nth-child(18),
#recent-entries-panel td:nth-child(18) {
  min-width: 300px;
  width: 300px;
  max-width: 300px;
}

#recent-entries-panel th:nth-child(19),
#recent-entries-panel td:nth-child(19) {
  min-width: 360px;
  width: 360px;
  max-width: 360px;
}

#recent-entries-panel th:nth-child(20),
#recent-entries-panel td:nth-child(20) {
  min-width: 300px;
  width: 300px;
  max-width: 300px;
}

#recent-entries-panel .verification-badge {
  min-width: 170px;
}

tbody tr:nth-child(even) {
  background: rgba(255, 248, 240, 0.65);
}

tbody tr:hover {
  background: rgba(241, 230, 216, 0.68);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 32px 14px;
}

.hidden {
  display: none !important;
}

.dashboard-focus-hidden {
  display: none !important;
}

.dashboard-default-hidden {
  display: none !important;
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  :root {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --panel: #ffffff;
    --line: #bfbfbf;
    --text: #111111;
    --muted: #444444;
    --accent: #111111;
    --accent-dark: #111111;
    --accent-soft: #ffffff;
    --shadow: transparent;
  }

  body {
    background: #ffffff;
    font-size: 9pt;
    min-height: auto;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .login-screen,
  .topbar,
  .stats-grid,
  #upload-panel,
  #resource-panel,
  .ghost-button,
  #entry-form,
  #resources-body,
  .status-message,
  .muted-text {
    display: none !important;
  }

  .dashboard-screen {
    display: block;
    gap: 0;
  }

  .panel {
    background: #ffffff;
    border: 1px solid #cfcfcf;
    box-shadow: none;
    border-radius: 0;
    padding: 8mm;
    margin: 0 0 8mm;
  }

  .summary-panel {
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: always;
  }

  .summary-panel:last-of-type {
    page-break-after: auto;
  }

  .panel-head {
    margin-bottom: 4mm;
  }

  .panel-head h3 {
    font-size: 14pt;
  }

  .form-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3mm;
    margin-bottom: 4mm;
  }

  label span {
    font-size: 8pt;
  }

  input,
  select,
  textarea {
    padding: 2mm 2.5mm;
    border-radius: 0;
    border: 1px solid #bfbfbf;
    background: #ffffff;
    font-size: 8pt;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  .summary-table {
    width: 100%;
    min-width: 0;
  }

  thead {
    background: #efefef !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  th,
  td {
    padding: 1.8mm 2mm;
    border: 1px solid #cfcfcf;
    white-space: normal;
    word-break: break-word;
    font-size: 7.5pt;
    line-height: 1.2;
  }

  th {
    font-size: 7pt;
    color: #111111;
  }

  tbody tr:nth-child(even) {
    background: #f7f7f7 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .empty-state {
    padding: 4mm 2mm;
  }

  body.printing-tehsil-progress .dashboard-screen > *:not(#tehsil-progress-panel),
  body.printing-tehsil-progress .dashboard-sidebar,
  body.printing-tehsil-progress .floating-alert,
  body.printing-tehsil-progress .resource-photo-modal {
    display: none !important;
  }

  body.printing-tehsil-progress .dashboard-screen {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-tehsil-progress #tehsil-progress-panel {
    display: block !important;
    width: 277mm;
    min-height: 190mm;
    margin: 0;
    padding: 6mm;
    border: 0;
    box-shadow: none;
    break-inside: auto;
    page-break-inside: auto;
  }

  body.printing-tehsil-progress #tehsil-progress-panel .panel-head {
    display: flex !important;
    margin-bottom: 3mm;
    padding-bottom: 2mm;
    border-bottom: 1px solid #111111;
  }

  body.printing-tehsil-progress #tehsil-progress-panel .panel-head h3 {
    font-size: 8pt;
    margin: 0;
  }

  body.printing-tehsil-progress #tehsil-progress-panel .panel-head .ghost-button,
  body.printing-tehsil-progress #tehsil-progress-panel .panel-head .tehsil-progress-actions,
  body.printing-tehsil-progress #tehsil-progress-panel .panel-head .muted-text {
    display: none !important;
  }

  body.printing-tehsil-progress #tehsil-progress-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 7.2pt;
  }

  body.printing-tehsil-progress #tehsil-progress-table th,
  body.printing-tehsil-progress #tehsil-progress-table td {
    border: 0.25mm solid #222222;
    padding: 0.65mm 0.6mm;
    font-size: 6pt;
    font-weight: 400;
    line-height: 1.12;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
  }

  body.printing-tehsil-progress #tehsil-progress-table th {
    background: #e6d5bb !important;
    color: #111111 !important;
    height: 38mm;
    padding: 1mm 0.3mm;
    font-weight: 800;
    vertical-align: bottom;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.printing-tehsil-progress #tehsil-progress-table th:nth-child(1),
  body.printing-tehsil-progress #tehsil-progress-table td:nth-child(1),
  body.printing-tehsil-progress #tehsil-progress-table th:nth-child(2),
  body.printing-tehsil-progress #tehsil-progress-table td:nth-child(2) {
    width: 18mm;
    text-align: left;
  }

  body.printing-tehsil-progress #tehsil-progress-table th:nth-child(3),
  body.printing-tehsil-progress #tehsil-progress-table td:nth-child(3),
  body.printing-tehsil-progress #tehsil-progress-table th:nth-child(4),
  body.printing-tehsil-progress #tehsil-progress-table td:nth-child(4) {
    width: 12mm;
  }

  body.printing-tehsil-progress #tehsil-progress-table th.tehsil-fixed-col,
  body.printing-tehsil-progress #tehsil-progress-table td.tehsil-fixed-col {
    width: 18mm;
    text-align: left;
  }

  body.printing-tehsil-progress #tehsil-progress-table th.tehsil-number-col,
  body.printing-tehsil-progress #tehsil-progress-table td.tehsil-number-col {
    width: 12mm;
    text-align: center;
  }

  body.printing-tehsil-progress #tehsil-progress-table th.tehsil-task-col,
  body.printing-tehsil-progress #tehsil-progress-table td.tehsil-task-col {
    width: auto;
    text-align: center;
  }

  body.printing-tehsil-progress #tehsil-progress-table .tehsil-fixed-head,
  body.printing-tehsil-progress #tehsil-progress-table .tehsil-task-head {
    max-height: 36mm;
    font-size: 4pt;
    font-weight: 800;
    line-height: 1;
  }

  body.printing-tehsil-progress #tehsil-progress-table .task-percent {
    display: block;
    width: max-content;
    margin: 0.5mm auto 0;
    padding: 0.2mm 0.8mm;
    font-size: 3.2pt;
    font-weight: 400;
  }

  body.printing-tehsil-progress #tehsil-progress-table .tehsil-total-row td {
    background: #e6d5bb !important;
    color: #111111 !important;
    font-weight: 900;
    border-top: 0.45mm solid #111111;
    border-bottom: 0.45mm solid #111111;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

@media (max-width: 1080px) {
  .login-screen,
  .panel-grid,
  .stats-grid,
  .admin-control-grid,
  .dashboard-overview-grid,
  .dashboard-overview-graphics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  #assignment-work-grid {
    grid-template-columns: 1fr;
  }

  #assignment-followup-grid {
    grid-template-columns: 1fr;
  }

  #work-update-grid,
  .survey-tab-actions,
  #bulk-submission-panel .form-grid {
    grid-template-columns: 1fr;
  }

  body.admin-layout .panel-grid,
  body.admin-layout #resource-form,
  #role-assignment-panel .form-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .login-screen {
    width: 100vw;
    min-height: 100vh;
    margin: -18px 0 -40px calc((100% - 100vw) / 2);
    border-radius: 0;
  }

  .brand-panel {
    min-height: 0;
    padding: 48px 28px;
  }

  .auth-stack {
    padding: 34px 24px 48px;
  }

  .auth-stack::before,
  .auth-stack::after {
    display: none;
  }

  .rajasthan-map-art {
    width: 86px;
    height: 86px;
  }

  .lead {
    max-width: none;
  }

  .registration-card {
    max-height: none;
  }

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

  .login-card h2 {
    font-size: clamp(2.6rem, 7vw, 3.4rem);
  }

  .login-card h2::before {
    display: none;
  }

  .login-card input,
  .login-card select {
    min-height: 58px;
  }

  .login-card input,
  .login-card select,
  .login-card label span {
    font-size: 1.55rem;
  }

  .login-card button[type="submit"] {
    min-height: 62px;
    font-size: 1.65rem;
  }
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table {
  width: max-content !important;
  min-width: 4100px !important;
  table-layout: fixed !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow: hidden;
  text-overflow: clip;
  font-size: 1.65rem !important;
  line-height: 1.5 !important;
  padding: 16px 20px !important;
  vertical-align: middle !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(1),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(1) {
  min-width: 170px !important;
  width: 170px !important;
  max-width: 170px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(2),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(2) {
  min-width: 180px !important;
  width: 180px !important;
  max-width: 180px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(3),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(3) {
  min-width: 190px !important;
  width: 190px !important;
  max-width: 190px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(4),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(4) {
  min-width: 370px !important;
  width: 370px !important;
  max-width: 370px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(5),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(5) {
  min-width: 520px !important;
  width: 520px !important;
  max-width: 520px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(6),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(6),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(7),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(7) {
  min-width: 120px !important;
  width: 120px !important;
  max-width: 120px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(8),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(8),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(9),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(9) {
  min-width: 110px !important;
  width: 110px !important;
  max-width: 110px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(10),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(10) {
  min-width: 180px !important;
  width: 180px !important;
  max-width: 180px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(11),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(11) {
  min-width: 130px !important;
  width: 130px !important;
  max-width: 130px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(12),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(12) {
  min-width: 190px !important;
  width: 190px !important;
  max-width: 190px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(13),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(13) {
  min-width: 330px !important;
  width: 330px !important;
  max-width: 330px !important;
}

body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(14),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(14) {
  min-width: 260px !important;
  width: 260px !important;
  max-width: 260px !important;
}

body.resource-layout #recent-entries-panel .verification-badge {
  min-width: 150px;
}

#resource-progress-panel .table-wrap {
  overflow-x: auto;
}

#resource-progress-table {
  width: max-content;
  min-width: 2580px;
  table-layout: fixed;
}

#resource-progress-table th,
#resource-progress-table td {
  white-space: nowrap;
  word-break: normal;
  font-size: 1.8rem;
  line-height: 1.35;
  padding: 14px 18px;
  vertical-align: middle;
}

#resource-progress-table th:nth-child(1),
#resource-progress-table td:nth-child(1) { min-width: 220px; }
#resource-progress-table th:nth-child(2),
#resource-progress-table td:nth-child(2) { min-width: 180px; }
#resource-progress-table th:nth-child(3),
#resource-progress-table td:nth-child(3) { min-width: 320px; }
#resource-progress-table th:nth-child(4),
#resource-progress-table td:nth-child(4) { min-width: 360px; }
#resource-progress-table th:nth-child(5),
#resource-progress-table td:nth-child(5) { min-width: 170px; }
#resource-progress-table th:nth-child(6),
#resource-progress-table td:nth-child(6) { min-width: 220px; }
#resource-progress-table th:nth-child(7),
#resource-progress-table td:nth-child(7) { min-width: 220px; }
#resource-progress-table th:nth-child(8),
#resource-progress-table td:nth-child(8) { min-width: 180px; }
#resource-progress-table th:nth-child(9),
#resource-progress-table td:nth-child(9) { min-width: 180px; }
#resource-progress-table th:nth-child(10),
#resource-progress-table td:nth-child(10) { min-width: 220px; }
#resource-progress-table th:nth-child(11),
#resource-progress-table td:nth-child(11) { min-width: 160px; }
#resource-progress-table th:nth-child(12),
#resource-progress-table td:nth-child(12) { min-width: 160px; }
#resource-progress-table th:nth-child(13),
#resource-progress-table td:nth-child(13) { min-width: 160px; }
#resource-progress-table th:nth-child(14),
#resource-progress-table td:nth-child(14) { min-width: 180px; }
#resource-progress-table th:nth-child(15),
#resource-progress-table td:nth-child(15) { min-width: 180px; }
#resource-progress-table th:nth-child(16),
#resource-progress-table td:nth-child(16) { min-width: 230px; }

body.resource-layout #resource-progress-panel .status-message {
  margin-bottom: 16px;
}

#resource-performance-table {
  width: max-content;
  min-width: 2640px;
  table-layout: fixed;
}

#resource-performance-table th,
#resource-performance-table td {
  white-space: nowrap;
  word-break: normal;
  font-size: 1.7rem;
  line-height: 1.35;
  padding: 12px 16px;
  vertical-align: middle;
}

#resource-performance-table th:nth-child(1),
#resource-performance-table td:nth-child(1) { min-width: 220px; }
#resource-performance-table th:nth-child(2),
#resource-performance-table td:nth-child(2) { min-width: 180px; }
#resource-performance-table th:nth-child(3),
#resource-performance-table td:nth-child(3) { min-width: 300px; }
#resource-performance-table th:nth-child(4),
#resource-performance-table td:nth-child(4) { min-width: 360px; }
#resource-performance-table th:nth-child(5),
#resource-performance-table td:nth-child(5) { min-width: 180px; }
#resource-performance-table th:nth-child(6),
#resource-performance-table td:nth-child(6) { min-width: 180px; }
#resource-performance-table th:nth-child(7),
#resource-performance-table td:nth-child(7) { min-width: 190px; }
#resource-performance-table th:nth-child(8),
#resource-performance-table td:nth-child(8) { min-width: 160px; }
#resource-performance-table th:nth-child(9),
#resource-performance-table td:nth-child(9) { min-width: 170px; }
#resource-performance-table th:nth-child(10),
#resource-performance-table td:nth-child(10) {
  min-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#resource-performance-table th:nth-child(11),
#resource-performance-table td:nth-child(11) {
  min-width: 190px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#resource-performance-table th:nth-child(12),
#resource-performance-table td:nth-child(12) { min-width: 170px; }
#resource-performance-table th:nth-child(13),
#resource-performance-table td:nth-child(13) {
  min-width: 260px;
  max-width: 320px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#resource-performance-table th:nth-child(14),
#resource-performance-table td:nth-child(14) { min-width: 160px; }

#resource-performance-table .performance-date-cell {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.25;
}

.performance-delay-remark {
  display: inline-flex;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.86);
  color: #b91c1c;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
}

#resource-task-details-table {
  width: max-content;
  min-width: 2550px;
  table-layout: fixed;
}

#resource-task-details-table th,
#resource-task-details-table td {
  white-space: nowrap;
  word-break: normal;
  font-size: 1.55rem;
  line-height: 1.35;
  padding: 12px 14px;
  vertical-align: middle;
}

#resource-task-details-table th:nth-child(1),
#resource-task-details-table td:nth-child(1) { min-width: 190px; }
#resource-task-details-table th:nth-child(2),
#resource-task-details-table td:nth-child(2) { min-width: 220px; }
#resource-task-details-table th:nth-child(3),
#resource-task-details-table td:nth-child(3) { min-width: 300px; }
#resource-task-details-table th:nth-child(4),
#resource-task-details-table td:nth-child(4) { min-width: 360px; }
#resource-task-details-table th:nth-child(5),
#resource-task-details-table td:nth-child(5) { min-width: 160px; }
#resource-task-details-table th:nth-child(n+6),
#resource-task-details-table td:nth-child(n+6) { min-width: 150px; }

body.resource-layout .supervisor-performance-only {
  display: none;
}

#next-assignment-alerts-table {
  width: max-content;
  min-width: 2200px;
  table-layout: fixed;
}

#next-assignment-alerts-table th,
#next-assignment-alerts-table td {
  white-space: nowrap;
  word-break: normal;
  font-size: 1.6rem;
  line-height: 1.35;
  padding: 12px 14px;
  vertical-align: middle;
}

#next-assignment-alerts-table th:nth-child(1),
#next-assignment-alerts-table td:nth-child(1) { min-width: 220px; }
#next-assignment-alerts-table th:nth-child(2),
#next-assignment-alerts-table td:nth-child(2) { min-width: 180px; }
#next-assignment-alerts-table th:nth-child(3),
#next-assignment-alerts-table td:nth-child(3) { min-width: 320px; }
#next-assignment-alerts-table th:nth-child(4),
#next-assignment-alerts-table td:nth-child(4) { min-width: 440px; }
#next-assignment-alerts-table th:nth-child(5),
#next-assignment-alerts-table td:nth-child(5) { min-width: 130px; }
#next-assignment-alerts-table th:nth-child(6),
#next-assignment-alerts-table td:nth-child(6) { min-width: 180px; }
#next-assignment-alerts-table th:nth-child(7),
#next-assignment-alerts-table td:nth-child(7) { min-width: 220px; }
#next-assignment-alerts-table th:nth-child(8),
#next-assignment-alerts-table td:nth-child(8) { min-width: 420px; }

body:not(.resource-layout) #work-update-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 1fr);
  align-items: stretch;
}

body:not(.resource-layout) #work-update-grid #entry-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  min-width: 0;
}

body:not(.resource-layout) #bulk-submission-panel .form-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px 12px;
}

body:not(.resource-layout) #next-assignment-alerts-table {
  min-width: 1600px;
}

body:not(.resource-layout) #next-assignment-alerts-table th,
body:not(.resource-layout) #next-assignment-alerts-table td {
  font-size: 1.35rem;
  padding: 10px 12px;
}

body:not(.resource-layout) #next-assignment-alerts-table th:nth-child(4),
body:not(.resource-layout) #next-assignment-alerts-table td:nth-child(4) { min-width: 360px; }
body:not(.resource-layout) #next-assignment-alerts-table th:nth-child(8),
body:not(.resource-layout) #next-assignment-alerts-table td:nth-child(8) { min-width: 360px; }

body.admin-layout .dashboard-screen {
  gap: 8px;
}

body.admin-layout .topbar,
body.admin-layout .panel {
  padding: 10px 12px;
}

body.admin-layout .panel-head {
  padding-bottom: 6px;
  margin-bottom: 8px;
}

body.admin-layout .panel-head h3 {
  font-size: 1.75rem;
}

body.admin-layout .muted-text,
body.admin-layout .panel-head .muted-text {
  font-size: 1.15rem;
}

body.admin-layout .stats-grid,
body.admin-layout .admin-control-grid,
body.admin-layout .panel-grid,
body.admin-layout #assignment-followup-grid,
body.admin-layout #work-update-grid {
  gap: 8px;
}

body.admin-layout .stat-card {
  min-height: 58px;
  padding: 9px 10px;
}

body.admin-layout .admin-control-card {
  min-height: 96px;
  padding: 10px;
  gap: 5px;
}

body.admin-layout #assignment-history-panel table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

body.admin-layout #assignment-history-panel th,
body.admin-layout #assignment-history-panel td {
  font-size: 1.2rem;
  padding: 7px 8px;
  text-align: left;
}

body.admin-layout #assignment-history-panel th:nth-child(n),
body.admin-layout #assignment-history-panel td:nth-child(n) {
  min-width: 0;
}

body.admin-layout #assignment-history-panel th:nth-child(1),
body.admin-layout #assignment-history-panel td:nth-child(1) { width: 150px; }
body.admin-layout #assignment-history-panel th:nth-child(2),
body.admin-layout #assignment-history-panel td:nth-child(2) { width: 90px; }
body.admin-layout #assignment-history-panel th:nth-child(6),
body.admin-layout #assignment-history-panel td:nth-child(6) { width: 230px; }
body.admin-layout #assignment-history-panel th:nth-child(9),
body.admin-layout #assignment-history-panel td:nth-child(9) { width: 90px; }

.alert-warning {
  color: #8a5a00;
  font-weight: 700;
}

.alert-success {
  color: #1f6a3b;
  font-weight: 700;
}

/* Responsive override layer */
html {
  font-size: 62.5%;
}

body {
  font-size: clamp(1.55rem, 0.98vw, 2rem);
}

h1 {
  font-size: clamp(3.4rem, 4.4vw, 5.8rem);
}

h2 {
  font-size: clamp(2.8rem, 3.2vw, 4.4rem);
}

h3 {
  font-size: clamp(2rem, 2.2vw, 3rem);
}

.app-shell {
  width: min(100% - 16px, 100vw - 16px);
  padding: 8px 0 24px;
}

.panel,
.topbar,
.stat-card,
.admin-control-card {
  border-radius: 10px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.summary-table {
  width: max-content;
  min-width: 100%;
}

.topbar-actions,
.survey-app-actions,
.survey-tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-actions > *,
.survey-app-actions > *,
.survey-tab-actions > * {
  flex: 1 1 150px;
  min-width: 0;
}

.survey-action-groups {
  align-items: flex-start;
}

.survey-action-menu {
  position: relative;
  flex: 0 1 220px;
  min-width: 180px;
}

.survey-action-menu summary {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(124, 80, 45, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, #9a4f28, #713416);
  color: #fff8ef;
  box-shadow: 0 9px 18px rgba(128, 65, 30, 0.16);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.survey-action-menu summary::-webkit-details-marker {
  display: none;
}

.survey-action-menu summary::after {
  content: "⌄";
  margin-left: 8px;
  font-size: 1.2rem;
}

.survey-action-menu[open] summary::after {
  content: "⌃";
}

.survey-action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(119, 86, 56, 0.18);
  border-radius: 10px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 18px 42px rgba(27, 38, 54, 0.14);
}

.survey-action-menu-panel .ghost-button,
.survey-action-menu-panel .survey-label-select,
.survey-action-menu-panel .survey-inline-check {
  width: 100%;
}

.survey-action-menu-panel .survey-inline-check {
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(124, 80, 45, 0.16);
  border-radius: 8px;
  background: #fff8ef;
}

/* Survey workspace redesign */
.survey-workspace {
  gap: 16px;
  padding: 18px;
  overflow: visible !important;
  background:
    linear-gradient(135deg, rgba(8, 116, 110, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff, #f7f3ed);
}

.survey-workspace > .detail-page-head {
  position: relative;
  z-index: 60;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(119, 86, 56, 0.14);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(27, 38, 54, 0.08);
}

.survey-workspace > .detail-page-head > div:first-child {
  display: grid;
  gap: 6px;
}

.survey-workspace > .detail-page-head h3 {
  font-size: clamp(2.6rem, 2.1vw, 3.8rem);
  font-weight: 900;
  color: #122033;
}

.survey-workspace > .detail-page-head .muted-text {
  max-width: 620px;
  color: #64748b;
}

.survey-workspace .survey-app-actions {
  position: relative;
  z-index: 70;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.survey-workspace .survey-action-menu {
  flex: 0 0 auto;
  min-width: 148px;
  z-index: 71;
}

.survey-workspace .survey-action-menu[open] {
  z-index: 120;
}

.survey-workspace .survey-action-menu summary {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: #0b746e;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(8, 116, 110, 0.2);
}

.survey-workspace .survey-action-menu:nth-of-type(2) summary {
  background: #8b4726;
  box-shadow: 0 14px 28px rgba(139, 71, 38, 0.2);
}

.survey-workspace .survey-action-menu:nth-of-type(3) summary {
  background: #202938;
  box-shadow: 0 14px 28px rgba(32, 41, 56, 0.18);
}

.survey-workspace .survey-action-menu-panel {
  right: 0;
  z-index: 130;
  width: 320px;
  border-radius: 12px;
  border-color: rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

.survey-workspace .page-back-button {
  min-width: 160px;
  min-height: 48px;
  border-radius: 10px;
  background: #fff8ef;
  color: #6b3419;
}

.survey-workspace .survey-app-layout {
  position: relative;
  z-index: 1;
  gap: 16px;
}

.survey-workspace .survey-map-card {
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(27, 38, 54, 0.08);
}

.survey-workspace .survey-map-head {
  padding: 14px 16px;
  background: linear-gradient(90deg, #f8fafc, #fff7ed);
}

.survey-workspace .survey-map-head strong {
  font-size: 1.55rem;
  color: #122033;
}

.survey-workspace .survey-map-canvas {
  min-height: min(68vh, 720px);
  background: #e5e7eb;
}

.survey-workspace .survey-status-grid {
  gap: 10px;
}

.survey-workspace .survey-status-grid .survey-inline-meta {
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(27, 38, 54, 0.06);
}

@media (max-width: 980px) {
  .survey-workspace > .detail-page-head {
    grid-template-columns: 1fr;
  }

  .survey-workspace .survey-app-actions {
    justify-content: flex-start;
  }
}

.form-grid,
.registration-card .form-grid,
#resource-form,
#role-assignment-panel .form-grid,
#bulk-submission-panel .form-grid,
body.admin-layout #resource-form {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.stats-grid,
body.admin-layout .stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-control-grid,
body.admin-layout .admin-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.panel-grid,
body.admin-layout .panel-grid,
#assignment-followup-grid,
#work-update-grid,
body:not(.resource-layout) #work-update-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 12px, 100vw - 12px);
    padding: 6px 0 18px;
  }

  .login-screen {
    grid-template-columns: 1fr;
    min-height: 100vh;
    overflow: auto;
  }

  .brand-panel {
    min-height: auto;
    padding: 32px 24px;
  }

  .auth-stack {
    padding: 28px 18px 36px;
  }

  .auth-switcher,
  .login-card,
  .registration-card {
    width: min(100%, 720px);
  }

  .topbar {
    align-items: stretch;
  }

  .topbar-copy,
  .topbar-actions {
    width: 100%;
  }

  body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table,
  body:not(.resource-layout) #next-assignment-alerts-table {
    min-width: 1100px !important;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 55%;
  }

  body {
    font-size: 1.6rem;
  }

  .app-shell {
    width: 100%;
    padding: 0 0 16px;
  }

  .panel,
  .topbar,
  .stat-card,
  .admin-control-card {
    border-radius: 0;
  }

  .topbar,
  body.admin-layout .topbar,
  body.admin-layout .panel,
  .panel {
    padding: 10px;
  }

  .stats-grid,
  .admin-control-grid,
  .panel-grid,
  #assignment-followup-grid,
  #work-update-grid,
  .form-grid,
  .registration-card .form-grid,
  #resource-form,
  #role-assignment-panel .form-grid,
  #bulk-submission-panel .form-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar-actions > *,
  .survey-app-actions > *,
  .survey-tab-actions > * {
    flex-basis: 100%;
  }

  input,
  select,
  textarea,
  button,
  .ghost-button,
  .table-action-button {
    width: 100%;
    max-width: 100%;
  }

  .survey-map-canvas {
    min-height: 58vh;
  }

  .summary-table th,
  .summary-table td {
    font-size: 1.35rem;
    padding: 7px 8px;
  }

  .table-wrap,
  #recent-entries-panel .table-wrap,
  #resource-logins-panel .table-wrap,
  #assignment-history-panel .table-wrap,
  #attendance-panel .table-wrap {
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
  }

  .summary-table,
  body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table,
  body:not(.resource-layout) #next-assignment-alerts-table,
  #resource-logins-table,
  #resource-progress-table,
  #resource-performance-table,
  #resource-task-details-table {
    width: max-content !important;
    min-width: 760px !important;
    max-width: none !important;
  }
}

@media (max-width: 480px) {
  .brand-panel {
    padding: 24px 16px;
  }

  .auth-stack {
    padding: 22px 12px 30px;
  }

  .auth-switcher {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 24px 16px;
  }

  .login-card h2 {
    font-size: clamp(2.4rem, 9vw, 3.2rem);
  }

  .summary-table th,
  .summary-table td {
    font-size: 1.25rem;
    padding: 6px 7px;
  }

  .overview-task-row {
    grid-template-columns: 1fr;
  }

  .overview-task-row strong {
    text-align: left;
  }

  .overview-task-count-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .overview-task-count-row strong {
    text-align: left;
  }

  .overview-tehsil-feature .dashboard-graphic-head {
    display: grid;
  }

  .overview-tehsil-head-tools {
    max-width: 100%;
    justify-items: start;
  }

  .overview-filter-dropdown {
    width: 100%;
  }

  .overview-tehsil-bars {
    grid-template-columns: 1fr;
  }

  .overview-insight-grid {
    grid-template-columns: 1fr;
  }

  .overview-bottom-grid {
    grid-template-columns: 1fr;
  }

  .overview-map-layout {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .overview-map-legend {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-workflow-steps {
    min-width: 1020px;
  }

  .overview-form-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-overview-panel > .panel-head .overview-filter-dropdown {
    min-width: 0;
    justify-self: stretch;
  }

  .overview-tehsil-filter {
    left: 0;
    right: auto;
    width: 100%;
  }

  .summary-table,
  body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table,
  body:not(.resource-layout) #next-assignment-alerts-table,
  #resource-logins-table,
  #resource-progress-table,
  #resource-performance-table,
  #resource-task-details-table {
    min-width: 680px !important;
  }
}

/* Premium dashboard polish */
body:not(:has(#login-screen:not(.hidden))) {
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.96), rgba(238, 230, 218, 0.96)),
    #f4eee5;
}

.dashboard-screen {
  gap: 12px;
}

.topbar,
.panel,
.stat-card,
.admin-control-card {
  border: 1px solid rgba(139, 71, 38, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(250, 244, 236, 0.94));
  box-shadow:
    0 14px 30px rgba(60, 40, 24, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.topbar {
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.98), rgba(242, 230, 217, 0.96));
}

.topbar::before {
  width: 360px;
  background: linear-gradient(135deg, rgba(139, 71, 38, 0.14), rgba(209, 134, 74, 0.08), transparent 78%);
}

.topbar-copy h2 {
  color: #1b2434;
  letter-spacing: 0;
}

.topbar .muted-text,
.panel-head .muted-text {
  color: #667085;
}

.ghost-button,
.table-action-button,
button {
  border-radius: 10px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.ghost-button {
  border-color: rgba(139, 71, 38, 0.22);
  background: linear-gradient(180deg, #fffdf9, #f3e7dc);
  color: #61351f;
}

.table-action-button,
button:not(.ghost-button):not(.auth-switch-button) {
  background: linear-gradient(135deg, #9f542c, #693219);
  box-shadow: 0 8px 16px rgba(105, 50, 25, 0.18);
}

.ghost-button:hover,
.table-action-button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(105, 50, 25, 0.16);
}

.stat-card {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(250, 244, 236, 0.94));
}

.stat-card span,
.admin-control-card span {
  color: #7b6756;
}

.stat-card strong,
.admin-control-card strong {
  color: #172033;
}

.admin-control-card {
  border-radius: 12px;
}

.panel {
  border-radius: 14px;
}

.panel-head {
  border-bottom: 1px solid rgba(139, 71, 38, 0.12);
}

.panel-head h3 {
  color: #20283a;
}

thead,
.summary-table th {
  background: linear-gradient(180deg, #eadbc8, #dcc7ac);
  color: #4b3526;
}

.summary-table th,
.summary-table td {
  border-color: rgba(139, 71, 38, 0.13);
}

tbody tr:nth-child(even) {
  background: rgba(255, 250, 243, 0.76);
}

tbody tr:hover {
  background: rgba(236, 220, 200, 0.72);
}

input,
select,
textarea {
  border-color: rgba(139, 71, 38, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(139, 71, 38, 0.48);
  box-shadow: 0 0 0 3px rgba(139, 71, 38, 0.12);
}

/* Premium post-login dashboard polish */
.dashboard-screen {
  background:
    linear-gradient(135deg, rgba(47, 111, 115, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(244, 238, 229, 0.94));
  color: #1f2937;
}

.dashboard-screen .topbar {
  background: rgba(255, 252, 247, 0.97);
  border: 1px solid rgba(118, 86, 58, 0.18);
  border-top: 3px solid #2f6f73;
  box-shadow: 0 16px 36px rgba(71, 52, 34, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-screen > .topbar {
  display: none;
}

.dashboard-screen .topbar-copy h2,
.dashboard-screen .panel h3,
.dashboard-screen .brand-panel h3 {
  color: #202938;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-screen .topbar-copy p,
.dashboard-screen .panel-subtitle,
.dashboard-screen .muted,
.dashboard-screen small {
  color: #64748b;
}

.dashboard-screen .topbar-actions .ghost-button,
.dashboard-screen .dashboard-tabs .ghost-button,
.dashboard-screen .quick-links .ghost-button {
  background: #fff8ef;
  border: 1px solid rgba(124, 80, 45, 0.24);
  color: #703b1f;
  box-shadow: 0 5px 14px rgba(96, 58, 28, 0.08);
}

.dashboard-screen .topbar-actions .ghost-button:hover,
.dashboard-screen .dashboard-tabs .ghost-button:hover,
.dashboard-screen .quick-links .ghost-button:hover {
  background: #ffffff;
  border-color: rgba(47, 111, 115, 0.42);
  color: #245f63;
  transform: translateY(-1px);
}

.dashboard-screen .panel,
.dashboard-screen .brand-panel,
.dashboard-screen .stat-card,
.dashboard-screen .admin-control-card,
.dashboard-screen .resource-card {
  background: rgba(255, 252, 247, 0.97);
  border: 1px solid rgba(119, 86, 56, 0.16);
  box-shadow: 0 14px 32px rgba(76, 55, 35, 0.1);
}

.dashboard-screen .panel,
.dashboard-screen .brand-panel {
  border-radius: 10px;
}

.dashboard-screen .panel::before {
  background: linear-gradient(90deg, #2f6f73, #9a4f28, #d9b16c);
  opacity: 0.82;
}

.dashboard-screen .panel-head {
  border-bottom-color: rgba(126, 88, 52, 0.16);
}

.dashboard-screen .stat-card,
.dashboard-screen .admin-control-card {
  border-radius: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-screen .stat-card:hover,
.dashboard-screen .admin-control-card:hover {
  border-color: rgba(47, 111, 115, 0.34);
  box-shadow: 0 18px 38px rgba(50, 69, 76, 0.14);
  transform: translateY(-1px);
}

.dashboard-screen .stat-card strong,
.dashboard-screen .admin-control-card strong,
.dashboard-screen .metric-value {
  color: #14213d;
}

.dashboard-screen .stat-card span,
.dashboard-screen .admin-control-card span,
.dashboard-screen .metric-label {
  color: #6f5a48;
  font-weight: 800;
}

.dashboard-screen button,
.dashboard-screen .button-link {
  border-radius: 8px;
  box-shadow: 0 9px 18px rgba(128, 65, 30, 0.16);
}

.dashboard-screen button:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.dashboard-screen .button-link:not(.ghost-button) {
  background: linear-gradient(135deg, #9a4f28, #713416);
}

.dashboard-screen button:not(.ghost-button):not(.icon-button):not(.auth-switch-button):hover,
.dashboard-screen .button-link:not(.ghost-button):hover {
  background: linear-gradient(135deg, #2f6f73, #1d4f54);
}

.dashboard-screen input,
.dashboard-screen select,
.dashboard-screen textarea {
  background: #fffdfa;
  border: 1px solid rgba(110, 84, 61, 0.26);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-screen input:focus,
.dashboard-screen select:focus,
.dashboard-screen textarea:focus {
  border-color: #2f6f73;
  box-shadow: 0 0 0 3px rgba(47, 111, 115, 0.14);
  outline: none;
}

.dashboard-screen .summary-table,
.dashboard-screen table {
  border-color: rgba(123, 89, 57, 0.14);
}

.dashboard-screen .summary-table thead,
.dashboard-screen thead {
  background: #efe2cf;
}

.dashboard-screen .summary-table th,
.dashboard-screen th {
  color: #4a3728;
  background: #efe2cf;
  border-bottom: 1px solid rgba(123, 89, 57, 0.2);
  font-weight: 850;
}

.dashboard-screen .summary-table td,
.dashboard-screen td {
  border-bottom: 1px solid rgba(123, 89, 57, 0.12);
}

.dashboard-screen .summary-table tbody tr:nth-child(even),
.dashboard-screen tbody tr:nth-child(even) {
  background: rgba(247, 242, 235, 0.72);
}

.dashboard-screen .summary-table tbody tr:hover,
.dashboard-screen tbody tr:hover {
  background: rgba(47, 111, 115, 0.08);
}

.dashboard-screen .alert,
.dashboard-screen .notice,
.dashboard-screen .toast {
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(65, 53, 39, 0.14);
}

.dashboard-screen .status-pill,
.dashboard-screen .badge,
.dashboard-screen .role-badge {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .dashboard-screen .topbar {
    border-top-width: 2px;
    box-shadow: 0 10px 24px rgba(71, 52, 34, 0.1);
  }

  .dashboard-screen .panel,
  .dashboard-screen .brand-panel,
  .dashboard-screen .stat-card,
  .dashboard-screen .admin-control-card {
    box-shadow: 0 8px 20px rgba(76, 55, 35, 0.08);
  }
}

/* Sidebar dashboard shell */
.app-shell:has(.dashboard-screen:not(.hidden)) {
  width: 100%;
  padding: 0;
}

.dashboard-screen:not(.hidden) {
  --dashboard-sidebar-width: 350px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--dashboard-sidebar-width) minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 22px;
  padding: 0 24px 28px 0;
  background: #f3f1ec;
}

.dashboard-screen > :not(.dashboard-sidebar) {
  grid-column: 2;
}

.dashboard-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 26px 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, #071527 0%, #06111f 48%, #030a14 100%);
  color: #ffffff;
  box-shadow: 18px 0 38px rgba(3, 10, 20, 0.26);
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 22px 28px;
  text-align: left;
}

.sidebar-size-toggle {
  width: calc(100% - 44px);
  min-height: 34px;
  margin: -12px 22px 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  box-shadow: none;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-size-toggle:hover {
  background: rgba(30, 64, 175, 0.38);
  box-shadow: none;
  transform: none;
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: #071527;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.sidebar-brand strong {
  display: block;
  font-size: 1.95rem;
  line-height: 1.1;
}

.sidebar-brand span {
  display: inline;
}

.sidebar-brand span,
.sidebar-user span,
.sidebar-menu-label {
  color: rgba(226, 232, 240, 0.7);
}

.sidebar-user {
  display: grid;
  gap: 4px;
  padding: 14px;
  margin: 0 22px 22px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-user-label,
.sidebar-menu-label {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-user strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.65rem;
  text-align: left;
}

.sidebar-user #sidebar-user-role {
  display: inline;
}

.sidebar-menu {
  display: grid;
  gap: 8px;
}

.sidebar-menu-label {
  margin: 16px 22px 4px;
  font-weight: 800;
  text-align: left;
}

.sidebar-menu-item {
  width: calc(100% - 44px);
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  margin: 0 22px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
  line-height: inherit;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  transform: none;
}

.sidebar-menu-item.active {
  border-left: 0;
}

.sidebar-submenu {
  display: grid;
  gap: 4px;
  margin: -2px 22px 8px 60px;
  padding: 0 0 8px 10px;
  border-left: 1px solid rgba(59, 130, 246, 0.26);
}

.sidebar-submenu.collapsed {
  display: none;
}

.sidebar-submenu-item {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(203, 213, 225, 0.82);
  box-shadow: none;
  text-align: left;
  font-size: 1.55rem;
  line-height: normal;
  cursor: pointer;
}

.sidebar-submenu-item:hover,
.sidebar-submenu-item.active {
  background: rgba(37, 99, 235, 0.24);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.sidebar-submenu-item.active {
  color: #67e8f9;
  font-weight: 800;
}

.sidebar-menu-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.sidebar-logout {
  margin-top: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.dashboard-screen .sidebar-menu-item,
.dashboard-screen .sidebar-submenu-item,
.dashboard-screen button.sidebar-menu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.dashboard-screen button.sidebar-submenu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button) {
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  box-shadow: none;
}

.dashboard-screen .sidebar-submenu-item,
.dashboard-screen button.sidebar-submenu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button) {
  font-size: 1.55rem;
}

.dashboard-screen .sidebar-menu-item:hover,
.dashboard-screen .sidebar-menu-item.active,
.dashboard-screen button.sidebar-menu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button):hover {
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  transform: none;
}

.dashboard-screen .sidebar-submenu-item:hover,
.dashboard-screen .sidebar-submenu-item.active,
.dashboard-screen button.sidebar-submenu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button):hover {
  background: rgba(37, 99, 235, 0.24);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.dashboard-screen .sidebar-logout,
.dashboard-screen button.sidebar-logout:not(.ghost-button):not(.icon-button):not(.auth-switch-button) {
  background: rgba(15, 23, 42, 0.72);
}

.dashboard-screen .topbar {
  margin-top: 24px;
  min-height: 104px;
  border-top: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(27, 38, 54, 0.09);
}

.dashboard-screen .topbar::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(8, 116, 110, 0.12), rgba(244, 197, 66, 0.16));
}

.dashboard-screen .topbar-actions {
  display: none;
}

.dashboard-screen .topbar-copy h2 {
  font-size: clamp(2.8rem, 2.4vw, 4.2rem);
}

.dashboard-screen .stats-grid,
.dashboard-screen .admin-control-grid {
  gap: 18px;
}

.dashboard-screen .stats-grid {
  grid-template-columns: minmax(250px, 1.55fr) repeat(9, minmax(118px, 1fr));
  align-items: stretch;
}

.dashboard-screen .stat-card,
.dashboard-screen .admin-control-card,
.dashboard-screen .panel {
  border-radius: 18px;
  background: #ffffff;
  border: 0;
  box-shadow: 0 18px 42px rgba(27, 38, 54, 0.08);
}

.dashboard-screen .stat-card {
  min-height: 124px;
  padding: 22px 24px;
}

.dashboard-screen .stat-user-card {
  min-height: 124px;
  padding: 20px 22px;
}

.dashboard-screen .stat-card span,
.dashboard-screen .admin-control-card span {
  color: #64748b;
  font-size: 1.35rem;
}

.dashboard-screen .stat-card strong,
.dashboard-screen .admin-control-card strong {
  color: #0f172a;
  font-size: clamp(2.4rem, 2vw, 3.8rem);
}

.dashboard-screen .stat-user-card .stat-live-label {
  color: #9a4f28;
  font-size: 1.12rem;
  letter-spacing: 0.14em;
}

.dashboard-screen .stat-user-card strong {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.65rem, 1.25vw, 2.25rem);
  font-weight: 900;
  text-transform: capitalize;
}

.dashboard-screen .stat-user-card small {
  color: #546173;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.dashboard-screen .panel {
  padding: 22px;
}

.dashboard-screen .panel::before {
  height: 0;
}

@media (max-width: 1180px) {
  .dashboard-screen:not(.hidden) {
    grid-template-columns: 1fr;
    padding: 0 12px 22px;
    gap: 12px;
  }

  .dashboard-screen > :not(.dashboard-sidebar) {
    grid-column: 1;
  }

  .dashboard-sidebar {
    grid-column: 1;
    grid-row: auto;
    position: static;
    min-height: auto;
    margin: 0 -12px;
    padding: 18px 14px;
  }

  .sidebar-brand,
  .sidebar-user {
    margin-bottom: 14px;
  }

  .sidebar-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar-submenu {
    display: contents;
  }

  .sidebar-submenu.collapsed {
    display: none;
  }

  .sidebar-menu-label,
  .sidebar-user {
    display: none;
  }

  .sidebar-menu-item,
  .sidebar-submenu-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    white-space: nowrap;
  }

  .dashboard-screen .topbar {
    margin-top: 0;
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .sidebar-brand strong {
    font-size: 2rem;
  }

  .sidebar-logo {
    width: 40px;
    height: 40px;
  }

  .dashboard-screen .stat-card {
    min-height: 92px;
    padding: 16px;
  }
}

/* Fix sidebar shell flow: keep content rows compact */
@media (min-width: 1181px) {
  .dashboard-screen:not(.hidden) {
    display: block;
    min-height: 100vh;
    padding: 24px 24px 28px calc(var(--dashboard-sidebar-width) + 24px);
  }

  .dashboard-screen > :not(.dashboard-sidebar) {
    grid-column: auto;
  }

  .dashboard-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--dashboard-sidebar-width);
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
  }

  .dashboard-screen .topbar {
    height: auto;
    min-height: 104px;
    margin-top: 0;
    align-self: auto;
  }

  .dashboard-screen > .topbar,
  .dashboard-screen > .stats-grid,
  .dashboard-screen > .panel,
  .dashboard-screen > .panel-grid,
  .dashboard-screen > .detail-page,
  .dashboard-screen > #assignment-work-grid,
  .dashboard-screen > #work-update-grid {
    margin-bottom: 18px;
  }
}

@media (min-width: 1181px) {
  body.sidebar-compact .dashboard-screen:not(.hidden) {
    padding-left: 112px;
  }

  body.sidebar-compact .dashboard-sidebar {
    width: 88px;
    padding: 22px 12px;
  }

  body.sidebar-compact .sidebar-brand {
    justify-content: center;
    margin-bottom: 14px;
  }

  body.sidebar-compact .sidebar-brand > div:not(.sidebar-logo),
  body.sidebar-compact .sidebar-user,
  body.sidebar-compact .sidebar-menu-label,
  body.sidebar-compact .sidebar-menu-item > span:not(.sidebar-menu-icon),
  body.sidebar-compact .sidebar-submenu {
    display: none;
  }

  body.sidebar-compact .sidebar-size-toggle {
    display: block;
    min-height: 32px;
    padding: 0;
    font-size: 0;
  }

  body.sidebar-compact .sidebar-size-toggle::before {
    content: ">";
    font-size: 1.6rem;
  }

  body.sidebar-compact .sidebar-menu {
    gap: 10px;
  }

  body.sidebar-compact .sidebar-menu-item {
    justify-content: center;
    min-height: 42px;
    padding: 8px;
  }

body.sidebar-compact .sidebar-menu-item.active {
    border-left: 0;
    outline: 2px solid rgba(244, 197, 66, 0.92);
    outline-offset: 2px;
  }
}

.resource-today-panel {
  padding: 24px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: #f8fbff;
}

.resource-today-topbar,
.resource-today-kpis,
.resource-today-grid,
.resource-attendance-times,
.resource-task-row {
  display: grid;
  gap: 16px;
}

.resource-today-topbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 18px;
}

.resource-today-topbar h3 {
  margin: 0;
  font-size: 2.4rem;
  color: #0f172a;
}

.resource-today-date {
  color: #475569;
  font-size: 1.35rem;
  font-weight: 800;
}

.resource-today-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.resource-today-kpis article,
.resource-today-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.resource-today-kpis article {
  min-height: 104px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
}

.resource-today-kpis span,
.resource-attendance-times span {
  color: #64748b;
  font-size: 1.25rem;
  font-weight: 850;
}

.resource-today-kpis strong {
  color: #0f172a;
  font-size: 3.2rem;
  line-height: 1;
}

.resource-today-grid {
  grid-template-columns: minmax(360px, 0.9fr) minmax(270px, 0.65fr) minmax(420px, 1.2fr);
  align-items: start;
}

.resource-today-grid .task-list-card {
  grid-column: 1 / span 2;
}

.resource-today-card {
  padding: 22px;
}

.resource-today-card h4 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: 2.15rem;
}

.today-attendance-overview-card {
  min-height: 100%;
  background:
    radial-gradient(circle at 92% 14%, rgba(20, 184, 166, 0.12), transparent 28%),
    #ffffff;
}

.today-attendance-overview-card h4 {
  margin: 0;
}

.today-attendance-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.today-attendance-overview-head span {
  padding: 6px 10px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 1.35rem;
  font-weight: 900;
}

.today-attendance-overview-layout {
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  min-height: 128px;
}

.today-attendance-donut {
  width: 112px;
  height: 112px;
  box-shadow: inset 0 0 0 24px #ffffff, 0 14px 28px rgba(15, 23, 42, 0.12);
}

.today-attendance-legend {
  gap: 10px;
}

.today-attendance-legend span {
  gap: 10px;
  font-size: 1.35rem;
  white-space: normal;
}

.today-attendance-legend i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.today-attendance-roster {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.today-attendance-roster-group {
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.86);
  overflow: hidden;
}

.today-attendance-roster-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 950;
}

.today-attendance-roster-title i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.today-attendance-roster-title strong {
  margin-left: auto;
  color: #0f766e;
  font-size: 1.45rem;
}

.today-attendance-roster-list {
  display: grid;
  gap: 6px;
  padding: 9px 11px 11px;
}

.today-attendance-roster-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 850;
}

.today-attendance-roster-list small {
  color: #64748b;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: right;
}

.today-attendance-roster-list .today-attendance-empty {
  color: #94a3b8;
  font-size: 1.25rem;
  font-style: italic;
}

.today-performance-card {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 100%;
  background:
    radial-gradient(circle at 88% 16%, rgba(37, 99, 235, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

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

.today-performance-head h4 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 950;
}

.today-performance-head strong {
  min-width: 92px;
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 2.6rem;
  font-weight: 950;
}

.today-performance-track {
  height: 14px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.today-performance-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.today-performance-filter label {
  display: grid;
  gap: 5px;
}

.today-performance-filter span {
  color: #64748b;
  font-size: 1.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.today-performance-filter input {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 10px;
  color: #0f172a;
  background: #f8fafc;
  font-size: 1.9rem;
  font-weight: 800;
}

.today-performance-output {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 12px;
  margin-bottom: 14px;
}

.today-performance-output div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.today-performance-output span {
  display: block;
  color: #64748b;
  font-size: 1.28rem;
  font-weight: 950;
  text-transform: uppercase;
}

.today-performance-output strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 2.3rem;
  font-weight: 950;
  line-height: 1;
}

.today-resource-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.today-resource-counts span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 1.22rem;
  font-weight: 950;
  line-height: 1;
}

.today-resource-counts strong {
  font-size: 1.55rem;
  font-weight: 950;
}

.today-resource-counts .present {
  color: #047857;
  background: #dcfce7;
}

.today-resource-counts .absent {
  color: #b91c1c;
  background: #fee2e2;
}

.today-resource-counts .leave {
  color: #5f6f38;
  background: #eef5df;
}

.today-task-output {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 10%, rgba(14, 165, 233, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.88);
}

.today-task-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.today-task-output-head h5 {
  margin: 0;
  color: #0f172a;
  font-size: 1.95rem;
  font-weight: 950;
}

.today-task-output-head span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 1.25rem;
  font-weight: 950;
}

.today-task-output-list {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.today-task-output-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
}

.today-task-output-list article strong {
  display: block;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.2;
}

.today-task-output-list article span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 1.18rem;
  font-weight: 850;
}

.today-task-output-list article b {
  color: #0f766e;
  font-size: 1.55rem;
  font-weight: 950;
}

.today-task-output-list article i {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.today-task-output-list article em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22c55e);
}

.today-performance-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.today-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.today-performance-grid div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.today-performance-grid span {
  display: block;
  color: #64748b;
  font-size: 1.22rem;
  font-weight: 900;
  text-transform: uppercase;
}

.today-performance-grid strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 2.25rem;
  font-weight: 950;
}

.today-performance-split {
  display: grid;
  gap: 14px;
}

.today-performance-mini {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 12%, rgba(20, 184, 166, 0.14), transparent 28%),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.today-performance-mini.team {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    radial-gradient(circle at 92% 12%, rgba(37, 99, 235, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.9);
}

.today-performance-mini > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.today-performance-mini > div:first-child span {
  color: #0f172a;
  font-size: 2.45rem;
  font-weight: 950;
}

.today-performance-mini > div:first-child strong {
  color: #0f766e;
  font-size: 3.2rem;
  font-weight: 950;
}

.today-performance-mini.team > div:first-child strong {
  color: #1d4ed8;
}

.today-performance-mini .today-performance-track {
  height: 10px;
  margin-bottom: 12px;
}

.today-performance-mini.team .today-performance-track span {
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
}

.today-performance-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.today-performance-grid.compact div {
  min-height: 74px;
  padding: 11px;
  border-radius: 12px;
}

.today-performance-grid.compact span {
  font-size: 1.75rem;
}

.today-performance-grid.compact strong {
  margin-top: 4px;
  font-size: 2.75rem;
}

.today-ip-work {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.88);
}

.today-ip-work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.today-ip-work-head h5 {
  margin: 0;
  color: #0f172a;
  font-size: 1.95rem;
  font-weight: 950;
}

.today-ip-work-head span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 1.25rem;
  font-weight: 950;
}

.today-ip-work-table-wrap {
  max-height: 250px;
  overflow: auto;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 12px;
  background: #ffffff;
}

.today-ip-work-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.today-ip-work-table th,
.today-ip-work-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
  color: #0f172a;
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.today-ip-work-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e0f2fe;
  color: #0f3a5f;
  font-size: 1.02rem;
  font-weight: 950;
  text-transform: uppercase;
}

.today-ip-work-table td:nth-child(3),
.today-ip-work-table td:nth-child(4),
.today-ip-work-table th:nth-child(3),
.today-ip-work-table th:nth-child(4) {
  text-align: center;
  white-space: nowrap;
}

.today-ip-work-empty {
  padding: 14px;
  border: 1px dashed rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.88);
  font-size: 1.35rem;
  font-weight: 850;
}

.today-performance-card p {
  margin: 16px 0 0;
  color: #475569;
  font-size: 1.95rem;
  font-weight: 800;
}

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

.attendance-card-head h4 {
  margin: 0;
}

.attendance-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.attendance-date {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
  font-size: 1.35rem;
  font-weight: 900;
}

.task-list-card {
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 18%, rgba(20, 184, 166, 0.13), transparent 28%),
    linear-gradient(180deg, #ffffff, #f8fffd);
}

.resource-task-card-head {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1.45fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  min-width: 0;
}

.resource-task-card-head h4 {
  margin-bottom: 5px;
}

.resource-task-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 1.25rem;
  font-weight: 800;
}

.resource-task-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 8px;
  margin-bottom: 0;
  min-width: 0;
  width: 100%;
}

.resource-task-metric {
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.resource-task-metric span {
  display: block;
  color: #64748b;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-task-metric strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 2rem;
  line-height: 1;
}

.resource-task-metric.total {
  min-width: 0;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.resource-task-metric.total span,
.resource-task-metric.total strong {
  color: #ffffff;
}

.resource-task-metric.completed strong {
  color: #059669;
}

.resource-task-metric.progress strong {
  color: #f97316;
}

.resource-task-metric.pending strong {
  color: #dc2626;
}

@media (max-width: 900px) {
  .resource-task-card-head {
    grid-template-columns: 1fr;
  }

  .resource-task-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .resource-today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-performance-card {
    grid-column: auto;
    grid-row: auto;
  }

  .resource-today-grid .task-list-card {
    grid-column: 1 / -1;
  }

  .resource-task-card-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .resource-task-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .resource-task-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-task-metric span {
    white-space: normal;
  }
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 42px;
  margin-bottom: 0;
  border-radius: 10px;
  font-size: 1.45rem;
  font-weight: 950;
}

.attendance-pill.present {
  color: #128044;
  background: #dcfce7;
}

.attendance-pill.pending {
  color: #9a3412;
  background: #ffedd5;
}

.resource-attendance-times {
  width: min(100%, 760px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: center;
  gap: 8px;
  margin-bottom: 12px;
}

.resource-attendance-time-item {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) auto;
  column-gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc, #eef6ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.resource-attendance-times span {
  grid-column: 1;
  color: #475569;
  font-size: 1.5rem;
}

.resource-attendance-times strong {
  grid-column: 1;
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 2.55rem;
  line-height: 1.05;
}

.resource-attendance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  gap: 10px;
}

.dashboard-screen button.resource-mark-time-button:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.resource-mark-time-button {
  width: min(100%, 132px);
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
  color: #ffffff !important;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.2);
  cursor: pointer;
}

.resource-attendance-time-item .resource-mark-time-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.dashboard-screen button.resource-mark-time-button.secondary:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.resource-mark-time-button.secondary {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.dashboard-screen button.resource-mark-time-button.lunch:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.resource-mark-time-button.lunch {
  color: #ffffff !important;
  background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
  box-shadow: 0 12px 22px rgba(234, 88, 12, 0.2);
}

.dashboard-screen button.resource-mark-time-button.lunch-end:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
.resource-mark-time-button.lunch-end {
  color: #ffffff !important;
  background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
  box-shadow: 0 12px 22px rgba(79, 70, 229, 0.2);
}

.resource-mark-time-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.resource-task-list {
  display: grid;
  gap: 12px;
}

.resource-task-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 0;
  color: #334155;
  font-size: 1.45rem;
  font-weight: 750;
}

.resource-task-status {
  min-width: 118px;
  padding: 8px 12px;
  border-radius: 9px;
  text-align: center;
  font-size: 1.2rem;
}

.status-completed {
  color: #128044;
  background: #dcfce7;
}

.status-in-progress {
  color: #b45309;
  background: #ffedd5;
}

.status-pending {
  color: #b45309;
  background: #fef3c7;
}

.task-summary-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 950;
}

@media (max-width: 900px) {
  .resource-today-kpis,
  .resource-today-grid,
  .resource-attendance-times {
    grid-template-columns: 1fr;
  }

  .resource-attendance-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-screen button.resource-mark-time-button:not(.ghost-button):not(.icon-button):not(.auth-switch-button),
  .resource-mark-time-button {
    width: 100%;
  }

  .resource-attendance-time-item {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }

  .resource-attendance-time-item .resource-mark-time-button {
    grid-column: 1;
    grid-row: auto;
  }

  .today-performance-card,
  .resource-today-grid .task-list-card {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Wide table hardening: keep dense reports readable without header/body overlap. */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

#resource-logins-table,
#registration-approval-page table,
#leave-request-panel table,
#master-records-page table,
#resource-locations-table,
#resource-photos-table,
#system-inventory-panel table,
#system-inventory-detail-table,
#task-summary-panel table,
#task-summary-page table,
#assigned-task-page table,
#attendance-matrix-table,
#workflow-summary-panel-part-1 table,
#workflow-summary-panel-part-2 table,
#workflow-summary-panel-part-3 table,
#workflow-summary-panel-part-4 table,
.survey-analysis-table {
  width: max-content;
  table-layout: fixed;
}

#resource-logins-table th,
#resource-logins-table td,
#registration-approval-page th,
#registration-approval-page td,
#leave-request-panel th,
#leave-request-panel td,
#master-records-page th,
#master-records-page td,
#resource-locations-table th,
#resource-locations-table td,
#resource-photos-table th,
#resource-photos-table td,
#system-inventory-panel th,
#system-inventory-panel td,
#system-inventory-detail-table th,
#system-inventory-detail-table td,
#task-summary-panel th,
#task-summary-panel td,
#task-summary-page th,
#task-summary-page td,
#assigned-task-page th,
#assigned-task-page td,
#attendance-matrix-table th,
#attendance-matrix-table td,
#workflow-summary-panel-part-1 th,
#workflow-summary-panel-part-1 td,
#workflow-summary-panel-part-2 th,
#workflow-summary-panel-part-2 td,
#workflow-summary-panel-part-3 th,
#workflow-summary-panel-part-3 td,
#workflow-summary-panel-part-4 th,
#workflow-summary-panel-part-4 td,
.survey-analysis-table th,
.survey-analysis-table td {
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#resource-logins-table .empty-state,
#registration-approval-page .empty-state,
#leave-request-panel .empty-state,
#master-records-page .empty-state,
#resource-locations-table .empty-state,
#resource-photos-table .empty-state,
#system-inventory-panel .empty-state,
#system-inventory-detail-table .empty-state,
#task-summary-panel .empty-state,
#task-summary-page .empty-state,
#assigned-task-page .empty-state,
#attendance-matrix-table .empty-state,
.survey-analysis-table .empty-state {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#resource-logins-table {
  min-width: 7800px;
}

#resource-logins-table th,
#resource-logins-table td {
  font-size: 1.45rem;
  line-height: 1.35;
  padding: 12px 14px;
}

#resource-logins-table th:nth-child(1),
#resource-logins-table td:nth-child(1) { width: 220px; }
#resource-logins-table th:nth-child(2),
#resource-logins-table td:nth-child(2) { width: 180px; }
#resource-logins-table th:nth-child(3),
#resource-logins-table td:nth-child(3) { width: 160px; }
#resource-logins-table th:nth-child(4),
#resource-logins-table td:nth-child(4) { width: 170px; }
#resource-logins-table th:nth-child(5),
#resource-logins-table td:nth-child(5) { width: 210px; }
#resource-logins-table th:nth-child(6),
#resource-logins-table td:nth-child(6) { width: 190px; }
#resource-logins-table th:nth-child(7),
#resource-logins-table td:nth-child(7) { width: 130px; }
#resource-logins-table th:nth-child(8),
#resource-logins-table td:nth-child(8) { width: 230px; }
#resource-logins-table th:nth-child(9),
#resource-logins-table td:nth-child(9) { width: 230px; }
#resource-logins-table th:nth-child(10),
#resource-logins-table td:nth-child(10) { width: 170px; }
#resource-logins-table th:nth-child(11),
#resource-logins-table td:nth-child(11) { width: 220px; }
#resource-logins-table th:nth-child(12),
#resource-logins-table td:nth-child(12) { width: 220px; }
#resource-logins-table th:nth-child(13),
#resource-logins-table td:nth-child(13) { width: 160px; }
#resource-logins-table th:nth-child(14),
#resource-logins-table td:nth-child(14) { width: 160px; }
#resource-logins-table th:nth-child(15),
#resource-logins-table td:nth-child(15) { width: 260px; }
#resource-logins-table th:nth-child(16),
#resource-logins-table td:nth-child(16),
#resource-logins-table th:nth-child(17),
#resource-logins-table td:nth-child(17) { width: 170px; }
#resource-logins-table th:nth-child(18),
#resource-logins-table td:nth-child(18),
#resource-logins-table th:nth-child(19),
#resource-logins-table td:nth-child(19) { width: 210px; }
#resource-logins-table th:nth-child(20),
#resource-logins-table td:nth-child(20) { width: 260px; }
#resource-logins-table th:nth-child(21),
#resource-logins-table td:nth-child(21) { width: 220px; }
#resource-logins-table th:nth-child(22),
#resource-logins-table td:nth-child(22),
#resource-logins-table th:nth-child(23),
#resource-logins-table td:nth-child(23) { width: 250px; }
#resource-logins-table th:nth-child(24),
#resource-logins-table td:nth-child(24),
#resource-logins-table th:nth-child(25),
#resource-logins-table td:nth-child(25) { width: 180px; }
#resource-logins-table th:nth-child(26),
#resource-logins-table td:nth-child(26),
#resource-logins-table th:nth-child(27),
#resource-logins-table td:nth-child(27),
#resource-logins-table th:nth-child(28),
#resource-logins-table td:nth-child(28) {
  width: 260px;
  overflow: visible;
}

#registration-approval-page table {
  min-width: 4600px;
}

#registration-approval-page th,
#registration-approval-page td {
  min-width: 190px;
}

#leave-request-panel table {
  min-width: 1940px;
}

#leave-request-panel th,
#leave-request-panel td {
  min-width: 0;
  width: auto;
  font-size: 1.45rem;
  line-height: 1.35;
  padding: 10px 12px;
}

#leave-request-panel th:nth-child(1),
#leave-request-panel td:nth-child(1) { width: 150px; }
#leave-request-panel th:nth-child(2),
#leave-request-panel td:nth-child(2) { width: 120px; }
#leave-request-panel th:nth-child(3),
#leave-request-panel td:nth-child(3),
#leave-request-panel th:nth-child(4),
#leave-request-panel td:nth-child(4) { width: 150px; }
#leave-request-panel th:nth-child(5),
#leave-request-panel td:nth-child(5) { width: 190px; }
#leave-request-panel th:nth-child(6),
#leave-request-panel td:nth-child(6) { width: 120px; }
#leave-request-panel th:nth-child(7),
#leave-request-panel td:nth-child(7),
#leave-request-panel th:nth-child(8),
#leave-request-panel td:nth-child(8) { width: 130px; }
#leave-request-panel th:nth-child(9),
#leave-request-panel td:nth-child(9) {
  width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#leave-request-panel th:nth-child(10),
#leave-request-panel td:nth-child(10) { width: 130px; }
#leave-request-panel th:nth-child(11),
#leave-request-panel td:nth-child(11) { width: 170px; }
#leave-request-panel th:nth-child(12),
#leave-request-panel td:nth-child(12) { width: 190px; }
#leave-request-panel th:nth-child(13),
#leave-request-panel td:nth-child(13) {
  width: 150px;
  overflow: visible;
}

#resource-locations-table {
  min-width: 2300px;
}

#resource-locations-table th,
#resource-locations-table td,
#resource-photos-table th,
#resource-photos-table td {
  min-width: 210px;
}

#resource-photos-table {
  min-width: 2500px;
}

#system-inventory-panel table,
#system-inventory-detail-table {
  min-width: 3200px;
}

#system-inventory-panel th,
#system-inventory-panel td,
#system-inventory-detail-table th,
#system-inventory-detail-table td {
  min-width: 220px;
}

#master-records-page table {
  min-width: 2700px;
}

#master-records-page th,
#master-records-page td {
  min-width: 210px;
}

#task-summary-panel table,
#task-summary-page table,
#assigned-task-page table {
  min-width: 3900px;
}

#task-summary-panel th,
#task-summary-panel td,
#task-summary-page th,
#task-summary-page td,
#assigned-task-page th,
#assigned-task-page td {
  min-width: 210px;
}

#attendance-matrix-table {
  min-width: 2800px;
}

#attendance-matrix-table th,
#attendance-matrix-table td {
  min-width: 64px;
  text-align: center;
}

#attendance-matrix-table th:nth-child(-n+4),
#attendance-matrix-table td:nth-child(-n+4) {
  text-align: left;
}

#attendance-matrix-table th:nth-child(1),
#attendance-matrix-table td:nth-child(1) {
  min-width: 110px;
  width: 110px;
}

#attendance-matrix-table th:nth-child(2),
#attendance-matrix-table td:nth-child(2) {
  min-width: 260px;
  width: 260px;
}

#attendance-matrix-table th:nth-child(3),
#attendance-matrix-table td:nth-child(3) {
  min-width: 190px;
  width: 190px;
}

#attendance-matrix-table th:nth-child(4),
#attendance-matrix-table td:nth-child(4) {
  min-width: 250px;
  width: 250px;
}

#attendance-head-row-1 th:nth-child(n+5),
#attendance-head-row-2 th {
  min-width: 62px !important;
  width: 62px !important;
  padding-inline: 8px !important;
  text-align: center;
  position: static !important;
  left: auto !important;
}

#workflow-summary-panel-part-1 table,
#workflow-summary-panel-part-2 table,
#workflow-summary-panel-part-3 table,
#workflow-summary-panel-part-4 table {
  min-width: 3000px;
}

#workflow-summary-panel-part-1 th,
#workflow-summary-panel-part-2 th,
#workflow-summary-panel-part-3 th,
#workflow-summary-panel-part-4 th {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.survey-analysis-table {
  min-width: 2500px;
}

.survey-analysis-table th,
.survey-analysis-table td {
  min-width: 190px;
}

/* Premium login polish */
#login-screen .auth-stack {
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 255, 255, 0.92), transparent 18%),
    radial-gradient(circle at 15% 85%, rgba(219, 70, 69, 0.1), transparent 22%),
    linear-gradient(145deg, #f6f8fc 0%, #eef2f8 56%, #f9f4ef 100%);
}

#login-screen .auth-switcher {
  width: min(680px, calc(100% - 28px));
  gap: 12px;
}

#login-screen .auth-switch-button {
  min-height: 54px;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 1.45rem;
  letter-spacing: 0;
  box-shadow: 0 16px 34px rgba(33, 39, 54, 0.12);
}

#login-screen .auth-switch-button.active {
  background: linear-gradient(135deg, #ec5656 0%, #c72e34 100%);
  box-shadow: 0 18px 38px rgba(199, 46, 52, 0.26);
}

#login-form.login-card,
#forgot-password-form.login-card {
  width: min(680px, calc(100% - 28px));
  padding: 54px 58px 46px;
  gap: 24px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 85% 10%, rgba(139, 71, 38, 0.08), transparent 34%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 34px 90px rgba(26, 31, 45, 0.2),
    0 8px 24px rgba(139, 71, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

#login-form.login-card::before,
#forgot-password-form.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.72), transparent 12%);
}

#login-form.login-card h2,
#forgot-password-form.login-card h2 {
  margin: 0 0 10px;
  color: #222734;
  font-size: clamp(2.9rem, 2.7vw, 3.6rem);
  font-weight: 750;
  letter-spacing: 0;
}

#login-form.login-card label,
#forgot-password-form.login-card label {
  gap: 10px;
}

#login-form.login-card label span,
#forgot-password-form.login-card label span {
  font-size: 1.55rem;
  font-weight: 750;
  color: #2b303c;
}

#login-form.login-card input,
#forgot-password-form.login-card input {
  min-height: 64px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(189, 198, 215, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 253, 0.96));
  color: #202633;
  font-size: 1.7rem;
  box-shadow:
    0 16px 34px rgba(25, 34, 52, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

#login-form.login-card input::placeholder,
#forgot-password-form.login-card input::placeholder {
  color: rgba(36, 42, 56, 0.48);
}

#login-form.login-card input:focus,
#forgot-password-form.login-card input:focus {
  border-color: rgba(139, 71, 38, 0.5);
  background: #fff;
  box-shadow:
    0 18px 38px rgba(25, 34, 52, 0.12),
    0 0 0 5px rgba(139, 71, 38, 0.11);
}

#login-form.login-card button[type="submit"],
#forgot-password-form.login-card button[type="submit"] {
  min-height: 68px;
  margin-top: 12px;
  border-radius: 16px;
  font-size: 1.8rem;
  font-weight: 850;
  letter-spacing: 0;
  background: linear-gradient(135deg, #b56335 0%, #843719 100%);
  box-shadow:
    0 20px 38px rgba(95, 46, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

#login-form.login-card button[type="submit"]:hover,
#forgot-password-form.login-card button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow:
    0 24px 44px rgba(95, 46, 24, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#login-screen .auth-link-button {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(139, 71, 38, 0.08);
  color: #9f3e30;
  font-size: 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(139, 71, 38, 0.1);
}

#login-screen .auth-link-button:hover {
  background: rgba(139, 71, 38, 0.13);
  text-decoration: none;
}

#login-form #login-message {
  margin: 0;
  min-height: 22px;
  font-size: 1.35rem;
}

/* Final responsive hardening */
@media (max-width: 1180px) {
  html {
    font-size: 58%;
  }

  .app-shell,
  body.resource-layout .app-shell,
  .app-shell:has(.dashboard-screen:not(.hidden)) {
    width: 100%;
    padding: 0;
  }

  .login-screen {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    overflow-y: auto;
  }

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

  .auth-stack {
    min-height: auto;
    padding: 36px 24px 52px;
  }

  #login-form.login-card,
  #forgot-password-form.login-card,
  .registration-card {
    width: min(720px, calc(100vw - 32px));
  }

  .dashboard-screen:not(.hidden) {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .dashboard-sidebar {
    width: 100%;
    max-width: 320px;
  }

  .dashboard-screen > :not(.dashboard-sidebar) {
    min-width: 0;
  }

  .stats-grid,
  .admin-control-grid,
  .panel-grid,
  #work-update-grid,
  #assignment-work-grid,
  .dashboard-overview-grid,
  .resource-today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #entry-form.daily-entry-grid,
  body.resource-layout #entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  body.resource-layout #entry-form > label:not(.wide-field),
  body.resource-layout #entry-form > button {
    max-width: none;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 54%;
  }

  body {
    overflow-x: hidden;
  }

  .login-screen {
    margin: 0;
    width: 100%;
  }

  .brand-panel {
    padding: 28px 18px;
  }

  .brand-panel h1,
  h1 {
    font-size: clamp(3.8rem, 12vw, 5.2rem);
    max-width: 100%;
  }

  .auth-stack {
    padding: 22px 14px 34px;
  }

  #login-screen .auth-switcher {
    width: 100%;
    gap: 8px;
  }

  #login-screen .auth-switch-button {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 1.28rem;
  }

  #login-form.login-card,
  #forgot-password-form.login-card,
  .registration-card {
    width: 100%;
    padding: 30px 18px 24px;
    border-radius: 22px;
  }

  #login-form.login-card input,
  #forgot-password-form.login-card input {
    min-height: 54px;
  }

  .dashboard-screen:not(.hidden) {
    display: block;
    padding: 8px;
  }

  .dashboard-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    margin-bottom: 10px;
    border-radius: 18px;
  }

  .dashboard-sidebar .sidebar-menu-list,
  .dashboard-sidebar .sidebar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sidebar-submenu {
    grid-column: 1 / -1;
  }

  .topbar,
  .panel,
  .detail-page,
  .resource-today-card,
  .stat-card {
    border-radius: 18px;
  }

  .topbar,
  .panel-head,
  .resource-today-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar-actions,
  .panel-actions,
  .survey-map-tools {
    justify-content: stretch;
  }

  .topbar-actions > *,
  .panel-actions > *,
  .survey-map-tools > *,
  button,
  .ghost-button {
    min-width: 0;
    max-width: 100%;
  }

  .stats-grid,
  .admin-control-grid,
  .panel-grid,
  #work-update-grid,
  #assignment-work-grid,
  .dashboard-overview-grid,
  .dashboard-overview-graphics,
  .resource-today-grid,
  .resource-today-kpis,
  .form-grid,
  #entry-form.daily-entry-grid,
  body.resource-layout #entry-form {
    grid-template-columns: 1fr;
  }

  .daily-entry-grid .entry-task-field,
  .daily-entry-grid .entry-location-field,
  .daily-entry-grid .entry-activity-field,
  .daily-entry-grid .entry-meta-field,
  .daily-entry-grid .entry-status-field,
  .daily-entry-grid .wide-field,
  .daily-entry-grid button,
  .daily-entry-grid .status-message {
    grid-column: 1 / -1;
  }

  input,
  select,
  textarea,
  .daily-entry-grid select,
  .daily-entry-grid input,
  .daily-entry-grid textarea {
    width: 100%;
    min-width: 0;
    font-size: 1.55rem;
  }

  .table-wrap,
  #attendance-panel .table-wrap,
  #recent-entries-panel .table-wrap,
  #resource-logins-panel .table-wrap,
  #assignment-history-panel .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .summary-table,
  .dashboard-screen .summary-table,
  .dashboard-screen table {
    width: max-content;
    min-width: 760px;
  }

  .survey-map-canvas {
    min-height: 58vh;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 50%;
  }

  .dashboard-sidebar .sidebar-menu-list,
  .dashboard-sidebar .sidebar-actions {
    grid-template-columns: 1fr;
  }

  #login-screen .auth-switcher {
    grid-template-columns: 1fr;
  }

  .panel,
  .resource-today-card,
  .stat-card {
    padding: 14px;
  }

  .summary-table,
  .dashboard-screen .summary-table,
  .dashboard-screen table {
    min-width: 680px;
  }
}

/* Complete responsive final pass: keep this block last */
img,
svg,
canvas,
video {
  max-width: 100%;
}

.dashboard-screen,
.panel,
.topbar,
.stat-card,
.resource-today-card,
.survey-map-card,
.table-wrap {
  min-width: 0;
}

.topbar-actions,
.panel-actions,
.survey-app-actions,
.survey-map-tools,
.quick-links,
.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-actions > *,
.panel-actions > *,
.survey-app-actions > *,
.survey-map-tools > *,
.quick-links > *,
.dashboard-tabs > * {
  min-width: 0;
  white-space: normal;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.summary-table,
.dashboard-screen table {
  max-width: none;
}

@media (max-width: 1360px) {
  .dashboard-screen:not(.hidden) {
    --dashboard-sidebar-width: 300px;
  }

  #work-update-grid,
  #assignment-work-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-screen .stats-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }

  .dashboard-screen .stat-user-card {
    grid-column: 1 / -1;
  }

  .resource-today-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-today-grid .task-list-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1800px) {
  .dashboard-screen .stats-grid,
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .dashboard-screen .stat-user-card {
    grid-column: auto;
  }
}

@media (max-width: 1180px) {
  body.sidebar-compact .dashboard-screen:not(.hidden),
  .dashboard-screen:not(.hidden) {
    display: block;
    padding: 10px;
  }

  .dashboard-screen > :not(.dashboard-sidebar) {
    grid-column: auto;
  }

  .dashboard-sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    min-height: auto;
    height: auto;
    margin: 0 0 12px;
    padding: 16px;
    border-radius: 22px;
    overflow: visible;
  }

  .sidebar-size-toggle {
    display: none;
  }

  .sidebar-brand,
  .sidebar-user {
    margin-left: 0;
    margin-right: 0;
  }

  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .sidebar-menu-label {
    display: block;
    grid-column: 1 / -1;
    margin: 10px 0 2px;
  }

  .sidebar-menu-item,
  .dashboard-screen .sidebar-menu-item,
  .dashboard-screen button.sidebar-menu-item:not(.ghost-button):not(.icon-button):not(.auth-switch-button) {
    width: 100%;
    margin: 0;
    justify-content: flex-start;
    white-space: normal;
  }

  .sidebar-submenu {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 8px;
    border-left: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.28);
  }

  .sidebar-submenu.collapsed {
    display: none;
  }

  .dashboard-screen .topbar {
    margin-top: 0;
  }

  .dashboard-screen > .topbar,
  .dashboard-screen > .stats-grid,
  .dashboard-screen > .panel,
  .dashboard-screen > .panel-grid,
  .dashboard-screen > .detail-page,
  .dashboard-screen > #assignment-work-grid,
  .dashboard-screen > #work-update-grid {
    margin-bottom: 12px;
  }

  .stats-grid,
  .dashboard-screen .stats-grid,
  .admin-control-grid,
  .dashboard-screen .admin-control-grid,
  .panel-grid,
  body.admin-layout .panel-grid,
  #work-update-grid,
  #assignment-work-grid,
  .dashboard-overview-grid,
  .dashboard-overview-graphics,
  .resource-today-grid,
  .resource-today-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-entry-grid,
  #entry-form.daily-entry-grid,
  body.resource-layout #entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .survey-app-layout,
  .survey-workspace {
    grid-template-columns: 1fr;
  }

  .survey-map-head {
    align-items: stretch;
  }
}

@media (max-width: 820px) {
  .login-screen {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .brand-panel,
  .auth-stack {
    min-height: auto;
  }

  .brand-panel {
    padding: 30px 18px;
  }

  .auth-stack {
    padding: 22px 14px 34px;
  }

  #login-screen .auth-switcher,
  #login-form.login-card,
  #forgot-password-form.login-card,
  .registration-card {
    width: 100%;
  }

  .sidebar-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-submenu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .dashboard-screen .topbar,
  .panel-head,
  .resource-today-topbar,
  .survey-map-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar-actions,
  .panel-actions,
  .survey-app-actions,
  .survey-map-tools,
  .quick-links,
  .dashboard-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions > *,
  .panel-actions > *,
  .survey-app-actions > *,
  .survey-map-tools > *,
  .quick-links > *,
  .dashboard-tabs > * {
    width: 100%;
  }

  .stats-grid,
  .dashboard-screen .stats-grid,
  .admin-control-grid,
  .dashboard-screen .admin-control-grid,
  .panel-grid,
  body.admin-layout .panel-grid,
  #work-update-grid,
  #assignment-work-grid,
  .dashboard-overview-grid,
  .dashboard-overview-graphics,
  .resource-today-grid,
  .resource-today-kpis,
  .form-grid,
  .daily-entry-grid,
  #entry-form.daily-entry-grid,
  body.resource-layout #entry-form {
    grid-template-columns: 1fr;
  }

  .daily-entry-grid .entry-task-field,
  .daily-entry-grid .entry-location-field,
  .daily-entry-grid .entry-activity-field,
  .daily-entry-grid .entry-meta-field,
  .daily-entry-grid .entry-status-field,
  .daily-entry-grid .wide-field,
  .daily-entry-grid button,
  .daily-entry-grid .status-message {
    grid-column: 1 / -1;
  }

  input,
  select,
  textarea,
  button,
  .ghost-button,
  .daily-entry-grid select,
  .daily-entry-grid input,
  .daily-entry-grid textarea {
    max-width: 100%;
  }

  .dashboard-screen .summary-table,
  .dashboard-screen table,
  .summary-table {
    width: max-content;
    min-width: 720px;
  }

  .overview-form-summary-table {
    min-width: 760px;
  }

  #attendance-matrix-table,
  #resource-logins-table,
  #task-summary-panel table,
  #task-summary-page table,
  #assigned-task-page table,
  #workflow-summary-panel-part-1 table,
  #workflow-summary-panel-part-2 table,
  #workflow-summary-panel-part-3 table,
  #workflow-summary-panel-part-4 table,
  .survey-analysis-table {
    min-width: 920px;
  }

  .survey-map-canvas {
    min-height: 56vh;
  }

  .survey-khata-type-legend {
    position: static;
    width: 100%;
    max-height: 240px;
    margin-top: 10px;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 50%;
  }

  .dashboard-screen:not(.hidden) {
    padding: 6px;
  }

  .dashboard-sidebar,
  .panel,
  .detail-page,
  .topbar,
  .resource-today-card,
  .stat-card {
    border-radius: 16px;
  }

  .sidebar-menu,
  .sidebar-submenu,
  .topbar-actions,
  .panel-actions,
  .survey-app-actions,
  .survey-map-tools,
  .quick-links,
  .dashboard-tabs,
  #login-screen .auth-switcher {
    grid-template-columns: 1fr;
  }

  .sidebar-brand {
    margin: 0 0 12px;
  }

  .sidebar-brand strong {
    font-size: 1.8rem;
  }

  #login-form.login-card,
  #forgot-password-form.login-card,
  .registration-card,
  .panel,
  .resource-today-card,
  .stat-card {
    padding: 14px;
  }

  #login-form.login-card,
  #forgot-password-form.login-card {
    padding: 26px 16px 22px;
  }

  .dashboard-screen .summary-table,
  .dashboard-screen table,
  .summary-table {
    min-width: 640px;
  }
}

/* Final responsive guard for wide controls inside compact panels */
@media (max-width: 820px) {
  .panel-head,
  .panel-head > *,
  .panel-head label,
  .panel-actions,
  .filter-field,
  .filter-row,
  .filter-controls,
  .dashboard-filter,
  .report-filter,
  .tehsil-progress-controls,
  .overview-filter-dropdown {
    min-width: 0;
    max-width: 100%;
  }

  #attendance-month-select,
  .panel-head select,
  .panel-head input,
  .panel-head button,
  .panel-actions select,
  .panel-actions input,
  .panel-actions button,
  .filter-field select,
  .filter-field input,
  .filter-row select,
  .filter-row input,
  .filter-controls select,
  .filter-controls input,
  .dashboard-filter select,
  .dashboard-filter input,
  .report-filter select,
  .report-filter input,
  .tehsil-progress-controls select,
  .tehsil-progress-controls input,
  .overview-filter-dropdown select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .panel-head select,
  .panel-head input,
  #attendance-month-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Time Sheet: keep long task, location, remarks and verification text readable. */
#recent-entries-panel table.summary-table.workflow-summary-table th,
#recent-entries-panel table.summary-table.workflow-summary-table td,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td {
  height: auto !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
  vertical-align: top !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table tbody tr {
  height: auto !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table td > *,
#recent-entries-panel table.summary-table.workflow-summary-table th > * {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table .working-hours-column {
  min-width: 180px !important;
  width: 180px !important;
  max-width: 180px !important;
  text-align: center;
  font-weight: 700;
}

/* Time Sheet column sizing: wrapped content with an auto-fit action column. */
#recent-entries-panel table.summary-table.workflow-summary-table,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table {
  width: max-content !important;
  min-width: 100% !important;
  table-layout: auto !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table th,
#recent-entries-panel table.summary-table.workflow-summary-table td,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th,
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td {
  width: auto !important;
  min-width: 105px !important;
  max-width: 260px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* Task, location and remarks need more room before wrapping. */
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(3),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(3),
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(10),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(10),
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(19),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(19),
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(20),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(20),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(4),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(4),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(5),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(5),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(18),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(18) {
  min-width: 170px !important;
  max-width: 320px !important;
}

/* Date, time, quantity and percentage columns stay compact. */
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(1),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(1),
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(n+7):nth-child(-n+9),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(n+7):nth-child(-n+9),
#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(n+11):nth-child(-n+18),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(n+11):nth-child(-n+18),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(1),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(1),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(n+6):nth-child(-n+13),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(n+6):nth-child(-n+13) {
  min-width: 100px !important;
  max-width: 150px !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(1),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(1),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(1),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(1) {
  width: 1% !important;
  min-width: 128px !important;
  max-width: 150px !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-align: center !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(2),
#recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(2),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table th:nth-child(2),
body.resource-layout #recent-entries-panel table.summary-table.workflow-summary-table td:nth-child(2) {
  width: 1% !important;
  min-width: 190px !important;
  max-width: 240px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: left !important;
}

#recent-entries-panel table.summary-table.workflow-summary-table .time-sheet-action-column {
  width: 1% !important;
  min-width: 230px !important;
  max-width: 320px !important;
  white-space: normal !important;
  text-align: center;
}

#recent-entries-panel .time-sheet-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  white-space: normal;
}

#recent-entries-panel .overtime-actions {
  margin-top: 8px;
}

#recent-entries-panel .overtime-approval-badge {
  min-width: 230px;
  white-space: normal;
  line-height: 1.25;
}

#recent-entries-panel .time-sheet-action-column .table-action-button {
  width: auto !important;
  min-width: 78px;
  padding: 8px 12px;
  max-width: none !important;
  white-space: nowrap !important;
}

/* Freeze the Time Sheet title/header row while its records scroll. */
#recent-entries-panel .table-wrap {
  max-height: min(70vh, 760px);
  overflow: auto !important;
  position: relative;
}

#recent-entries-panel table.summary-table.workflow-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #efe1cd;
  box-shadow: inset 0 -1px 0 #d7c3a7, 0 2px 4px rgba(57, 40, 24, 0.08);
}

/* Freeze Resource Performance headers while the performance records scroll. */
#resource-performance-panel .table-wrap {
  max-height: min(70vh, 760px);
  overflow: auto !important;
  position: relative;
}

#resource-performance-table thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #efe1cd;
  box-shadow: inset 0 -1px 0 #d7c3a7, 0 2px 4px rgba(57, 40, 24, 0.08);
}
