:root {
  --dna-navy: #16324f;
  --dna-blue: #2563eb;
  --dna-bg: #f5f7fb;
  --dna-border: #d8dee9;
  --dna-text: #1f2937;
  --dna-muted: #64748b;
}

html {
  font-size: 14px;
}

body {
  background: var(--dna-bg);
  color: var(--dna-text);
  font-size: 0.95rem;
  line-height: 1.35;
}

main.container-fluid {
  padding-right: clamp(0.75rem, 2vw, 1.5rem);
  padding-left: clamp(0.75rem, 2vw, 1.5rem);
}

a,
td,
dd {
  overflow-wrap: anywhere;
}

.row > * {
  min-width: 0;
}

.bg-dna {
  background: var(--dna-navy);
}

.navbar {
  min-height: 48px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.navbar-brand {
  font-size: 1.08rem;
}

.nav-link,
.navbar-text {
  font-size: 0.92rem;
}

.notification-bell {
  position: relative;
  min-width: 34px;
}

.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
}

.notification-menu {
  width: min(360px, calc(100vw - 1rem));
  padding: 0;
}

.notification-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--dna-border);
  font-size: 0.82rem;
}

.notification-menu-item {
  white-space: normal;
  line-height: 1.25;
}

.notification-menu-item strong,
.notification-menu-item span {
  display: block;
  overflow-wrap: anywhere;
  word-break: normal;
}

.notification-menu-item strong {
  font-size: 0.82rem;
}

.notification-menu-item span {
  color: var(--dna-muted);
  font-size: 0.76rem;
}

.notification-toast-container {
  margin-top: 52px;
}

