@font-face {
  font-family: robotolight;
  src: url("../fonts/robotofont/Roboto-Light.ttf");
}

@font-face {
  font-family: robotomedium;
  src: url("../fonts/robotofont/Roboto-Medium.ttf");
}

:root {
  --singer-blue: #005af0;
  --singer-blue-dark: #0048c4;
  --singer-accent: #8caaff;
  --singer-bg: #f5f7fb;
  --singer-surface: #ffffff;
  --singer-surface-muted: #f8faff;
  --singer-border: #e4e8f0;
  --singer-text: #172033;
  --singer-muted: #64748b;
  --singer-pill: #e7f0ff;
  --singer-secondary: #eef2f7;
  --singer-shadow: 0 18px 42px rgba(15, 35, 75, 0.09);
  --singer-shadow-soft: 0 8px 24px rgba(15, 35, 75, 0.06);
  --sidebar-width: 248px;
  --sidebar-collapsed: 72px;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--singer-text);
  background: var(--singer-bg);
  font-family: "Segoe UI", robotolight, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

.login-page {
  min-height: 100vh;
  overflow: hidden;
  background: url("../img/loginbackground.jpg") center / cover no-repeat;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.login-card {
  width: min(440px, 86vw);
  min-height: 300px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 30px 38px;
}

.login-card img {
  display: block;
  width: 54%;
  margin: 0 auto 32px;
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--singer-border);
  border-radius: 8px;
  background: var(--singer-surface-muted);
  color: var(--singer-text);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.form-textarea {
  min-height: 82px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 0;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.16);
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: bold;
}

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

