:root {
  --brand: #ce1d22;
  --brand-dark: #ae1a1f;
  --brand-soft: #fef2f2;
  --ink: #1e293b;
  --muted: #64748b;
  --page: #eef2f6;
  --card: #ffffff;
  --line: #e2e8f0;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --danger: #dc2626;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* --- Increased Heading Font Weights (1 point up) --- */
h1,
h2,
h3,
h4 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700 !important;
  color: var(--ink);
}

h5,
h6 {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600 !important;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}

a {
  text-decoration: none;
  color: inherit;
}

a,
button,
input[type="submit"],
input[type="button"],
input[type="checkbox"],
input[type="radio"],
select,
label,
.nav-link,
.btn,
.ghost-btn,
.icon-btn,
.quick-card,
.sidebar-toggle-btn,
.mini-row,
.link,
[onclick],
.modal-close {
  cursor: pointer !important;
}

/* --- Auth Page Styling --- */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 14% 18%, rgba(206, 29, 34, 0.06), transparent 32%), radial-gradient(circle at 86% 82%, rgba(206, 29, 34, 0.04), transparent 32%), #eef2f6;
}

.login-panel {
  width: min(100%, 480px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.1);
  padding: 36px;
  backdrop-filter: blur(12px);
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo img {
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-panel h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 6px;
  color: var(--ink);
}

.login-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.field small {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select,
.field textarea,
.filter-bar input,
.filter-bar select,
.inline-review input,
.inline-review select,
.worksheet-wrap input,
.worksheet-wrap select,
.worksheet-wrap textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  color: var(--ink);
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(206, 29, 34, 0.5);
  box-shadow: 0 0 0 3px rgba(206, 29, 34, 0.1);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.check-line input {
  accent-color: var(--brand);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 4px 14px rgba(206, 29, 34, 0.2);
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.light {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}

.btn.light:hover {
  border-color: rgba(206, 29, 34, 0.3);
}

.btn.white {
  background: #ffffff;
  color: var(--ink);
}

.btn.soft {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.danger {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.btn.tiny {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.btn.full {
  width: 100%;
}

.ghost-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.ghost-btn:hover {
  color: var(--ink);
  background: #e2e8f0;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: #f8fafc;
  color: var(--ink);
  border-color: #cbd5e1;
}

.notification-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

.flash {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid;
}

.flash.success {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.flash.error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.login-help {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* --- Layout Shell & Sidebar --- */
.crm-shell {
  min-height: 100vh;
  display: flex;
  background: var(--page);
}

.sidebar {
  width: 270px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--line);
  transition: all 0.25s ease;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: all 0.25s ease;
}

.brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  transition: opacity 0.2s ease;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.nav {
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.nav-label {
  padding: 14px 10px 6px;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: opacity 0.2s ease;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  margin: 2px 0;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-link .nav-icon {
  width: 20px;
  text-align: center;
  color: #64748b;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.nav-link.active .nav-icon {
  color: var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px 4px 0;
  transition: opacity 0.2s ease;
}

.secure-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #64748b;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
}

.secure-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* --- Collapsed Desktop Sidebar State --- */
.crm-shell.collapsed .sidebar {
  width: 76px;
  padding: 16px 8px;
}

.crm-shell.collapsed .sidebar .brand {
  justify-content: center;
  padding: 4px 0 14px;
}

.crm-shell.collapsed .sidebar .brand-logo {
  width: 42px;
  height: 42px;
}

.crm-shell.collapsed .sidebar .brand-copy,
.crm-shell.collapsed .sidebar .nav-label,
.crm-shell.collapsed .sidebar .nav-link-text,
.crm-shell.collapsed .sidebar .sidebar-footer {
  display: none !important;
  opacity: 0;
}

.crm-shell.collapsed .sidebar .nav-link {
  justify-content: center;
  padding: 10px 0;
  margin: 4px 0;
}

.crm-shell.collapsed .sidebar .nav-link .nav-icon {
  font-size: 18px;
  width: auto;
  margin: 0;
}

/* --- Main Section & Topbar --- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
  min-height: 72px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted) !important;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: #f8fafc;
  color: var(--ink);
  border-color: #cbd5e1;
}

.topbar-kicker {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.topbar h1 {
  font-size: 16px;
  font-weight: 700;
  margin: 2px 0 0;
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
}

.avatar.large {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.profile-text {
  display: grid;
  gap: 0;
}

.profile-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.profile-text span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

/* --- Page Content Container --- */
.content {
  padding: 24px 28px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.page-head h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  margin: 4px 0 6px;
  color: var(--ink);
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* --- Metric Grid & Panels --- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.metric-value {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.metric-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

.metric-meta.good {
  color: var(--success);
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 15px;
  margin-top: 15px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.panel-text {
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Tables & Data Presentation --- */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr:last-child td {
  border-bottom: 0;
}

.muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.link {
  display: grid;
  gap: 2px;
  color: inherit;
}

.link:hover strong {
  color: var(--brand);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 10px;
  margin-bottom: 15px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-field {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 15px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

.badge.active,
.badge.working,
.badge.signed,
.badge.approved,
.badge.completed {
  background: #f0fdf4;
  color: var(--success);
}

.badge.scheduled,
.badge.assigned,
.badge.viewed,
.badge.pending {
  background: #fefce8;
  color: #a16207;
}

.badge.cancelled,
.badge.rejected,
.badge.inactive,
.badge.absent {
  background: #fef2f2;
  color: var(--danger);
}

/* --- Clean Profile & Detail Card Redesign (Fix Screenshot 1 & 2 Text Mashing) --- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 16px;
}

.profile-avatar-large {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.profile-header-info h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.profile-header-info span {
  color: var(--muted);
  font-size: 13px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.profile-summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-summary-text strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.profile-summary-text span {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.detail-grid>div,
.detail-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-grid span,
.detail-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.detail-grid strong,
.detail-val {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.detail-box {
  margin-top: 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.detail-box h5 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.detail-list>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list>div:last-child {
  border-bottom: 0;
}

.detail-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.detail-list strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  word-break: break-word;
}

/* --- Improved Employee "My Dispatch" & "My Time" Cards --- */
.dispatch-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dispatch-card:hover {
  border-color: rgba(206, 29, 34, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

.dispatch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dispatch-ref {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dispatch-card-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 3px 0 0;
  color: var(--ink);
}

.dispatch-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.dispatch-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* --- Dashboard Modules --- */
.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: 14px;
  padding: 20px;
  gap: 14px;
  margin-bottom: 15px;
}

.hero-strip>div {
  display: grid;
  gap: 4px;
}

.hero-strip span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.hero-strip strong {
  font-size: 16px;
  font-weight: 700;
}

.mini-list {
  display: grid;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.mini-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mini-main strong {
  font-size: 13px;
  font-weight: 700;
}

.mini-main span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px;
  margin-bottom: 15px;
  border-radius: 14px;
  color: #ffffff;
  background: radial-gradient(circle at 88% 20%, rgba(206, 29, 34, 0.4), transparent 28%), linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin: 0;
  font-size: 14px;
}

.hero-mark {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.quick-card {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-card:hover {
  border-color: rgba(206, 29, 34, 0.3);
  box-shadow: var(--shadow);
}

.quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.quick-card strong {
  font-size: 14px;
  font-weight: 700;
}

.quick-card small {
  font-size: 12px;
  color: var(--muted);
}

/* --- Modal Popup System & Backdrop Blur --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  width: min(100%, 640px);
  max-height: 86vh;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--ink);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* --- Notifications list --- */
.notification-list {
  display: grid;
}

.notification-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.notification-row:last-child {
  border-bottom: 0;
}

.notification-row.unread {
  background: #fff8f8;
  padding: 12px 10px;
  border-radius: 10px;
}

.notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  background: #94a3b8;
  flex-shrink: 0;
}

.notification-dot.success {
  background: var(--success);
}

.notification-dot.warning {
  background: #d97706;
}

.notification-dot.info {
  background: var(--brand);
}

.notification-row>div:nth-child(2) {
  flex: 1;
}

.notification-row strong {
  font-size: 14px;
  font-weight: 700;
}

.notification-row p {
  margin: 3px 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.notification-row span {
  color: #94a3b8;
  font-size: 12px;
}

/* --- Signature & Document Canvas --- */
.signature-pad-wrap {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  margin: 14px 0;
}

#signature-pad {
  display: block;
  width: 100%;
  height: 200px;
  touch-action: none;
}

.sig-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pdf-frame {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 24px;
}

.pdf-icon {
  width: 68px;
  height: 84px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--brand);
  font-weight: 700;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pagination>* {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
}

.pagination .current {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1200px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar {
    width: 250px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: -290px;
    width: 270px !important;
    transition: left 0.25s ease;
    box-shadow: 20px 0 40px rgba(15, 23, 42, 0.15);
  }

  .sidebar.open {
    left: 0;
  }

  .crm-shell.collapsed .sidebar .brand-copy,
  .crm-shell.collapsed .sidebar .nav-label,
  .crm-shell.collapsed .sidebar .nav-link-text,
  .crm-shell.collapsed .sidebar .sidebar-footer {
    display: flex !important;
    opacity: 1;
  }

  .topbar {
    padding: 12px 16px;
  }

  .content {
    padding: 18px 14px;
  }

  .dashboard-grid,
  .hero-strip {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-field {
    grid-column: auto;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 64px;
  }

  .topbar-kicker,
  .topbar h1 {
    display: none;
  }

  .profile-text,
  .ghost-btn {
    display: none;
  }

  .content {
    padding: 14px 10px;
  }

  .page-head h2 {
    font-size: 22px;
  }

  .metric-grid,
  .card-grid,
  .card-grid.two {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 24px;
  }

  .panel {
    padding: 16px;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-card h3 {
    font-size: 18px;
  }

  .hero-mark {
    display: none;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   EMPLOYEE MY TIME
   ========================================================= */

.time-page {
  width: 100%;
}

.time-page-head {
  margin-bottom: 20px;
}

/* ---------------------------------------------------------
   SUMMARY CARDS
   --------------------------------------------------------- */

.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.time-summary-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(23, 31, 43, 0.055);
}

.time-summary-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff1f2;
  color: var(--brand);
  font-size: 17px;
  font-weight: 900;
}

.time-summary-icon.success {
  background: #edf8f1;
  color: #2e8b57;
}

.time-summary-icon.warning {
  background: #fff8e8;
  color: #b47b00;
}

.time-summary-icon.extra {
  background: #f3efff;
  color: #7257c7;
}

.time-summary-card>div:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.time-summary-label {
  color: #737d8b;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.time-summary-card strong {
  margin-top: 4px;
  color: #202a35;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
}

/* ---------------------------------------------------------
   TABLE PANEL
   --------------------------------------------------------- */

.time-table-panel {
  padding: 0;
  overflow: hidden;
}

.time-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.time-table-header h3 {
  margin: 5px 0 3px;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
}

.time-table-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.time-table-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fb;
  color: #25303b;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.time-table-count span {
  color: #7d8692;
  font-size: 12px;
  font-weight: 400;
}

/* ---------------------------------------------------------
   TABLE
   --------------------------------------------------------- */

.time-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.time-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.time-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  color: #6f7885;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-align: left;
  white-space: nowrap;
}

.time-table tbody td {
  padding: 15px 14px;
  background: #fff;
  border-bottom: 1px solid #edf0f3;
  color: #2c3642;
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
}

.time-table tbody tr {
  transition: background .16s ease;
}

.time-table tbody tr:hover td {
  background: #fcfcfd;
}

.time-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------------------------------------------------------
   DISPATCH
   --------------------------------------------------------- */

.dispatch-cell {
  min-width: 190px;
  max-width: 220px;
}

.dispatch-reference {
  display: inline-flex;
  align-items: center;
  margin-bottom: 5px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.dispatch-title {
  overflow: hidden;
  color: #25303b;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   LOCATION
   --------------------------------------------------------- */

.location-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 200px;
  color: #5f6976;
  font-size: 14px;
}

.location-cell>span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

/* ---------------------------------------------------------
   DATE
   --------------------------------------------------------- */

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-cell strong {
  color: #28333f;
  font-size: 14px;
  font-weight: 600;
}

.date-cell small {
  color: #8b949f;
  font-size: 11px;
  font-weight: 400;
}

/* ---------------------------------------------------------
   SCHEDULED
   --------------------------------------------------------- */

.time-cell {
  display: flex;
  align-items: center;
  gap: 5px;
}

.time-cell strong {
  color: #303a45;
  font-size: 13px;
  font-weight: 600;
}

.time-arrow {
  color: #a0a7b0;
  font-size: 12px;
}

/* ---------------------------------------------------------
   ACTUAL TIMES
   --------------------------------------------------------- */

.time-active,
.time-complete {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.time-active {
  background: #eef7f1;
  color: #24764d;
}

.time-complete {
  background: #f1f4f7;
  color: #3c4754;
}

.time-working {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: #fff7e5;
  color: #a06e00;
  font-size: 12px;
  font-weight: 700;
}

.time-empty {
  color: #a0a8b2;
  font-size: 13px;
}

/* ---------------------------------------------------------
   HOURS
   --------------------------------------------------------- */

.hours-cell strong {
  color: #303a45;
  font-size: 14px;
  font-weight: 700;
}

.hours-cell span {
  color: #8d95a0;
  font-size: 13px;
}

.extra-hours-cell strong {
  color: #8b5f00;
}

.total-hours-cell {
  display: inline-flex;
  min-width: 62px;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f7f8fa;
}

.total-hours-cell strong {
  color: #28333f;
  font-size: 13px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   STATUS
   --------------------------------------------------------- */

.time-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.time-status.completed {
  color: #26734c;
  background: #edf8f1;
}

.time-status.completed .status-dot {
  background: #2e8b57;
}

.time-status.working {
  color: #a06e00;
  background: #fff7e7;
}

.time-status.working .status-dot {
  background: #d39a18;
  box-shadow: 0 0 0 3px rgba(211, 154, 24, .10);
}

.time-status.pending {
  color: #6f5aa3;
  background: #f3efff;
}

.time-status.pending .status-dot {
  background: #8066be;
}

.time-status.scheduled {
  color: #5e6875;
  background: #f1f3f5;
}

.time-status.scheduled .status-dot {
  background: #89929d;
}

/* ---------------------------------------------------------
   ACTIONS
   --------------------------------------------------------- */

.action-column {
  text-align: right !important;
}

.time-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.time-action-btn:hover {
  transform: translateY(-1px);
}

.time-action-btn.start {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 7px 16px rgba(206, 29, 34, .15);
}

.time-action-btn.start:hover {
  background: var(--brand-dark);
}

.time-action-btn.end {
  color: #fff;
  background: #343c46;
  box-shadow: 0 7px 16px rgba(52, 60, 70, .12);
}

.time-action-btn.end:hover {
  background: #242b33;
}

.completed-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #28764f;
  font-size: 12px;
  font-weight: 800;
}

/* ---------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------- */

.time-empty-state {
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 24px;
  text-align: center;
}

.time-empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 17px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 23px;
  font-weight: 900;
}

.time-empty-state h4 {
  margin: 0 0 6px;
  color: #28333f;
  font-size: 17px;
  font-weight: 800;
}

.time-empty-state p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */

.time-pagination {
  margin-top: 16px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

  .time-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {

  .time-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-table-header {
    padding: 18px;
  }

  .time-table thead th {
    padding: 12px;
  }

  .time-table tbody td {
    padding: 13px 12px;
  }

}

@media (max-width: 600px) {

  .time-summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .time-summary-card {
    min-height: 78px;
  }

  .time-table-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 17px 15px;
  }

  .time-table-count {
    align-self: flex-start;
  }

  .time-table-wrapper {
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }

  .time-table {
    min-width: 1320px;
  }

  .time-table thead th {
    font-size: 11px;
  }

  .time-table tbody td {
    font-size: 13px;
  }
}

/* =========================================================
   EMPLOYEE PROFILE INFORMATION
   ========================================================= */

.profile-readonly {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 15px;
  background: #f8f9fb;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  transition:
    background .2s ease,
    border-color .2s ease,
    transform .15s ease;
}

.profile-info-item:hover {
  background: #fff;
  border-color: rgba(206, 29, 34, .18);
  transform: translateY(-1px);
}

.profile-info-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}

.profile-info-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-info-content span {
  color: #7b8490;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.profile-info-content strong {
  overflow: hidden;
  color: #26333f;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ---------------------------------------------------------
   PROFILE RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {

  .profile-readonly {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {

  .profile-readonly {
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
  }

  .profile-info-item {
    padding: 12px;
  }

  .profile-info-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .profile-info-content strong {
    font-size: 14px;
  }

}

/* =========================================================
   DISPATCH MODAL
   ========================================================= */

.crm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.crm-modal.is-open {
  display: block;
}

.crm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 27, 35, 0.48);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s ease;
}

.crm-modal.is-open .crm-modal-backdrop {
  opacity: 1;
}

.crm-modal-dialog {
  position: relative;
  z-index: 2;

  width: min(calc(100% - 32px),
      1050px);

  max-height: calc(100vh - 48px);

  margin: 24px auto;

  background: #fff;

  border: 1px solid rgba(0, 0, 0, .06);

  border-radius: 18px;

  box-shadow:
    0 30px 80px rgba(20, 27, 35, .22);

  display: flex;
  flex-direction: column;

  overflow: hidden;

  transform: translateY(14px) scale(.985);

  opacity: 0;

  transition:
    transform .22s ease,
    opacity .22s ease;
}

.crm-modal.is-open .crm-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}


/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */

.crm-modal-header {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 20px;

  border-bottom: 1px solid var(--line);

  background: #fff;
}

.crm-modal-eyebrow {
  color: var(--brand);

  font-size: 11px;

  font-weight: 850;

  letter-spacing: .11em;

  text-transform: uppercase;
}

.crm-modal-header h3 {
  margin: 4px 0 0;

  color: #26333f;

  font-size: 19px;

  font-weight: 850;
}

.crm-modal-close {
  width: 38px;
  height: 38px;

  border: 1px solid var(--line);

  border-radius: 10px;

  background: #f8f9fb;

  color: #697381;

  display: grid;
  place-items: center;

  font-size: 25px;
  line-height: 1;

  cursor: pointer;

  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}

.crm-modal-close:hover {
  background: var(--brand-soft);

  color: var(--brand);

  border-color: rgba(206, 29, 34, .18);
}


/* ---------------------------------------------------------
   BODY
--------------------------------------------------------- */

.crm-modal-body {

  min-height: 180px;

  max-height: calc(100vh - 120px);

  overflow-y: auto;
  overflow-x: hidden;

  padding: 22px;

  background: #f7f8fa;
}

.crm-modal-body>*:first-child {
  margin-top: 0;
}

.crm-modal-body>*:last-child {
  margin-bottom: 0;
}


/* ---------------------------------------------------------
   LOADING
--------------------------------------------------------- */

.crm-modal-loading {

  min-height: 300px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 12px;

  color: #7a8490;

  font-size: 14px;

  font-weight: 700;
}

.crm-spinner {

  width: 32px;
  height: 32px;

  border: 3px solid #e5e8ec;

  border-top-color: var(--brand);

  border-radius: 50%;

  animation:
    crmSpin .7s linear infinite;
}

@keyframes crmSpin {
  to {
    transform: rotate(360deg);
  }
}


/* ---------------------------------------------------------
   MODAL FORM IMPROVEMENTS
--------------------------------------------------------- */

.crm-modal-body .panel {
  box-shadow: none;

  border-radius: 14px;
}

.crm-modal-body .page-head {
  margin-bottom: 0;
}

.crm-modal-body .page-head>div:first-child {
  width: 100%;
}


/* ---------------------------------------------------------
   BODY LOCK
--------------------------------------------------------- */

body.modal-open {
  overflow: hidden;
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 700px) {

  .crm-modal-dialog {
    width: calc(100% - 18px);

    max-height: calc(100vh - 18px);

    margin: 9px auto;

    border-radius: 15px;
  }

  .crm-modal-header {
    min-height: 62px;

    padding: 13px 15px;
  }

  .crm-modal-header h3 {
    font-size: 17px;
  }

  .crm-modal-body {
    padding: 15px;

    max-height: calc(100vh - 80px);
  }

  .crm-modal-close {
    width: 36px;
    height: 36px;
  }

}

/* =========================================================
   FIELD WORKSHEET - FORM DESIGN
   ========================================================= */

.worksheet-page {
  width: 100%;
}

.worksheet-page-head {
  margin-bottom: 22px;
  align-items: flex-end;
}

.worksheet-page-head h2 {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  margin: 4px 0 6px;
  color: var(--ink);
}

.worksheet-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.worksheet-back-btn {
  flex: 0 0 auto;
}


/* =========================================================
   EMPLOYEE LIST
   ========================================================= */

.worksheet-employee-list {
  display: grid;
  gap: 18px;
}


/* =========================================================
   EMPLOYEE CARD
   ========================================================= */

.worksheet-employee-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}


/* =========================================================
   EMPLOYEE HEADER
   ========================================================= */

.worksheet-employee-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 18px 20px;

  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.worksheet-employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.worksheet-avatar {
  width: 46px;
  height: 46px;

  flex: 0 0 46px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: var(--brand-soft);
  color: var(--brand);

  font-size: 16px;
  font-weight: 700;
}

.worksheet-employee-text {
  min-width: 0;
}

.worksheet-employee-text h3 {
  margin: 0;

  color: var(--ink);

  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

.worksheet-employee-meta {
  display: flex;
  align-items: center;
  gap: 7px;

  margin-top: 4px;

  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
}

.meta-divider {
  color: #cbd5e1;
}


/* =========================================================
   STATUS
   ========================================================= */

.worksheet-status-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.worksheet-status-label {
  color: #94a3b8;

  font-size: 11px;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: .05em;
}

.worksheet-status-badge {
  display: inline-flex;
  align-items: center;

  min-width: 92px;
  justify-content: center;

  padding: 7px 12px;

  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
}

.worksheet-status-badge.scheduled {
  background: #fefce8;
  color: #a16207;
}

.worksheet-status-badge.working {
  background: #eff6ff;
  color: #2563eb;
}

.worksheet-status-badge.completed {
  background: var(--success-soft);
  color: var(--success);
}

.worksheet-status-badge.absent {
  background: #fef2f2;
  color: var(--danger);
}


/* =========================================================
   SECTION
   ========================================================= */

.worksheet-section {
  padding: 20px;

  border-bottom: 1px solid #edf0f3;
}

.worksheet-section:last-of-type {
  border-bottom: 0;
}

.worksheet-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 16px;
}

.worksheet-section-icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: #f1f5f9;
  color: #64748b;

  font-size: 14px;
  font-weight: 700;
}

.worksheet-section-icon.extra {
  background: #f5f1ff;
  color: #7659bd;
}

.worksheet-section-icon.notes {
  background: var(--brand-soft);
  color: var(--brand);
}

.worksheet-section-heading h4 {
  margin: 0;

  color: var(--ink);

  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}

.worksheet-section-heading p {
  margin: 3px 0 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.4;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.worksheet-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.worksheet-hours-grid {
  display: grid;
  grid-template-columns:
    minmax(150px, .8fr) minmax(180px, 1fr) minmax(150px, .8fr);
  gap: 15px;
}


/* =========================================================
   FIELD
   ========================================================= */

.worksheet-field {
  min-width: 0;
}

.worksheet-field label {
  display: block;

  margin-bottom: 7px;

  color: #475569;

  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}


/* =========================================================
   INPUTS / SELECT
   ========================================================= */

.worksheet-control {
  width: 100%;
  min-height: 44px;

  padding: 10px 12px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #ffffff;

  color: var(--ink);

  font-family: inherit;
  font-size: 14px;
  font-weight: 400;

  outline: none;

  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.worksheet-control:hover {
  border-color: #cbd5e1;
}

.worksheet-control:focus {
  border-color: rgba(206, 29, 34, .5);

  box-shadow:
    0 0 0 3px rgba(206, 29, 34, .1);
}

.worksheet-control::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

select.worksheet-control {
  cursor: pointer;
}


/* =========================================================
   HOURS WITH UNIT
   ========================================================= */

.input-with-unit {
  position: relative;
}

.input-with-unit .worksheet-control {
  padding-right: 75px;
}

.input-with-unit span {
  position: absolute;

  top: 50%;
  right: 12px;

  transform: translateY(-50%);

  color: #94a3b8;

  font-size: 12px;
  font-weight: 600;

  pointer-events: none;
}


/* =========================================================
   READONLY HOURS
   ========================================================= */

.readonly-hours {
  min-height: 44px;

  display: flex;
  align-items: center;

  gap: 6px;

  padding: 10px 12px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #f8fafc;
}

.readonly-hours strong {
  color: var(--ink);

  font-size: 15px;
  font-weight: 700;
}

.readonly-hours span {
  color: var(--muted);

  font-size: 13px;
  font-weight: 500;
}


/* =========================================================
   NOTES
   ========================================================= */

.worksheet-notes {
  min-height: 105px;

  resize: vertical;

  line-height: 1.5;
}


/* =========================================================
   SAVE BAR
   ========================================================= */

.worksheet-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-top: 18px;
  padding: 16px 18px;

  background: #ffffff;

  border: 1px solid var(--line);
  border-radius: 14px;

  box-shadow: var(--shadow);
}

.worksheet-save-info {
  display: flex;
  align-items: center;

  gap: 10px;
}

.worksheet-save-icon {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: var(--success-soft);
  color: var(--success);

  font-size: 14px;
  font-weight: 700;
}

.worksheet-save-info>div:last-child {
  display: flex;
  flex-direction: column;

  gap: 2px;
}

.worksheet-save-info strong {
  color: var(--ink);

  font-size: 14px;
  font-weight: 700;
}

.worksheet-save-info span {
  color: var(--muted);

  font-size: 13px;
  line-height: 1.4;
}

.worksheet-save-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.worksheet-save-btn {
  min-width: 155px;
  min-height: 44px;
}


/* =========================================================
   MODAL
   ========================================================= */

.crm-modal-body .worksheet-page {
  width: 100%;
}

.crm-modal-body .worksheet-page-head {
  margin-bottom: 14px;
}

.crm-modal-body .worksheet-page-head h2 {
  font-size: 21px;
}

.crm-modal-body .worksheet-employee-list {
  gap: 12px;
}

.crm-modal-body .worksheet-section {
  padding: 16px;
}

.crm-modal-body .worksheet-save-bar {
  margin-top: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {

  .worksheet-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .worksheet-back-btn {
    width: auto;
  }

  .worksheet-hours-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


@media (max-width: 700px) {

  .worksheet-page-head h2 {
    font-size: 22px;
  }

  .worksheet-employee-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .worksheet-status-preview {
    align-items: flex-start;
  }

  .worksheet-form-grid,
  .worksheet-hours-grid {
    grid-template-columns: 1fr;
  }

  .worksheet-section {
    padding: 16px;
  }

  .worksheet-save-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .worksheet-save-actions {
    width: 100%;
  }

  .worksheet-save-actions .btn {
    flex: 1;
  }

}


@media (max-width: 480px) {

  .worksheet-employee-card {
    border-radius: 13px;
  }

  .worksheet-employee-header {
    padding: 15px;
  }

  .worksheet-section {
    padding: 14px;
  }

  .worksheet-employee-text h3 {
    font-size: 16px;
  }

  .worksheet-employee-meta {
    font-size: 12px;
  }

  .worksheet-section-heading h4 {
    font-size: 14px;
  }

  .worksheet-section-heading p {
    font-size: 12px;
  }

  .worksheet-field label {
    font-size: 13px;
  }

  .worksheet-control {
    min-height: 43px;
    font-size: 14px;
  }

  .worksheet-save-bar {
    padding: 14px;
  }

}

/* =========================================================
   TNF CRM LOGIN
   Professional full-screen login
   No page scrolling
   Responsive across desktop / laptop / tablet / mobile
   ========================================================= */


/* ---------------------------------------------------------
   PAGE
   --------------------------------------------------------- */

.tnf-login-page {
  position: relative;

  width: 100%;
  height: 100dvh;
  min-height: 100dvh;

  margin: 0;
  padding: 0;

  overflow: hidden;

  background: #1c2025;

  font-family:
    'Montserrat',
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}


/* ---------------------------------------------------------
   BACKGROUND IMAGE
   --------------------------------------------------------- */

.tnf-login-background {
  position: fixed;

  inset: 0;

  z-index: 0;

  background-image:
    url("../assets/tnf-login-bg.webp");

  background-size: cover;

  background-position: center;

  background-repeat: no-repeat;

  transform: scale(1.01);
}


/* ---------------------------------------------------------
   BACKGROUND OVERLAY
   --------------------------------------------------------- */

.tnf-login-overlay {
  position: fixed;

  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    linear-gradient(90deg,
      rgba(12, 17, 22, 0.16) 0%,
      rgba(255, 255, 255, 0.02) 32%,
      rgba(255, 255, 255, 0.02) 68%,
      rgba(12, 17, 22, 0.16) 100%);

  backdrop-filter: saturate(1.02);
}


/* ---------------------------------------------------------
   LOGIN WRAPPER
   --------------------------------------------------------- */

.tnf-login-wrapper {
  position: relative;

  z-index: 2;

  width: 100%;
  height: 100dvh;

  min-height: 100dvh;

  display: flex;

  align-items: center;
  justify-content: center;

  padding:
    clamp(16px, 3vw, 42px);
}


/* ---------------------------------------------------------
   LOGIN PANEL
   --------------------------------------------------------- */

.tnf-login-panel {
  width: min(100%, 520px);

  max-height: calc(100dvh - 40px);

  padding:
    clamp(26px, 3vw, 42px);

  background:
    rgba(255, 255, 255, 0.96);

  border:
    1px solid rgba(255, 255, 255, 0.85);

  border-radius: 24px;

  box-shadow:
    0 35px 90px rgba(10, 17, 25, 0.18),
    0 10px 35px rgba(10, 17, 25, 0.08);

  backdrop-filter: blur(18px);

  -webkit-backdrop-filter: blur(18px);

  overflow: hidden;
}


/* ---------------------------------------------------------
   LOGO
   --------------------------------------------------------- */

.tnf-login-logo {
  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  margin-bottom:
    clamp(16px, 2vh, 24px);
}

.tnf-login-logo img {
  display: block;

  width:
    clamp(190px, 24vw, 375px);

  height:
    clamp(68px, 9vh, 96px);

  object-fit: contain;

  object-position: center;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.tnf-login-header {
  width: 100%;
}

.tnf-login-eyebrow {
  color: var(--brand);

  font-size:
    clamp(12px, 1vw, 14px);

  line-height: 1.2;

  font-weight: 700;

  letter-spacing: 0.11em;

  text-transform: uppercase;

  margin-bottom: 7px;
}

.tnf-login-header h1 {
  margin: 0 0 8px;

  color: #1e293b;

  font-size:
    clamp(29px, 3vw, 39px);

  line-height: 1.05;

  font-weight: 700;

  letter-spacing: -0.035em;
}

.tnf-login-header p {
  max-width: 470px;

  margin: 0;

  color: #64748b;

  font-size:
    clamp(13px, 1.2vw, 15px);

  line-height: 1.55;

  font-weight: 400;
}


/* ---------------------------------------------------------
   ERROR
   --------------------------------------------------------- */

.tnf-login-alert {
  display: flex;

  align-items: center;

  gap: 9px;

  margin-top: 18px;

  padding: 10px 12px;

  border:
    1px solid #fecaca;

  border-radius: 10px;

  background: #fff5f5;

  color: #b91c1c;

  font-size: 13px;

  line-height: 1.4;

  font-weight: 500;
}

.tnf-alert-icon {
  width: 21px;
  height: 21px;

  flex: 0 0 21px;

  display: grid;

  place-items: center;

  border-radius: 50%;

  background: #dc2626;

  color: #ffffff;

  font-size: 12px;

  font-weight: 700;
}


/* ---------------------------------------------------------
   FORM
   --------------------------------------------------------- */

.tnf-login-form {
  display: grid;

  gap:
    clamp(13px, 2vh, 18px);

  margin-top:
    clamp(20px, 2.8vh, 28px);
}


/* ---------------------------------------------------------
   FORM FIELD
   --------------------------------------------------------- */

.tnf-form-field {
  display: grid;

  gap: 7px;
}

.tnf-form-field label {
  color: #334155;

  font-size: 14px;

  line-height: 1.25;

  font-weight: 600;
}


/* ---------------------------------------------------------
   INPUT WRAPPER
   --------------------------------------------------------- */

.tnf-input-wrap {
  position: relative;

  display: flex;

  align-items: center;
}

.tnf-input-wrap input {
  width: 100%;

  height:
    clamp(46px, 6vh, 53px);

  padding:
    0 44px 0 43px;

  border:
    1px solid #dbe2ea;

  border-radius: 11px;

  outline: none;

  background: rgba(255, 255, 255, 0.98);

  color: #1e293b;

  font-family: inherit;

  font-size: 15px;

  font-weight: 400;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.tnf-input-wrap input::placeholder {
  color: #9aa4b2;

  font-size: 14px;
}

.tnf-input-wrap input:hover {
  border-color: #cbd5e1;
}

.tnf-input-wrap input:focus {
  background: #fff;

  border-color:
    rgba(206, 29, 34, .55);

  box-shadow:
    0 0 0 4px rgba(206, 29, 34, .08);
}


/* ---------------------------------------------------------
   INPUT ICON
   --------------------------------------------------------- */

.tnf-input-icon {
  position: absolute;

  left: 14px;

  z-index: 2;

  color: #94a3b8;

  font-size: 15px;

  font-weight: 600;

  pointer-events: none;
}

.password-icon {
  font-size: 10px;

  letter-spacing: -1px;
}


/* ---------------------------------------------------------
   PASSWORD TOGGLE
   --------------------------------------------------------- */

.tnf-password-toggle {
  position: absolute;

  right: 10px;

  z-index: 2;

  min-width: 42px;

  padding: 7px 8px;

  border: 0;

  border-radius: 7px;

  background: transparent;

  color: #64748b;

  font-family: inherit;

  font-size: 12px;

  font-weight: 600;

  cursor: pointer;
}

.tnf-password-toggle:hover {
  background: #f1f5f9;

  color: #1e293b;
}


/* ---------------------------------------------------------
   REMEMBER
   --------------------------------------------------------- */

.tnf-login-options {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 22px;
}

.tnf-remember {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  color: #64748b;

  font-size: 13px;

  font-weight: 500;

  cursor: pointer;
}

.tnf-remember input {
  width: 16px;
  height: 16px;

  margin: 0;

  accent-color: var(--brand);

  cursor: pointer;
}


/* ---------------------------------------------------------
   BUTTON
   --------------------------------------------------------- */

.tnf-login-button {
  position: relative;

  width: 100%;

  min-height:
    clamp(46px, 6vh, 53px);

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

  border: 0;

  border-radius: 11px;

  background:
    linear-gradient(135deg,
      #d61f25 0%,
      #c91d22 100%);

  color: #ffffff;

  font-family: inherit;

  font-size: 15px;

  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 10px 24px rgba(206, 29, 34, 0.20);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.tnf-login-button:hover {
  background:
    linear-gradient(135deg,
      #c91d22 0%,
      #ae1a1f 100%);

  transform: translateY(-1px);

  box-shadow:
    0 14px 30px rgba(206, 29, 34, 0.25);
}

.tnf-login-button:active {
  transform: translateY(0);
}

.tnf-login-arrow {
  font-size: 18px;

  line-height: 1;

  transition:
    transform .18s ease;
}

.tnf-login-button:hover .tnf-login-arrow {
  transform: translateX(3px);
}


/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

.tnf-login-footer {
  margin-top:
    clamp(14px, 2vh, 20px);

  text-align: center;
}

.tnf-security-line {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 7px;

  color: #64748b;

  font-size: 12px;

  line-height: 1.4;

  font-weight: 500;
}

.tnf-security-dot {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: #16a34a;

  box-shadow:
    0 0 0 3px rgba(22, 163, 74, .10);
}

.tnf-login-footer p {
  margin: 5px 0 0;

  color: #94a3b8;

  font-size: 11px;

  line-height: 1.4;

  font-weight: 400;
}


/* =========================================================
   LAPTOP / SHORT DESKTOP
   ========================================================= */

@media (max-height: 800px) and (min-width: 701px) {
    
 

  .tnf-login-wrapper {
    padding: 15px;
  }

  .tnf-login-panel {
    width: min(100%, 500px);

    padding: 24px 30px;

    border-radius: 20px;

    max-height:
      calc(100dvh - 30px);
  }

  .tnf-login-logo {
    margin-bottom: 12px;
  }

  .tnf-login-logo img {
    width: 220px;
    height: 65px;
  }

  .tnf-login-header h1 {
    font-size: 29px;

    margin-bottom: 6px;
  }

  .tnf-login-header p {
    font-size: 13px;

    line-height: 1.45;
  }

  .tnf-login-form {
    gap: 11px;

    margin-top: 16px;
  }

  .tnf-input-wrap input {
    height: 44px;
  }

  .tnf-login-button {
    min-height: 44px;
  }

  .tnf-login-footer {
    margin-top: 11px;
  }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .tnf-login-wrapper {
    padding: 18px;
  }

  .tnf-login-panel {
    width: min(100%, 490px);
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

  .tnf-login-wrapper {
    align-items: center;

    padding:
      10px;
  }

  .tnf-login-panel {
    width: 100%;

    max-height:
      calc(100dvh - 20px);

    padding:
      22px 18px;

    border-radius: 17px;
  }

  .tnf-login-logo {
    margin-bottom: 10px;
  }

  .tnf-login-logo img {
    width: 210px;

    height: 68px;
  }

  .tnf-login-eyebrow {
    font-size: 11px;
  }

  .tnf-login-header h1 {
    font-size: 25px;
  }

  .tnf-login-header p {
    font-size: 13px;

    line-height: 1.45;
  }

  .tnf-login-form {
    gap: 11px;

    margin-top: 17px;
  }

  .tnf-form-field label {
    font-size: 13px;
  }

  .tnf-input-wrap input {
    height: 43px;

    font-size: 14px;
  }

  .tnf-login-button {
    min-height: 44px;

    font-size: 14px;
  }

  .tnf-login-footer {
    margin-top: 10px;
  }

}


/* =========================================================
   VERY SMALL MOBILE / SHORT SCREEN
   ========================================================= */

@media (max-width: 600px) and (max-height: 700px) {

  .tnf-login-panel {
    padding:
      16px 15px;

    border-radius: 14px;
  }

  .tnf-login-logo {
    margin-bottom: 5px;
  }

  .tnf-login-logo img {
    width: 175px;

    height: 48px;
  }

  .tnf-login-eyebrow {
    font-size: 10px;

    margin-bottom: 3px;
  }

  .tnf-login-header h1 {
    font-size: 22px;

    margin-bottom: 4px;
  }

  .tnf-login-header p {
    font-size: 11px;

    line-height: 1.35;
  }

  .tnf-login-form {
    gap: 8px;

    margin-top: 10px;
  }

  .tnf-form-field {
    gap: 4px;
  }

  .tnf-form-field label {
    font-size: 12px;
  }

  .tnf-input-wrap input {
    height: 38px;

    padding-left: 39px;

    font-size: 13px;
  }

  .tnf-input-wrap input::placeholder {
    font-size: 12px;
  }

  .tnf-login-options {
    min-height: 19px;
  }

  .tnf-remember {
    font-size: 11px;
  }

  .tnf-remember input {
    width: 14px;
    height: 14px;
  }

  .tnf-login-button {
    min-height: 39px;

    font-size: 13px;
  }

  .tnf-login-footer {
    margin-top: 7px;
  }

  .tnf-security-line {
    font-size: 10px;
  }

  .tnf-login-footer p {
    font-size: 9px;

    margin-top: 3px;
  }

}

/* =========================================================
   FINAL ADMIN DASHBOARD MOBILE FIX
   Put this at the VERY END of crm.css
   ========================================================= */

/* ---------------------------------------------------------
   GLOBAL DASHBOARD WIDTH RESET
   --------------------------------------------------------- */

.admin-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  overflow-x: hidden !important;
}

.admin-dashboard .dashboard-metrics {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: grid !important;
}


/* =========================================================
   MOBILE METRICS — EXACTLY 2 COLUMNS
   ========================================================= */

@media screen and (max-width: 680px) {

  .content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    padding-left: 10px !important;
    padding-right: 10px !important;

    overflow-x: hidden !important;
  }

  .main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }


  /* FORCE 2 x 2 style */
  .admin-dashboard .dashboard-metrics,
  .admin-dashboard .metric-grid {
    display: grid !important;

    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    grid-auto-columns: auto !important;

    gap: 10px !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }


  /* Every metric card must stay inside its grid cell */
  .admin-dashboard .dashboard-metric-card,
  .admin-dashboard .metric-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;

    padding: 13px 11px !important;

    overflow: hidden !important;
  }


  /* Icon */
  .admin-dashboard .dashboard-metric-card .metric-icon,
  .admin-dashboard .metric-card .metric-icon {
    width: 31px !important;
    height: 31px !important;

    margin-bottom: 8px !important;

    font-size: 12px !important;

    border-radius: 8px !important;
  }


  /* Label */
  .admin-dashboard .dashboard-metric-card .metric-label,
  .admin-dashboard .metric-card .metric-label {
    width: 100% !important;

    min-width: 0 !important;

    min-height: 30px !important;

    margin: 0 !important;

    color: var(--muted) !important;

    font-size: 11px !important;

    line-height: 1.3 !important;

    font-weight: 500 !important;

    white-space: normal !important;

    overflow-wrap: anywhere !important;
  }


  /* Number */
  .admin-dashboard .dashboard-metric-card .metric-value,
  .admin-dashboard .metric-card .metric-value {
    width: 100% !important;

    min-width: 0 !important;

    margin-top: 4px !important;

    color: var(--ink) !important;

    font-size: 20px !important;

    line-height: 1.1 !important;

    font-weight: 700 !important;

    white-space: nowrap !important;
  }


  /* Description */
  .admin-dashboard .dashboard-metric-card .metric-meta,
  .admin-dashboard .metric-card .metric-meta {
    width: 100% !important;

    min-width: 0 !important;

    min-height: 28px !important;

    margin-top: 5px !important;

    font-size: 10px !important;

    line-height: 1.3 !important;

    white-space: normal !important;

    overflow-wrap: anywhere !important;
  }


  /* -----------------------------------------------------
       DASHBOARD HEADER
       ----------------------------------------------------- */

  .admin-dashboard .dashboard-page-head {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    display: flex !important;

    flex-direction: column !important;

    align-items: stretch !important;

    gap: 12px !important;

    margin-bottom: 16px !important;
  }

  .admin-dashboard .dashboard-page-head>div {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admin-dashboard .dashboard-page-head h2 {
    font-size: 22px !important;

    line-height: 1.15 !important;

    white-space: normal !important;

    overflow-wrap: anywhere !important;
  }

  .admin-dashboard .dashboard-page-head p {
    max-width: 100% !important;

    font-size: 13px !important;

    line-height: 1.45 !important;
  }

  .admin-dashboard .dashboard-create-btn {
    width: 100% !important;
    max-width: 100% !important;
  }


  /* -----------------------------------------------------
       LOWER DASHBOARD GRID
       ----------------------------------------------------- */

  .admin-dashboard .admin-dashboard-grid,
  .admin-dashboard .dashboard-grid {
    display: grid !important;

    grid-template-columns: 1fr !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    gap: 12px !important;
  }


  .admin-dashboard .dashboard-dispatch-panel,
  .admin-dashboard .dashboard-signature-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow: hidden !important;
  }


  /* -----------------------------------------------------
       PANEL HEADER
       ----------------------------------------------------- */

  .admin-dashboard .dashboard-panel-head {
    display: flex !important;

    align-items: flex-start !important;

    justify-content: space-between !important;

    width: 100% !important;

    min-width: 0 !important;

    gap: 8px !important;
  }

  .admin-dashboard .dashboard-panel-head>div {
    min-width: 0 !important;
  }

  .admin-dashboard .dashboard-panel-head h3 {
    font-size: 15px !important;
  }

  .admin-dashboard .dashboard-panel-head p {
    font-size: 12px !important;

    line-height: 1.4 !important;
  }

  .admin-dashboard .dashboard-view-btn {
    flex: 0 0 auto !important;

    min-height: 34px !important;

    padding: 6px 9px !important;

    font-size: 11px !important;
  }


  /* -----------------------------------------------------
       COMPLETELY REMOVE MOBILE TABLE OVERFLOW
       ----------------------------------------------------- */

  .admin-dashboard .dashboard-dispatch-table,
  .admin-dashboard .admin-dashboard-table-wrap {
    width: 100% !important;

    max-width: 100% !important;

    min-width: 0 !important;

    overflow: visible !important;
  }


  .admin-dashboard .admin-dashboard-table {
    width: 100% !important;

    max-width: 100% !important;

    min-width: 0 !important;

    table-layout: auto !important;
  }


  .admin-dashboard .admin-dashboard-table thead {
    display: none !important;
  }


  .admin-dashboard .admin-dashboard-table,
  .admin-dashboard .admin-dashboard-table tbody,
  .admin-dashboard .admin-dashboard-table tr,
  .admin-dashboard .admin-dashboard-table td {
    display: block !important;

    width: 100% !important;

    max-width: 100% !important;

    min-width: 0 !important;
  }


  .admin-dashboard .admin-dashboard-table tbody {
    display: grid !important;

    grid-template-columns: 1fr !important;

    gap: 9px !important;
  }


  /* Dispatch becomes card */
  .admin-dashboard .admin-dashboard-table tbody tr {
    display: block !important;

    width: 100% !important;

    padding: 12px !important;

    margin: 0 !important;

    border: 1px solid var(--line) !important;

    border-radius: 11px !important;

    background: #fff !important;

    box-shadow:
      0 3px 12px rgba(15, 23, 42, .04) !important;
  }


  .admin-dashboard .admin-dashboard-table tbody td {
    display: grid !important;

    grid-template-columns: 75px minmax(0, 1fr) !important;

    align-items: start !important;

    gap: 8px !important;

    width: 100% !important;

    max-width: 100% !important;

    min-width: 0 !important;

    padding: 7px 0 !important;

    border-bottom: 1px solid #eef2f6 !important;

    text-align: right !important;

    font-size: 12px !important;
  }


  .admin-dashboard .admin-dashboard-table tbody td:last-child {
    border-bottom: 0 !important;

    padding-bottom: 0 !important;
  }


  .admin-dashboard .admin-dashboard-table tbody td::before {
    content: attr(data-label);

    color: #94a3b8;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.3;

    text-align: left;

    text-transform: uppercase;

    letter-spacing: .04em;
  }


  .admin-dashboard .admin-dashboard-table tbody td>* {
    min-width: 0 !important;

    max-width: 100% !important;
  }


  .admin-dashboard .dashboard-job-link {
    display: block !important;

    width: 100% !important;

    text-align: right !important;
  }


  .admin-dashboard .dashboard-job-link strong {
    font-size: 12px !important;

    line-height: 1.35 !important;

    white-space: normal !important;

    overflow: visible !important;

    text-overflow: unset !important;

    overflow-wrap: anywhere !important;
  }


  .admin-dashboard .dashboard-job-link span {
    font-size: 10px !important;

    overflow-wrap: anywhere !important;
  }


  .admin-dashboard .dashboard-location {
    display: flex !important;

    align-items: flex-start !important;

    justify-content: flex-end !important;

    width: 100% !important;

    max-width: 100% !important;

    font-size: 11px !important;

    text-align: right !important;
  }


  .admin-dashboard .dashboard-location span {
    min-width: 0 !important;

    overflow-wrap: anywhere !important;
  }


  /* -----------------------------------------------------
       SIGNATURE LIST
       ----------------------------------------------------- */

  .admin-dashboard .dashboard-mini-row {
    width: 100% !important;

    min-width: 0 !important;

    display: flex !important;

    align-items: center !important;

    gap: 8px !important;
  }

  .admin-dashboard .dashboard-mini-row .mini-main {
    min-width: 0 !important;

    flex: 1 1 auto !important;
  }

  .admin-dashboard .dashboard-mini-row .mini-main strong {
    display: block !important;

    max-width: 100% !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    white-space: nowrap !important;

    font-size: 12px !important;
  }

  .admin-dashboard .dashboard-mini-row .mini-main span {
    display: block !important;

    max-width: 100% !important;

    overflow: hidden !important;

    text-overflow: ellipsis !important;

    white-space: nowrap !important;

    font-size: 11px !important;
  }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media screen and (max-width: 380px) {

  .admin-dashboard .dashboard-metrics,
  .admin-dashboard .metric-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap: 8px !important;
  }

  .admin-dashboard .dashboard-metric-card,
  .admin-dashboard .metric-card {
    padding: 11px 9px !important;
  }

  .admin-dashboard .dashboard-metric-card .metric-label {
    font-size: 10px !important;
  }

  .admin-dashboard .dashboard-metric-card .metric-value {
    font-size: 18px !important;
  }

  .admin-dashboard .dashboard-metric-card .metric-meta {
    font-size: 9px !important;
  }

}



/* =========================================================
   TNF FINAL RESPONSIVE UI FIX - 2026-10-08
   This block intentionally comes LAST.
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.crm-shell,
.main,
.content {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
}

.content {
  overflow-x: hidden !important;
}

/* ---------------------------------------------------------
   FINAL HAMBURGER
   --------------------------------------------------------- */

.sidebar-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;

  display: grid !important;
  place-items: center !important;

  background: #ffffff !important;
  color: #475569 !important;

  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;

  outline: none !important;
  opacity: 1 !important;
  visibility: visible !important;

  appearance: none !important;
  -webkit-appearance: none !important;
}

.sidebar-toggle-btn:hover {
  background: #f8fafc !important;
  color: var(--brand) !important;
  border-color: rgba(206, 29, 34, .35) !important;
}

.sidebar-toggle-btn svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  color: #475569 !important;
  stroke: #475569 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.sidebar-toggle-btn svg line,
.sidebar-toggle-btn svg path,
.sidebar-toggle-btn svg polyline {
  stroke: #475569 !important;
  opacity: 1 !important;
}

.sidebar-toggle-btn:hover svg,
.sidebar-toggle-btn:hover svg line,
.sidebar-toggle-btn:hover svg path,
.sidebar-toggle-btn:hover svg polyline {
  stroke: var(--brand) !important;
  color: var(--brand) !important;
}

/* ---------------------------------------------------------
   SIDEBAR CORE
   --------------------------------------------------------- */

.sidebar {
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;
  flex: 0 0 270px !important;
}

.crm-shell.collapsed .sidebar {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  flex-basis: 76px !important;
}

/* ---------------------------------------------------------
   SIDEBAR FOOTER / LOGOUT
   --------------------------------------------------------- */

.sidebar .sidebar-footer {
  width: 100% !important;
  margin-top: auto !important;
  padding: 12px 4px 6px !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;

  flex-shrink: 0 !important;
}

.sidebar .sidebar-logout-form {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar button.sidebar-logout {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 10px !important;
  padding: 0 11px !important;
  margin: 0 !important;

  background: transparent !important;
  color: #64748b !important;

  border: 1px solid transparent !important;
  border-radius: 9px !important;

  box-shadow: none !important;
  outline: none !important;

  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.sidebar button.sidebar-logout:hover {
  background: #fef2f2 !important;
  color: var(--brand) !important;
  border-color: #fecaca !important;
}

.sidebar .sidebar-logout-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex: 0 0 20px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: currentColor !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.sidebar .sidebar-logout-text {
  display: block !important;
  color: inherit !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.sidebar .secure-pill {
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 8px !important;
  padding: 0 10px !important;
  margin: 0 !important;

  background: #f8fafc !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;

  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 500 !important;

  overflow: hidden !important;
}

.sidebar .secure-pill>span:first-child {
  width: 7px !important;
  height: 7px !important;
  min-width: 7px !important;
  flex: 0 0 7px !important;
  border-radius: 50% !important;
  background: #16a34a !important;
}

/* collapsed desktop footer */
@media (min-width: 961px) {
  .crm-shell.collapsed .sidebar .sidebar-footer {
    align-items: center !important;
  }

  .crm-shell.collapsed .sidebar button.sidebar-logout {
    width: 44px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .sidebar-logout-text {
    display: none !important;
  }

  .crm-shell.collapsed .sidebar .secure-pill {
    width: 44px !important;
    height: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .secure-text {
    display: none !important;
  }
}

/* ---------------------------------------------------------
   MOBILE SIDEBAR
   --------------------------------------------------------- */

.sidebar-mobile-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1090 !important;

  display: block !important;

  background: rgba(15, 23, 42, .42) !important;

  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;

  transition: opacity .22s ease, visibility .22s ease !important;
}

.sidebar-mobile-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -290px !important;

    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;

    z-index: 1100 !important;

    flex: none !important;

    height: 100dvh !important;

    transition: left .25s ease !important;
  }

  .sidebar.open {
    left: 0 !important;
  }

  .crm-shell.collapsed .sidebar {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
  }

  .crm-shell.collapsed .sidebar .brand-copy,
  .crm-shell.collapsed .sidebar .nav-label,
  .crm-shell.collapsed .sidebar .nav-link-text,
  .crm-shell.collapsed .sidebar .sidebar-footer {
    display: flex !important;
    opacity: 1 !important;
  }

  .crm-shell.collapsed .sidebar .nav-link {
    justify-content: flex-start !important;
  }

  .crm-shell.collapsed .sidebar .brand {
    justify-content: flex-start !important;
  }

  body.sidebar-open {
    overflow: hidden !important;
  }
}

/* ---------------------------------------------------------
   ADMIN DASHBOARD - DESKTOP
   --------------------------------------------------------- */

.admin-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

.admin-dashboard .metric-grid,
.admin-dashboard .dashboard-metrics {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: grid !important;

  grid-template-columns:
    repeat(4, minmax(0, 1fr)) !important;

  gap: 14px !important;
}

.admin-dashboard .metric-card,
.admin-dashboard .dashboard-metric-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.admin-dashboard .dashboard-grid,
.admin-dashboard .admin-dashboard-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: grid !important;

  grid-template-columns:
    minmax(0, 1.55fr) minmax(300px, .85fr) !important;

  gap: 15px !important;
}

.admin-dashboard .dashboard-grid>*,
.admin-dashboard .admin-dashboard-grid>* {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.admin-dashboard .panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------
   TABLE
   --------------------------------------------------------- */

.admin-dashboard .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.admin-dashboard .table-wrap table {
  width: 100% !important;
  max-width: 100% !important;
}

.admin-dashboard .link,
.admin-dashboard .link strong,
.admin-dashboard .link span {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

/* ---------------------------------------------------------
   MEDIUM
   --------------------------------------------------------- */

@media (max-width: 1200px) {

  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;
  }

  .admin-dashboard .dashboard-grid,
  .admin-dashboard .admin-dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------------------------------------------------------
   MOBILE - 2 COLUMNS
   --------------------------------------------------------- */

@media (max-width: 680px) {
  .content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    padding: 14px 10px !important;

    overflow-x: hidden !important;
  }

  .admin-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* THIS IS THE IMPORTANT FIX */
  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    display: grid !important;

    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    grid-template-rows: auto !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    gap: 10px !important;
  }

  .admin-dashboard .metric-card,
  .admin-dashboard .dashboard-metric-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    padding: 13px 11px !important;
  }

  .admin-dashboard .metric-icon {
    width: 31px !important;
    height: 31px !important;

    margin-bottom: 8px !important;

    font-size: 12px !important;
  }

  .admin-dashboard .metric-label {
    min-width: 0 !important;
    min-height: 29px !important;

    font-size: 11px !important;
    line-height: 1.3 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .admin-dashboard .metric-value {
    margin-top: 4px !important;

    font-size: 20px !important;
    line-height: 1.1 !important;

    white-space: nowrap !important;
  }

  .admin-dashboard .metric-meta {
    min-width: 0 !important;
    min-height: 26px !important;

    margin-top: 4px !important;

    font-size: 10px !important;
    line-height: 1.3 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* lower sections */
  .admin-dashboard .dashboard-grid,
  .admin-dashboard .admin-dashboard-grid {
    display: grid !important;

    grid-template-columns: 1fr !important;

    width: 100% !important;
    min-width: 0 !important;

    gap: 12px !important;
  }

  /* convert dispatch table to cards */
  .admin-dashboard .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    overflow: visible !important;
  }

  .admin-dashboard .table-wrap table,
  .admin-dashboard .table-wrap tbody,
  .admin-dashboard .table-wrap tr,
  .admin-dashboard .table-wrap td {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admin-dashboard .table-wrap table {
    table-layout: auto !important;
  }

  .admin-dashboard .table-wrap thead {
    display: none !important;
  }

  .admin-dashboard .table-wrap tbody {
    display: grid !important;
    gap: 9px !important;
  }

  .admin-dashboard .table-wrap tbody tr {
    width: 100% !important;

    padding: 12px !important;

    border:
      1px solid var(--line) !important;

    border-radius: 11px !important;

    background: #fff !important;
  }

  .admin-dashboard .table-wrap tbody td {
    display: grid !important;

    grid-template-columns:
      72px minmax(0, 1fr) !important;

    gap: 8px !important;

    padding: 7px 0 !important;

    border-bottom:
      1px solid #eef2f6 !important;

    text-align: right !important;

    font-size: 12px !important;
  }

  .admin-dashboard .table-wrap tbody td:last-child {
    border-bottom: 0 !important;
  }

  .admin-dashboard .table-wrap tbody td::before {
    content: attr(data-label);

    color: #94a3b8;

    font-size: 10px;
    font-weight: 700;

    line-height: 1.3;

    text-align: left;

    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .admin-dashboard .table-wrap tbody td>* {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-dashboard .dashboard-page-head {
    width: 100% !important;
    max-width: 100% !important;

    align-items: flex-start !important;
    flex-direction: column !important;

    gap: 10px !important;
  }

  .admin-dashboard .dashboard-create-btn {
    width: 100% !important;
  }
}

/* ---------------------------------------------------------
   VERY SMALL PHONES
   --------------------------------------------------------- */

@media (max-width: 380px) {

  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .admin-dashboard .metric-card,
  .admin-dashboard .dashboard-metric-card {
    padding: 11px 9px !important;
  }

  .admin-dashboard .metric-label {
    font-size: 10px !important;
  }

  .admin-dashboard .metric-value {
    font-size: 18px !important;
  }

  .admin-dashboard .metric-meta {
    font-size: 9px !important;
  }
}


/* =========================================================
   FINAL SIDEBAR FOOTER FIX ONLY
   Fixes the second .secure-pill span being styled as
   another green dot and keeps the footer inside the sidebar.
   ========================================================= */

.sidebar .sidebar-footer {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  margin-top: auto !important;
  padding: 12px 4px 8px !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;

  gap: 8px !important;

  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.sidebar .sidebar-logout-form {
  width: 100% !important;
  max-width: 100% !important;

  margin: 0 !important;
  padding: 0 !important;
}

.sidebar button.sidebar-logout {
  width: 100% !important;
  max-width: 100% !important;

  height: 42px !important;
  min-height: 42px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 10px !important;
  padding: 0 10px !important;

  margin: 0 !important;

  border: 1px solid transparent !important;
  border-radius: 9px !important;

  background: transparent !important;
  color: #64748b !important;

  box-shadow: none !important;
  outline: none !important;

  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;

  cursor: pointer !important;

  appearance: none !important;
  -webkit-appearance: none !important;
}

.sidebar button.sidebar-logout:hover {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: var(--brand) !important;
}

.sidebar .sidebar-logout-icon {
  width: 20px !important;
  min-width: 20px !important;

  height: 20px !important;
  min-height: 20px !important;

  flex: 0 0 20px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: currentColor !important;

  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

.sidebar .sidebar-logout-text {
  display: block !important;

  width: auto !important;
  min-width: 0 !important;

  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  color: inherit !important;

  font-family: inherit !important;

  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;

  white-space: nowrap !important;
}


/* ---------------------------------------------------------
   SECURE WORKSPACE
   IMPORTANT: the original CSS styles ALL .secure-pill span
   elements as dots. This rule restores .secure-text.
   --------------------------------------------------------- */

.sidebar .secure-pill {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  height: 38px !important;
  min-height: 38px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 8px !important;

  padding: 0 12px !important;
  margin: 0 !important;

  background: #f8fafc !important;

  border: 1px solid #dbe3ec !important;
  border-radius: 999px !important;

  color: #64748b !important;

  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;

  overflow: hidden !important;
  box-sizing: border-box !important;
}


/* FIRST span = green status dot */
.sidebar .secure-pill>span:first-child {
  width: 8px !important;
  min-width: 8px !important;

  height: 8px !important;
  min-height: 8px !important;

  flex: 0 0 8px !important;

  display: block !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 50% !important;

  background: var(--success) !important;
}


/* SECOND span = actual text, NOT a dot */
.sidebar .secure-pill>span.secure-text {
  width: auto !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;

  flex: 1 1 auto !important;

  display: block !important;

  margin: 0 !important;
  padding: 0 !important;

  border-radius: 0 !important;

  background: transparent !important;

  color: #64748b !important;

  font-family: inherit !important;

  font-size: 12px !important;
  font-weight: 500 !important;

  line-height: 1 !important;

  white-space: nowrap !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
}


/* ---------------------------------------------------------
   COLLAPSED DESKTOP
   --------------------------------------------------------- */

@media (min-width: 961px) {

  .crm-shell.collapsed .sidebar .sidebar-footer {
    align-items: center !important;
  }

  .crm-shell.collapsed .sidebar button.sidebar-logout {
    width: 44px !important;
    min-width: 44px !important;

    height: 42px !important;
    min-height: 42px !important;

    padding: 0 !important;

    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .sidebar-logout-text {
    display: none !important;
  }

  .crm-shell.collapsed .sidebar .secure-pill {
    width: 44px !important;
    min-width: 44px !important;

    height: 38px !important;
    min-height: 38px !important;

    padding: 0 !important;

    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .secure-text {
    display: none !important;
  }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 960px) {

  .sidebar .sidebar-footer {
    padding: 12px 4px 10px !important;
  }

  .sidebar button.sidebar-logout {
    height: 44px !important;
    min-height: 44px !important;

    font-size: 14px !important;
  }

  .sidebar .secure-pill {
    height: 38px !important;
    min-height: 38px !important;
  }

  .sidebar .secure-pill>span.secure-text {
    white-space: nowrap !important;
  }
}



/* =========================================================
   TNF FINAL LAYOUT FIX
   Fixed sidebar + independent main area + responsive dashboard
   This block is intentionally LAST so it overrides old rules.
   ========================================================= */

/* -----------------------------
   GLOBAL
------------------------------ */

html,
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.crm-shell {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  min-width: 0 !important;
  display: block !important;
  overflow-x: hidden !important;
}

/* -----------------------------
   DESKTOP SIDEBAR
------------------------------ */

@media (min-width: 961px) {

  .sidebar {
    position: fixed !important;

    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;

    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;

    height: 100vh !important;
    height: 100dvh !important;

    padding: 16px 12px !important;

    display: flex !important;
    flex-direction: column !important;

    background: #ffffff !important;
    border-right: 1px solid var(--line) !important;

    z-index: 1000 !important;

    overflow: hidden !important;

    flex-shrink: 0 !important;

    box-sizing: border-box !important;

    transition:
      width .25s cubic-bezier(.4, 0, .2, 1),
      padding .25s cubic-bezier(.4, 0, .2, 1) !important;
  }

  .main {
    width: calc(100% - 270px) !important;
    max-width: calc(100% - 270px) !important;
    min-width: 0 !important;

    margin-left: 270px !important;

    min-height: 100vh !important;

    display: flex !important;
    flex-direction: column !important;

    transition:
      margin-left .25s cubic-bezier(.4, 0, .2, 1),
      width .25s cubic-bezier(.4, 0, .2, 1),
      max-width .25s cubic-bezier(.4, 0, .2, 1) !important;
  }

  /* Collapsed desktop */
  .crm-shell.collapsed .sidebar {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;

    padding: 16px 8px !important;
  }

  .crm-shell.collapsed .main {
    width: calc(100% - 76px) !important;
    max-width: calc(100% - 76px) !important;

    margin-left: 76px !important;
  }

  /* Collapsed nav/footer */
  .crm-shell.collapsed .sidebar .brand {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .crm-shell.collapsed .sidebar .brand-logo {
    width: 42px !important;
    height: 42px !important;
  }

  .crm-shell.collapsed .sidebar .brand-copy,
  .crm-shell.collapsed .sidebar .nav-label,
  .crm-shell.collapsed .sidebar .nav-link-text {
    display: none !important;
  }

  .crm-shell.collapsed .sidebar .nav-link {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .crm-shell.collapsed .sidebar .nav-icon {
    width: auto !important;
    margin: 0 !important;
    font-size: 18px !important;
  }
}

/* -----------------------------
   SIDEBAR NAV SCROLL
------------------------------ */

.sidebar .nav {
  width: 100% !important;

  flex: 1 1 auto !important;
  min-height: 0 !important;

  padding: 12px 0 !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  overscroll-behavior: contain !important;

  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.sidebar .nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar .nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.sidebar .nav::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* -----------------------------
   SIDEBAR FOOTER
------------------------------ */

.sidebar .sidebar-footer {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  flex: 0 0 auto !important;

  margin-top: auto !important;

  padding: 10px 4px 6px !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;

  gap: 8px !important;

  box-sizing: border-box !important;
}

.sidebar .sidebar-logout-form {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar button.sidebar-logout {
  width: 100% !important;

  min-height: 42px !important;
  height: 42px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 10px !important;
  padding: 0 10px !important;
  margin: 0 !important;

  border: 1px solid transparent !important;
  border-radius: 9px !important;

  background: transparent !important;
  color: #64748b !important;

  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;

  cursor: pointer !important;

  appearance: none !important;
  -webkit-appearance: none !important;
  box-shadow: none !important;
}

.sidebar button.sidebar-logout:hover {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: var(--brand) !important;
}

.sidebar .sidebar-logout-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;

  flex: 0 0 20px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: currentColor !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.sidebar .sidebar-logout-text {
  display: block !important;

  min-width: 0 !important;

  color: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;

  white-space: nowrap !important;
}

.sidebar .secure-pill {
  width: 100% !important;
  max-width: 100% !important;

  height: 38px !important;
  min-height: 38px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 8px !important;
  padding: 0 12px !important;
  margin: 0 !important;

  background: #f8fafc !important;
  border: 1px solid #dbe3ec !important;
  border-radius: 999px !important;

  color: #64748b !important;

  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;

  overflow: hidden !important;
}

.sidebar .secure-pill>span:first-child {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;

  flex: 0 0 8px !important;

  display: block !important;

  border-radius: 50% !important;
  background: var(--success) !important;
}

.sidebar .secure-pill>span.secure-text {
  width: auto !important;
  min-width: 0 !important;

  height: auto !important;
  min-height: 0 !important;

  flex: 1 1 auto !important;

  display: block !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border-radius: 0 !important;

  color: #64748b !important;

  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;

  white-space: nowrap !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Collapsed desktop footer */
@media (min-width: 961px) {

  .crm-shell.collapsed .sidebar .sidebar-footer {
    align-items: center !important;
  }

  .crm-shell.collapsed .sidebar button.sidebar-logout {
    width: 44px !important;
    min-width: 44px !important;

    height: 42px !important;

    padding: 0 !important;

    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .sidebar-logout-text {
    display: none !important;
  }

  .crm-shell.collapsed .sidebar .secure-pill {
    width: 44px !important;
    min-width: 44px !important;

    height: 38px !important;

    padding: 0 !important;

    justify-content: center !important;
  }

  .crm-shell.collapsed .sidebar .secure-text {
    display: none !important;
  }
}

/* -----------------------------
   MOBILE SIDEBAR
------------------------------ */

.sidebar-mobile-overlay {
  position: fixed !important;
  inset: 0 !important;

  z-index: 1090 !important;

  display: block !important;

  background: rgba(15, 23, 42, .42) !important;

  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;

  transition:
    opacity .22s ease,
    visibility .22s ease !important;
}

.sidebar-mobile-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 960px) {

  .sidebar {
    position: fixed !important;

    top: 0 !important;
    left: -290px !important;
    bottom: 0 !important;

    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;

    height: 100vh !important;
    height: 100dvh !important;

    z-index: 1100 !important;

    padding: 16px 12px !important;

    display: flex !important;
    flex-direction: column !important;

    transition: left .25s ease !important;
  }

  .sidebar.open {
    left: 0 !important;
  }

  .main,
  .crm-shell.collapsed .main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin-left: 0 !important;
  }

  .crm-shell.collapsed .sidebar {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;

    padding: 16px 12px !important;
  }

  .crm-shell.collapsed .sidebar .brand {
    justify-content: flex-start !important;
  }

  .crm-shell.collapsed .sidebar .brand-copy,
  .crm-shell.collapsed .sidebar .nav-label,
  .crm-shell.collapsed .sidebar .nav-link-text {
    display: grid !important;
    opacity: 1 !important;
  }

  .crm-shell.collapsed .sidebar .nav-link {
    justify-content: flex-start !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .sidebar .nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .sidebar .sidebar-footer {
    flex: 0 0 auto !important;
    margin-top: auto !important;
  }

  body.sidebar-open {
    overflow: hidden !important;
  }
}

/* -----------------------------
   TOPBAR WIDTH SAFETY
------------------------------ */

.topbar {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.topbar-left,
.topbar-actions {
  min-width: 0 !important;
}

.content {
  width: 100% !important;
  max-width: 1600px;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

/* -----------------------------
   HAMBURGER VISIBILITY
------------------------------ */

.sidebar-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;

  display: grid !important;
  place-items: center !important;

  padding: 0 !important;

  background: #ffffff !important;
  color: #475569 !important;

  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;

  opacity: 1 !important;
  visibility: visible !important;

  cursor: pointer !important;
}

.sidebar-toggle-btn svg {
  display: block !important;

  width: 20px !important;
  height: 20px !important;

  stroke: #475569 !important;
  color: #475569 !important;

  opacity: 1 !important;
  visibility: visible !important;
}

.sidebar-toggle-btn svg line,
.sidebar-toggle-btn svg path,
.sidebar-toggle-btn svg polyline {
  stroke: #475569 !important;
  opacity: 1 !important;
}

.sidebar-toggle-btn:hover {
  background: #f8fafc !important;
  color: var(--brand) !important;
  border-color: rgba(206, 29, 34, .35) !important;
}

.sidebar-toggle-btn:hover svg,
.sidebar-toggle-btn:hover svg line,
.sidebar-toggle-btn:hover svg path,
.sidebar-toggle-btn:hover svg polyline {
  stroke: var(--brand) !important;
}

/* -----------------------------
   ADMIN DASHBOARD - DESKTOP
------------------------------ */

.admin-dashboard {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  overflow-x: hidden !important;
}

.admin-dashboard .metric-grid,
.admin-dashboard .dashboard-metrics {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: grid !important;

  grid-template-columns:
    repeat(4, minmax(0, 1fr)) !important;

  gap: 14px !important;
}

.admin-dashboard .metric-card,
.admin-dashboard .dashboard-metric-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  overflow: hidden !important;
}

.admin-dashboard .dashboard-grid,
.admin-dashboard .admin-dashboard-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  display: grid !important;

  grid-template-columns:
    minmax(0, 1.55fr) minmax(280px, .85fr) !important;

  gap: 15px !important;
}

.admin-dashboard .dashboard-grid>*,
.admin-dashboard .admin-dashboard-grid>* {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.admin-dashboard .panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  overflow: hidden !important;
}

.admin-dashboard .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.admin-dashboard .table-wrap table {
  width: 100% !important;
  max-width: 100% !important;
}

.admin-dashboard .link,
.admin-dashboard .link strong,
.admin-dashboard .link span {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

/* Medium desktop/tablet */
@media (max-width: 1200px) and (min-width: 681px) {

  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;
  }

  .admin-dashboard .dashboard-grid,
  .admin-dashboard .admin-dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

/* -----------------------------
   MOBILE DASHBOARD
------------------------------ */

@media (max-width: 680px) {

  .content {
    padding: 14px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .admin-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* EXACTLY 2 COLUMNS */
  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    display: grid !important;

    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap: 10px !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-dashboard .metric-card,
  .admin-dashboard .dashboard-metric-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    padding: 13px 11px !important;
  }

  .admin-dashboard .metric-label {
    min-width: 0 !important;
    min-height: 29px !important;

    font-size: 11px !important;
    line-height: 1.3 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .admin-dashboard .metric-value {
    font-size: 20px !important;
    line-height: 1.1 !important;
  }

  .admin-dashboard .metric-meta {
    min-height: 26px !important;

    font-size: 10px !important;
    line-height: 1.3 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  /* Lower sections */
  .admin-dashboard .dashboard-grid,
  .admin-dashboard .admin-dashboard-grid {
    grid-template-columns: 1fr !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Mobile dashboard table as cards */
  .admin-dashboard .table-wrap {
    overflow: visible !important;
  }

  .admin-dashboard .table-wrap table,
  .admin-dashboard .table-wrap tbody,
  .admin-dashboard .table-wrap tr,
  .admin-dashboard .table-wrap td {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-dashboard .table-wrap table {
    min-width: 0 !important;
    table-layout: auto !important;
  }

  .admin-dashboard .table-wrap thead {
    display: none !important;
  }

  .admin-dashboard .table-wrap tbody {
    display: grid !important;
    gap: 9px !important;
  }

  .admin-dashboard .table-wrap tbody tr {
    padding: 12px !important;

    border: 1px solid var(--line) !important;
    border-radius: 11px !important;

    background: #ffffff !important;
  }

  .admin-dashboard .table-wrap tbody td {
    display: grid !important;

    grid-template-columns:
      72px minmax(0, 1fr) !important;

    gap: 8px !important;

    padding: 7px 0 !important;

    border-bottom: 1px solid #eef2f6 !important;

    text-align: right !important;

    font-size: 12px !important;
  }

  .admin-dashboard .table-wrap tbody td:last-child {
    border-bottom: 0 !important;
  }

  .admin-dashboard .table-wrap tbody td::before {
    content: attr(data-label);

    color: #94a3b8;

    font-size: 10px;
    font-weight: 700;

    line-height: 1.3;

    text-align: left;

    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .admin-dashboard .table-wrap tbody td>* {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .admin-dashboard .dashboard-page-head {
    width: 100% !important;

    align-items: flex-start !important;
    flex-direction: column !important;

    gap: 10px !important;
  }

  .admin-dashboard .dashboard-create-btn {
    width: 100% !important;
  }
}

/* -----------------------------
   VERY SMALL PHONES
------------------------------ */

@media (max-width: 380px) {

  .admin-dashboard .metric-grid,
  .admin-dashboard .dashboard-metrics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap: 8px !important;
  }

  .admin-dashboard .metric-card,
  .admin-dashboard .dashboard-metric-card {
    padding: 11px 9px !important;
  }

  .admin-dashboard .metric-label {
    font-size: 10px !important;
  }

  .admin-dashboard .metric-value {
    font-size: 18px !important;
  }

  .admin-dashboard .metric-meta {
    font-size: 9px !important;
  }
}

/* TNF brand colors — True North red throughout. */
:root {
  --brand: #ce1d22;
  --brand-dark: #ae1a1f;
  --brand-soft: #fef2f2;
  --ink: #1d2e43;
  --muted: #708094;
  --page: #f3f6fa;
  --line: #e4eaf1;
  --success: #258567;
  --success-soft: #ebf7f1;
  --shadow: 0 10px 30px rgba(30, 55, 84, .045), 0 2px 6px rgba(30, 55, 84, .025);
}

body {
  background: #f3f6fa;
}

.crm-shell {
  background: #f3f6fa;
}

.sidebar {
  background: #152b40;
}

.sidebar .nav-link.active {
  color: #fff;
  background: rgba(206, 29, 34, .22);
  box-shadow: inset 3px 0 #ce1d22;
}

.sidebar .nav-link:hover {
  background: rgba(206, 29, 34, .12);
  color: #ff8a8d;
}

.sidebar .nav-link:hover .nav-icon {
  color: #ff8a8d;
}

.sidebar .nav-label {
  color: #99adbf;
}

.btn.primary {
  background: #ce1d22;
  box-shadow: 0 4px 12px rgba(206, 29, 34, .20);
}

.btn.primary:hover {
  background: #ae1a1f;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(206, 29, 34, .45);
  box-shadow: 0 0 0 3px rgba(206, 29, 34, .09);
}

.dashboard-welcome {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 170px;
  padding: 28px 32px;
  margin: 0 0 22px;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(116deg, #18253f 0%, #2c1a2e 57%, #6b1518 100%);
  box-shadow: 0 12px 28px rgba(100, 15, 20, .18);
}

.dashboard-welcome-copy,
.welcome-actions {
  position: relative;
  z-index: 2;
}

.dashboard-welcome .eyebrow {
  color: #ffb3b5;
}

.dashboard-welcome h2 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 31px);
  letter-spacing: -.035em;
  line-height: 1.2;
}

.dashboard-welcome p {
  margin: 0;
  color: rgba(247, 252, 255, .78);
  font-size: 13px;
  line-height: 1.65;
}

.welcome-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  color: rgba(247, 252, 255, .75);
  font-size: 11px;
  letter-spacing: .015em;
}

.welcome-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff8a8d;
  box-shadow: 0 0 0 4px rgba(206, 29, 34, .15);
}

.welcome-meta-separator {
  opacity: .6;
}

.welcome-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
  align-self: flex-start;
}

.welcome-actions .btn {
  min-height: 39px;
  padding: 9px 14px;
  font-size: 12px;
  border-radius: 10px;
}

.welcome-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .08);
}

.welcome-outline:hover {
  background: rgba(255, 255, 255, .14);
}

.welcome-primary {
  background: #fef2f2;
  color: #7a0d10;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, .4);
}

.welcome-primary:hover {
  background: #fff;
  color: #7a0d10;
}

.welcome-decoration {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-decoration-one {
  width: 270px;
  height: 270px;
  right: 11%;
  top: -150px;
}

.welcome-decoration-two {
  width: 360px;
  height: 360px;
  right: -5%;
  bottom: -275px;
  background: rgba(255, 255, 255, .035);
}

.employee-welcome {
  background: linear-gradient(116deg, #18253f 0%, #2c1a2e 58%, #6b1518 100%);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 0 0 20px;
}

.kpi-card {
  min-width: 0;
  padding: 19px 19px 16px;
  border: 1px solid #e7ecf3;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cfe2e5;
  box-shadow: 0 14px 32px rgba(30, 55, 84, .07);
}

.kpi-top,
.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-label {
  color: #708094;
  font-size: 12px;
  font-weight: 600;
}

.kpi-icon,
.tool-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
}

.icon-blue {
  color: #537fbe;
  background: #edf3ff;
}

.icon-green {
  color: #ce1d22;
  background: #fef2f2;
}

.icon-teal {
  color: #ae1a1f;
  background: #fde8e8;
}

.icon-amber {
  color: #a67b2d;
  background: #fbf3df;
}

.icon-rose {
  color: #ab6670;
  background: #fbeced;
}

.kpi-value {
  margin: 12px 0 13px;
  font-size: clamp(25px, 2.3vw, 32px);
  line-height: 1.1;
  color: #1b3046;
  font-weight: 750;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.kpi-value small {
  color: #9aa8b7;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.kpi-footer {
  border-top: 1px solid #f0f3f7;
  padding-top: 11px;
}

.kpi-note {
  min-width: 0;
  color: #8492a3;
  font-size: 10px;
  line-height: 1.35;
}

.kpi-link {
  flex: 0 0 auto;
  color: #ce1d22;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-chart-grid,
.dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: 17px;
  margin-bottom: 18px;
  align-items: stretch;
}

.dashboard-panel {
  min-width: 0;
  padding: 21px;
  border: 1px solid #e6ecf3;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.panel-overline {
  display: block;
  margin-bottom: 7px;
  color: #94a2b2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.dashboard-panel-head h3 {
  margin: 0;
  color: #20354b;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.dashboard-panel-head p {
  margin: 5px 0 0;
  color: #8996a6;
  font-size: 11px;
  line-height: 1.5;
}

.chart-period-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #e8eef4;
  border-radius: 9px;
  color: #718196;
  background: #fafbfd;
  font-size: 10px;
  font-weight: 650;
}

.chart-stage {
  position: relative;
  width: 100%;
}

.chart-stage-large {
  height: 235px;
}

.chart-stage-donut {
  height: 180px;
  max-width: 220px;
  margin: 0 auto 12px;
}

.chart-legend {
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

.chart-legend span {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  color: #748297;
  font-size: 11px;
}

.chart-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 3px;
}

.chart-legend strong {
  color: #2b3c50;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.coverage-summary {
  margin: 0 0 10px;
  padding: 13px 14px;
  border: 1px solid #edf1f6;
  border-radius: 12px;
  background: #f9fbfd;
}

.coverage-summary>div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.coverage-label {
  color: #7b8a9c;
  font-size: 11px;
  font-weight: 600;
}

.coverage-summary strong {
  color: #23394e;
  font-size: 20px;
  font-weight: 750;
}

.coverage-summary strong small {
  color: #8592a2;
  font-size: 10px;
  font-weight: 500;
}

.coverage-progress {
  overflow: hidden;
  height: 6px;
  margin: 11px 0 7px;
  border-radius: 99px;
  background: #e5edf3;
}

.coverage-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67b8ac, #3b8d91);
  transition: width .3s ease;
}

.coverage-caption {
  color: #8b98a8;
  font-size: 10px;
}

.operations-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.operations-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.operations-table th {
  padding: 12px 10px;
  border-bottom: 1px solid #edf1f6;
  color: #96a2b0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.operations-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #f0f3f7;
  color: #5a6c81;
  font-size: 11px;
  vertical-align: middle;
}

.operations-table tr:last-child td {
  border-bottom: 0;
}

.operations-primary {
  display: block;
  max-width: 210px;
  overflow: hidden;
  color: #283f56;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-secondary {
  display: block;
  margin-top: 4px;
  color: #98a4b2;
  font-size: 9px;
  font-weight: 500;
}

.team-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #426b85;
  font-weight: 700;
}

.nowrap {
  white-space: nowrap;
}

.table-more {
  display: inline-grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #e8eef4;
  border-radius: 8px;
  color: #6d8299;
  background: #fff;
}

.table-more:hover {
  color: #277d82;
  background: #f0faf8;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  color: #66788c;
  background: #f0f3f7;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.status-scheduled,
.status-published {
  background: #edf3ff;
  color: #5278b6 !important;
}

.status-active,
.status-in_progress,
.status-working {
  background: #e9f7f3;
  color: #2c846e !important;
}

.status-completed,
.status-accepted,
.status-approved {
  background: #eaf7ef;
  color: #317f5e;
}

.status-draft,
.status-assigned,
.status-notified,
.status-pending,
.status-submitted {
  background: #fbf3df;
  color: #96712b;
}

.status-cancelled,
.status-declined,
.status-no_show,
.status-rejected {
  background: #fbedef;
  color: #a85e69;
}

.dashboard-empty {
  text-align: center;
  padding: 22px 10px !important;
  white-space: normal;
}

.dashboard-empty .empty-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 11px;
  color: #4f8c92;
  background: #e9f6f4;
  font-size: 18px;
}

.dashboard-empty strong {
  display: block;
  color: #31455a;
  font-size: 12px;
}

.dashboard-empty p {
  margin: 6px 0 12px;
  color: #8c99a9;
  font-size: 10px;
}

.text-action {
  color: #287d83;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-pagination {
  padding-top: 10px;
}

.attention-panel {
  padding: 21px 18px;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f6;
}

.attention-row:last-of-type {
  border-bottom: 0;
}

.attention-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 750;
}

.attention-amber {
  color: #a17b2d;
  background: #fbf3df;
}

.attention-blue {
  color: #5f83c1;
  background: #edf3ff;
}

.attention-rose {
  color: #ad6774;
  background: #fbeced;
}

.attention-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.attention-copy strong {
  color: #31465b;
  font-size: 11px;
}

.attention-copy small {
  color: #8a98a8;
  font-size: 9px;
}

.attention-number {
  min-width: 22px;
  color: #263c53;
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.attention-arrow {
  color: #9eacba;
  font-size: 13px;
}

.attention-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 13px 0;
  padding: 10px;
  border-radius: 9px;
  color: #7f8d9e;
  background: #f7fafc;
  font-size: 9px;
}

.attention-footnote .welcome-live-dot {
  width: 6px;
  height: 6px;
}

.pending-doc-heading {
  margin: 16px 0 5px;
  color: #8896a5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pending-doc-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
}

.pending-doc-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 34px;
  border: 1px solid #f3d9da;
  border-radius: 7px;
  color: #bc767c;
  background: #fff7f7;
  font-size: 8px;
  font-weight: 800;
}

.pending-doc-row>span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.pending-doc-row strong {
  overflow: hidden;
  color: #33485e;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-doc-row small {
  color: #93a0ae;
  font-size: 9px;
}

.employee-shift-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 20px;
  padding: 23px 27px;
  border: 1px solid #dbece9;
  border-radius: 18px;
  background: linear-gradient(115deg, #eff9f6, #f8fbfd 68%);
  box-shadow: var(--shadow);
}

.employee-shift-main {
  min-width: 0;
}

.employee-shift-main h3 {
  margin: 4px 0 8px;
  color: #203a4d;
  font-size: 20px;
  letter-spacing: -.025em;
}

.employee-shift-main>p {
  margin: 0;
  color: #687d8c;
  font-size: 11px;
  line-height: 1.6;
}

.employee-shift-main>p span {
  color: #287d83;
}

.employee-shift-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 13px;
  color: #708695;
  font-size: 10px;
}

.employee-shift-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 11px;
}

.employee-shift-actions form {
  margin: 0;
}

.employee-shift-actions .status-pill {
  margin-bottom: 1px;
}

.btn-muted {
  color: #536e80;
  background: #edf3f7;
  border: 1px solid #dfe8ee;
}

.btn-muted:hover {
  background: #e3edf2;
}

.employee-shift-empty {
  align-items: center;
}

.employee-shift-empty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #328783;
  background: #dff2ee;
  font-size: 21px;
}

.employee-dashboard-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .9fr);
}

.profile-dashboard-card {
  overflow: hidden;
}

.profile-dashboard-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 5px 0 18px;
  padding: 14px;
  border-radius: 13px;
  background: #f7fafc;
}

.profile-avatar-large {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #2e7682;
  background: #e0f1f1;
  font-size: 14px;
  font-weight: 800;
}

.profile-summary-text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-summary-text strong {
  color: #273d53;
  font-size: 12px;
}

.profile-summary-text>span {
  color: #8090a0;
  font-size: 10px;
}

.profile-status-dot {
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-status-dot i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #46a681;
}

.profile-data-list {
  display: grid;
  gap: 0;
}

.profile-data-list>div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid #f0f3f6;
  font-size: 10px;
}

.profile-data-list>div:last-child {
  border-bottom: 0;
}

.profile-data-list span {
  color: #8a98a8;
}

.profile-data-list strong {
  color: #33495f;
  font-weight: 700;
  text-align: right;
}

.employee-upcoming-list {
  display: grid;
}

.employee-upcoming-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid #edf1f6;
}

.employee-upcoming-item:last-child {
  border-bottom: 0;
}

.date-block {
  display: grid;
  place-items: center;
  align-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 49px;
  border: 1px solid #e0eaf0;
  border-radius: 11px;
  color: #377b84;
  background: #f3faf9;
}

.date-block strong {
  font-size: 17px;
  line-height: 1.15;
}

.date-block small {
  margin-top: 3px;
  color: #829ba4;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.employee-upcoming-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.employee-upcoming-copy strong {
  overflow: hidden;
  color: #30465b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-upcoming-copy small {
  overflow: hidden;
  color: #8492a2;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-upcoming-status {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  color: #65819a;
  font-size: 9px;
  font-weight: 700;
}

.employee-upcoming-status b {
  color: #9ba9b6;
  font-size: 13px;
}

.employee-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-tool-grid a {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e9eef3;
  border-radius: 13px;
  background: #fbfcfe;
  transition: border-color .18s ease, transform .18s ease;
}

.employee-tool-grid a:hover {
  transform: translateY(-1px);
  border-color: #cfe3e3;
}

.employee-tool-grid .tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 15px;
}

.employee-tool-grid strong {
  color: #354a5f;
  font-size: 10px;
}

.employee-tool-grid small {
  color: #8b99a8;
  font-size: 9px;
  line-height: 1.35;
}

.employee-tool-grid b {
  position: absolute;
  top: 14px;
  right: 13px;
  color: #a1adba;
  font-size: 12px;
}

/* Modal shell used by create/edit/detail pages. */
.tnf-modal-backdrop[hidden] {
  display: none !important;
}

.tnf-modal-backdrop {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(13, 30, 46, .56);
  backdrop-filter: blur(5px);
}

.tnf-modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(100%, 900px);
  max-height: min(88vh, 860px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(12, 35, 56, .25);
  animation: tnfModalIn .16s ease-out;
}

.tnf-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 10px 15px 10px 21px;
  border-bottom: 1px solid #edf1f6;
  background: #fbfcfe;
}

.tnf-modal-context {
  overflow: hidden;
  color: #7c8b9b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.tnf-modal-x {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e6ecf2;
  border-radius: 10px;
  color: #667b8d;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tnf-modal-x:hover {
  color: #204f5e;
  background: #eef7f6;
}

.tnf-modal-body {
  overflow: auto;
  min-height: 120px;
  padding: 23px;
  overscroll-behavior: contain;
}

.tnf-modal-body>[data-modal-content] {
  max-width: 100%;
}

.tnf-modal-body .page-head {
  margin-top: 0;
}

.tnf-modal-body .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin: 0 0 17px;
}

.tnf-modal-body .modal-title,
.tnf-modal-body h2 {
  margin-top: 2px;
}

.tnf-modal-body .modal-body {
  padding: 0;
}

.tnf-modal-body .modal-footer-actions,
.tnf-modal-body .form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.tnf-modal-body .panel {
  box-shadow: none;
}

.tnf-modal-loading {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #7c8b9b;
  font-size: 12px;
}

.tnf-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid #dce8eb;
  border-top-color: #287d83;
  border-radius: 50%;
  animation: tnfSpin .7s linear infinite;
}

.tnf-modal-error {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
}

.tnf-modal-error h3 {
  margin: 0;
  color: #283e53;
  font-size: 17px;
}

.tnf-modal-error p {
  margin: 0 0 8px;
  color: #7f8fa0;
  font-size: 12px;
}

.tnf-modal-error-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #aa6870;
  background: #fbeced;
  font-size: 18px;
  font-weight: 800;
}

body.tnf-modal-open {
  overflow: hidden;
}

.modal-backdrop:not(.active) {
  display: none !important;
}

@keyframes tnfSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tnfModalIn {
  from {
    opacity: .7;
    transform: translateY(8px) scale(.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-grid,
  .dashboard-lower-grid,
  .employee-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .chart-stage-donut {
    max-width: 250px;
  }
}

@media (max-width: 760px) {
  .dashboard-welcome {
    display: block;
    padding: 23px 21px;
    border-radius: 17px;
  }

  .dashboard-welcome h2 {
    max-width: 90%;
    font-size: 24px;
  }

  .welcome-actions {
    margin-top: 18px;
    align-self: auto;
  }

  .welcome-decoration-one {
    right: -75px;
  }

  .kpi-grid {
    gap: 10px;
  }

  .kpi-card {
    padding: 15px;
    border-radius: 14px;
  }

  .kpi-icon {
    width: 31px;
    height: 31px;
    border-radius: 10px;
    font-size: 15px;
  }

  .kpi-value {
    margin: 11px 0;
    font-size: 25px;
  }

  .kpi-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-panel {
    padding: 17px 15px;
    border-radius: 15px;
  }

  .dashboard-chart-grid,
  .dashboard-lower-grid {
    gap: 12px;
    margin-bottom: 12px;
  }

  .chart-stage-large {
    height: 205px;
  }

  .chart-stage-donut {
    height: 165px;
  }

  .dashboard-panel-head h3 {
    font-size: 15px;
  }

  .operations-table {
    min-width: 650px;
  }

  .employee-shift-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
    padding: 20px;
  }

  .employee-shift-actions {
    align-items: flex-start;
    width: 100%;
  }

  .employee-shift-empty {
    align-items: flex-start;
  }

  .employee-tool-grid {
    gap: 8px;
  }

  .employee-tool-grid a {
    padding: 12px;
  }

  .tnf-modal-backdrop {
    padding: 8px;
    place-items: end center;
  }

  .tnf-modal-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 17px 17px 12px 12px;
  }

  .tnf-modal-body {
    padding: 17px 14px;
  }

  .tnf-modal-body .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-label {
    font-size: 10px;
  }

  .kpi-icon {
    width: 28px;
    height: 28px;
  }

  .kpi-value {
    font-size: 23px;
  }

  .kpi-note {
    font-size: 9px;
  }

  .kpi-link {
    font-size: 9px;
  }

  .welcome-actions .btn {
    flex: 1;
    padding: 8px 9px;
  }

  .employee-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-upcoming-status {
    display: none;
  }
}

/* Field-operation form refinements */
.page-kpi-grid {
  margin: 0 0 18px;
}

.table-subtext {
  display: block;
  margin-top: 4px;
  color: #8291a1;
  font-size: 11px;
  line-height: 1.4;
}

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9eff3;
}

.form-section-heading:first-child {
  margin-top: 0;
}

.form-section-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #287d83;
  background: #e6f4f1;
  font-size: 11px;
  font-weight: 800;
}

.form-section-heading strong {
  display: block;
  color: #293f53;
  font-size: 14px;
}

.form-section-heading small {
  display: block;
  margin-top: 3px;
  color: #8292a0;
  font-size: 11px;
}

.shift-requirements-editor {
  display: grid;
  gap: 8px;
}

.shift-requirement-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(110px, .5fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8eef3;
  border-radius: 12px;
  background: #fbfcfe;
}

.employee-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-assignment-row {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e6edf2;
  border-radius: 12px;
  background: #fff;
}

.assignment-employee-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
}

.assignment-employee-check input {
  accent-color: #287d83;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.assignment-employee-check span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.assignment-employee-check strong {
  color: #2b4256;
  font-size: 12px;
}

.assignment-employee-check small {
  color: #8795a4;
  font-size: 10px;
}

.assignment-role-select {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 0;
}

.assignment-role-select label {
  margin: 0;
  color: #7b8b9b;
  font-size: 10px;
}

.inline-review-form {
  display: inline-flex;
  margin: 0 3px 3px 0;
}

.timeoff-review-form {
  display: grid;
  gap: 7px;
  min-width: 150px;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.availability-day {
  padding: 14px;
  border: 1px solid #e7edf3;
  border-radius: 13px;
  background: #fff;
}

.availability-day-head {
  padding-bottom: 11px;
  color: #33485e;
  font-size: 12px;
  font-weight: 750;
}

.availability-day-head input {
  accent-color: #287d83;
  margin-right: 7px;
}

.availability-day .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.availability-note {
  width: 100%;
  margin-top: 8px;
}

.availability-panel {
  margin-bottom: 16px;
}

@media(max-width:760px) {

  .shift-requirement-row,
  .employee-assignment-grid,
  .availability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .assignment-role-select {
    grid-template-columns: 85px minmax(0, 1fr);
  }
}

.timesheet-resubmit-form {
  display: grid;
  min-width: 140px;
  gap: 5px;
}

.timesheet-resubmit-form input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e1e8ef;
  border-radius: 7px;
  font-size: 10px;
}

.employee-response-actions {
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid #dfeeea;
  border-radius: 12px;
  background: #f5fbf9;
}

.employee-response-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.calendar-week-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #fff;
}

.calendar-week-bar strong {
  color: #30465a;
  font-size: 13px;
}

.shift-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  align-items: stretch;
}

.calendar-day-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4eaf0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(33, 57, 81, .035);
}

.calendar-day-heading {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 12px 5px;
  border-bottom: 1px solid #ebf0f4;
  background: #f9fbfc;
}

.calendar-day-heading span {
  color: #7f91a0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.calendar-day-heading strong {
  margin-top: 4px;
  color: #30475b;
  font-size: 24px;
  line-height: 1.15;
}

.calendar-day-heading small {
  margin-top: 3px;
  color: #96a4b1;
  font-size: 9px;
}

.calendar-day-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
}

.calendar-shift-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #e1eceb;
  border-left: 3px solid #6bb5ad;
  border-radius: 9px;
  background: #f8fcfb;
}

.calendar-shift-time {
  color: #287d83;
  font-size: 9px;
  font-weight: 800;
}

.calendar-shift-card strong {
  color: #33495d;
  font-size: 10px;
  line-height: 1.4;
}

.calendar-shift-card>span:not(.calendar-shift-time) {
  color: #8191a0;
  font-size: 9px;
  line-height: 1.35;
}

.calendar-shift-meta {
  display: grid;
  gap: 6px;
  margin-top: 3px;
}

.calendar-shift-meta .status-pill {
  width: fit-content;
}

.calendar-no-shifts {
  padding: 16px 4px;
  color: #a0acb8;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

@media(max-width:1250px) {
  .shift-calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media(max-width:760px) {
  .shift-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-week-bar {
    flex-wrap: wrap;
  }

  .calendar-week-bar strong {
    order: -1;
    width: 100%;
  }

  .calendar-filter {
    align-items: stretch;
  }
}

/* Employee document + electronic-signature workflow (TNF palette) */
.employee-edit-head {
  align-items: center;
}

.employee-edit-panel {
  margin-bottom: 20px;
}

.employee-edit-form .form-grid {
  gap: 14px 16px;
}

.employee-documents-panel {
  overflow: hidden;
  padding: 0;
}

.employee-documents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #eadfce;
}

.employee-documents-head h3 {
  margin: 0;
  color: #24231f;
  font-size: 18px;
}

.employee-documents-head p {
  margin: 6px 0 0;
  color: #80796f;
  font-size: 11px;
  line-height: 1.6;
}

.employee-documents-head .eyebrow {
  margin-bottom: 6px;
  color: #a27525;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.employee-documents-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding: 12px 18px;
  border-bottom: 1px solid #ece3d6;
  background: #fcfaf6;
}

.employee-document-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 295px);
  padding: 0 12px;
  border: 1px solid #e1d4c0;
  border-radius: 11px;
  background: #fff;
  color: #9b8d75;
}

.employee-document-search span {
  font-size: 20px;
  line-height: 1;
}

.employee-document-search input {
  min-width: 0;
  width: 100%;
  height: 39px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  box-shadow: none;
}

.employee-documents-filters select {
  height: 39px;
  min-width: 140px;
  padding: 0 30px 0 10px;
  border: 1px solid #e1d4c0;
  border-radius: 11px;
  background: #fff;
  font-size: 11px;
}

.employee-documents-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.employee-documents-table {
  min-width: 1160px;
  margin: 0;
}

.employee-documents-table thead th {
  padding: 13px 11px;
  border-bottom: 1px solid #e6d9c6;
  background: #faf7f0;
  color: #756c5f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.employee-documents-table tbody td {
  padding: 15px 11px;
  border-bottom: 1px solid #eee4d7;
  color: #57534d;
  font-size: 11px;
  vertical-align: middle;
}

.employee-documents-table tbody tr:last-child td {
  border-bottom: 0;
}

.employee-documents-table tbody tr:nth-child(even) {
  background: #fffdf9;
}

.employee-doc-name {
  min-width: 135px;
  max-width: 185px;
}

.employee-doc-name strong {
  display: block;
  color: #27251f;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.employee-doc-name small {
  display: block;
  margin-top: 4px;
  color: #93897b;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.document-category-chip,
.document-state-chip,
.document-field-count,
.document-sign-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

.document-category-chip {
  border-color: #e8cc8e;
  background: #fbf2dc;
  color: #946315;
}

.document-state-chip.is-active {
  border-color: #b9dec8;
  background: #eff8f1;
  color: #2c8052;
}

.document-state-chip.is-archived {
  border-color: #d8d7d2;
  background: #f4f3ef;
  color: #746f67;
}

.document-check {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #abd5b9;
  border-radius: 50%;
  color: #23804e;
  font-size: 13px;
  font-weight: 800;
}

.document-field-count {
  min-width: 22px;
  border-color: #e8cc8e;
  background: #fbf2dc;
  color: #946315;
}

.document-sign-state.is-verified {
  border-color: #b9dec8;
  background: #eff8f1;
  color: #28764b;
}

.document-sign-state.is-pending {
  border-color: #f1c9a5;
  background: #fff5e9;
  color: #9b6320;
}

.document-sign-state.is-awaiting {
  border-color: #b9d7f7;
  background: #eff6ff;
  color: #2c67a6;
}

.document-sign-state.is-neutral {
  border-color: #d8d7d2;
  background: #f7f6f3;
  color: #716b61;
}

.document-expired {
  color: #be3838 !important;
}

.document-expired-tag {
  display: flex;
  width: max-content;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid #f1c2c2;
  border-radius: 99px;
  color: #b83434;
  background: #fff0f0;
  font-size: 9px;
  font-weight: 800;
}

.employee-doc-actions {
  min-width: 360px;
}

.employee-doc-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 485px;
}

.employee-doc-action-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 29px;
  padding: 6px 9px;
  border: 1px solid #e2d5c1;
  border-radius: 8px;
  background: #fffdf9;
  color: #715f42;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.employee-doc-action-row .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 54, 15, .08);
}

.employee-doc-action-row .btn.blue {
  border-color: #c8dafa;
  background: #f0f6ff;
  color: #2c66a1;
}

.employee-doc-action-row .btn.green {
  border-color: #b9dfc6;
  background: #eff9f2;
  color: #247b4b;
}

.employee-doc-action-row .btn.danger {
  border-color: #f0c5c5;
  background: #fff2f2;
  color: #bd3838;
}

.employee-doc-action-row .btn.is-disabled,
.employee-doc-action-row .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.inline-document-action {
  display: inline-flex;
  margin: 0;
}

.employee-documents-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid #eadfce;
  background: #fcfaf6;
  color: #8a8072;
  font-size: 10px;
}

.employee-documents-footer .pagination,
.employee-documents-footer nav {
  margin: 0;
}

.employee-docs-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 38px 12px;
  text-align: center;
}

.employee-docs-empty strong {
  color: #454039;
  font-size: 13px;
}

.employee-docs-empty span {
  color: #968b7c;
  font-size: 11px;
}

.document-modal-root,
.document-preview-modal {
  color: #292721;
}

.document-modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 22px 24px 17px;
  border-bottom: 1px solid #eadfce;
  background: #fffdfa;
}

.document-modal-heading .eyebrow {
  margin-bottom: 6px;
  color: #a27525;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.document-modal-heading h2 {
  margin: 0;
  color: #24231f;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.document-modal-heading p {
  margin: 6px 0 0;
  color: #8b8378;
  font-size: 11px;
  line-height: 1.5;
}

.document-modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border: 1px solid #e6d8c5;
  border-radius: 11px;
  background: #fff;
  color: #8a7b63;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.document-modal-close:hover {
  border-color: #c49a4b;
  color: #8c631b;
  background: #faf4e8;
}

