
:root {
  --black: #0b0b0b;
  --white: #ffffff;
  --chrome: #cecece;
  --gold: #c2ab7b;
  --gold-soft: rgba(194,171,123,.72);
  --text: #121212;
  --muted: rgba(18,18,18,.62);
  --line: rgba(255,255,255,.72);
  --glass: rgba(255,255,255,.58);
  --glass-strong: rgba(255,255,255,.72);
  --shadow: 0 28px 70px rgba(18,18,18,.10), 0 8px 22px rgba(18,18,18,.06);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --guest-bg-image: url("background-default.jpg");
  --page-width: 1440px;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  margin: 0;
  background-color: #f6f3ec;
  background-image: var(--guest-bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: transparent;
  background-image: var(--guest-bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.background-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-color: #f6f3ec;
  background-image:
    radial-gradient(ellipse 900px 520px at 78% 6%, rgba(211,234,247,.20), transparent 70%),
    radial-gradient(ellipse 620px 420px at 8% 16%, rgba(194,171,123,.10), transparent 75%),
    var(--guest-bg-image);
  background-size: auto, auto, cover;
  background-position: center, center, center center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}
.background-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.16);
  pointer-events: none;
}

.app-shell {
  width: min(var(--page-width), calc(100% - 64px));
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(30px, env(safe-area-inset-top)) 0 max(34px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .34em;
  text-transform: uppercase;
}
h1,h2,h3,h4,h5,p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; line-height: 1.08; font-weight: 900; letter-spacing: -.055em; }
h2 { margin-bottom: 12px; font-size: 16px; line-height: 1.15; font-weight: 900; letter-spacing: -.03em; }
h3 { margin-bottom: 0; font-size: 14px; line-height: 1.2; font-weight: 900; letter-spacing: -.02em; }
h4 { margin: 0; font-size: 14px; line-height: 1.2; font-weight: 900; }
h5 { margin: 0 0 12px; font-size: 14px; font-weight: 900; }
.muted { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  min-width: 214px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  background: rgba(255,255,255,.52);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  box-shadow: 0 18px 48px rgba(18,18,18,.09), inset 0 1px 0 rgba(255,255,255,.92);
}
.tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 26px;
  color: rgba(18,18,18,.56);
  background: transparent;
  font-weight: 800;
  font-size: 12px;
  transition: .2s ease;
}
.tab.active {
  color: #fff;
  background: rgba(0,0,0,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 12px 22px rgba(0,0,0,.12);
}
.admin-tab { width: 58px; padding: 0; display: grid; place-items: center; }
.person-icon { width: 25px; height: 25px; display: inline-grid; place-items: center; }
.person-icon svg { width: 25px; height: 25px; fill: currentColor; }

.view { display: none; }
.active-view { display: block; }
.panel, .hero-card, .result-card, .table-card, .row-item, .setup-panel, .import-preview, .config-background-panel {
  position: relative;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.42));
  backdrop-filter: blur(28px) saturate(1.36);
  -webkit-backdrop-filter: blur(28px) saturate(1.36);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.92), inset 0 -1px 0 rgba(194,171,123,.05);
}
.panel::before, .hero-card::before, .result-card::before, .table-card::before, .setup-panel::before, .config-background-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.55), transparent 34%, rgba(255,255,255,.12) 70%, rgba(194,171,123,.035));
}
.panel, .hero-card, .result-card, .setup-panel { padding: 42px; margin-bottom: 24px; }
.hero-card { min-height: 182px; }
.result-card { background: linear-gradient(145deg, rgba(255,252,243,.82), rgba(255,255,255,.50)); border-color: rgba(194,171,123,.34); }
.match-block:not(:last-child) { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(194,171,123,.18); }
.match-name { font-size: 16px; margin-bottom: 8px; }
.match-table { margin: 0; color: var(--gold); font-weight: 900; font-size: 14px; }

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(194,171,123,.80);
  color: #0b0b0b;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 18px rgba(194,171,123,.22);
}

.search-wrap { width: min(610px, 100%); margin-top: 24px; }
input, select, textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(18,18,18,.09);
  border-radius: 24px;
  padding: 0 22px;
  color: var(--text);
  background: rgba(255,255,255,.48);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 8px 20px rgba(18,18,18,.035);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  appearance: none;
  -webkit-appearance: none;
  font-size: 12px;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(194,171,123,.70);
  box-shadow: 0 0 0 4px rgba(194,171,123,.16), inset 0 1px 0 rgba(255,255,255,.92);
}
input::placeholder { color: rgba(18,18,18,.38); }
label { display: block; color: var(--muted); font-weight: 700; margin-bottom: 18px; }
label input, label select { margin-top: 8px; }

