@font-face {
  font-family: "Titillium Web";
  src: url("../fonts/Titillium_Web/TitilliumWeb-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src: url("../fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Titillium Web";
  src: url("../fonts/Titillium_Web/TitilliumWeb-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink-950);
  background: linear-gradient(180deg, #ffffff 0, var(--paper) 260px, #f1f5f9 100%);
  background-attachment: fixed;
  font-family: "Titillium Web", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

* {
  font-family: inherit;
  letter-spacing: 0;
}

::selection {
  color: var(--ink-950);
  background: var(--its-cyan);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--its-teal) var(--paper);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--paper);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid var(--paper);
  border-radius: 8px;
  background: var(--its-teal);
}

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-link-hover);
}

button,
input,
select,
textarea,
.btn {
  letter-spacing: 0;
}

:focus-visible {
  outline: 3px solid rgba(var(--its-cyan-rgb), 0.38);
  outline-offset: 2px;
}

.fw-bold {
  font-weight: 600 !important;
}

.color-primary {
  color: var(--its-cyan-dark) !important;
}

.bg-custom-primary {
  color: var(--ink-950);
  border-color: var(--its-cyan);
  background: var(--its-cyan);
}

.visually-hidden-focusable:focus {
  position: fixed !important;
  z-index: 10000;
  top: 12px;
  left: 12px;
  width: auto !important;
  height: auto !important;
  padding: 0.6rem 0.85rem !important;
  overflow: visible !important;
  clip: auto !important;
  color: var(--ink-950);
  background: var(--its-cyan);
}

.navbar-custom {
  position: sticky;
  z-index: 1030;
  top: 12px;
  width: min(calc(100% - 24px), 1680px);
  min-height: 68px;
  margin: 12px auto 0;
  padding: 0;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  backdrop-filter: saturate(150%) blur(20px);
}

.navbar-custom .container-fluid {
  min-height: 66px;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.25rem);
}

.navbar-brand {
  display: grid;
  min-width: 224px;
  min-height: 46px;
  margin: 0;
  padding: 0.25rem 0.5rem;
  align-items: center;
}

.navbar-brand img {
  display: block;
  width: 190px;
  height: auto;
}

.topbar-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 0.5rem;
}

.topbar-actions .btn {
  min-height: 40px;
}

.topbar-role {
  display: inline-flex;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.18);
  border-radius: 999px;
  color: var(--ink-700);
  background: var(--surface-subtle);
  box-shadow: inset 0 1px 0 #ffffff;
  font-size: 0.78rem;
  line-height: 1;
}

.btn-custom-survey {
  color: var(--pollme-navy);
  border-color: rgba(var(--its-cyan-rgb), 0.32);
  background: rgba(var(--its-cyan-rgb), 0.08);
}

.survey-nav-badge {
  min-width: 1.35rem;
  padding: 0.3rem 0.42rem;
  color: #ffffff;
  background: var(--its-orange);
  box-shadow: 0 3px 9px rgba(var(--its-orange-rgb), 0.28);
  font-size: 0.66rem;
  line-height: 1;
}

.btn-custom-survey:hover,
.btn-custom-survey:focus-visible,
.btn-custom-survey.is-active {
  color: #ffffff;
  border-color: var(--pollme-navy);
  background: var(--pollme-navy);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.btn-custom-survey:hover .survey-nav-badge,
.btn-custom-survey:focus-visible .survey-nav-badge,
.btn-custom-survey.is-active .survey-nav-badge {
  color: var(--pollme-navy);
  background: #ffffff;
}

.btn,
.btn-custom {
  display: inline-flex;
  min-height: 40px;
  margin: 0;
  padding: 0.55rem 0.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.btn:hover,
.btn-custom:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn-custom:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-sm {
  min-width: 36px;
  min-height: 36px;
  padding: 0.45rem 0.65rem;
}

.btn-icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.btn-custom-size {
  padding: 0.55rem 0.9rem;
}

.btn-custom-size-lg {
  min-height: 50px;
  padding: 0.75rem 1.15rem;
  font-size: 1rem;
}

.btn-custom-primary {
  color: var(--btn-primary-color);
  border-color: var(--btn-primary-border-color);
  background: var(--btn-primary-bg);
  box-shadow: 0 10px 22px rgba(var(--its-cyan-rgb), 0.2);
}

.btn-custom-primary:hover {
  color: #ffffff;
  border-color: var(--btn-primary-border-color-hover);
  background: var(--btn-primary-bg-hover);
}

.btn-custom-outline-primary {
  color: var(--its-teal-dark);
  border-color: var(--its-teal);
  background: transparent;
}

.btn-custom-outline-primary:hover {
  color: var(--ink-950);
  border-color: var(--its-teal);
  background: var(--surface-muted);
}

.btn-custom-cancel,
.btn-custom-outline-cancel {
  color: var(--ink-800);
  border-color: var(--line-strong);
  background: var(--surface);
}

.btn-custom-cancel:hover,
.btn-custom-outline-cancel:hover {
  color: #ffffff;
  border-color: var(--its-teal-dark);
  background: var(--its-teal-dark);
}

.btn-custom-danger {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.btn-custom-outline-danger {
  color: #ff9ba2;
  border-color: #6f343a;
  background: transparent;
}

.btn-custom-danger:hover,
.btn-custom-outline-danger:hover {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.btn-custom-success {
  color: #ffffff;
  border-color: var(--success);
  background: var(--success);
}

.btn-custom-outline-success {
  color: #69d99d;
  border-color: #32664a;
  background: transparent;
}

.btn-custom-success:hover,
.btn-custom-outline-success:hover {
  color: #ffffff;
  border-color: var(--success);
  background: var(--success);
}

.navbar-custom .btn-custom-outline-cancel {
  color: var(--ink-600);
  border-color: var(--line);
  background: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff;
}

.navbar-custom .btn-custom-outline-cancel:hover {
  color: #ffffff;
  border-color: var(--pollme-navy);
  background: var(--pollme-navy);
}

.app-main {
  width: 100%;
  padding: clamp(1.25rem, 2.5vw, 2.5rem);
}

.app-main-inner {
  width: min(100%, 1680px);
  margin: 0 auto;
}

.survey-results-main .app-main-inner {
  display: grid;
  gap: 1.25rem;
}

.survey-results-heading {
  margin-bottom: 0;
}

.survey-demo-badge {
  display: inline-flex;
  margin-left: 0.4rem;
  padding: 0.22rem 0.52rem;
  align-items: center;
  color: #9a4b0c;
  border: 1px solid rgba(255, 107, 0, 0.24);
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.09);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.survey-demo-alert {
  margin: 0;
  padding: 0.9rem 1rem;
  gap: 0.7rem;
  color: #78400d;
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 15px;
  background: #fff8ef;
  box-shadow: 0 10px 24px rgba(154, 75, 12, 0.06);
}

.survey-demo-alert > i {
  flex: 0 0 auto;
  color: var(--its-orange-dark);
  font-size: 1.1rem;
}

.survey-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.survey-kpi-card,
.survey-result-card,
.survey-empty-state {
  border: 1px solid rgba(var(--its-cyan-rgb), 0.14);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.survey-kpi-card {
  position: relative;
  display: flex;
  min-height: 150px;
  padding: 1.25rem;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
}

.survey-kpi-card-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(145deg, var(--pollme-navy), #18395a);
}

.survey-kpi-icon {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--its-cyan-dark);
  background: rgba(var(--its-cyan-rgb), 0.12);
  place-items: center;
}

.survey-kpi-card-primary .survey-kpi-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.survey-kpi-label {
  color: var(--ink-600);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.survey-kpi-card-primary .survey-kpi-label { color: rgba(255, 255, 255, 0.72); }

.survey-kpi-card strong {
  margin-top: 0.25rem;
  color: var(--ink-950);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.survey-kpi-card-primary strong { color: #ffffff; }
.survey-kpi-card strong small { margin-left: 0.15rem; font-size: 0.95rem; font-weight: 600; }

.survey-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.survey-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.survey-chart-grid-primary {
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.7fr);
}

.survey-chart-card {
  min-width: 0;
}

.survey-chart-wrap {
  position: relative;
  width: 100%;
  height: 310px;
}

.survey-chart-wrap-wide { height: 300px; }
.survey-chart-wrap-doughnut { height: 300px; }
.survey-chart-wrap-sections { height: 330px; }

.survey-result-card { padding: clamp(1.15rem, 2vw, 1.75rem); }
.survey-result-card-header { display: flex; margin-bottom: 1.25rem; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.survey-result-card-header h2 { margin: 0; color: var(--ink-950); font-size: 1.25rem; }
.survey-result-card-header p { margin: 0.3rem 0 0; color: var(--ink-600); font-size: 0.9rem; }

.survey-rating-list { display: grid; gap: 1rem; }
.survey-rating-meta { display: flex; margin-bottom: 0.42rem; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--ink-700); font-size: 0.86rem; }
.survey-rating-meta > span:last-child { flex: 0 0 auto; color: var(--ink-600); font-size: 0.78rem; }
.survey-rating-row .progress { height: 8px; border-radius: 999px; background: var(--surface-subtle); }
.survey-rating-row .progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--its-cyan), var(--its-cyan-dark)); }

.survey-product-results { display: grid; gap: 1.25rem; }
.survey-product-result > div:first-child { display: flex; margin-bottom: 0.5rem; align-items: center; justify-content: space-between; gap: 1rem; color: var(--ink-800); }
.survey-product-result strong { color: var(--its-cyan-dark); font-size: 1.1rem; }
.survey-product-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-subtle); }
.survey-product-track span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--its-orange); }