.document-form {
  padding: 20px 24px 0;
}

.document-form .form-grid {
  gap: 18px 16px;
}

.document-form .field label {
  margin-bottom: 7px;
  color: #37342e;
  font-size: 11px;
  font-weight: 750;
}

.document-form .field input:not([type=checkbox]):not([type=file]),
.document-form .field select,
.document-form .field textarea {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #e2d2ba;
  border-radius: 11px;
  background: #fff;
  color: #292721;
  font-size: 12px;
  box-shadow: none;
}

.document-form .field textarea {
  min-height: 82px;
  resize: vertical;
}

.document-form .field input:focus,
.document-form .field select:focus,
.document-form .field textarea:focus {
  border-color: #c3943a;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(185, 135, 37, .12);
}

.required-mark {
  color: #bd7c20;
}

.document-file-picker {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px dashed #d7bf97;
  border-radius: 11px;
  background: #fcfaf6;
  color: #a57928 !important;
  cursor: pointer;
  text-align: center;
}

.document-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.document-file-picker span {
  font-size: 11px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: #8b8172;
  font-size: 9px;
  line-height: 1.5;
}

.document-checkbox-row {
  display: flex !important;
  align-items: flex-start;
  gap: 9px;
  padding: 7px 0;
  cursor: pointer;
}