button, .file-btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(18,18,18,.08);
  border-radius: 24px;
  padding: 0 26px;
  font-weight: 900;
  font-size: 12px;
  text-decoration: none;
  user-select: none;
}
.primary { background: var(--gold); color: #0b0b0b; border-color: rgba(194,171,123,.78); box-shadow: 0 14px 28px rgba(194,171,123,.20), inset 0 1px 0 rgba(255,255,255,.28); }
.ghost, .file-btn { background: rgba(255,255,255,.46); color: #111; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.small { min-height: 44px; padding: 0 20px; border-radius: 18px; }
.action-row, .inline-form, .guest-form, .toolbar { display: flex; align-items: center; gap: 14px; }
.wrap { flex-wrap: wrap; }
.inline-form input { flex: 1; }
.guest-form { display: grid; grid-template-columns: 1fr 280px auto; gap: 14px; }
.pin-form { grid-template-columns: 1fr 1fr auto; }
.toolbar { margin: 18px 0; }
.toolbar input { flex: 1; }
.data-actions { flex-wrap: wrap; align-items: stretch; }
.data-actions > * { min-width: 190px; }

.table-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.table-card { padding: 26px; min-height: 164px; border-radius: 26px; background: linear-gradient(145deg, rgba(255,255,255,.62), rgba(255,255,255,.36)); }
.table-card-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.table-card ul { list-style: none; margin: 0; padding: 0; }
.table-card li { padding: 10px 0; border-bottom: 1px solid rgba(18,18,18,.08); color: rgba(18,18,18,.70); }
.table-card li:last-child { border-bottom: 0; }
.admin-layout { display: grid; gap: 24px; }
.admin-list { display: grid; gap: 12px; margin-top: 20px; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 22px; }
.row-title { font-weight: 900; }
.row-meta { color: var(--muted); margin-top: 4px; }
.row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions select { min-width: 220px; }
.icon-btn { min-height: 42px; padding: 0 16px; border-radius: 16px; background: rgba(255,255,255,.45); }

.setup-panel { max-width: 980px; margin: 24px auto; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 28px; }
.setup-grid label:nth-child(1), .setup-grid label:nth-child(2) { grid-column: 1 / -1; }
.config-background-panel { margin: 22px 0; padding: 28px; }
.upload-drop {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(194,171,123,.38);
  border-radius: 24px;
  background: rgba(255,255,255,.28);
  cursor: pointer;
}
.upload-drop span { font-weight: 900; color: #333; }
.upload-drop small { color: var(--muted); font-weight: 700; }
.background-preview {
  height: 132px;
  margin: 18px 0 10px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.78);
  background-image: var(--guest-bg-image);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.70);
}
.config-preview { min-height: 100px; padding: 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.helper { margin: 12px 0 0; color: var(--muted); }
.status-ok { color: #287a45; }
.status-error { color: #b00020; }
.setup-note { margin-top: 18px; }

.import-preview { margin-top: 24px; padding: 26px; }
.import-preview-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.import-preview-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; }
.import-preview ul { list-style: none; padding: 0; margin: 0; border: 1px solid rgba(18,18,18,.08); border-radius: 18px; overflow: hidden; }
.import-preview li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(18,18,18,.08); background: rgba(255,255,255,.24); }
.import-preview li:last-child { border-bottom: 0; }
.import-preview li span { color: var(--gold); font-weight: 900; }
.import-confirm-row { margin-top: 22px; }
.mini-note { font-size: 11px; }
.app-footer { text-align: center; color: rgba(18,18,18,.48); margin-top: 34px; padding-bottom: 20px; }
.app-footer a { color: var(--gold); font-weight: 900; text-decoration: none; }

@media (min-width: 1500px) {
  .table-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app-shell { width: min(100% - 34px, 760px); }
  .topbar { align-items: flex-start; flex-direction: column; }
  .tabs { align-self: center; }
  .table-grid { grid-template-columns: 1fr; }
  .guest-form, .pin-form, .setup-grid, .import-preview-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form button { width: 100%; }
}
@media (max-width: 760px) {
  html, body {
    background-color: #f6f3ec;
    background-image: var(--guest-bg-image);
    background-size: auto 100svh;
    background-position: center top;
    background-repeat: no-repeat;
  }
  .background-stage {
    background-image:
      linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.12)),
      var(--guest-bg-image);
    background-size: cover, auto 100svh;
    background-position: center center, center top;
  }
  .background-stage::after { background: rgba(255,255,255,.10); }
  .app-shell {
    width: 100%;
    min-height: 100svh;
    padding: max(26px, env(safe-area-inset-top)) 14px max(34px, env(safe-area-inset-bottom));
  }
  .topbar { gap: 18px; margin-bottom: 22px; }
  h1 { font-size: 22px; }
  .tabs { min-width: 206px; padding: 7px; }
  .tab { min-height: 48px; padding: 0 23px; font-size: 12px; }
  .admin-tab { width: 56px; }
  .panel, .hero-card, .result-card, .setup-panel { padding: 28px; margin-bottom: 18px; border-radius: 28px; }
  .hero-card { min-height: auto; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .badge { min-height: 36px; }
  input, select, textarea, #guestSearch, #adminGuestSearch, #pinInput {
    min-height: 56px;
    height: 56px;
    padding: 0 20px;
    font-size: 16px;
    line-height: normal;
    border-radius: 24px;
  }
  input::placeholder { line-height: normal; }
  button, .file-btn { min-height: 54px; width: 100%; }
  .action-row, .toolbar { flex-direction: column; align-items: stretch; }
  .data-actions > * { min-width: 0; }
  .table-card { min-height: 154px; padding: 24px; }
  .row-item { align-items: stretch; flex-direction: column; }
  .row-actions, .row-actions select { width: 100%; }
  .config-background-panel { padding: 24px; }
  .background-preview { height: 110px; }
}


