:root {
  --ink: #18181b;
  --ink-soft: #52525b;
  --navy: #0f766e;
  --navy-deep: #18181b;
  --amber: #0f766e;
  --amber-hover: #115e59;
  --on-amber: #ffffff;
  --sand: #f4f6f5;
  --sand-deep: #e7eeeb;
  --paper: #ffffff;
  --paper-warm: #f7f8f7;
  --line: #e4e4e7;
  --input-border: #d4d4d8;
  --danger: #9f2d2d;
  --danger-bg: #f8e8e8;
  --success: #0f766e;
  --success-bg: #e8f3ef;
  --warning: #8a5a08;
  --warning-bg: #f8edd4;
  --info-bg: #eef4f2;
  --shadow: 0 12px 32px color-mix(in srgb, var(--navy) 10%, transparent);
  --radius: 12px;
  --header: 64px;
  --content: 1040px;
  --field-h: 36px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --display: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.logo img {
  width: min(100%, 280px);
  height: auto;
  aspect-ratio: 350 / 75;
}

.auth-card .logo img {
  width: 100%;
}

.auth-card .logo + form,
.auth-card .logo + .alert {
  margin-top: 16px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--amber) 18%, transparent), transparent 32%),
    linear-gradient(180deg, var(--paper-warm) 0%, var(--sand) 48%, var(--sand-deep) 100%);
}

.auth-card {
  width: min(100%, 400px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}

.auth-card h1 {
  margin: 16px 0 6px;
  font-size: 1.5rem;
  color: var(--navy-deep);
}

.panel h2 {
  margin: 0 0 4px;
  color: var(--navy-deep);
  font-size: 1.05rem;
}

.trash-tabs {
  margin-top: 0;
}

.trash-table .col-action {
  width: 8.5rem;
}

.trash-table td.cell-action {
  text-align: right;
}

.lede {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.usage-bar {
  margin: 0 0 16px;
}

.usage-bar-label {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.usage-bar-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 6px;
}

.usage-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.usage-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
  flex: none;
}

.usage-swatch.is-rest {
  background: #3d7ea6;
}

.usage-bar-track {
  display: flex;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.usage-bar-fill {
  display: block;
  height: 100%;
  flex: none;
  background: var(--amber);
}

.usage-bar-fill.is-rest {
  background: #3d7ea6;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field[hidden] {
  display: none;
}

.field span {
  font-size: 0.75rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: var(--field-h);
  border: 1px solid var(--input-border);
  background: var(--paper);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.wysiwyg {
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}

.wysiwyg-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}

.wysiwyg-bar button {
  width: auto;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.wysiwyg-bar button:hover,
.wysiwyg-bar button.is-active {
  background: var(--navy);
  color: var(--paper);
}

.wysiwyg-area {
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.wysiwyg-area:focus {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
}

.wysiwyg-area p,
.wysiwyg-area ul,
.wysiwyg-area ol {
  margin: 0 0 8px;
}

.wysiwyg-area a {
  color: var(--navy);
}

.field input[readonly] {
  background: var(--paper-warm);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
  border-color: var(--amber);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--amber);
  color: var(--on-amber);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  background: var(--amber-hover);
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-small {
  width: auto;
  margin: 0;
  padding: 6px 14px;
  font-size: 0.8125rem;
  text-decoration: none;
}

.btn-inline {
  width: auto;
  min-width: 128px;
  margin-top: 4px;
  margin-bottom: 16px;
  padding: 7px 14px;
  text-decoration: none;
}

.form-actions,
.license-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.license-actions form {
  margin: 0;
}

.license-actions .btn {
  margin-top: 0;
}

.form-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.email-test {
  margin-top: 20px;
}

.auth-links {
  margin: 18px 0 0;
  text-align: center;
}

.auth-links a {
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.875rem;
}

.alert-ok {
  background: var(--success-bg);
  color: var(--success);
}

.topbar {
  min-height: var(--header);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--sand) 92%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn-line {
  width: auto;
  margin: 0;
  background: transparent;
  border: 1px solid var(--navy);
  color: var(--navy);
  text-decoration: none;
}

.btn-line:hover {
  background: var(--amber-hover);
  border-color: var(--amber-hover);
  color: var(--on-amber);
}

.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 220px;
  height: 100vh;
  overflow: auto;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  background: var(--navy-deep);
  color: var(--sand);
}

.sidebar .logo {
  padding: 0 4px 4px;
}

.sidebar .logo img {
  width: 100%;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 20px;
}

.sidebar-divider {
  height: 1px;
  margin: 8px 10px;
  background: color-mix(in srgb, var(--sand) 28%, transparent);
}

.sidebar-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--sand) 86%, transparent);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

a.sidebar-link:hover {
  background: color-mix(in srgb, var(--sand) 8%, transparent);
  color: var(--paper);
}

.sidebar-link.is-active {
  background: var(--amber);
  color: var(--on-amber);
}

.sidebar-link.is-pending {
  color: color-mix(in srgb, var(--sand) 78%, transparent);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--sand) 35%, transparent);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--sand);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-settings:hover {
  border-color: var(--sand);
  color: var(--paper);
}