.survey-comments-card { overflow: hidden; padding-bottom: 0; }
.survey-comments-table { min-width: 760px; }
.survey-comments-table th { padding: 0.8rem 1rem; color: var(--ink-600); border-bottom-color: var(--line-strong); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.survey-comments-table td { padding: 1rem; color: var(--ink-800); border-bottom-color: var(--line); vertical-align: top; }
.survey-comment-type { display: inline-flex; padding: 0.3rem 0.55rem; border-radius: 999px; color: var(--its-cyan-dark); background: rgba(var(--its-cyan-rgb), 0.1); font-size: 0.76rem; font-weight: 700; }
.survey-comments-empty { padding: 1.25rem 0 1.75rem; color: var(--ink-600); }

.survey-empty-state {
  display: grid;
  min-height: 420px;
  padding: clamp(2rem, 5vw, 5rem);
  text-align: center;
  place-items: center;
  align-content: center;
}

.survey-empty-icon { display: grid; width: 72px; height: 72px; margin-bottom: 1.1rem; border-radius: 22px; color: var(--its-cyan-dark); background: rgba(var(--its-cyan-rgb), 0.12); font-size: 2rem; place-items: center; }
.survey-empty-state h2 { margin: 0; color: var(--ink-950); font-size: 1.7rem; }
.survey-empty-state p { max-width: 48ch; margin: 0.55rem auto 1.4rem; color: var(--ink-600); }

.projects-stage {
  min-height: calc(100vh - 104px - clamp(2rem, 5vw, 5rem));
}

.workspace-loading {
  display: grid;
  min-height: 380px;
  place-items: center;
  color: var(--ink-600);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.loading-mark {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.loading-mark i {
  color: var(--its-cyan-dark);
  font-size: 1.6rem;
  animation: loadingPulse 900ms ease-in-out infinite alternate;
}

@keyframes loadingPulse {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.icon-spin {
  display: inline-block;
  animation: iconSpin 800ms linear infinite;
}

@keyframes iconSpin {
  to { transform: rotate(360deg); }
}

.project-register {
  display: grid;
  overflow: visible;
  gap: 16px;
  border: 0;
  background: transparent;
}

.workspace-heading {
  display: flex;
  min-height: 112px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--ink-950);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07), inset 0 1px 0 #ffffff;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.workspace-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 1rem;
}

.workspace-title-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 12px 26px rgba(var(--its-cyan-rgb), 0.24);
  font-size: 1.05rem;
}

.workspace-heading h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
}

.workspace-heading p {
  max-width: 60ch;
  margin: 0.5rem 0 0;
  color: var(--ink-600);
}

.workspace-total {
  display: flex;
  min-width: 138px;
  padding: 0.55rem 0 0.55rem 1.5rem;
  align-items: center;
  gap: 0.7rem;
  border-left: 1px solid rgba(var(--its-cyan-rgb), 0.35);
  color: var(--ink-600);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
}

.workspace-total strong {
  color: var(--pollme-blue);
  font-size: 2.5rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.billing-insights {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.68fr);
  gap: 16px;
  background: transparent;
}

.billing-summary {
  min-width: 0;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--pollme-navy), var(--pollme-navy-soft));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.billing-summary-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #e3edef;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.billing-summary-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 8px 20px rgba(var(--its-cyan-rgb), 0.26);
}

.billing-kpi-label {
  margin: 1.5rem 0 0.25rem;
  color: #cadadd;
  font-size: 0.86rem;
  font-weight: 600;
}