.notification-toast .toast-body {
  display: block;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.attachment-dropzone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  min-height: 74px;
  margin-top: 0;
  padding: 0.8rem;
  border: 1px dashed #9aa8b6;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--dna-text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.attachment-dropzone:hover,
.attachment-dropzone:focus,
.attachment-dropzone.is-dragging {
  border-color: var(--dna-blue);
  background: #eef5ff;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.12);
  outline: 0;
}

.attachment-dropzone-title {
  font-size: 0.84rem;
  font-weight: 700;
}

.attachment-dropzone-status {
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.attachment-upload-layout > * {
  order: 10;
}

.attachment-upload-layout > .attachment-file-field {
  order: 1;
  grid-column: 1 / -1;
}

.attachment-upload-layout > .attachment-dropzone {
  order: 2;
  grid-column: 1 / -1;
}

.attachment-upload-layout > .attachment-description-field {
  order: 3;
  grid-column: 1 / -1;
}

.attachment-upload-layout > .attachment-type-field {
  order: 4;
}

.attachment-upload-layout > .attachment-expiry-field {
  order: 5;
}

.btn {
  --bs-btn-padding-y: 0.36rem;
  --bs-btn-padding-x: 0.72rem;
  --bs-btn-font-size: 0.92rem;
  --bs-btn-border-radius: 0.42rem;
}

.btn-sm {
  --bs-btn-padding-y: 0.22rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.82rem;
}

.btn-dull-blue {
  --bs-btn-color: #fff;
  --bs-btn-bg: #5f7896;
  --bs-btn-border-color: #5f7896;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #526b87;
  --bs-btn-hover-border-color: #526b87;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #475f79;
  --bs-btn-active-border-color: #475f79;
}

.form-control,
.form-select {
  min-height: 34px;
  padding: 0.38rem 0.58rem;
  font-size: 0.92rem;
  border-radius: 0.42rem;
}

.form-control-lg {
  min-height: 38px;
  padding: 0.45rem 0.65rem;
  font-size: 1rem;
}

.form-label {
  margin-bottom: 0.28rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-text,
.small,
small {
  font-size: 0.78rem;
}

.table {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.25;
}

.table > :not(caption) > * > * {
  padding: 0.3rem 0.55rem;
}

.table thead th {
  color: var(--dna-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef4ff, #f8fafc 55%, #edf7f4);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--dna-border);
  border-radius: 8px;
  padding: 1.35rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--dna-navy);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
}

.page-heading {
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.page-heading h1 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0;
}

.page-heading p {
  color: var(--dna-muted);
  margin: 0.18rem 0 0;
  font-size: 0.95rem;
}

.actions,
.form-actions,
.pagination-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel,
.metric-card {
  background: #fff;
  border: 1px solid var(--dna-border);
  border-radius: 8px;
  padding: 0.78rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
  min-width: 0;
}

.panel h2 {
  font-size: 0.95rem;
  margin-bottom: 0.62rem;
}

.metric-card span {
  display: block;
  color: var(--dna-muted);
  font-size: 0.78rem;
}

.metric-card strong {
  display: block;
  font-size: 1.42rem;
  line-height: 1.05;
}

.dashboard-status-row .metric-card {
  padding: 0.58rem 0.72rem;
}

.dashboard-status-row .metric-card strong {
  font-size: 1.24rem;
}

@media (min-width: 1200px) {
  .dashboard-status-row > * {
    flex: 0 0 14.285714%;
    max-width: 14.285714%;
  }
}

.gap-pill {
  border: 1px solid var(--dna-border);
  border-radius: 8px;
  padding: 0.45rem 0.62rem;
  background: #f8fafc;
}

.compact-list {
  display: grid;
}

.compact-list-item {
  display: block;
  padding: 0.45rem 0;
  border-top: 1px solid var(--dna-border);
  color: inherit;
  text-decoration: none;
}

.renewal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid var(--dna-border);
  color: inherit;
  text-decoration: none;
}

.compact-list-item:first-child,
.renewal-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.compact-list-item strong,
.compact-list-item span,
.renewal-item strong,
.renewal-item small {
  display: block;
}

.compact-list-item strong {
  overflow-wrap: anywhere;
}

.compact-list-item span,
.renewal-item small,
.renewal-date {
  color: var(--dna-muted);
  font-size: 0.78rem;
}

.renewal-date {
  text-align: right;
  white-space: nowrap;
}

.dashboard-table-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-table-scroll-5 {
  height: 178px;
}

.dashboard-table-scroll-10 {
  height: 356px;
}

.dashboard-audit-scroll {
  max-height: 390px;
}

.dashboard-table {
  min-width: 100%;
  white-space: nowrap;
}

.dashboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.dashboard-table > :not(caption) > * > * {
  padding: 0.38rem 0.48rem;
  vertical-align: top;
}

.dashboard-note-cell {
  min-width: 320px;
  max-width: 720px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-audit-table {
  min-width: 1480px;
}

.audit-json-cell,
.audit-user-agent {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-strip {
  display: flex;
  gap: 0.5rem;
}

.search-clear-sort {
  white-space: nowrap;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}

.table-sort-link:hover,
.table-sort-link:focus,
.table-sort-link.is-active {
  color: var(--dna-blue);
}

.table-sort-indicator {
  font-size: 0.78rem;
  line-height: 1;
}

.table-sort-muted {
  color: #94a3b8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

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

.company-identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 0.72rem;
}

.company-use-processing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  gap: 0.72rem;
}

.phone-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.8fr);
  gap: 0.5rem;
}

.company-role-grid {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 140px;
  gap: 0.5rem;
  align-items: end;
}

.ownership-field {
  min-width: 120px;
}

.ubo-address-field {
  grid-column: 2;
}

.url-form-shell {
  max-width: 1280px;
}

.url-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.url-form-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.url-form-whois {
  display: grid;
  gap: 0.72rem;
}

.url-form-side {
  display: grid;
  gap: 0.75rem;
}

.url-form-checks {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.1rem;
}

.url-form-whois textarea {
  min-height: 468px;
  resize: vertical;
}

.url-credentials-card {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.url-credential-list {
  display: grid;
  gap: 0.45rem;
}

.url-credential-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: end;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--dna-border);
}

.url-credential-row .form-label {
  margin-bottom: 0.15rem;
  font-size: 0.75rem;
}

.url-credential-row .form-control,
.url-credential-row .form-select,
.url-credential-row .btn {
  min-height: 1.85rem;
  padding-top: 0.18rem;
  padding-bottom: 0.18rem;
  font-size: 0.78rem;
}

.url-credential-new {
  border-bottom: 0;
  padding-bottom: 0;
}

.url-credential-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.my-projects-head h2 {
  margin-bottom: 0;
}