/* GuestPlace v3.3 — stabilizzazione UX app ufficiale */
html, body {
  width: 100%;
  min-height: 100%;
  background-color: #f6f3ec;
}
body {
  position: relative;
  overscroll-behavior-y: auto;
}
.background-stage {
  position: fixed;
  inset: -2px;
  width: calc(100vw + 4px);
  height: calc(100dvh + 4px);
  background-color: #f6f3ec;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.05)),
    var(--guest-bg-image);
  background-size: cover, cover;
  background-position: center center, center center;
  background-repeat: no-repeat;
  z-index: -10;
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.background-stage::after { background: rgba(255,255,255,.055); }

.tabs {
  min-width: 0;
  width: auto;
  padding: 5px;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.86);
  background: rgba(255,255,255,.70);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(18,18,18,.075), inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.tab {
  min-height: 42px;
  min-width: 84px;
  padding: 0 18px;
  font-size: 12px;
  line-height: 1;
}
.admin-tab {
  width: 50px;
  min-width: 50px;
  padding: 0;
}
.person-icon, .person-icon svg {
  width: 22px;
  height: 22px;
}

.panel, .hero-card, .result-card, .table-card, .row-item, .setup-panel, .import-preview, .config-background-panel {
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.84), rgba(255,255,255,.62));
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  border-color: rgba(255,255,255,.84);
  box-shadow: 0 22px 58px rgba(18,18,18,.085), 0 6px 18px rgba(18,18,18,.045), inset 0 1px 0 rgba(255,255,255,.96);
}
.panel::before, .hero-card::before, .result-card::before, .table-card::before, .setup-panel::before, .config-background-panel::before {
  z-index: 0;
  opacity: .42;
}
.panel > *, .hero-card > *, .result-card > *, .table-card > *, .setup-panel > *, .import-preview > *, .config-background-panel > * {
  position: relative;
  z-index: 1;
}
.table-card {
  background: linear-gradient(145deg, rgba(255,255,255,.80), rgba(255,255,255,.58));
}
.muted { color: rgba(18,18,18,.66); }
.table-card li { color: rgba(18,18,18,.76); }

@media (max-width: 760px) {
  html, body {
    background-color: #f6f3ec;
    background-image: var(--guest-bg-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
  .background-stage {
    inset: -96px 0 -120px 0;
    width: 100vw;
    height: calc(100dvh + 216px);
    min-height: calc(100svh + 216px);
    background-image:
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.05)),
      var(--guest-bg-image);
    background-size: cover, cover;
    background-position: center center, center center;
    background-repeat: no-repeat;
  }
  .app-shell {
    width: 100%;
    min-height: 100svh;
    padding: max(26px, env(safe-area-inset-top)) 14px max(34px, env(safe-area-inset-bottom));
  }
  .topbar { gap: 18px; margin-bottom: 22px; }
  .tabs {
    align-self: center;
    padding: 5px;
    gap: 5px;
  }
  .tab {
    min-height: 44px;
    min-width: 84px;
    padding: 0 17px;
    font-size: 12px;
  }
  .admin-tab { min-width: 50px; width: 50px; }
  .person-icon, .person-icon svg { width: 22px; height: 22px; }
  .panel, .hero-card, .result-card, .setup-panel {
    background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(255,255,255,.66));
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
  }
  input, select, textarea, #guestSearch, #adminGuestSearch, #pinInput {
    min-height: 56px;
    height: 56px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 56px;
    font-size: 16px;
    vertical-align: middle;
  }
}