.sidebar-settings.is-active {
  border-color: var(--amber);
  color: var(--amber);
}

.sidebar-footer .btn {
  margin-top: 0;
}

.sidebar-logout {
  margin-top: 0;
}

.sidebar .btn-line {
  width: 100%;
  border-color: color-mix(in srgb, var(--sand) 35%, transparent);
  color: var(--sand);
  background: transparent;
}

.sidebar .btn-line:hover {
  border-color: var(--sand);
  background: transparent;
}

.shell-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: auto;
}

.shell-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.shell-bar-inner {
  width: min(var(--content), calc(100% - 48px));
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell-bar h1,
.shell-bar .panel-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.shell-bar h1 {
  font-size: 1.15rem;
  color: var(--navy-deep);
}

.sidebar-toggle {
  display: none;
  flex: none;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.panel {
  width: min(var(--content), calc(100% - 48px));
  margin: 20px auto 32px;
}

.panel h1 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--navy-deep);
}

.table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.875rem;
}

.data-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.data-table th:first-child,
.data-table td:first-child,
.data-table .cell-title {
  text-align: left;
}

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

.data-table tbody tr:hover td {
  background: var(--paper-warm);
}

.cell-title {
  font-weight: 700;
}

.cell-link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
}

.cell-action {
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.data-table .cell-action form {
  display: inline;
  margin: 0;
}

.data-table .cell-edit {
  text-align: left;
}

.data-table .cell-edit form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.data-table .cell-edit input {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.companies-table .col-name {
  width: 24%;
}

.companies-table .col-domain {
  width: 16%;
}

.data-table .cell-domain {
  text-align: left;
}

.companies-table .col-count {
  width: 16%;
}

.companies-table .col-state {
  width: 14%;
}

.companies-table .col-action {
  width: 30%;
}

.people-table .col-name {
  width: 24%;
}

.people-table .cell-company,
.people-table .cell-code {
  text-align: left;
}

.companies-table .col-domain,
.people-table .col-code {
  width: 16%;
}

.people-table .col-company {
  width: 18%;
}

.people-table .col-code {
  width: 14%;
}

.people-table .col-state {
  width: 14%;
}

.people-table .col-action {
  width: 30%;
}

.people-table td.cell-action {
  text-align: right;
}

.people-trash-table .col-action,
.files-table .col-action {
  width: 18%;
}

.people-trash-table .col-name {
  width: 50%;
}

.people-trash-table .col-code {
  width: 32%;
}

.company-people-table .col-name {
  width: 36%;
}

.company-people-table .col-code,
.company-people-table .col-state {
  width: 22%;
}

.company-people-table .col-action {
  width: 20%;
}

.social-add {
  margin-bottom: 28px;
}

.social-form .table-wrap {
  margin-bottom: 16px;
}

.social-table .col-check {
  width: 72px;
}

.social-table .col-type {
  width: 160px;
}

.social-table .cell-check {
  text-align: center;
}

.social-table .cell-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--amber);
}

.social-table tr.is-off .cell-title,
.social-table tr.is-off .cell-edit input {
  opacity: 0.45;
}

.social-table th,
.social-table td.cell-edit {
  text-align: left;
}