.document-checkbox-row input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #b98725;
}

.document-checkbox-row span {
  display: grid;
  gap: 4px;
}

.document-checkbox-row strong {
  font-size: 10px;
  font-weight: 650;
}

.document-checkbox-row small {
  color: #8a8175;
  font-size: 9px;
  line-height: 1.5;
  font-weight: 500;
}

.document-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px -24px 0;
  padding: 14px 24px;
  border-top: 1px solid #ece2d4;
  background: #fcfaf6;
}

.document-modal-footer .btn {
  min-height: 40px;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 11px;
}

.document-alert {
  margin: 16px 24px 0;
  padding: 12px 14px;
  border: 1px solid #efd8a9;
  border-radius: 10px;
  background: #fff8e8;
  color: #82601d;
  font-size: 11px;
  line-height: 1.6;
}

.document-alert strong {
  display: block;
  margin-bottom: 3px;
}

.document-send-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 18px 24px 0;
  padding: 13px;
  border: 1px solid #e9ddca;
  border-radius: 12px;
  background: #fcfaf6;
}

.document-file-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f4e9d4;
  color: #9b6c18;
  font-size: 10px;
  font-weight: 900;
}

.document-send-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-send-summary strong {
  overflow-wrap: anywhere;
  color: #2b2923;
  font-size: 12px;
}

