:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-muted: #fafaf9;
  --text: #18181b;
  --text-muted: #71717a;
  --border: #e4e4e7;
  --border-focus: #18181b;
  --accent: #18181b;
  --accent-hover: #27272a;
  --accent-text: #ffffff;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(24, 24, 27, 0.08);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.page-stack {
  width: 100%;
  max-width: 490px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.card {
  width: 100%;
  max-width: 490px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.card-wide {
  max-width: 100%;
  padding: 24px;
}

.card-header {
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

.form-logo-wrap {
  margin-bottom: 16px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.form-logo-wrap.align-left {
  justify-content: flex-start;
}

.form-logo-wrap.align-center {
  justify-content: center;
}

.form-logo-wrap.align-right {
  justify-content: flex-end;
}

.align-left {
  text-align: left;
}

.align-center {
  text-align: center;
}

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

.form-logo {
  max-height: 85px;
  max-width: min(300px, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.state-box {
  padding: 20px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

label,
.label-sm {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.required {
  color: var(--error);
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}

input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
input[type='date'],
input[type='time'],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 84px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.field-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hint,
.char-count {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.char-count {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Griglia sole date disponibili */
.dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 2px;
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.date-card:hover {
  border-color: var(--accent);
}

.date-card-weekday {
  font-size: 11.5px;
  text-transform: capitalize;
  color: var(--text-muted);
}

.date-card-day {
  font-size: 14px;
  font-weight: 600;
}

.date-card.is-selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.date-card.is-selected .date-card-weekday {
  color: rgba(255, 255, 255, 0.78);
}

/* Griglia slot orari */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.slot-btn {
  min-height: 44px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

.slot-btn.is-selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.slot-btn.is-unavailable {
  background-color: var(--surface-muted);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.78;
}

.slot-btn.is-unavailable .slot-time {
  text-decoration: line-through;
}

.slot-status {
  font-size: 10px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--error);
}

.alert-error {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background-color: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
  font-size: 13.5px;
}

.btn-primary,
.btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-inline {
  width: auto;
  padding: 9px 14px;
  font-size: 13.5px;
}

.btn-xs {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn-primary {
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: var(--surface-muted);
}

.confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.confirmation-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.confirmation-icon svg {
  width: 24px;
  height: 24px;
}

.confirmation h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.confirmation-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.summary {
  width: 100%;
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-row dt {
  font-size: 12px;
  color: var(--text-muted);
}

.summary-row dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.footer-link {
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-support-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Admin Dashboard */
.admin-shell {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: flex-start;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.is-active {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

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

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

.grid-span-2 {
  grid-column: 1 / -1;
}

.grid-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.section-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.exception-form .grid-form-actions {
  margin-top: 16px;
}

.btn-push-left {
  margin-right: auto;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-inline input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.feedback-msg {
  font-size: 13px;
}

.feedback-msg.is-success {
  color: var(--success);
}

.feedback-msg.is-error {
  color: var(--error);
}

.feedback-banner {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
}

.feedback-banner.is-success {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.feedback-banner.is-error {
  background-color: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

/* Weekly editor */
.weekly-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-day-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
}

.weekly-day-row.is-disabled {
  opacity: 0.72;
}

.weekly-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  font-weight: 500;
  cursor: pointer;
}

.weekly-day-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.windows-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.window-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.window-row input[type='time'] {
  width: 118px;
  padding: 6px 8px;
  font-size: 13.5px;
}

.window-sep {
  color: var(--text-muted);
}

.btn-icon-remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.btn-icon-remove:hover {
  color: var(--error);
  border-color: var(--error-border);
}

.exc-windows-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
}

.calendar-exc-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 14px;
}

.cal-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background-color: var(--surface);
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cal-header-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cal-month-label {
  font-size: 14.5px;
  font-weight: 600;
  text-transform: capitalize;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cal-spacer {
  min-height: 40px;
}

.cal-day {
  min-height: 40px;
  padding: 4px 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.cal-day:hover:not(:disabled) {
  border-color: var(--accent);
}

.cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--text-muted);
  font-weight: 700;
}

.cal-day.is-weekly-closed {
  background-color: var(--surface-muted);
  color: var(--text-muted);
}

.cal-day.is-custom {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.cal-day.is-closed {
  background-color: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

.cal-day.is-past {
  opacity: 0.42;
  cursor: not-allowed;
  background-color: var(--surface-muted);
  color: var(--text-muted);
}

.cal-day.is-selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background-color: transparent;
}

.cal-day.is-weekly-open .cal-dot,
.cal-dot-open {
  background-color: var(--success);
}

.cal-day.is-custom .cal-dot,
.cal-dot-custom {
  background-color: #2563eb;
}

.cal-day.is-closed .cal-dot,
.cal-dot-closed {
  background-color: var(--error);
}

.cal-dot-selected {
  background-color: var(--accent);
}

.cal-day.is-selected .cal-dot {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}

.cal-controls {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cal-multi-toggle {
  font-size: 13px;
}

.cal-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.exc-editor-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background-color: var(--surface);
}

.exc-selection-box {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface-muted);
}

.exc-selection-summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.exc-selection-meta {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
}

.exc-selected-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.exc-chip-remove {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

.exc-chip-remove:hover {
  color: var(--error);
}

.exceptions-list-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.exceptions-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.exc-list-date-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.exc-list-date-btn:hover {
  text-decoration-color: var(--accent);
}

kbd {
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--surface-muted);
  font-family: inherit;
  font-size: 11px;
}

.exceptions-list,
.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
}

.list-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.booking-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.status-pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-pill.is-confirmed {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-pill.is-cancelled {
  background-color: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.form-pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.module-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.module-bar-select {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.module-url-line {
  margin-top: 10px;
  word-break: break-all;
}

.module-url-line code {
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--text);
}

.logo-editor {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.logo-inline-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-preview-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
}

.admin-logo-preview {
  max-height: 36px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-url-row input[type='url'] {
  width: 320px;
  max-width: 100%;
  padding: 8px 10px;
  font-size: 13.5px;
}

.file-upload-btn {
  flex-shrink: 0;
}

.btn-danger-outline {
  color: var(--error);
  border-color: var(--error-border);
}

.btn-danger-outline:hover:not(:disabled) {
  background-color: var(--error-bg);
}

.btn-danger-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bookings-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bookings-toolbar select {
  width: auto;
  min-width: 170px;
}

.element-with-align {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.element-control {
  flex: 1 1 auto;
  min-width: 0;
}

.align-group {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--surface-muted);
}

.align-btn {
  width: 36px;
  height: 38px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.align-btn svg {
  width: 15px;
  height: 15px;
}

.align-btn:last-child {
  border-right: 0;
}

.align-btn:hover {
  color: var(--text);
}

.align-btn.is-active {
  background-color: var(--accent);
  color: var(--accent-text);
}

.qr-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-preview-img {
  width: 132px;
  height: 132px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: #ffffff;
  display: block;
}

.qr-panel-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(24, 24, 27, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -12px rgba(24, 24, 27, 0.24);
  padding: 24px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

/* Lucide icons & label alignment */
.label-with-icon,
.section-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lucide {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 1.8;
}

.icon {
  width: 16px;
  height: 16px;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-xs {
  width: 13px;
  height: 13px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

@media (max-width: 820px) {
  .calendar-exc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 22px 18px;
  }

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

  .element-with-align {
    flex-direction: column;
    align-items: stretch;
  }

  .align-group {
    align-self: flex-end;
  }

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

  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }
}