.social-table .cell-action form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.social-table .cell-edit input {
  display: block;
  width: 100%;
  height: var(--field-h);
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.social-table .cell-edit input:focus {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
  border-color: var(--amber);
}

.files-table .col-file,
.files-table .col-note {
  width: 41%;
}

.contacts-table .col-name {
  width: 12%;
}

.downloads-table .col-file {
  width: 34%;
}

.contacts-table .col-email {
  width: 20%;
}

.contacts-table .col-company {
  width: 15%;
}

.contacts-table .col-origin,
.contacts-table .col-person {
  width: 13%;
}

.contacts-table .col-message {
  width: 14%;
}

.downloads-table .col-company,
.downloads-table .col-person {
  width: 24%;
}

.contacts-table .col-date {
  width: 13%;
}

.downloads-table .col-date {
  width: 18%;
}

.contacts-table .cell-email,
.contacts-table .cell-company,
.contacts-table .cell-origin,
.contacts-table .cell-person,
.downloads-table .cell-company,
.downloads-table .cell-person {
  text-align: left;
}

.contacts-table td,
.downloads-table td {
  overflow-wrap: anywhere;
}

.contacts-table td.cell-email {
  overflow: hidden;
  max-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}

.contacts-table .cell-date,
.downloads-table .cell-date {
  text-align: right;
}

.clients-table,
.users-table,
.client-licenses-table,
.catalog-table,
.licenses-table {
  table-layout: fixed;
}

.clients-table .col-name {
  width: 30%;
}

.clients-table .col-domain {
  width: 24%;
}

.clients-table .col-license,
.clients-table .col-status {
  width: 16%;
}

.clients-table .col-action {
  width: 14%;
}

.users-table .col-client {
  width: 24%;
}

.users-table .col-email {
  width: 32%;
}

.users-table .col-state {
  width: 14%;
}

.users-table .col-login {
  width: 16%;
}

.users-table .col-action {
  width: 14%;
}

.client-licenses-table th,
.client-licenses-table td {
  padding-right: 6px;
  padding-left: 6px;
}

.client-licenses-table .col-client {
  width: 17%;
}

.client-licenses-table .col-type {
  width: 12%;
}

.client-licenses-table .col-usage,
.client-licenses-table .col-duration {
  width: 8%;
}

.client-licenses-table .col-date,
.client-licenses-table .col-due,
.client-licenses-table .col-state,
.client-licenses-table .col-action {
  width: 10%;
}

.client-licenses-table td {
  white-space: nowrap;
}

.client-licenses-table .days-left {
  margin-left: 0;
}

.clients-table .cell-license {
  white-space: nowrap;
}

.catalog-table .col-code {
  width: 50%;
}

.catalog-table .col-count {
  width: 20%;
}

.catalog-table .col-action {
  width: 30%;
}

.limit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
}

.licenses-table .col-code {
  width: 16%;
}

.licenses-table .col-limit {
  width: 10%;
}

.licenses-table .col-service {
  width: 12%;
}

.licenses-table .col-count {
  width: 8%;
}

.licenses-table .col-action {
  width: 20%;
}

.back-link {
  margin: 0 0 10px;
}

.back-link a {
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.panel-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 6px;
}

.panel-title h1 {
  margin: 0;
}

.panel-title .btn-small {
  margin-left: auto;
}