.form-grid > * {
  min-width: 0;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.btn-compact {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 12px;
}

.btn-primary,
.btn.btn-primary {
  background: var(--singer-blue);
  border-color: var(--singer-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 90, 240, 0.18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
  background: var(--singer-blue-dark);
  color: #fff;
}

.btn-primary.compact {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-danger:hover {
  background: #bb2d3b;
  color: #fff;
}

.btn-style-pill {
  color: var(--singer-blue);
  background: #f5f8ff;
  border: 1px solid #cddfff;
  border-radius: 999px;
  box-shadow: none;
}

.btn-style-pill:hover {
  color: #fff;
  background: #66b3ff;
}

.btn-style-pillsec {
  color: #5f6f85;
  background: #f1f4f9;
  border: 1px solid var(--singer-border);
  border-radius: 999px;
}

.btn-style-pillsec:hover {
  color: #fff;
  background: grey;
}

.btn-icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--singer-border);
  border-radius: 10px;
  background: var(--singer-surface);
  color: var(--singer-text);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  background: var(--singer-surface);
  border-right: 1px solid var(--singer-border);
  box-shadow: var(--singer-shadow-soft);
  transition: width 0.18s ease;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 0 6px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding: 5px 4px;
  border-radius: 10px;
}

.sidebar-logo-main {
  width: 158px;
  max-width: 100%;
}

.sidebar-label {
  padding: 8px 10px 6px;
  color: var(--singer-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-logo-dot {
  display: none;
  width: 36px;
  margin: 0 auto;
}

.sidebar.collapsed .sidebar-logo-main {
  display: none;
}

.sidebar.collapsed .sidebar-brand {
  display: none;
}

.sidebar.collapsed .sidebar-logo-dot {
  display: block;
}

.sidebar-toggle {
  margin-left: auto;
  color: var(--singer-text);
  flex: 0 0 auto;
}

.sidebar.collapsed .sidebar-toggle {
  margin: 0 auto;
}

.nav-section {
  padding: 0 0 10px;
  display: grid;
  gap: 3px;
  align-content: start;
  flex: 1;
}

.nav-link,
.nav-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--singer-text);
  padding: 0 11px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-link i,
.nav-group-toggle i {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.nav-link:hover,
.nav-group-toggle:hover,
.nav-link.active {
  background: var(--singer-pill);
  color: var(--singer-blue);
  box-shadow: inset 3px 0 0 var(--singer-blue), 0 8px 18px rgba(0, 90, 240, 0.06);
}

.nav-link.active {
  font-weight: 700;
}

.nav-group-items {
  display: none;
  padding: 2px 0 4px 38px;
}

.nav-group.open .nav-group-items {
  display: block;
}

.nav-group-items a {
  display: block;
  padding: 6px 9px;
  color: var(--singer-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: 8px;
}

.nav-group-items a:hover,
.nav-group-items a.active {
  background: var(--singer-surface-muted);
  color: var(--singer-blue);
}

.nav-group-items a.active {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--singer-blue);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--singer-border);
}

.sidebar-foot-card {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--singer-border);
  border-radius: 11px;
  background: linear-gradient(180deg, #fff, var(--singer-surface-muted));
}

.sidebar-foot-card span {
  color: var(--singer-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-foot-card strong {
  overflow: hidden;
  color: var(--singer-text);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-group-items,
.sidebar.collapsed .sidebar-brand-copy,
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-foot {
  display: none;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .nav-group-toggle {
  justify-content: center;
  padding: 0;
}

.main-area {
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  min-width: 0;
  transition: margin-left 0.18s ease;
}

.sidebar.collapsed + .main-area {
  width: calc(100% - var(--sidebar-collapsed));
  max-width: calc(100% - var(--sidebar-collapsed));
  margin-left: var(--sidebar-collapsed);
}

.topbar-mini {
  height: 34px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--singer-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  min-width: 0;
}

.topbar-mini a {
  color: var(--singer-blue);
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
}

.topbar-mini a:hover {
  background: var(--singer-pill);
}

.topbar-main {
  min-height: 76px;
  background: var(--singer-surface);
  border-bottom: 1px solid var(--singer-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 22px;
  color: var(--singer-text);
  min-width: 0;
  box-shadow: var(--singer-shadow-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.mobile-menu-button {
  display: none;
}

.shell-search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 1 236px;
  max-width: 430px;
  min-height: 42px;
  border: 1px solid var(--singer-border);
  border-radius: 14px;
  background: var(--singer-surface-muted);
  color: var(--singer-muted);
  padding: 0 12px;
}

.shell-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--singer-text);
  font-weight: 600;
}

.quick-links {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  flex: 2 1 500px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-links a {
  flex: 0 0 auto;
  min-width: auto;
  background: var(--singer-surface-muted);
  border: 1px solid var(--singer-border);
  border-radius: 12px;
  color: var(--singer-text);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
}

.quick-links a:hover {
  color: var(--singer-blue);
  border-color: #cddfff;
  background: var(--singer-pill);
}

.quick-links i {
  margin-right: 7px;
}

.user-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 190px;
  flex: 0 1 auto;
  gap: 11px;
  text-align: left;
}

.initials {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--singer-pill);
  color: var(--singer-blue);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-family: robotomedium, Arial, sans-serif;
}

.user-role {
  color: var(--singer-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.content {
  padding: 26px 28px 38px;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.content.brand-bg {
  min-height: calc(100vh - 144px);
  background: linear-gradient(rgba(255,255,255,0.44), rgba(255,255,255,0.44)), url("../img/singer_bg.png") center / cover no-repeat;
}

.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  min-width: 0;
}

.page-title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

.page-subtitle {
  margin: 7px 0 0;
  color: #566573;
  font-size: 13px;
  font-weight: 600;
}

.page-title-action {
  margin-top: 3px;
}

.panel {
  background: var(--singer-surface);
  border: 1px solid var(--singer-border);
  border-radius: 16px;
  min-width: 0;
  box-shadow: var(--singer-shadow-soft);
}

.panel-pad {
  padding: 20px;
}

.panel + .panel {
  margin-top: 18px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.profile-card {
  min-height: 100%;
}

.profile-card-danger {
  border-top: 3px solid #dc3545;
}

.profile-section-header h2,
.profile-delete-form h2 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.profile-section-header p,
.profile-delete-form p {
  margin: 7px 0 0;
  color: #566573;
  line-height: 1.45;
}

.profile-form,
.profile-delete-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.form-field {
  min-width: 0;
}

.form-error {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #dc3545;
  font-size: 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.status-message {
  color: #198754;
  font-size: 13px;
  font-weight: bold;
}

.status-message.error {
  color: #dc3545;
}

.profile-note {
  margin-top: 8px;
  color: #566573;
}

.profile-note p {
  margin: 0;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--singer-blue);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
}

.metric {
  padding: 18px 22px;
  border-right: 3px solid #dee2e6;
}

.metric:last-child {
  border-right: 0;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress {
  height: 20px;
  border: 1px solid #000;
  background: #fff;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--singer-blue);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.empty-state {
  padding: 18px;
  color: #566573;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.summary-cell {
  padding: 18px 20px;
  border-right: 3px solid #dee2e6;
}

.summary-cell:last-child {
  border-right: 0;
}

.chart-placeholder {
  height: 230px;
  display: grid;
  place-items: center;
}

.donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--singer-blue) 0 58%, var(--singer-accent) 58% 82%, #edeef2 82% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  background: #fff;
  border-radius: 50%;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  min-width: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.filter-row .form-control,
.filter-row .form-select {
  width: auto;
  min-width: 135px;
  flex: 1 1 135px;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.register-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--singer-surface);
  white-space: nowrap;
}

.register-table th,
.register-table td {
  border: 1px solid var(--singer-border);
  padding: 9px 10px;
  text-align: left;
  vertical-align: middle;
}

.register-table th {
  font-family: robotomedium, Arial, sans-serif;
  font-size: 12px;
  background: var(--singer-surface-muted);
}

.register-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.045);
}

.admin-lifecycle-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.admin-lifecycle-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--singer-border);
  border-radius: 8px;
  background: var(--singer-surface);
  box-shadow: var(--singer-shadow-soft);
}

.admin-lifecycle-summary span,
.legacy-source-grid span {
  display: block;
  color: var(--singer-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-lifecycle-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  color: var(--singer-text);
}

.technician-finance-flow .admin-lifecycle-summary {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.technician-finance-flow .summary-card {
  padding: 10px 12px;
}

.technician-finance-flow .summary-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.technician-finance-flow .workflow-step-current {
  border-color: var(--singer-blue);
  background: rgba(11, 94, 215, 0.06);
}

.technician-finance-flow .workflow-step-current strong {
  color: var(--singer-blue);
}

.admin-lifecycle-panel {
  overflow: hidden;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  min-height: 156px;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.settings-card:hover {
  border-color: var(--singer-blue);
  box-shadow: 0 8px 20px rgba(0, 53, 128, 0.08);
}

.settings-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--singer-blue);
  background: #eaf2ff;
}

.settings-card strong {
  font-size: 15px;
}

.settings-card small {
  color: var(--muted);
  line-height: 1.45;
}

.settings-card-muted {
  background: #f8fafc;
}

.settings-card-muted:hover {
  border-color: var(--border);
  box-shadow: none;
}

.admin-lifecycle-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(6, minmax(132px, 1fr)) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-lifecycle-savebar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.admin-lifecycle-savebar .form-control {
  width: min(420px, 100%);
}

.admin-dry-run-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.admin-dry-run-toolbar .form-control {
  width: 180px;
}

.dry-run-notice {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 600;
}

.form-status {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid #badbcc;
  border-radius: 8px;
  color: #0f5132;
  background: #d1e7dd;
  font-size: 13px;
  font-weight: 700;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid #bfdbfe;
  color: #123a83;
  background: #eaf2ff;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 90, 240, 0.08);
}

.impersonation-banner strong,
.impersonation-banner span {
  display: block;
}

.impersonation-banner span {
  margin-top: 1px;
  color: #516783;
  font-size: 12px;
}

.impersonation-banner button {
  min-height: 30px;
  border: 1px solid #9ec5fe;
  border-radius: 7px;
  background: #fff;
  color: var(--singer-blue);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.transfer-request-panel {
  max-width: 760px;
}

.transfer-request-summary {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--singer-border);
  border-radius: 8px;
  background: #f8fafc;
}

.transfer-request-summary span,
.transfer-request-summary small {
  color: var(--singer-muted);
  font-size: 12px;
}

.request-review-form {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 100px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

.status.planned { color: #005af0; background: #cde1fd; }
.status.reactive { color: #842029; background: #f8d7da; }
.status.pending { color: #664d03; background: #fff3cd; }
.status.completed { color: #0f5132; background: #d1e7dd; }
.status.rejected { color: #842029; background: #f5c2c7; }
.status.auto { color: #41464b; background: #e2e3e5; }
.status.remedial { color: #055160; background: #cff4fc; }
.status.quote { color: #005af0; background: #e7f1ff; }

.actions {
  display: flex;
  gap: 5px;
}

.action-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--singer-text);
  border: 1px solid var(--singer-border);
  background: var(--singer-surface);
}

.action-icon:hover {
  color: var(--singer-blue);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.section-title h2 {
  margin: 0;
  font-size: 15px;
}

.line-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-collapse: collapse;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.line-table th,
.line-table td {
  border: 1px solid #dee2e6;
  padding: 7px;
  min-width: 120px;
}

.line-table .form-control,
.line-table .form-select {
  min-width: 120px;
}

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

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

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill-muted {
  background: #eef2f7;
  color: #536070;
}

.status-pill-warning {
  background: #fff4d6;
  color: #7a4a00;
}

.status-pill-success {
  background: #dff5e7;
  color: #17633a;
}

.topbar-alert-link {
  position: relative;
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.topbar-alert-link .notification-badge {
  position: absolute;
  top: -8px;
  right: -10px;
}

.sidebar-notification-badge {
  margin-left: auto;
}

.topbar-notification-menu {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.topbar-notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1150;
  display: none;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
  max-height: min(460px, calc(100vh - 92px));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--singer-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--singer-shadow);
  padding: 10px;
  overscroll-behavior: contain;
}

.topbar-notification-menu.open .topbar-notification-dropdown {
  display: block;
}

.notification-dropdown-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-width: 0;
  gap: 10px;
}

.notification-dropdown-heading strong {
  color: var(--singer-text);
  font-size: 13px;
}

.notification-dropdown-heading a,
.notification-dropdown-item {
  color: var(--singer-blue);
  text-decoration: none;
}

.notification-dropdown-item {
  display: grid;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--singer-border);
  padding: 8px 0;
}

.notification-dropdown-item.notification-unread {
  border-left: 3px solid var(--singer-blue);
  padding-left: 8px;
  background: #f5f9ff;
}

.notification-dropdown-item.notification-read {
  opacity: 0.72;
}

.notification-dropdown-item * {
  max-width: 100%;
  min-width: 0;
}

.notification-dropdown-item strong,
.notification-dropdown-item small {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.notification-dropdown-item strong {
  color: var(--singer-text);
  font-size: 12px;
}

.notification-dropdown-item small,
.notification-dropdown-empty {
  color: var(--singer-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.notification-dropdown-context {
  font-weight: 700;
}

.notification-row.notification-unread {
  background: #f5f9ff;
}

.notification-row.notification-read {
  color: var(--singer-muted);
}

.shell-toast-container {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 1100;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.shell-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cddfff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 39, 71, 0.16);
  pointer-events: auto;
}

.shell-toast.is-hiding {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.shell-toast.high,
.shell-toast.warning {
  border-color: #f3ddb4;
}

.shell-toast.urgent,
.shell-toast.critical {
  border-color: #efc2cb;
}

.shell-toast-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #075bb0;
  background: #e8f2ff;
}

.shell-toast-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shell-toast-body strong {
  color: var(--singer-text);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.shell-toast-body span {
  color: var(--singer-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.shell-toast-body a {
  color: var(--singer-blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.shell-toast-dismiss {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: #64748b;
  background: #eef2f7;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 767px) {
  .topbar-notification-dropdown {
    position: fixed;
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    max-height: min(420px, calc(100vh - 84px));
  }

  .shell-toast-container {
    top: 64px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .shell-toast {
    padding: 10px;
  }
}

.notification-summary {
  margin-bottom: 14px;
}

.notification-table small {
  display: block;
  color: #667085;
  margin-top: 4px;
}

.alert-severity {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.alert-severity.info {
  background: #e7f1ff;
  color: #0b5ed7;
}

.alert-severity.warning {
  background: #fff4de;
  color: #9a5b00;
}

.alert-severity.critical {
  background: #ffe8e8;
  color: #b42318;
}

.notification-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.signature-pad {
  min-height: 100px;
  border: 1px dashed #adb5bd;
  background: #fff;
  display: grid;
  place-items: center;
  color: #6c757d;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edeef2;
}

/* .modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.42);
  align-items: center;
  justify-content: center;
  padding: 18px;
} */

/* .modal-backdrop.open {
  display: flex;
} */

/* .modal {
  width: min(520px, 94vw);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(15, 35, 75, 0.16);
} */

.modal-body {
  padding: 24px;
  text-align: center;
}

.modal-warning {
  color: #f00;
  font-size: 32px;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}

.prototype-note {
  color: #6c757d;
  font-size: 12px;
}

@media (max-width: 980px) {
  .quick-links {
    flex-wrap: nowrap;
    flex-basis: 100%;
    order: 3;
  }

  .metrics-row,
  .dashboard-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .summary-cell {
    border-right: 0;
    border-bottom: 1px solid #dee2e6;
  }

  .form-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .span-8,
  .span-6,
  .span-5,
  .span-4,
  .span-3,
  .span-2 {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-area,
  .sidebar.collapsed + .main-area {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .topbar-main {
    min-height: 68px;
    padding: 14px 16px;
  }

  .topbar-mini {
    padding: 0 16px;
  }

  .user-block {
    min-width: 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .shell-search {
    max-width: none;
    order: 2;
    flex-basis: 100%;
  }

  .quick-links {
    display: none;
  }

  .content {
    padding: 16px;
    overflow-x: hidden;
  }

  .login-card {
    padding: 26px 22px;
  }

  .modal-actions {
    gap: 12px;
    flex-wrap: wrap;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-12,
  .span-8,
  .span-6,
  .span-5,
  .span-4,
  .span-3,
  .span-2 {
    grid-column: span 1;
  }
}

/*****Add Custom Css*****/
/* ===== Jobsheet-style modal header (title + close button row) ===== */
/* ===== Backdrop: add blur + fade-in for a more native feel ===== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop.open {
  display: flex;
  animation: modal-fade 0.15s ease-out;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Modal shell: slight pop-in + your existing shadow token ===== */
.modal {
  display: block; /* Override Bootstrap's display: none */
  position: relative; /* Override Bootstrap's position: fixed */
  width: min(520px, 94vw);
  height: auto; /* Override Bootstrap's height: 100% */
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--singer-shadow);
  animation: modal-pop 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Jobsheet header refinements ===== */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--singer-border);
  text-align: left;
}

.modal-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--singer-blue);
  font-family: robotomedium, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-header h2 {
  margin: 0 0 6px;
  color: var(--singer-text);
  font-family: robotomedium, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-header p {
  margin: 0;
  color: var(--singer-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--singer-border);
  border-radius: 9px;
  background: var(--singer-surface-muted);
  color: var(--singer-muted);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.modal-close:hover {
  background: #fdecec;
  border-color: #f3c9c9;
  color: #dc3545;
}

/* ===== Form refinements ===== */
.modal-body:has(.modal-header) {
  text-align: left;
}

.form-group {
  margin-bottom: 22px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--singer-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Bigger, more deliberate input for a "search" field this important */
.modal-body:has(.modal-header) .form-control {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border-color: var(--singer-border);
  background: var(--singer-surface-muted);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.modal-body:has(.modal-header) .form-control:focus {
  border-color: var(--singer-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 90, 240, 0.12);
}

.modal-body:has(.modal-header) .form-control::placeholder {
  color: #a7b0bf;
  font-weight: 600;
}

/* Footer separated visually from the form, actions right-aligned */
.modal-body:has(.modal-header) .modal-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--singer-border);
}