.document-send-summary small {
  color: #8b8070;
  font-size: 10px;
}

.document-send-modal .document-form {
  padding-top: 17px;
}

.document-send-notice {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 3px solid #b98725;
  border-radius: 7px;
  background: #faf5ea;
  color: #665b49;
  font-size: 10px;
  line-height: 1.6;
}

.document-send-notice strong {
  color: #7d5b1c;
  font-size: 10px;
}

.document-preview-modal {
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.document-preview-frame {
  display: grid;
  place-items: center;
  min-height: 370px;
  background: #eff1f4;
}

.document-preview-frame iframe {
  width: 100%;
  height: min(68vh, 720px);
  border: 0;
  background: #fff;
}

.document-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.document-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px;
  border-top: 1px solid #eadfce;
  background: #fcfaf6;
  color: #8a8072;
  font-size: 10px;
}

.signature-config-root {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: min(82vh, 820px);
  color: #25241f;
}

.document-preview-page {
  width: min(100%, 900px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #eadfce;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.document-preview-page .document-preview-frame {
  min-height: 250px;
}

.document-preview-page .document-preview-frame iframe {
  height: min(52vh, 520px);
}

.signature-config-page {
  width: 100%;
  min-height: calc(100vh - 220px);
}

.signature-config-page .signature-config-root {
  height: calc(100vh - 220px);
  min-height: 680px;
  border: 1px solid #dce0e6;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.document-preview-page .document-modal-close,
.signature-config-page .document-modal-close,
.signature-config-page [data-close-modal] {
  display: none;
}

.document-workspace-body {
  margin: 0;
  min-width: 0;
  background: #dfe3e9;
}

.document-workspace-content {
  min-height: 100vh;
}

.document-workspace-content .signature-config-page {
  min-height: 100vh;
}

.document-workspace-content .signature-config-page .signature-config-root {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.document-workspace-page-head {
  margin: 0;
  padding: 28px clamp(20px, 4vw, 64px);
  background: #1d1b17;
  border-bottom: 3px solid #b98725;
  color: #fff;
}

.document-workspace-page-head h2,
.document-workspace-page-head .eyebrow {
  color: #fff;
}

.document-workspace-page-head p {
  color: #e1c681;
}

.document-workspace-page-head .btn.light {
  border-color: #e1c681;
  color: #fff;
  background: transparent;
}

.document-workspace-back {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(225, 198, 129, .75);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 12px;
  font-weight: 600;
}

.document-workspace-back:hover {
  background: rgba(255, 255, 255, .16);
}

.signature-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 17px;
  border-bottom: 1px solid #c5a25c;
  background: #1d1b17;
  color: #fff;
}

.signature-config-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.signature-config-brand img {
  width: 55px;
  height: 42px;
  object-fit: contain;
}

.signature-config-brand span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.signature-config-brand strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.signature-config-brand small {
  color: #e1c681;
  font-size: 10px;
  line-height: 1.45;
}

.signature-config-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 49px;
  padding: 7px 15px;
  border-bottom: 1px solid #dce0e6;
  background: #fff;
}

.signature-zoom-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.signature-zoom-controls button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 30px;
  border: 1px solid #d9dfe7;
  border-radius: 8px;
  background: #fff;
  color: #2d3744;
  font-size: 17px;
  cursor: pointer;
}