.my-project-status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.status-filter {
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.status-filter:hover,
.status-filter:focus,
.status-filter.is-active {
  border-color: currentColor;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.status-filter span {
  margin-left: 0.25rem;
}

.status-filter-all {
  display: inline-block;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #f8fafc;
  color: #334155;
  line-height: 1.4;
}

.status {
  display: inline-block;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
  vertical-align: middle;
  line-height: 1.4;
}

.status-new { background: #e0f2fe; color: #075985; }
.status-active { background: #dcfce7; color: #166534; }
.status-needs-updating { background: #fef9c3; color: #854d0e; }
.status-in-progress { background: #fef3c7; color: #92400e; }
.status-flagged { background: #fee2e2; color: #991b1b; }
.status-closed { background: #e5e7eb; color: #374151; }
.status-open { background: #e0f2fe; color: #075985; }
.status-on-hold { background: #fef3c7; color: #92400e; }
.status-completed { background: #dcfce7; color: #166534; }
.status-cancelled { background: #e5e7eb; color: #374151; }
.status-archived { background: #e5e7eb; color: #374151; }
.invoice-status-paid { background: #dcfce7; color: #166534; }
.invoice-status-unpaid { background: #fef3c7; color: #92400e; }
.invoice-status-cancelled { background: #e5e7eb; color: #374151; }

.uptime-dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  margin-right: 0.28rem;
  vertical-align: middle;
  background: #dc2626;
}

.uptime-dot-up {
  background: #16a34a;
}

.uptime-dot-down {
  background: #dc2626;
}

.form-section-heading,
.detail-section-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dna-muted);
  margin: 0;
  padding: 0;
}

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  line-height: 1.4;
  border-radius: 3px;
}

.detail-list {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 0.28rem 0.62rem;
  margin: 0;
  font-size: 0.9rem;
}

.detail-list dt {
  color: var(--dna-muted);
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
}

.table-fixed {
  table-layout: fixed;
  width: 100%;
}

.table-responsive {
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  min-width: 100%;
}

.table-responsive > .stats-table {
  min-width: 520px;
}

.col-datetime {
  width: 150px;
}

.col-date {
  width: 120px;
}

.col-user {
  width: 130px;
}

.col-followup {
  width: 150px;
}

.col-size {
  width: 90px;
}

.col-document-type {
  width: 180px;
}

.col-action {
  width: 80px;
}

.col-actions {
  width: 140px;
}

.col-colour {
  width: 52px;
}

.text-pretty {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.url-table {
  table-layout: fixed;
}

.url-table th:nth-child(1) {
  width: 38%;
}

.url-table th:nth-child(2) {
  width: 34%;
}

.url-table th:nth-child(3) {
  width: 16%;
}

.url-table th:nth-child(4) {
  width: 12%;
}

.url-cell-link {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.45rem;
  color: var(--dna-muted);
  font-size: 0.78rem;
}

.meta-line span {
  white-space: nowrap;
}

.note-panel {
  min-height: 100%;
}

.notification-list {
  display: grid;
}

.notification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.58rem 0;
  border-top: 1px solid var(--dna-border);
}

.notification-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.notification-row-main {
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.notification-row-main strong,
.notification-row-main span,
.notification-row-main small {
  display: block;
  overflow-wrap: anywhere;
}

.notification-row-main span,
.notification-row-main small {
  color: var(--dna-muted);
  font-size: 0.78rem;
}

.notification-row-unread .notification-row-main strong {
  color: var(--dna-blue);
}

.dashboard-activity-panel {
  height: 292px;
  display: flex;
  flex-direction: column;
}

.dashboard-activity-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.note-item,
.activity-item,
.attachment-row,
.result-row {
  display: block;
  border-top: 1px solid var(--dna-border);
  padding: 0.52rem 0;
}

.note-item:first-of-type,
.activity-item:first-of-type,
.attachment-row:first-of-type,
.result-row:first-of-type {
  border-top: 0;
}

.note-item p,
.activity-item p {
  margin-bottom: 0.25rem;
}

.note-item span,
.activity-item span,
.attachment-row span,
.result-row span {
  display: block;
  color: var(--dna-muted);
  font-size: 0.78rem;
}

.audit-summary {
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.audit-event-list {
  max-height: 220px;
  overflow-y: auto;
}

.audit-event {
  padding: 0.32rem 0;
  border-top: 1px solid var(--dna-border);
}

.audit-event:first-child {
  border-top: 0;
  padding-top: 0;
}

.audit-event-title {
  font-size: 0.8rem;
  font-weight: 600;
}

.audit-event-meta {
  color: var(--dna-muted);
  font-size: 0.72rem;
}

.attachment-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.colour-dot,
.colour-swatch {
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.colour-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.colour-swatch {
  width: 28px;
  height: 18px;
  border-radius: 4px;
}

.colour-input {
  width: 36px;
  height: 30px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
}

.defaults-edit-input {
  width: min(200px, 100%);
}

.defaults-edit-input-wide {
  width: min(320px, 100%);
}

.default-add-form .form-control {
  min-width: 0;
}

.note-followup-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(220px, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.note-completed-control {
  min-height: 34px;
}

.supplier-active-control,
.client-active-control {
  align-self: end;
  min-height: 34px;
  display: flex;
  align-items: center;
}

.supplier-active-toggle {
  display: flex;
  justify-content: flex-end;
  min-height: 20px;
}

.supplier-active-toggle .form-check {
  margin-bottom: 0;
  min-height: 20px;
}

.supplier-detail-list,
.client-detail-list {
  grid-template-columns: 92px 1fr;
}

.supplier-updated-cell {
  font-size: 0.9rem;
}

.project-list-description {
  max-width: 720px;
}

.project-list-description,
.table td,
.detail-list dd {
  min-width: 0;
}

.project-form {
  display: block;
}

.project-form-main,
.project-association-grid,
.project-task-create,
.project-task-subgrid,
.project-note-form {
  display: grid;
  gap: 0.72rem;
}

.project-form-main {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-association-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.association-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
}

.association-label-row .form-label {
  margin-bottom: 0;
}

.project-association-grid select,
.project-task-create select[multiple],
.project-note-form textarea {
  min-height: auto;
}

.association-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.association-pill {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  border: 1px solid var(--dna-border);
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  background: #f8fafc;
  color: inherit;
  font-size: 0.82rem;
  text-decoration: none;
  max-width: 100%;
}

.association-pill span {
  color: var(--dna-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-task-create {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.project-summary-row > [class*="col-"] {
  display: flex;
}

.project-summary-row .panel {
  width: 100%;
}

.project-task-create-actions {
  align-self: end;
}

.project-task-list {
  display: grid;
  gap: 0.55rem;
}

.project-tasks-shell {
  background: transparent;
}

.project-tasks-shell > .section-head {
  margin-bottom: 0.45rem;
}

.project-tasks-shell > .section-head h2 {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.project-task-item {
  border: 1px solid var(--dna-border);
  border-radius: 8px;
  background: #fff;
  padding: 0.42rem 0.55rem;
}

.project-task-main {
  min-width: 0;
}

.project-task-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.project-task-title-text {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.project-task-description {
  font-size: 0.9rem;
  margin-top: 0.42rem;
  margin-bottom: 0;
}

.project-task-status-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.project-task-status-form select {
  min-height: 30px;
  height: 30px;
  width: 138px;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}

.project-task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
}

.project-task-status-form .btn,
.project-action-button {
  min-height: 30px;
  height: 30px;
  width: 74px;
}

.project-task-subgrid {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.project-subhead {
  margin-bottom: 0.18rem;
}

.project-subhead h2 {
  font-size: 0.82rem;
  margin-bottom: 0;
}

.project-note-list,
.project-attachment-list {
  display: grid;
}

.project-note-item {
  border-top: 1px solid var(--dna-border);
  padding: 0.32rem 0;
}

.project-note-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.project-note-form {
  grid-template-columns: 150px minmax(220px, 1fr);
  align-items: end;
}

.project-note-notify {
  border: 1px solid var(--dna-border);
  border-radius: 6px;
  padding: 0.72rem;
}

.project-note-notify-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.62rem;
}

.project-note-user-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  max-height: 120px;
  overflow: auto;
}

.project-note-user-list .form-check-label {
  overflow-wrap: anywhere;
}

.project-attach-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 0.72rem;
}

.project-modal-action {
  width: 88px;
}

.project-attachment-strip {
  border-top: 1px solid var(--dna-border);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.project-note-textarea {
  min-height: 58px;
  resize: vertical;
}

.empty-state {
  text-align: center;
  margin: 10vh auto;
  max-width: 420px;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 0.75rem;
}

.stats-summary-width {
  max-width: none;
}

.stats-block {
  border: 1px solid var(--dna-border);
  border-radius: 8px;
  padding: 0.62rem;
  background: #fbfdff;
}

.stats-block-title {
  color: var(--dna-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.stats-table {
  font-size: 0.82rem;
}

.stats-table > :not(caption) > * > * {
  padding: 0.32rem 0.4rem;
}

.stats-number {
  text-align: right;
}

.stats-line-chart {
  display: block;
  width: 100%;
  height: 70px;
  border-bottom: 1px solid var(--dna-border);
}

.stats-trend-labels,
.stats-day-cards {
  display: grid;
  gap: 0.45rem;
}

.stats-trend-labels {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0.35rem;
}

.stats-trend-labels span,
.stats-day-cards div {
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--dna-border);
  padding: 0.45rem;
  text-align: left;
}

.stats-trend-labels strong,
.stats-trend-labels span,
.stats-day-cards span,
.stats-day-cards small {
  display: block;
}

.stats-day-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stats-day-cards span,
.stats-day-cards small,
.stats-trend-labels span {
  color: var(--dna-muted);
  font-size: 0.76rem;
}

.stats-day-cards strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1.2;
  margin-bottom: 0.18rem;
}

.stats-error {
  color: #7f1d1d;
  font-size: 0.76rem;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
}

@media (max-width: 991.98px) {
  .url-form-layout,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .project-form-main,
  .project-association-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-note-user-list,
  .stats-trend-labels,
  .stats-day-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .navbar-collapse {
    padding-top: 0.55rem;
  }

  .navbar form[role="search"] {
    width: 100%;
    margin: 0.35rem 0 0.7rem;
  }

  .navbar form[role="search"] .form-control {
    min-width: 0;
  }

  .navbar .navbar-text {
    display: block;
    margin: 0.45rem 0;
  }

  .page-heading,
  .search-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .page-heading .actions {
    width: 100%;
  }

  .actions .btn,
  .search-strip button,
  .search-clear-sort {
    flex: 1 1 auto;
  }

  .search-strip {
    display: flex;
  }

  .form-grid,
  .detail-list,
  .company-identity-row,
  .company-use-processing-row,
  .phone-meta-grid,
  .company-role-grid,
  .url-form-layout,
  .project-form-main,
  .project-association-grid,
  .project-task-create,
  .project-task-subgrid,
  .project-attach-form,
  .project-note-form {
    grid-template-columns: 1fr;
  }

  .supplier-active-toggle {
    justify-content: flex-start;
  }

  .project-note-user-list {
    grid-template-columns: 1fr;
  }

  .url-credential-row {
    grid-template-columns: 1fr;
  }

  .url-credential-actions {
    justify-content: flex-start;
  }

  .company-role-grid > .form-label,
  .company-role-grid > .form-select,
  .ownership-field,
  .ubo-address-field {
    grid-column: auto;
    grid-row: auto;
  }

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

  .note-followup-grid {
    grid-template-columns: 1fr;
  }

  .notes-table col,
  .attachments-table col {
    width: auto;
  }

  .attachment-row {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .stats-summary-width,
  .stats-trend-labels,
  .stats-day-cards {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .url-form-whois textarea {
    min-height: 260px;
  }

  .detail-list {
    gap: 0.22rem 0.5rem;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 13.5px;
  }

  main.container-fluid {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .page-heading h1 {
    font-size: 1.22rem;
  }

  .panel,
  .metric-card {
    padding: 0.65rem;
  }

  .actions,
  .form-actions,
  .pagination-row {
    width: 100%;
  }

  .actions .btn,
  .form-actions .btn,
  .pagination-row .btn,
  .search-strip button,
  .search-clear-sort {
    width: 100%;
  }

  .notification-menu {
    width: calc(100vw - 1rem);
  }

  .modal-dialog {
    margin-right: 0.75rem;
    margin-left: 0.75rem;
  }

  .table-responsive > .table {
    min-width: 640px;
  }

  .default-add-form {
    flex-wrap: wrap;
  }

  .default-add-form .form-control {
    flex-basis: 100%;
  }

  .default-add-form .btn {
    flex: 1 1 auto;
  }

  .project-task-title,
  .project-task-status-form,
  .project-task-actions {
    justify-content: flex-start;
  }

  .project-task-status-form select,
  .project-task-status-form .btn,
  .project-action-button {
    width: 100%;
  }

  .attachment-row {
    align-items: start;
  }
}