/* GuestPlace v3.5 — refinements: compact admin UX, stats, table filter */
:root { --page-width: 1320px; }
body { font-size: 12px; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3, h4, h5 { font-size: 14px; }
.panel, .hero-card, .result-card, .setup-panel { padding: 34px; margin-bottom: 20px; }
.hero-card { min-height: 160px; }
.panel-head { margin-bottom: 20px; }
button, .file-btn { min-height: 46px; padding: 0 22px; border-radius: 20px; font-size: 12px; }
.small { min-height: 40px; padding: 0 18px; border-radius: 16px; }
input, select, textarea { min-height: 48px; border-radius: 20px; font-size: 12px; }
.inline-form { gap: 12px; }
.guest-form { gap: 12px; grid-template-columns: 1fr 240px auto; }
.toolbar { gap: 12px; align-items: center; }
.toolbar input { flex: 1 1 280px; }
.toolbar select { flex: 0 0 220px; }
.toolbar button { flex: 0 0 auto; }
.data-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 220px));
  gap: 14px;
  align-items: stretch;
  justify-content: start;
}
.data-actions > * { min-width: 0; width: 100%; }
.row-item { padding: 16px; }
.icon-btn { min-height: 38px; padding: 0 14px; border-radius: 15px; }

.stats-panel { grid-column: 1 / -1; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card {
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(255,255,255,.52));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94), 0 10px 24px rgba(18,18,18,.045);
  padding: 18px;
}
.stat-card span {
  display: block;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  color: var(--black);
  margin-bottom: 8px;
}
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (min-width: 981px) {
  .admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
  .settings-panel, .pin-panel, .stats-panel, .data-panel { grid-column: 1 / -1; }
  .tables-panel, .guests-panel { grid-column: auto; align-self: start; }
  .tables-panel .inline-form { align-items: center; }
  .tables-panel .inline-form input { flex: 1; }
  .tables-panel .inline-form button { flex: 0 0 auto; width: auto; }
}

@media (max-width: 980px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guest-form { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input, .toolbar select, .toolbar button { flex: 0 0 auto; width: 100%; }
}

@media (max-width: 760px) {
  h1 { font-size: 22px; }
  h2 { font-size: 16px; }
  h3, h4 { font-size: 14px; }
  .panel, .hero-card, .result-card, .setup-panel { padding: 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-card { padding: 16px; border-radius: 20px; }
  .data-actions { grid-template-columns: 1fr; }
  .row-item { gap: 14px; }
  .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }
  .row-actions .icon-btn {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }
  .row-actions select {
    grid-column: 1 / -1;
    width: 100%;
  }
  .tables-panel .inline-form button,
  .guests-panel .guest-form button { min-height: 50px; }
  button, .file-btn { min-height: 50px; }
}


/* GuestPlace v3.8 — ottimizzazione card invitati e selettore tavolo */
@media (min-width: 981px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .settings-panel,
  .pin-panel,
  .stats-panel,
  .tables-panel,
  .guests-panel,
  .data-panel {
    grid-column: 1 / -1;
  }

  .pin-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px;
    align-items: center;
    gap: 14px;
  }
  .pin-form input,
  .pin-form button {
    width: 100%;
  }

  .tables-panel .admin-list,
  .guests-panel .admin-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
  }
  .tables-panel .row-item,
  .guests-panel .row-item {
    min-height: 156px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
  }
  .tables-panel .row-actions,
  .guests-panel .row-actions {
    display: grid;
    gap: 8px;
    width: 100%;
  }
  .tables-panel .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guests-panel .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guests-panel .row-actions select {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }
  .row-actions .icon-btn {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }

  .data-actions {
    display: grid;
    grid-template-columns: repeat(4, 240px);
    gap: 14px;
    align-items: stretch;
    justify-content: start;
  }
  .data-actions > button,
  .data-actions > .file-btn {
    width: 100%;
    min-height: 58px;
    height: 58px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
  }
}

@media (min-width: 981px) and (max-width: 1240px) {
  .tables-panel .admin-list,
  .guests-panel .admin-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .data-actions {
    grid-template-columns: repeat(2, 240px);
  }
}

@media (max-width: 760px) {
  .tables-panel .row-actions,
  .guests-panel .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .row-actions .icon-btn {
    min-height: 40px;
    border-radius: 16px;
  }
}


/* GuestPlace v3.8 — rimozione testo tavolo duplicato nella card invitato */
@media (min-width: 981px) {
  .guests-panel .row-item {
    min-height: 132px;
    padding: 16px;
  }
  .guests-panel .row-actions select {
    min-height: 42px;
    height: 42px;
    border-radius: 16px;
  }
  .guests-panel .row-actions .icon-btn {
    min-height: 38px;
  }
}
@media (max-width: 760px) {
  .guests-panel .row-item {
    padding: 16px;
    gap: 10px;
  }
  .guests-panel .row-title {
    margin-bottom: 0;
  }
  .guests-panel .row-actions select {
    min-height: 50px;
    height: 50px;
  }
}