.signature-zoom-controls span {
  min-width: 45px;
  color: #39424d;
  font-size: 11px;
  text-align: center;
}

.signature-page-count {
  color: #35404c;
  font-size: 11px;
  font-weight: 750;
}

.signature-sort-hint {
  color: #8b929a;
  font-size: 9px;
}

.signature-config-workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.signature-field-sidebar {
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 14px;
  border-right: 1px solid #e0e3e8;
  background: #fff;
}

.signature-sidebar-label {
  color: #8b9098;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.signature-config-document-name {
  overflow-wrap: anywhere;
  color: #292d32;
  font-size: 12px;
}

.signature-sidebar-divider {
  height: 1px;
  margin: 5px 0;
  background: #eceef1;
}

.signature-field-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  background: #fff;
  color: #2c333b;
  text-align: left;
  cursor: grab;
}

.signature-field-tool:hover,
.signature-field-tool.is-selected {
  border-color: #d0b06a;
  background: #fcf7ed;
}

.signature-field-tool:active {
  cursor: grabbing;
}

.signature-field-tool>span:last-child {
  display: grid;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
}

.signature-field-tool small {
  color: #9a9da3;
  font-size: 8px;
  font-weight: 500;
}

.signature-tool-icon {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  height: 29px;
  border-radius: 8px;
  background: #f1f3f6;
  color: #4f5965;
  font-size: 13px;
  font-weight: 800;
}