.billing-total {
  display: block;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 2.65rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.billing-summary-meta {
  margin: 0.65rem 0 0;
  color: #cadadd;
  font-size: 0.84rem;
}

.billing-summary-meta strong { color: #ffffff; }

.billing-balance {
  display: grid;
  margin-top: 1.45rem;
  padding-top: 1.25rem;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--glass-border);
}

.billing-donut-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.billing-legend {
  display: grid;
  margin: 0;
  gap: 0.8rem;
}

.billing-legend > div {
  display: grid;
  gap: 0.15rem;
}

.billing-legend dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #cadadd;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.billing-legend dd {
  margin: 0 0 0 1rem;
  color: #ffffff;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.billing-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.billing-dot--open { background: var(--its-orange); }
.billing-dot--closed { background: var(--its-teal); }

.billing-chart-panel {
  min-width: 0;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.08), inset 0 1px 0 #ffffff;
}

.billing-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.billing-chart-heading h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: 1.3rem;
}

.billing-chart-heading p {
  margin: 0.3rem 0 0;
  color: var(--ink-600);
  font-size: 0.88rem;
}

.billing-year-badge {
  display: inline-grid;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  align-self: flex-start;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.5rem;
  color: var(--ink-600);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.24);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}

.billing-year-badge i {
  grid-row: 1 / 3;
  color: var(--its-cyan-dark);
  font-size: 1rem;
}

.billing-year-badge strong {
  color: var(--ink-950);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.billing-chart-wrap {
  position: relative;
  height: 245px;
  margin-top: 1.25rem;
}

.billing-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  color: var(--ink-500);
  text-align: center;
}

.billing-chart-empty i {
  color: var(--its-orange);
  font-size: 1.8rem;
}

.status-toolbar {
  display: flex;
  min-width: 0;
  padding: 0.9rem clamp(1rem, 2.5vw, 1.35rem);
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.status-toolbar-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  color: var(--pollme-blue);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-rail {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

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

.rail-filter {
  position: relative;
  display: grid;
  min-height: 50px;
  padding: 0.45rem 0.65rem;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-800);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-subtle);
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.rail-filter:hover {
  color: var(--ink-950);
  border-color: var(--its-cyan);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(var(--its-cyan-rgb), 0.1);
}

.rail-filter.is-active {
  color: #ffffff;
  border-color: var(--pollme-blue);
  background: linear-gradient(135deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 12px 26px rgba(var(--its-cyan-rgb), 0.2);
}

.rail-filter i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--its-teal-dark);
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.82rem;
}

.rail-filter.is-active i {
  color: var(--pollme-blue);
  background: rgba(255, 255, 255, 0.92);
}

.rail-filter[data-status-filter="terminato"] i {
  color: var(--its-orange-dark);
  background: var(--its-orange-soft);
}

.rail-filter.is-active[data-status-filter="terminato"] i {
  color: var(--its-orange-dark);
  background: rgba(255, 255, 255, 0.94);
}

.rail-filter[data-status-filter="chiuso"] i {
  color: var(--its-teal-dark);
  background: var(--success-soft);
}

.rail-filter.is-active[data-status-filter="chiuso"] i {
  color: var(--its-teal-dark);
  background: rgba(255, 255, 255, 0.94);
}

.rail-filter-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.45rem;
  line-height: 1;
}

.rail-filter-copy strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.rail-filter-copy span {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.register-toolbar {
  display: flex;
  min-width: 0;
  padding: 1rem clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
  margin-bottom: -16px;
}

.register-search {
  position: relative;
  width: min(100%, 560px);
}

.register-search i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1rem;
  color: var(--its-teal);
  transform: translateY(-50%);
  pointer-events: none;
}

.register-search .form-control {
  min-height: 46px;
  padding-left: 2.75rem;
  border-color: var(--line-strong);
  border-radius: 12px;
  background: var(--surface-subtle);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.025);
}

.register-search .form-control:focus {
  border-color: var(--its-cyan);
  background: #ffffff;
}

.register-result-count {
  flex: 0 0 auto;
  color: var(--ink-600);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.register-toolbar-meta {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 1rem;
}

.register-mobile-sort {
  position: relative;
  display: none;
  width: min(100%, 210px);
}

.register-mobile-sort i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0.8rem;
  color: var(--pollme-blue);
  transform: translateY(-50%);
  pointer-events: none;
}

.register-mobile-sort .form-select {
  min-height: 40px;
  padding-left: 2.25rem;
  border-color: var(--line-strong);
  border-radius: 12px;
  background-color: var(--surface-subtle);
  font-size: 0.85rem;
  font-weight: 600;
}

.project-table-frame {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), filter 180ms ease;
}

.project-register.is-updating .project-table-frame {
  opacity: 0.38;
  transform: translateY(5px);
  filter: blur(1px);
}

.project-table {
  width: 100%;
  min-width: 1140px;
  margin: 0;
  border-collapse: collapse;
}

.project-table--details {
  min-width: 720px;
  table-layout: fixed;
}

.project-table--details .detail-col-date { width: 15%; }
.project-table--details .detail-col-description { width: auto; }
.project-table--details .detail-col-amount { width: 13%; }
.project-table--details .detail-col-recurrence { width: 14%; }
.project-table--details .detail-col-actions { width: 190px; }

.project-table thead th {
  padding: 0.75rem 1rem;
  color: #e8eef5 !important;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--pollme-navy) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-table thead th.sortable-column {
  padding: 0;
}

.table-sort {
  display: flex;
  width: 100%;
  min-height: 43px;
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: 1;
  text-transform: inherit;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.table-sort--end {
  justify-content: flex-end;
}

.table-sort i {
  color: #91a4b8;
  font-size: 0.7rem;
}

.table-sort:hover,
.table-sort:focus-visible,
.sortable-column[aria-sort="ascending"] .table-sort,
.sortable-column[aria-sort="descending"] .table-sort {
  color: #ffffff;
  background: rgba(var(--its-cyan-rgb), 0.14);
}

.sortable-column[aria-sort="ascending"] .table-sort i,
.sortable-column[aria-sort="descending"] .table-sort i {
  color: var(--its-cyan);
}

.project-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.project-table tbody tr:last-child { border-bottom: 0; }

.project-table tbody tr:hover,
.project-table tbody tr:focus-within {
  background: #f8fbfd;
  box-shadow: inset 3px 0 0 var(--its-cyan);
}

.project-table tbody tr:nth-child(even):not(:hover):not(:focus-within) {
  background: var(--surface-subtle);
}

.project-table td {
  padding: 0.8rem 1rem;
  vertical-align: middle;
  border: 0;
  color: var(--ink-800);
}

.project-table--details thead th {
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
}

.project-table--details td {
  padding: 0.6rem 0.75rem;
  line-height: 1.35;
}

.project-table--details td:nth-child(2) {
  overflow-wrap: anywhere;
}

.project-table tbody tr.project-deposit-row {
  background: #fff6cc !important;
  box-shadow: inset 0 1px 0 rgba(180, 118, 0, 0.08);
}

.project-table tbody tr.project-deposit-row:hover,
.project-table tbody tr.project-deposit-row:focus-within {
  background: #ffedaa !important;
  box-shadow: inset 3px 0 0 #d49a00;
}

.project-deposit-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #5f4300;
  font-weight: 700;
}