.cell-actions {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.signatures-table .col-name {
  width: 26%;
}

.signatures-table .col-domain {
  width: 22%;
}

.signatures-table .col-theme {
  width: 18%;
}

.signatures-table .col-action {
  width: 34%;
}

.companies-table td.cell-action,
.signatures-table td.cell-action {
  text-align: right;
}

.row-menu {
  position: relative;
}

.row-menu-panel {
  z-index: 40;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.row-menu-panel[hidden] {
  display: none;
}

.row-menu-panel a,
.row-menu-panel button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row-menu-panel a:hover,
.row-menu-panel button:hover,
.row-menu-panel a:focus-visible,
.row-menu-panel button:focus-visible {
  background: var(--sand);
}

.row-menu-panel .is-split {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.detail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
}

.detail-card h2 {
  margin: 0 0 10px;
  color: var(--navy-deep);
  font-size: 1.05rem;
}

.detail-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.detail-list dt {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  font-size: 0.875rem;
}

.detail-user + .detail-user {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-on {
  background: var(--success-bg);
  color: var(--success);
}

.badge-off {
  background: var(--danger-bg);
  color: var(--danger);
}

.empty-note {
  margin: 0;
  color: var(--ink-soft);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  margin: 0 0 -1px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.tabs a:hover {
  color: var(--navy);
}

.tabs a.is-active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--navy-deep);
}

.summary-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(200px, 260px);
  gap: 16px;
  margin: 0 0 16px;
}

.summary-facts {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 88px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.summary-facts dt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 700;
}

.summary-facts dd {
  margin: 0;
  color: var(--navy-deep);
  font-size: 0.875rem;
  font-weight: 700;
}

.license-traits {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-traits li {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.license-traits svg {
  flex: none;
  color: var(--navy);
}

.license-traits .trait-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.license-traits .trait-name {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.license-traits .trait-value {
  color: var(--navy-deep);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.license-traits li.is-off {
  background: transparent;
}

.license-traits li.is-off svg,
.license-traits li.is-off .trait-value {
  color: var(--ink-soft);
  font-weight: 700;
}

.detail-list.is-split {
  grid-template-columns: 140px minmax(0, 1fr) 140px minmax(0, 1fr);
}

.detail-list.is-split dt.is-full {
  grid-column: 1;
}

.detail-list.is-split dd.is-full {
  grid-column: 2 / -1;
}

.detail-card h2.form-section {
  margin-top: 18px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 20px;
}

.dash-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
}

.dash-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-value {
  margin: 6px 0 0;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dash-note {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.dash-days {
  font-size: 1.5rem;
}

.dash-days span {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.dash-days.is-soon {
  color: var(--warning);
}

.dash-days.is-urgent {
  color: var(--danger);
}

.days-left {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--info-bg);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 800;
}

.days-left.is-soon {
  background: var(--warning-bg);
  color: var(--warning);
}

.days-left.is-urgent {
  background: var(--danger-bg);
  color: var(--danger);
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.anagrafica-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  gap: 16px;
  align-items: start;
}

.identity-lead span {
  color: var(--navy-deep);
}

.identity-lead input {
  border-color: var(--navy);
  font-weight: 700;
}

.identity-fields {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 12px 12px 2px;
  background: var(--paper-warm);
  border: 1px solid var(--navy);
  border-radius: 10px;
}

.identity-fields .field span {
  color: var(--navy-deep);
}

.identity-fields .field .field-hint {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.identity-fields .field input,
.identity-fields .field select {
  border-color: var(--navy);
  font-weight: 700;
}

.company-dati {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.company-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.company-media img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 12px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.media-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.company-media .media-frame img {
  margin: 0;
}

.media-frame form {
  position: absolute;
  top: -7px;
  right: -7px;
  margin: 0;
}

.media-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--danger);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}

.media-remove:hover {
  background: var(--danger);
  color: #fff;
}

.company-media img.is-favicon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.company-media img.company-qr {
  width: 100%;
  background: #fff;
}

.company-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-company {
  margin-bottom: 12px;
}

.qr-url {
  margin: 8px 0 12px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

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

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

.domain-field > span:first-child {
  color: var(--navy-deep);
}

.domain-input {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--paper-warm);
  overflow: hidden;
}

.domain-input:focus-within {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
  border-color: var(--amber);
}

.domain-input .domain-prefix,
.domain-input .domain-suffix {
  flex: none;
  padding: 0 10px;
  color: var(--navy-deep);
  font-size: 0.8125rem;
  font-weight: 700;
}

.domain-input input {
  flex: 1;
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  font-weight: 700;
}

.domain-input input:focus {
  outline: none;
}

.domain-input.is-path .domain-prefix {
  flex: none;
  padding-right: 0;
  white-space: nowrap;
}

.domain-input.is-path input {
  flex: 1 1 auto;
  min-width: 4rem;
  padding-left: 0;
}

.domain-input.is-path.is-multi .domain-prefix {
  display: none;
}

.domain-input.is-path.is-multi input {
  padding-left: 12px;
}

.code-urls {
  display: none;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.domain-input.is-multi ~ .code-urls {
  display: block;
}

.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.theme-preview {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.theme-preview[hidden] {
  display: none;
}

.theme-preview iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: #fff;
}

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.choice input {
  width: auto;
  accent-color: var(--amber);
}

.row-menu-label {
  display: block;
  padding: 8px 10px 2px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.domain-input.is-taken {
  border-color: var(--danger);
}

.domain-input.is-taken:focus-within {
  outline-color: color-mix(in srgb, var(--danger) 45%, transparent);
  border-color: var(--danger);
}

.domain-field .domain-status.is-taken {
  color: var(--danger);
  font-weight: 700;
}

.domain-field .domain-status.is-free {
  color: var(--success);
  font-weight: 700;
}

.domain-field .domain-note {
  display: block;
  margin: 8px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}

.field .field-hint {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 500;
}

.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field .color-row input[type="color"] {
  width: 40px;
  height: var(--field-h);
  padding: 4px;
  flex: none;
  cursor: pointer;
}

.field .color-row input[type="text"] {
  flex: 1;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.settings-link {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

a.settings-link:hover {
  border-color: var(--amber);
}

.settings-link strong {
  display: block;
  color: var(--navy-deep);
  font-size: 0.95rem;
}

.settings-link span {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.settings-link.is-pending strong {
  color: var(--ink-soft);
}

.date-field {
  position: relative;
  display: block;
}

.date-field input[type="text"] {
  height: var(--field-h);
  padding: 0 36px 0 12px;
  line-height: calc(var(--field-h) - 2px);
  cursor: pointer;
}

.date-field input[type="hidden"] {
  display: none;
}

.date-field-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy);
  transform: translateY(-50%);
  cursor: pointer;
}

.date-field-btn:hover {
  background: var(--sand-deep);
}

.date-popup {
  position: fixed;
  z-index: 40;
  width: 292px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.date-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--navy-deep);
  font-weight: 800;
  text-transform: capitalize;
}

.date-nav {
  width: 32px;
  height: 32px;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.date-nav:hover {
  border-color: var(--navy);
}

.date-week,
.date-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.date-week {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.date-day {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.date-day:hover:not(:disabled) {
  background: var(--sand-deep);
}

.date-day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--amber);
}

.date-day.is-selected {
  background: var(--navy);
  color: var(--paper);
}

.date-day:disabled {
  color: var(--line);
  cursor: default;
}

@media (max-width: 1100px) {
  .anagrafica-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: none;
  }

  .panel {
    margin-top: 24px;
  }

  .detail-grid,
  .detail-list,
  .detail-list.is-split,
  .dash-layout,
  .home-activity,
  .summary-top,
  .form-grid,
  .company-dati,
  .anagrafica-layout,
  .color-grid,
  .signature-editor,
  .signature-presets {
    grid-template-columns: 1fr;
  }

  .detail-list.is-split dt.is-full,
  .detail-list.is-split dd.is-full {
    grid-column: auto;
  }

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

  .domain-input.is-path {
    flex-wrap: wrap;
  }

  .domain-input.is-path .domain-prefix {
    flex: 1 0 100%;
    max-width: 100%;
    padding-top: 8px;
    padding-right: 10px;
    padding-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .domain-input.is-path input {
    flex: 1 1 100%;
    min-width: 0;
    padding-left: 12px;
  }
}

@media (max-width: 560px) {
  .auth-card {
    padding: 28px 20px 24px;
  }

  .auth-card h1,
  .panel h1,
  .shell-bar h1 {
    font-size: 1.05rem;
  }

  .summary-facts {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .license-traits {
    flex-wrap: wrap;
  }

  .license-traits li {
    flex: 1 1 140px;
  }

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

  .panel,
  .shell-bar-inner {
    width: min(var(--content), calc(100% - 24px));
  }

  .myarea-stats,
  .home-usage,
  .home-pulse {
    grid-template-columns: 1fr;
  }
}

.myarea-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}

.myarea-stats .dash-value span {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.home-license {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-license .dash-days {
  margin: 0;
  text-align: right;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.home-actions .btn {
  margin: 0;
}

.home-figure {
  font-size: 1.75rem;
}

a.home-stat {
  color: inherit;
  text-decoration: none;
}

a.home-stat:hover {
  border-color: var(--amber);
}

a.home-stat:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
  outline-offset: 2px;
}

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

.home-pulse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-stat .usage-bar,
.myarea-stats .usage-bar {
  margin: 12px 0 0;
}

.home-activity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-activity h2 {
  margin: 0;
  color: var(--navy-deep);
  font-size: 1.05rem;
}

.home-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-activity .empty-note {
  margin: 0;
}

.home-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-feed li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.home-feed li:first-child {
  padding-top: 0;
  border-top: 0;
}

.home-feed strong {
  display: block;
  overflow-wrap: anywhere;
}

.home-feed span {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.profile-client {
  margin-top: 0;
  padding-top: 32px;
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 16px;
}

.filter-bar .field {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.filter-bar .field input,
.filter-bar .field select {
  width: 100%;
  min-width: 0;
}

.filter-bar .date-field {
  width: 100%;
}

.filter-bar .btn {
  flex: 0 0 auto;
  margin: 0;
}

.filter-bar.is-single .field {
  flex: 0 1 280px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.row-actions form,
.row-actions .btn {
  margin: 0;
}

.btn-danger {
  width: auto;
  min-width: 128px;
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.92);
}

.signature-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.signature-editor .field-hint,
.signature-editor .field-label {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.signature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.signature-tabs button {
  border: 1px solid var(--input-border);
  background: var(--paper);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

.signature-tabs button.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.signature-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}

.signature-presets label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-items: start;
  margin: 0;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.signature-presets input {
  width: auto;
  height: auto;
  margin: 2px 0 0;
  padding: 0;
  grid-row: 1 / span 2;
}

.signature-presets .preset-name {
  font-weight: 700;
}

.field .signature-presets .preset-name {
  font-size: 0.9rem;
}

.field .signature-presets .preset-note {
  font-weight: 400;
}

.signature-presets .preset-note {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.signature-presets label:has(input:checked) {
  border-color: var(--navy);
  background: var(--info-bg);
}

.vcard-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.vcard-settings > .field,
.vcard-settings-side {
  min-width: 0;
}

.vcard-settings .signature-presets {
  grid-template-columns: 1fr;
}

@media (max-width: 800px) {
  .vcard-settings {
    grid-template-columns: 1fr;
  }
}

.vcard-preview {
  margin-top: 4px;
}

.vcard-preview-stage {
  height: 196px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: #f4f1ec;
  overflow: hidden;
}

.vcard-preview-stage.is-dark {
  background: #0e1014;
}

.vp-page {
  height: 100%;
  display: flex;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.vcard-preview-stage.is-dark .vp-page {
  background: #17191f;
}

.vp-hero,
.vp-body {
  min-width: 0;
}

.vp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--preview-accent) 28%, #fff);
  flex: 0 0 auto;
}

.vp-name,
.vp-line {
  height: 7px;
  border-radius: 99px;
  background: #e7e5e4;
}

.vcard-preview-stage.is-dark .vp-name,
.vcard-preview-stage.is-dark .vp-line {
  background: rgba(255, 255, 255, 0.16);
}

.vp-name {
  width: 64px;
}

.vp-btn {
  width: 46px;
  height: 12px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--preview-accent);
}

.vp-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
}

.vp-line {
  width: 100%;
}

.vp-line:nth-child(2) {
  width: 72%;
}

.vp-map {
  flex: 1 1 auto;
  min-height: 28px;
  margin-top: 4px;
  border-radius: 8px;
  background: #e7eef2;
}

.vcard-preview-stage.is-dark .vp-map {
  background: #242830;
}

.vcard-preview-stage.is-classico .vp-page {
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr);
}

.vcard-preview-stage.is-classico .vp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-right: 1px solid #e7e5e4;
}

.vcard-preview-stage.is-dark.is-classico .vp-hero {
  border-right-color: rgba(255, 255, 255, 0.12);
}

.vcard-preview-stage.is-copertina .vp-page {
  flex-direction: column;
  background: transparent;
}

.vcard-preview-stage.is-copertina .vp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 10px 22px;
  background: var(--preview-accent);
}

.vcard-preview-stage.is-copertina .vp-avatar {
  background: #fff;
}

.vcard-preview-stage.is-copertina .vp-name {
  background: rgba(255, 255, 255, 0.75);
}

.vcard-preview-stage.is-copertina .vp-btn {
  background: #fff;
}

.vcard-preview-stage.is-copertina .vp-body {
  margin: -12px 16px 0;
  background: #fff;
  border-radius: 8px;
}

.vcard-preview-stage.is-dark.is-copertina .vp-body {
  background: #17191f;
}

.vcard-preview-stage.is-elenco .vp-page {
  flex-direction: column;
  width: 46%;
  margin: 0 auto;
}

.vcard-preview-stage.is-elenco .vp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 10px 4px;
}

.vcard-preview-stage.is-elenco .vp-body {
  padding-top: 8px;
}

.vcard-preview-stage.is-biglietto {
  background: color-mix(in srgb, var(--preview-accent) 18%, #f4f1ec);
}

.vcard-preview-stage.is-dark.is-biglietto {
  background: color-mix(in srgb, var(--preview-accent) 22%, #0e1014);
}

.vcard-preview-stage.is-biglietto .vp-page {
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr);
  width: calc(100% - 28px);
  height: calc(100% - 20px);
  margin: 10px auto;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.vcard-preview-stage.is-biglietto .vp-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--preview-accent);
}

.vcard-preview-stage.is-biglietto .vp-avatar,
.vcard-preview-stage.is-biglietto .vp-btn {
  background: #fff;
}

.vcard-preview-stage.is-biglietto .vp-name {
  background: rgba(255, 255, 255, 0.75);
}

.vcard-preview-stage.is-fascia .vp-page {
  flex-direction: column;
}

.vcard-preview-stage.is-fascia .vp-hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 5px solid var(--preview-accent);
}

.vcard-preview-stage.is-fascia .vp-id {
  display: flex;
  flex-direction: column;
}

.vcard-preview-stage.is-fascia .vp-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  align-content: start;
}

.vcard-preview-stage.is-fascia .vp-line:nth-child(3) {
  display: none;
}

.vcard-preview-stage.is-fascia .vp-line,
.vcard-preview-stage.is-fascia .vp-map {
  width: auto;
  height: 42px;
  margin: 0;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: transparent;
}

.vcard-preview-stage.is-dark.is-fascia .vp-line,
.vcard-preview-stage.is-dark.is-fascia .vp-map {
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
}

.signature-choice {
  display: flex;
  gap: 16px;
  margin: 0 0 14px;
}

.signature-choice label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signature-editor textarea {
  height: auto;
  padding: 10px 12px;
}

.signature-editor input[type="color"] {
  padding: 4px;
}

.signature-logo-preview {
  width: 160px;
  max-width: 100%;
  height: auto;
  margin: 0 0 14px;
  background: var(--paper);
}

.file-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-field input[type="file"]:focus + label {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
}

.file-field [data-file-name] {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-grid .file-field {
  min-height: var(--field-h);
}

.company-media .file-field {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.company-media .file-field .btn {
  width: 100%;
  margin-top: 0;
}

.company-media .file-field [data-file-name] {
  font-size: 0.75rem;
  font-weight: 500;
}

.signature-remove {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.signature-remove input {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
}

.signature-blocks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.signature-blocks li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 110px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #e6e1d8);
}

.signature-blocks .sig-enable {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signature-blocks select,
.signature-blocks input[type="text"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--paper);
}

.sig-move {
  display: flex;
  gap: 4px;
}

.sig-move button {
  border: 1px solid var(--input-border);
  background: var(--paper);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  cursor: pointer;
}

.signature-preview {
  overflow: auto;
  background: #f4f1ea;
  border-radius: 12px;
  padding: 20px;
}

.sig-sheet {
  max-width: 100%;
  background: #fff;
  padding: 16px;
  font-size: 13px;
  line-height: 1.45;
}

.sig-columns {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.sig-sheet p {
  margin: 0 0 4px;
}

.sig-name {
  font-weight: 700;
}

.sig-logo {
  max-width: 141px;
  height: auto;
  color: var(--sig-textMuted, #9b9b9b);
}

.sig-disclaimer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid;
  font-size: 11px;
  white-space: pre-wrap;
}

.sig-theme-classico .sig-columns {
  gap: 0;
}

.sig-theme-classico .sig-main {
  border-left: 2px solid var(--sig-divider, #1793d2);
  padding-left: 14px;
}

.sig-theme-classico .sig-name {
  font-size: 16px;
}

.sig-theme-lineare {
  text-align: center;
}

.sig-theme-lineare .sig-logo {
  margin: 0 auto 8px;
}

.sig-theme-lineare .sig-name {
  font-size: 18px;
}

.sig-theme-lineare .sig-title {
  display: inline-block;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sig-divider, #d6d3d1);
}

.sig-theme-compatto {
  padding: 10px 12px;
}

.sig-theme-compatto .sig-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.sig-theme-compatto .sig-stack p {
  display: inline;
  margin: 0;
}

.sig-theme-compatto .sig-stack p + p::before {
  content: " · ";
  color: var(--sig-textMuted, #71717a);
}

.sig-theme-compatto .sig-name {
  font-size: 15px;
}

.sig-theme-biglietto {
  padding: 0;
  overflow: hidden;
}

.sig-theme-biglietto .sig-columns {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 0;
  min-height: 108px;
}

.sig-theme-biglietto .sig-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: var(--sig-divider, #1793d2);
  color: #fff;
}

.sig-theme-biglietto .sig-main {
  padding: 14px 16px;
}

.sig-theme-biglietto .sig-name {
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sig-theme-biglietto .sig-logo {
  max-width: 96px;
  color: #fff;
}

.sig-theme-social .sig-name {
  font-size: 16px;
}

.sig-theme-social .sig-social {
  display: inline-block;
  margin: 6px 6px 0 0;
  padding: 3px 10px;
  border: 1px solid var(--sig-socialIcon, #1793d2);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.sig-theme-social .sig-social.sig-social-icons,
.sig-social-icons {
  border: 0;
  padding: 0;
  border-radius: 0;
}

.sig-social-icons img {
  width: 20px;
  height: 20px;
  margin: 0 8px 0 0;
  vertical-align: middle;
}

/* Su smartphone e tablet ogni riga di tabella diventa una card. */
@media (max-width: 1100px) {
  .table-wrap {
    position: relative;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: auto;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .data-table tr {
    margin: 0 0 12px;
    padding: 12px 14px 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .data-table td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    justify-items: end;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .contacts-table td.cell-email {
    overflow: visible;
    max-width: none;
    white-space: normal;
    text-overflow: clip;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    justify-self: start;
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
  }

  .data-table td[data-label=""]::before,
  .data-table .cell-title::before {
    content: none;
  }

  .data-table .cell-title,
  .data-table .cell-action,
  .data-table .cell-edit,
  .data-table td[data-label=""] {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-table .cell-title,
  .data-table .cell-edit {
    justify-items: start;
    text-align: left;
  }

  .data-table .cell-title {
    padding-top: 2px;
    padding-bottom: 10px;
    font-size: 1rem;
  }

  .data-table .cell-action {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
  }

  .data-table .cell-action form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
  }

  .data-table .cell-action .btn {
    width: auto;
  }

  .data-table .cell-edit {
    align-items: stretch;
    text-align: left;
  }

  .data-table .cell-edit input {
    width: 100%;
    min-width: 0;
  }

  .data-table tbody tr:hover td {
    background: transparent;
  }
}

@media (max-width: 800px) {
  .filter-bar {
    flex-wrap: wrap;
  }

  .filter-bar .field,
  .filter-bar.is-single .field {
    flex: 1 1 calc(50% - 12px);
  }
}

@media (max-width: 560px) {
  .filter-bar .field,
  .filter-bar.is-single .field,
  .filter-bar .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

.editor-screen {
  height: 100vh;
  overflow: hidden;
}

.editor-screen #landing-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

.editor-top {
  display: flex;
  flex: none;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.editor-top .btn {
  margin: 0;
}

.editor-top .alert {
  margin: 0;
}

.editor-stage {
  flex: 1 1 auto;
  min-height: 0;
}

.editor-screen #gjs {
  height: 100%;
  border: 0;
}

.editor-screen .gjs-editor img {
  max-width: none;
}

.contacts-table td:nth-child(6) {
  max-width: 280px;
  white-space: pre-wrap;
}

#landing-form textarea {
  height: auto;
  min-height: 160px;
  padding: 10px 12px;
  line-height: 1.45;
  overflow: auto;
}

#landing-form + .row-actions {
  margin-top: 16px;
}