.signature-config-help {
  margin: 4px 0 8px;
  color: #8b9198;
  font-size: 9px;
  line-height: 1.65;
}

.signature-field-count-wrap {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 12px 0;
  border-top: 1px solid #eceef1;
  color: #969aa0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.signature-field-count-wrap strong {
  color: #292d32;
  font-size: 22px;
  letter-spacing: 0;
}

.signature-field-sidebar .btn {
  min-height: 37px;
  font-size: 10px;
}

.signature-field-sidebar .btn+.btn {
  margin-top: 0;
}

.signature-config-error {
  padding: 9px 10px;
  border: 1px solid #f0c8c8;
  border-radius: 8px;
  background: #fff3f3;
  color: #ac3535;
  font-size: 10px;
  line-height: 1.5;
}

.signature-pdf-scroll,
.public-signing-pdf-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 24px 18px;
  background: #dfe3e9;
  overscroll-behavior: contain;
}

.signature-pdf-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 26px;
}

.signature-pdf-page-label {
  align-self: flex-start;
  color: #68717d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
}

.signature-pdf-page-surface {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 7px 25px rgba(24, 34, 47, .17);
}

.signature-pdf-page-canvas {
  display: block;
  max-width: none;
}

.signature-pdf-page-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.signature-pdf-field {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  min-width: 30px;
  min-height: 16px;
  padding: 2px 5px;
  border: 1px dashed #b98725;
  border-radius: 5px;
  background: rgba(252, 245, 225, .93);
  color: #7d5917;
  font: 700 9px/1.2 Montserrat, Arial, sans-serif;
  text-align: center;
}