.project-deposit-label i { color: #b77900; }

.project-deposit-amount {
  color: #765300 !important;
  font-weight: 700;
}

.project-deposit-status {
  display: inline-flex;
  min-height: 26px;
  padding: 0.25rem 0.55rem;
  align-items: center;
  color: #5f4300;
  border: 1px solid rgba(180, 118, 0, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.project-sequence {
  width: 58px;
  color: var(--ink-500) !important;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.project-name {
  display: block;
  color: var(--ink-950);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.project-meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.project-cost {
  width: 132px;
  color: var(--ink-950) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.project-created {
  width: 118px;
  color: var(--ink-700) !important;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.project-actions {
  width: 180px;
  white-space: nowrap;
  text-align: right;
}

.project-actions .btn {
  color: var(--pollme-blue);
  border-color: var(--line-strong);
  background: #ffffff;
  border-radius: 10px;
}

.project-actions .btn:hover {
  color: var(--ink-950);
  border-color: var(--its-teal);
  background: var(--surface-muted);
}

.project-actions .btn-action-danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.project-actions--details {
  width: auto;
  white-space: nowrap;
}

.project-actions-inline {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.project-actions .btn-detail-action {
  display: inline-flex;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-actions .btn-detail-action span { line-height: 1; }

.project-actions .btn-detail-action.btn-action-danger {
  color: var(--danger);
  border-color: rgba(179, 45, 55, 0.22);
  background: var(--danger-soft);
}

.project-actions .btn-detail-action.btn-action-danger:hover,
.project-actions .btn-detail-action.btn-action-danger:focus-visible {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.project-archived-label {
  display: inline-flex;
  min-height: 32px;
  padding-inline: 0.55rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-500);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.project-archived-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.project-survey-sent-indicator {
  display: inline-grid;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 140, 185, 0.22);
  border-radius: 50%;
  place-items: center;
  color: var(--pollme-blue);
  background: #eef9fd;
  font-size: 0.9rem;
  cursor: help;
}

.status-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.status-badge i {
  width: 14px;
  text-align: center;
}

.status-badge--corso {
  color: var(--pollme-blue);
  background: #eef9fd;
}

.status-badge--terminato {
  color: var(--its-orange-dark);
  background: var(--its-orange-soft);
}

.status-badge--fatturato {
  color: var(--its-teal-dark);
  background: var(--success-soft);
}

.status-badge--chiuso {
  color: var(--ink-600);
  background: var(--surface-muted);
}

.empty-register,
.register-error {
  display: grid;
  min-height: 280px;
  padding: 2rem;
  place-items: center;
  text-align: center;
}

.empty-register-inner,
.register-error-inner {
  max-width: 48ch;
}

.empty-register i,
.register-error i {
  margin-bottom: 1rem;
  color: var(--its-cyan-dark);
  font-size: 2rem;
}

.register-error i { color: var(--danger); }

.empty-register h2,
.register-error h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.empty-register p,
.register-error p {
  margin: 0;
  color: var(--ink-600);
}

.project-view-enter {
  animation: projectViewIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes projectViewIn {
  from {
    opacity: 0.35;
    transform: translateY(10px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.project-detail {
  overflow: hidden;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.09);
}

.detail-topbar {
  position: relative;
  display: flex;
  min-height: 64px;
  padding: 0.65rem 0.75rem 0.65rem 0.9rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-900);
  border-bottom: 1px solid rgba(var(--its-cyan-rgb), 0.2);
  background: rgba(247, 251, 253, 0.94);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -1px 0 rgba(var(--its-cyan-rgb), 0.06), 0 10px 28px rgba(15, 23, 42, 0.05);
  -webkit-backdrop-filter: saturate(135%) blur(20px);
  backdrop-filter: saturate(135%) blur(20px);
}

.detail-back {
  display: inline-flex;
  min-height: 40px;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-800);
  border-radius: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.detail-back i {
  display: grid;
  width: 28px;
  height: 28px;
  margin: 0 !important;
  place-items: center;
  color: var(--its-cyan-dark);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.26);
  border-radius: 9px;
  background: rgba(var(--its-cyan-rgb), 0.08);
}

.detail-back:hover {
  color: var(--its-cyan-dark);
  background: rgba(var(--its-cyan-rgb), 0.08);
  transform: translateX(-1px);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.detail-action-group {
  display: inline-flex;
  padding: 0.25rem;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 #ffffff, 0 7px 18px rgba(15, 23, 42, 0.06);
}

.detail-actions-divider {
  width: 1px;
  height: 28px;
  background: var(--line-strong);
}

.detail-actions .btn {
  min-height: 38px;
  border-radius: 9px;
}

.detail-toolbar-button {
  min-width: 38px;
  padding: 0.45rem 0.65rem;
  color: var(--ink-600);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.detail-toolbar-button:hover,
.detail-toolbar-button:focus-visible {
  color: var(--its-cyan-dark);
  border-color: rgba(var(--its-cyan-rgb), 0.24);
  background: rgba(var(--its-cyan-rgb), 0.09);
}

.detail-export-action {
  color: var(--its-cyan-dark);
  border-color: rgba(var(--its-cyan-rgb), 0.24);
  background: rgba(var(--its-cyan-rgb), 0.09);
}

.detail-export-action i { color: var(--its-cyan-dark); }

.detail-state-action {
  padding-inline: 0.85rem;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.detail-state-action--success {
  color: var(--success);
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--success-soft);
}

.detail-state-action--success:hover,
.detail-state-action--success:focus-visible {
  color: #ffffff;
  border-color: rgba(94, 234, 212, 0.5);
  background: var(--success);
}

.detail-state-action--survey {
  color: var(--its-cyan-dark);
  border-color: rgba(var(--its-cyan-rgb), 0.28);
  background: rgba(var(--its-cyan-rgb), 0.1);
}

.detail-state-action--survey:hover,
.detail-state-action--survey:focus-visible {
  color: #ffffff;
  border-color: var(--its-cyan);
  background: linear-gradient(135deg, var(--pollme-blue), var(--its-cyan));
}

.detail-state-action--danger {
  color: var(--danger);
  border-color: rgba(179, 45, 55, 0.2);
  background: var(--danger-soft);
}

.detail-state-action--danger:hover,
.detail-state-action--danger:focus-visible {
  color: #ffffff;
  border-color: #d95b65;
  background: var(--danger);
}

.detail-actions .detail-quick-action {
  display: inline-flex;
  padding-inline: 0.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  font-weight: 600;
}

.detail-actions .detail-quick-action:disabled {
  opacity: 0.72;
}

.detail-heading {
  display: flex;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.detail-heading h1 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.detail-heading p {
  margin: 0.55rem 0 0;
  color: var(--ink-600);
}

.detail-total {
  display: grid;
  min-width: 180px;
  justify-items: end;
  color: var(--ink-600);
  font-size: 0.82rem;
}

.detail-total strong {
  color: var(--its-orange-dark);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.detail-content-grid {
  display: grid;
  grid-template-areas:
    "facts related"
    "table related";
  grid-template-columns: minmax(0, 1fr) clamp(280px, 21vw, 330px);
  align-items: stretch;
}

.detail-project-summary {
  min-width: 0;
  grid-area: facts;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.detail-fact {
  min-width: 0;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--line-strong);
}

.detail-fact:last-child { border-right: 0; }

.detail-fact span {
  display: block;
  color: var(--ink-600);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.detail-fact strong {
  display: block;
  margin-top: 0.25rem;
  overflow: hidden;
  color: var(--ink-950);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-fact--committente {
  color: #ffffff;
  background: var(--its-teal-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.detail-fact--committente span {
  color: rgba(255, 255, 255, 0.74);
}

.detail-fact--committente span i {
  margin-right: 0.4rem;
  color: var(--its-cyan);
}

.detail-fact--committente strong {
  color: #ffffff;
  font-weight: 700;
}

.detail-contacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.detail-contact {
  min-width: 0;
  padding: 0.9rem 1.25rem;
  border-right: 1px solid var(--line-strong);
  box-shadow: inset 0 3px 0 rgba(var(--its-cyan-rgb), 0.1);
}

.detail-contact:last-child { border-right: 0; }

.detail-contact span {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--ink-600);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.detail-contact span i { color: var(--pollme-blue); }

.detail-contact strong {
  display: block;
  margin-top: 0.28rem;
  overflow: hidden;
  color: var(--ink-950);
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-contact a {
  color: var(--its-teal-dark);
  text-decoration: none;
}

.detail-contact a:hover,
.detail-contact a:focus-visible {
  color: var(--pollme-blue);
  text-decoration: underline;
}

.detail-table-wrap {
  grid-area: table;
  padding: clamp(0.85rem, 1.8vw, 1.35rem);
}

.detail-table-wrap .project-table-frame {
  border-radius: 0 0 14px 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.related-projects {
  min-width: 0;
  padding: 1.15rem;
  grid-area: related;
  border-left: 1px solid var(--line-strong);
  background: var(--surface-subtle);
}

.related-projects-heading {
  display: flex;
  padding-bottom: 0.9rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--line-strong);
}

.related-projects-heading h2 {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-950);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.related-projects-heading h2 i { color: var(--pollme-blue); }

.related-projects-heading p {
  max-width: 230px;
  margin: 0.3rem 0 0;
  overflow: hidden;
  color: var(--ink-600);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-projects-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding-inline: 0.45rem;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: var(--pollme-blue);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.related-projects-total {
  display: flex;
  min-height: 68px;
  padding: 0.85rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line-strong);
}

.related-projects-total > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-700);
  font-size: 0.76rem;
  font-weight: 600;
}

.related-projects-total > span > i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  color: var(--its-cyan);
  border: 1px solid rgba(var(--its-cyan-rgb), 0.28);
  border-radius: 8px;
  background: rgba(var(--its-cyan-rgb), 0.08);
}

.related-projects-total > span > span {
  display: grid;
  gap: 0.08rem;
}

.related-projects-total small {
  color: var(--ink-500);
  font-size: 0.68rem;
  font-weight: 500;
}

.related-projects-total > strong {
  flex: 0 0 auto;
  color: var(--its-orange-dark);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.related-project-list {
  max-height: 590px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.related-project-list .related-project-item:last-child { border-bottom: 0; }

.related-project-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 88px;
  padding: 0.85rem 1.35rem 0.85rem 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 0.6rem;
  color: var(--ink-800);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, padding-left 150ms ease;
}

.related-project-item:hover,
.related-project-item:focus-visible {
  padding-left: 0.45rem;
  color: var(--ink-950);
  background: rgba(var(--its-cyan-rgb), 0.07);
}

.related-project-main,
.related-project-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.related-project-main > strong {
  overflow: hidden;
  color: currentColor;
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-project-item .status-badge {
  min-height: 24px;
  padding: 0.2rem 0.45rem;
  flex: 0 0 auto;
  font-size: 0.68rem;
}

.related-project-meta {
  color: var(--ink-600);
  font-size: 0.76rem;
}

.related-project-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.related-project-meta strong {
  color: var(--ink-800);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.related-project-arrow {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  color: var(--pollme-blue);
  transform: translateY(-50%);
}

.related-projects-empty {
  display: grid;
  min-height: 170px;
  padding: 1rem;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  color: var(--ink-600);
  text-align: center;
}

.related-projects-empty i {
  color: var(--success);
  font-size: 1.4rem;
}

.related-projects-empty p {
  max-width: 24ch;
  margin: 0;
}

.detail-section-heading {
  display: flex;
  margin-bottom: 0.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.detail-section-heading h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: 1.25rem;
}

.form-control,
.form-select {
  min-height: 44px;
  color: var(--ink-950);
  border-color: var(--line-strong);
  border-radius: 12px;
  background-color: #ffffff;
}

textarea.form-control { min-height: 110px; }
.form-control::placeholder { color: #66737b; }

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--its-teal);
  box-shadow: 0 0 0 0.22rem rgba(var(--its-cyan-rgb), 0.2);
}

.form-check-input:checked {
  border-color: var(--its-teal);
  background-color: var(--its-teal);
}

.form-label {
  margin-bottom: 0.35rem;
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 600;
}

.app-modal .modal-dialog {
  width: min(calc(100% - 2rem), 640px);
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
}

.app-modal #close_project.modal-dialog { max-width: 480px; }
.app-modal #finish_project.modal-dialog { max-width: 520px; }
.app-modal .modal-dialog.modal-sm { max-width: 340px; }

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(8, 12, 15, 0.3), inset 0 1px 0 #ffffff;
}

.modal-header {
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 0.75rem 0.85rem 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #ffffff;
  border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(145deg, var(--pollme-navy), var(--pollme-navy-soft));
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  -webkit-backdrop-filter: saturate(145%) blur(20px);
  backdrop-filter: saturate(145%) blur(20px);
}

.modal-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  flex: 1 1 auto;
}

.modal-title-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: linear-gradient(145deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 8px 18px rgba(var(--its-cyan-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.modal-title-icon--warning {
  color: var(--pollme-navy);
  background: linear-gradient(145deg, #ffb26f, var(--its-orange));
  box-shadow: 0 8px 18px rgba(var(--its-orange-rgb), 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.modal-title-icon--danger {
  background: linear-gradient(145deg, #b8323d, var(--danger));
  box-shadow: 0 8px 18px rgba(153, 27, 37, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-title-icon--success {
  background: linear-gradient(145deg, #159785, var(--success));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.modal-title {
  overflow: hidden;
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-header .btn-close {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  margin-left: auto;
  flex: 0 0 34px;
  border-radius: 10px;
  background-size: 12px;
  filter: invert(1) grayscale(1);
  opacity: 0.72;
  transition: background-color 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus-visible {
  background-color: rgba(255, 255, 255, 0.14);
  opacity: 1;
  transform: rotate(4deg);
}

.modal-body {
  max-height: min(72vh, 650px);
  padding: 1.1rem;
  overflow-y: auto;
  scrollbar-color: rgba(var(--its-cyan-rgb), 0.65) transparent;
  scrollbar-width: thin;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 0.8rem 1rem;
}

.app-modal-form { width: 100%; }

.entry-type-switch {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.entry-type-switch legend {
  width: auto;
  margin: 0 0 0.35rem;
  color: var(--ink-700);
  font-size: 0.82rem;
  font-weight: 600;
}

.entry-type-options {
  display: grid;
  padding: 0.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-muted);
}

.entry-type-options .btn {
  display: inline-flex;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--ink-600);
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: none;
}

.entry-type-options .btn-check:checked + .btn {
  color: #ffffff;
  background: var(--pollme-navy);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.entry-type-options .btn-check:focus-visible + .btn {
  box-shadow: 0 0 0 0.22rem rgba(var(--its-cyan-rgb), 0.22);
}

.modal-field {
  min-width: 0;
  margin: 0;
}

.modal-field--full { grid-column: 1 / -1; }

.modal-section-title {
  display: flex;
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-950);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-section-title i { color: var(--its-cyan-dark); }

.modal-field .form-label {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.modal-field .form-label i { color: var(--pollme-blue); }

.app-modal .form-control,
.app-modal .form-select,
.app-modal .select2-container--default .select2-selection--single {
  min-height: 42px;
  border-radius: 10px;
  background-color: var(--surface-subtle);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.035);
}

.app-modal textarea.form-control {
  min-height: 78px;
  resize: vertical;
}

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

.modal-switch {
  display: flex;
  min-height: 46px;
  padding: 0.55rem 0.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-subtle);
  box-shadow: inset 0 1px 0 #ffffff;
}

.modal-switch > label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-800);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-switch > label i { color: var(--pollme-blue); }
.modal-switch .form-check { min-height: 0; margin: 0; }
.modal-switch .form-check-input { margin: 0; cursor: pointer; }

.modal-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 0.5rem;
}

.modal-input-action .btn {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 10px;
}

.modal-confirm {
  display: grid;
  padding: 0.9rem;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.modal-confirm--warning {
  border-color: rgba(var(--its-orange-rgb), 0.28);
  background: var(--warning-soft);
}

.modal-confirm--danger {
  border-color: rgba(153, 27, 37, 0.2);
  background: var(--danger-soft);
}

.modal-confirm--success {
  border-color: rgba(15, 118, 110, 0.22);
  background: var(--success-soft);
}

.modal-confirm-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--its-orange-dark);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
  box-shadow: inset 0 1px 0 #ffffff;
}

.modal-confirm--danger .modal-confirm-icon { color: var(--danger); }
.modal-confirm--success .modal-confirm-icon { color: var(--success); }

.modal-confirm p {
  margin: 0;
  color: var(--ink-800);
  line-height: 1.45;
}

.delete-detail-summary {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.delete-detail-summary > div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.delete-detail-summary .delete-detail-summary-description { grid-column: 1 / -1; }

.delete-detail-summary dt {
  margin-bottom: 0.25rem;
  color: var(--ink-500);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
}

.delete-detail-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-900);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}

.survey-mail-modal-subtitle {
  margin: 0.2rem 0 0;
  color: var(--ink-600);
  font-size: 0.78rem;
  font-weight: 500;
}

.app-modal .modal-dialog.survey-mail-dialog {
  width: min(calc(100% - 3rem), 1260px);
  max-width: 1260px;
}

.survey-mail-modal-body {
  padding: 1.15rem;
  background: #f4f8fb;
}

.survey-mail-panel,
.survey-mail-preview {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 34, 61, 0.07), inset 0 1px 0 #ffffff;
}

.survey-mail-meta {
  display: grid;
  padding: 0.8rem;
  gap: 0.12rem;
  border: 1px solid rgba(var(--its-cyan-rgb), 0.2);
  border-radius: 11px;
  background: rgba(var(--its-cyan-rgb), 0.07);
}

.survey-mail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--its-cyan-dark);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.survey-mail-meta strong {
  color: var(--ink-900);
  font-size: 0.82rem;
}

.survey-mail-meta small { color: var(--ink-600); }

.survey-mail-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink-600);
  font-size: 0.75rem;
  line-height: 1.45;
}

.survey-mail-note i {
  margin-top: 0.05rem;
  color: var(--success);
  font-size: 1rem;
}

.survey-mail-preview-label {
  display: inline-flex;
  margin-bottom: 0.7rem;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.survey-mail-preview-label i { color: var(--its-cyan-dark); }

.survey-mail-preview-card {
  overflow: hidden;
  border: 1px solid #eadfd6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(64, 40, 26, 0.13);
}

.survey-mail-preview-accent {
  height: 6px;
  background: linear-gradient(90deg, var(--its-cyan) 0 58%, var(--its-orange) 58% 82%, #f7b955 82% 100%);
}

.survey-mail-preview-logo {
  display: flex;
  padding: 1rem 1.15rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.survey-mail-preview-logo img {
  display: block;
  width: 145px;
  max-width: 100%;
  height: auto;
}

.survey-mail-preview-logo span {
  color: #9a5a31;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.survey-mail-preview-hero {
  display: grid;
  min-height: 235px;
  padding: 1.35rem 1.1rem 1.3rem;
  grid-template-columns: minmax(0, 1.08fr) minmax(150px, 0.92fr);
  align-items: center;
  gap: 0.5rem;
  color: #173b53;
  background: linear-gradient(135deg, #fff8f2 0%, #eef9fd 100%);
}

.survey-mail-preview-hero-copy > span {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.55rem;
  color: #a8470b;
  border: 1px solid #f3c7a8;
  border-radius: 999px;
  background: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.survey-mail-preview-hero h6 {
  max-width: 380px;
  margin: 0;
  color: #173b53;
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.survey-mail-preview-hero p {
  max-width: 390px;
  margin: 0.75rem 0 0;
  color: #526879;
  font-size: 0.75rem;
  line-height: 1.5;
}

.survey-mail-preview-art {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 14px 22px rgba(141, 82, 39, 0.18));
}

.survey-mail-preview-copy { padding: 1.1rem 1.15rem 1.2rem; }

.survey-mail-preview-copy p {
  margin: 0 0 0.55rem;
  color: #50617a;
  font-size: 0.73rem;
  line-height: 1.5;
}

.survey-mail-preview-copy p strong { color: #13213b; }

.survey-mail-preview-cta {
  display: inline-flex;
  margin: 0.65rem 0 0.85rem;
  padding: 0.68rem 0.85rem;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  border-radius: 8px;
  background: var(--its-orange);
  box-shadow: 0 8px 20px rgba(var(--its-orange-rgb), 0.24);
  font-size: 0.7rem;
  font-weight: 700;
}

.survey-mail-preview-copy small {
  display: block;
  padding-top: 0.75rem;
  color: #6b7b91;
  border-top: 1px solid #e3eaf0;
  font-size: 0.62rem;
}

.modal-footer {
  min-height: 62px;
  padding: 0.7rem 1rem;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.96);
  box-shadow: inset 0 1px 0 #ffffff;
}

.modal-footer .btn {
  min-width: 116px;
  min-height: 42px;
  padding-inline: 1rem;
  border-radius: 10px;
}

.modal-footer .btn-custom-primary {
  border-color: var(--its-cyan-dark);
  background: linear-gradient(135deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 10px 22px rgba(var(--its-cyan-rgb), 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.modal-footer .btn-custom-outline-cancel {
  color: var(--ink-700);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06), inset 0 1px 0 #ffffff;
}

.modal-footer .btn-custom-danger {
  box-shadow: 0 10px 22px rgba(153, 27, 37, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.modal-loading-content { min-height: 128px; }

.modal-loading {
  display: grid;
  min-height: 128px;
  padding: 1.5rem;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  color: var(--ink-700);
  font-size: 0.86rem;
  font-weight: 600;
}

.modal-loading-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--pollme-blue), var(--its-cyan));
  box-shadow: 0 10px 22px rgba(var(--its-cyan-rgb), 0.22);
}

.modal-backdrop {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal-backdrop.show { opacity: 0.62; }
.select2-container { width: 100% !important; }

.select2-container--default .select2-selection--single {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  color: var(--ink-950);
  line-height: 26px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 5px;
  right: 8px;
}

.bg-login {
  min-height: 100vh;
  background-color: var(--ink-950);
  background-image: url("../img/login-event-control.jpg");
  background-position: center center;
  background-size: cover;
}

.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px);
  background: rgba(5, 15, 24, 0.25);
}

.login-brand-space {
  display: flex;
  min-width: 0;
  padding: clamp(2rem, 5vw, 5rem);
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.login-brand-mark {
  width: min(320px, 76%);
  filter: drop-shadow(0 14px 26px rgba(8, 12, 15, 0.3));
}

.login-brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.login-brand-copy {
  max-width: 620px;
  margin-top: auto;
  padding-top: 4rem;
}

.login-brand-copy h1 {
  max-width: 15ch;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.5rem, 4.6vw, 5rem);
  font-weight: 700;
  line-height: 0.94;
  text-shadow: 0 10px 34px rgba(5, 15, 24, 0.4);
}

.login-brand-copy p {
  max-width: 48ch;
  margin: 1.25rem 0 0;
  color: #eef7fa;
  font-size: 1.05rem;
  text-shadow: 0 6px 24px rgba(5, 15, 24, 0.48);
}

.login-panel {
  display: flex;
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  color: var(--ink-900);
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 4px 0 var(--its-cyan), -22px 0 64px rgba(0, 52, 63, 0.26);
}

.login-form-wrap { width: 100%; }

.login-form-wrap h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
}

.login-form-wrap > p {
  margin: 0.75rem 0 2rem;
  color: var(--ink-600);
}

.login-role {
  display: inline-flex;
  margin-bottom: 1.4rem;
  padding: 0.3rem 0.65rem;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--its-cyan);
  border-radius: 999px;
  color: var(--pollme-blue);
  background: #eef9fd;
  font-size: 0.78rem;
  font-weight: 600;
}

.login-submit { width: 100%; }

.toast {
  position: fixed;
  z-index: 1090;
  top: 20px;
  right: 20px;
  width: min(420px, calc(100vw - 40px));
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 75, 90, 0.2);
}

.alert { border-radius: 14px; }

.alert-full-msg {
  padding: 2rem 1.25rem;
  color: var(--color-alert-full-msg);
  border: 1px solid var(--line);
  background: var(--bg-alert-full-msg);
}

.alert-success-custom {
  color: var(--color-alert-high-contrast-success);
  background: var(--bg-alert-success);
}

.alert-error-custom {
  color: var(--color-alert-high-contrast-error);
  background: var(--bg-alert-error);
}

.alert-warning-custom {
  color: var(--color-alert-high-contrast-warning);
  background: var(--bg-alert-warning);
}

@media (max-width: 1199.98px) {
  .detail-content-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .detail-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .detail-fact:nth-child(3n) { border-right: 0; }

  .detail-fact:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line-strong);
  }
}

@media (max-width: 991.98px) {
  .navbar-brand { min-width: 230px; }
  .navbar-brand img { width: 188px; }

  .survey-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .survey-chart-grid,
  .survey-chart-grid-primary { grid-template-columns: 1fr; }
  .survey-results-grid { grid-template-columns: 1fr; }

  .billing-insights { grid-template-columns: 1fr; }
  .status-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .status-rail--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .detail-content-grid {
    grid-template-areas:
      "facts"
      "related"
      "table";
    grid-template-columns: minmax(0, 1fr);
  }

  .related-projects {
    padding: 1rem clamp(1rem, 2.5vw, 2rem);
    border-bottom: 1px solid var(--line-strong);
    border-left: 0;
  }

  .related-project-list { max-height: 300px; }

  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, 46vw); }
  .login-brand-copy h1 { font-size: 3.6rem; }
}

@media (max-width: 767.98px) {
  .app-modal .modal-dialog {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  .modal-header { padding-inline: 0.8rem; }

  .modal-body {
    max-height: calc(100dvh - 136px);
    padding: 0.9rem;
  }

  .modal-form-grid { grid-template-columns: 1fr; }
  .modal-field--full { grid-column: auto; }

  .modal-footer {
    padding: 0.65rem 0.8rem;
    flex-wrap: nowrap;
  }

  .modal-footer .btn {
    min-width: 0;
    flex: 1 1 0;
  }

  .survey-mail-modal-body { padding: 0.8rem; }
  .app-modal .modal-dialog.survey-mail-dialog {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
  }
  .survey-mail-panel,
  .survey-mail-preview { padding: 0.8rem; }

  .survey-mail-preview-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .survey-mail-preview-hero h6,
  .survey-mail-preview-hero p { margin-inline: auto; }

  .survey-mail-preview-art { max-width: 215px; }

  .navbar-custom {
    top: 8px;
    width: calc(100% - 16px);
    min-height: 60px;
    margin-top: 8px;
    border-radius: 16px;
  }

  .navbar-custom .container-fluid { min-height: 58px; }

  .navbar-brand {
    min-width: 0;
    min-height: 44px;
    padding: 0.35rem 0.25rem;
  }

  .navbar-brand img { width: 154px; }
  .topbar-actions { padding-left: 0.75rem; }
  .topbar-role,
  .btn-text { display: none; }

  .navbar-custom .btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  .survey-kpi-grid { grid-template-columns: 1fr; }
  .survey-kpi-card { min-height: 128px; }
  .survey-chart-wrap,
  .survey-chart-wrap-wide,
  .survey-chart-wrap-doughnut { height: 270px; }
  .survey-chart-wrap-sections { height: 350px; }
  .survey-rating-meta { align-items: flex-start; flex-direction: column; gap: 0.15rem; }
  .survey-result-card { border-radius: 16px; }
  .survey-demo-badge { display: table; margin: 0.45rem 0 0; }

  .app-main { padding: 1.25rem 0.5rem 0.75rem; }

  .workspace-heading {
    min-height: 0;
    padding: 1.2rem 1rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
    border-radius: 18px;
  }

  .workspace-heading h1 { font-size: 1.75rem; }
  .workspace-heading p { font-size: 0.9rem; }
  .workspace-title { gap: 0.75rem; }
  .workspace-title-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }
  .workspace-total {
    min-width: 0;
    padding: 0.65rem 0 0;
    align-self: flex-end;
    gap: 0.45rem;
    border-top: 1px solid rgba(var(--its-cyan-rgb), 0.28);
    border-left: 0;
    font-size: 0.62rem;
  }
  .workspace-total strong { font-size: 2rem; }

  .billing-summary,
  .billing-chart-panel {
    padding: 1.25rem;
    border-radius: 18px;
  }

  .billing-total { font-size: 2.2rem; }

  .billing-balance { grid-template-columns: 96px minmax(0, 1fr); }

  .billing-donut-wrap {
    width: 96px;
    height: 96px;
  }

  .billing-chart-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .billing-chart-wrap { height: 230px; }

  .status-toolbar {
    padding: 0.85rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    border-radius: 18px;
  }

  .status-rail {
    overflow-x: auto;
    padding: 0;
    grid-template-columns: repeat(3, minmax(142px, 1fr));
    gap: 0.5rem;
    overscroll-behavior-inline: contain;
  }

  .status-rail--4 { grid-template-columns: repeat(4, minmax(142px, 1fr)); }

  .register-toolbar {
    padding: 0.85rem;
    align-items: stretch;
    flex-direction: column;
    border-radius: 18px 18px 0 0;
  }

  .register-toolbar-meta {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .register-mobile-sort { display: block; }
  .register-result-count { align-self: center; }
  .project-table { min-width: 0; }

  .project-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .project-table tbody,
  .project-table tr,
  .project-table td {
    display: block;
    width: 100%;
  }

  .project-table tbody tr {
    position: relative;
    display: grid;
    padding: 0.9rem;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem 0.85rem;
  }

  .project-table td { padding: 0; }

  .project-sequence {
    grid-row: 1 / span 2;
    width: 36px;
    text-align: left;
  }

  .project-status-cell,
  .project-main-cell,
  .project-committente-cell,
  .project-client-cell,
  .project-created,
  .project-cost {
    grid-column: 2;
    width: auto;
    text-align: left;
  }

  .project-committente-cell::before,
  .project-client-cell::before,
  .project-created::before,
  .project-cost::before {
    margin-right: 0.45rem;
    color: var(--ink-500);
    content: attr(data-label) ":";
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .project-actions {
    display: flex !important;
    width: auto;
    padding-top: 0.7rem !important;
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
  }

  .detail-topbar,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions { width: 100%; }

  .detail-actions-divider { display: none; }

  .detail-action-group { width: 100%; }

  .detail-action-group--tools {
    display: grid;
    grid-template-columns: 40px 40px minmax(132px, 1fr) 40px;
  }

  .detail-action-group--lifecycle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-action-group--tools .detail-toolbar-button { width: 100%; }

  .detail-actions .detail-quick-action {
    width: 100%;
  }

  .detail-total {
    min-width: 0;
    justify-items: start;
  }

  .detail-facts { grid-template-columns: 1fr; }

  .detail-contacts { grid-template-columns: 1fr; }

  .detail-contact {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .detail-contact:last-child { border-bottom: 0; }

  .detail-fact,
  .detail-fact:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .detail-fact:last-child { border-bottom: 0; }

  .login-shell {
    display: block;
    min-height: 100vh;
    padding-top: 28vh;
  }

  .login-brand-space {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    min-height: 28vh;
    padding: 1.25rem;
  }

  .login-brand-mark { width: 230px; }
  .login-brand-copy { display: none; }

  .login-panel {
    min-height: 72vh;
    padding: 2rem 1.25rem;
    align-items: flex-start;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-left: 0;
    box-shadow: 0 -18px 46px rgba(8, 12, 15, 0.22);
  }
}

@media (max-width: 479.98px) {
  .modal-status-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