.signature-pdf-page-overlay .signature-pdf-field {
  pointer-events: auto;
}

.signature-pdf-field-label {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-pdf-field.field-signature {
  border-color: #477fee;
  background: rgba(230, 239, 255, .95);
  color: #235ab1;
}

.signature-pdf-field.field-initials {
  border-color: #9462dc;
  background: rgba(243, 235, 255, .96);
  color: #6e3cbe;
}

.signature-pdf-field.field-name {
  border-color: #42a778;
  background: rgba(231, 250, 240, .96);
  color: #1c8050;
}

.signature-pdf-field.field-date {
  border-color: #d99b34;
  background: rgba(255, 247, 226, .97);
  color: #976317;
}

.signature-pdf-field.is-dragging {
  z-index: 8;
  opacity: .88;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .16);
  cursor: grabbing;
}

.signature-pdf-field-remove {
  position: absolute;
  top: -9px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #f2b8b8;
  border-radius: 50%;
  background: #fff;
  color: #cc3333;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.signature-pdf-field.is-signing-field {
  min-height: 28px;
  border-style: solid;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(20, 28, 42, .08);
}

.signature-pdf-field.is-signing-field:hover {
  z-index: 4;
  filter: brightness(.98);
  box-shadow: 0 0 0 3px rgba(185, 135, 37, .14);
}

.signature-pdf-field.is-signing-field.is-complete {
  border-style: solid;
  border-color: #2c9963;
  background: rgba(231, 249, 240, .96);
  color: #247749;
}

.signature-pdf-loading,
.signature-pdf-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 210px;
  color: #79818d;
  font-size: 11px;
  text-align: center;
}

.signature-pdf-error {
  padding: 25px;
}

.signature-pdf-error strong {
  color: #aa3333;
}

.signature-pdf-error span {
  max-width: 350px;
}

.tnf-modal-dialog.tnf-modal-wide {
  width: min(96vw, 1420px);
  max-height: 95vh;
}

.tnf-modal-dialog.tnf-modal-wide .tnf-modal-body {
  padding: 0;
  overflow: hidden;
}

.tnf-modal-body.tnf-modal-document-workspace {
  padding: 0;
  overflow: hidden;
}

.public-signing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  min-height: calc(100vh - 88px);
}

.public-signing-document-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.public-signing-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  min-height: 50px;
  padding: 8px 18px;
  border-bottom: 1px solid #d9dfe7;
  background: #fff;
}

.public-signing-toolbar>strong {
  color: #3b4653;
  font-size: 12px;
}

.public-signing-pdf-scroll {
  max-height: none;
  background: #cfd5de;
}

.public-signing-sidebar {
  min-width: 0;
  padding: 24px 20px;
  border-left: 1px solid #e0e4ea;
  background: #fff;
}

.public-signing-sidebar form {
  display: grid;
  gap: 13px;
}

.public-signing-sidebar h2 {
  margin: 0 0 4px;
  color: #222832;
  font-size: 18px;
}

.public-sign-info-card {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border-radius: 12px;
  background: #f7f8fa;
}

.public-sign-info-card span {
  color: #828994;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.public-sign-info-card strong {
  color: #252a32;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.public-sign-instructions {
  padding: 14px 15px;
  border-radius: 12px;
  background: #eff5ff;
  color: #2259a5;
  font-size: 11px;
  line-height: 1.65;
}

.public-sign-instructions p {
  margin: 5px 0 0;
}

.public-sign-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4a5059;
  font-size: 11px;
  line-height: 1.65;
  cursor: pointer;
}

.public-sign-confirm input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #b98725;
}

.public-finish-signing {
  min-height: 46px;
}

.public-finish-signing:disabled {
  border-color: #ddd7cc !important;
  background: #ddd7cc !important;
  color: #7b7469 !important;
  opacity: 1;
  cursor: not-allowed;
}

.public-sign-error {
  padding: 10px 12px;
  border: 1px solid #efc2c2;
  border-radius: 9px;
  background: #fff0f0;
  color: #b33333;
  font-size: 11px;
}

.public-sign-progress-track {
  width: min(230px, 18vw);
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #343944;
}

.public-sign-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: #c69b48;
  transition: width .18s ease;
}

.public-signature-progress {
  display: grid;
  gap: 0;
  text-align: right;
  color: #fff;
  font-size: 10px;
}

.public-signature-progress strong {
  font-size: 11px;
}

.public-signature-pad-backdrop {
  position: fixed;
  z-index: 20000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 24, 30, .55);
  backdrop-filter: blur(4px);
}

.public-signature-pad-backdrop[hidden] {
  display: none !important;
}

.public-signature-pad-dialog {
  width: min(100%, 780px);
  padding: 22px;
  border: 1px solid #e3e6eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.public-signature-pad-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
}

.public-signature-pad-head h2 {
  margin: 0;
  color: #252a32;
  font-size: 19px;
}

.public-signature-pad-head p {
  margin: 5px 0 0;
  color: #89909b;
  font-size: 11px;
}

.public-signature-pad-head button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f0f2f5;
  color: #464c56;
  font-size: 23px;
  cursor: pointer;
}

.public-signature-canvas-wrap {
  overflow: hidden;
  border: 1px dashed #b5c2d4;
  border-radius: 14px;
  background: #fcfcfd;
}

.public-signature-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  background: #fff;
}

.public-signature-pad-help {
  margin: 10px 0 18px;
  color: #88909a;
  font-size: 11px;
}

.public-signature-pad-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.public-signature-pad-actions .btn {
  min-height: 48px;
  font-size: 13px;
  font-weight: 800;
}

.public-sign-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(92vw, 570px);
  margin: clamp(32px, 8vh, 95px) auto;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid #e7ddcd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(35, 38, 43, .07);
  text-align: center;
}

.public-sign-complete-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border: 1px solid #b8ddc6;
  border-radius: 50%;
  background: #eff8f1;
  color: #2c8652;
  font-size: 30px;
}

.public-sign-complete h1 {
  margin: 7px 0 10px;
  color: #232722;
  font-size: clamp(24px, 4vw, 32px);
}

.public-sign-complete p {
  color: #777d76;
  font-size: 13px;
  line-height: 1.8;
}

.public-sign-complete-detail {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 9px 14px;
  width: 100%;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #e9dfcf;
  border-radius: 12px;
  background: #fbf8f2;
  text-align: left;
}

.public-sign-complete-detail span {
  color: #898174;
  font-size: 10px;
}

.public-sign-complete-detail strong {
  color: #36352f;
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media(max-width:1000px) {
  .public-signing-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .signature-sort-hint {
    display: none;
  }

  .signature-field-sidebar {
    flex-basis: 195px;
    padding: 11px;
  }
}

@media(max-width:720px) {
    
       .nav-link {
        color:#fff;
    }
    
    .brand-copy  strong {
        color:#fff;
    }
    
  .employee-documents-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 15px;
  }

  .employee-documents-filters {
    justify-content: stretch;
    padding: 11px;
  }

  .employee-document-search {
    flex: 1 1 100%;
    width: 100%;
  }

  .employee-documents-filters select {
    flex: 1;
  }

  .employee-documents-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-modal-heading {
    padding: 17px 15px 13px;
  }

  .document-modal-heading h2 {
    font-size: 18px;
  }

  .document-form {
    padding: 15px 15px 0;
  }

  .document-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .document-modal-footer {
    margin: 18px -15px 0;
    padding: 12px 15px;
  }

  .document-preview-frame {
    min-height: 260px;
  }

  .document-preview-frame iframe {
    height: 58vh;
  }

  .tnf-modal-dialog.tnf-modal-wide {
    width: 100%;
    max-height: 96vh;
  }

  .signature-config-root {
    height: 88vh;
  }

  .signature-config-header {
    padding: 8px 10px;
  }

  .signature-config-brand img {
    width: 41px;
    height: 34px;
  }

  .signature-config-brand strong {
    font-size: 12px;
  }

  .signature-config-brand small {
    font-size: 8px;
  }

  .signature-config-toolbar {
    min-height: 41px;
    padding: 5px 8px;
  }

  .signature-page-count {
    font-size: 9px;
  }

  .signature-config-workspace {
    flex-direction: column;
  }

  .signature-field-sidebar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    max-height: 200px;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid #e0e3e8;
  }

  .signature-sidebar-label,
  .signature-config-document-name,
  .signature-sidebar-divider,
  .signature-config-help,
  .signature-field-count-wrap {
    display: none;
  }

  .signature-field-tool {
    justify-content: center;
    min-height: 47px;
    padding: 5px;
  }

  .signature-field-tool>span:last-child {
    display: none;
  }

  .signature-tool-icon {
    flex-basis: 31px;
  }

  .signature-field-sidebar .btn {
    grid-column: span 2;
    min-height: 32px;
    padding: 7px;
  }

  .signature-field-sidebar .btn+.btn {
    grid-column: span 2;
  }

  .signature-config-error {
    grid-column: 1/-1;
  }

  .signature-pdf-scroll {
    padding: 14px 7px;
  }

  .public-signing-layout {
    display: flex;
    flex-direction: column;
  }

  .public-signing-sidebar {
    order: -1;
    padding: 16px;
    border-left: 0;
    border-bottom: 1px solid #e0e4ea;
  }

  .public-signing-sidebar form {
    gap: 9px;
  }

  .public-signing-sidebar h2 {
    font-size: 16px;
  }

  .public-sign-info-card {
    padding: 9px 11px;
  }

  .public-sign-instructions {
    padding: 10px 12px;
    font-size: 10px;
  }

  .public-signing-toolbar {
    min-height: 43px;
    padding: 6px 11px;
  }

  .public-signature-progress strong {
    font-size: 8px;
  }

  .public-sign-progress-track {
    width: 24vw;
    height: 5px;
  }

  .public-signature-pad-dialog {
    padding: 17px;
    border-radius: 16px;
  }

  .public-signature-canvas-wrap canvas {
    height: 180px;
  }
}

@media(max-width:430px) {
  .tnf-public-signature-header {
    flex-wrap: wrap;
  }

  .public-signature-progress {
    width: 100%;
    grid-template-columns: 1fr;
    text-align: left;
    padding-left: 70px;
  }

  .public-sign-progress-track {
    width: 100%;
  }

  .signature-config-brand small {
    max-width: 205px;
  }

  .document-modal-footer {
    justify-content: stretch;
  }

  .document-modal-footer .btn {
    flex: 1;
  }

  .public-signature-pad-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   EMPLOYEE MY TIME — TYPOGRAPHY ALIGNMENT
   Keep the page on the same typography scale as other CRM pages.
   This block intentionally comes last to override older time-page rules.
   ========================================================= */
.time-page,
.time-page * {
  font-family: inherit;
}

.time-page .eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.time-page .page-head h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}

.time-page .page-head p,
.time-page .time-table-header p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.time-page .time-summary-label,
.time-page .time-table-count span,
.time-page .date-cell small,
.time-page .hours-cell span {
  font-weight: 400;
}

.time-page .time-summary-card strong,
.time-page .time-table-header h3,
.time-page .time-table-count,
.time-page .dispatch-reference,
.time-page .hours-cell strong,
.time-page .total-hours-cell strong {
  font-weight: 700;
}

.time-page .dispatch-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.time-page .date-cell strong,
.time-page .time-cell strong {
  font-weight: 600;
}

.time-page .time-active,
.time-page .time-complete,
.time-page .time-working,
.time-page .time-status {
  font-weight: 600;
}

.time-page .time-table thead th {
  font-weight: 700;
}

.time-page .time-table tbody td {
  font-weight: 400;
}

.time-page .time-table tbody td strong {
  font-weight: 600;
}

.time-page .time-table tbody td .hours-cell strong,
.time-page .time-table tbody td .total-hours-cell strong,
.time-page .time-table tbody td .dispatch-reference {
  font-weight: 700;
}

.time-page .time-action-btn,
.time-page .completed-action {
  font-weight: 600;
}


/* Notifications pagination */
.notification-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    min-height: 36px;
    overflow: hidden;
}

.notification-pagination nav {
    width: 100%;
}

.notification-pagination nav > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.notification-pagination nav p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.notification-pagination nav a,
.notification-pagination nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 34px;
    height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 6px;
}

.notification-pagination nav svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px;
    max-height: 16px;
}
