:root {
  color-scheme: light;
  --bg: #f6fbff;
  --bg-alt: #eaf4ff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --primary: #1a7ddb;
  --primary-soft: rgba(26, 125, 219, 0.16);
  --accent: #73c7ff;
  --text: #0b2a3d;
  --muted: #5e7388;
  --success: #18a074;
  --danger: #e35353;
  --radius-lg: 26px;
  --radius-md: 18px;
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body.portal-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 22%, rgba(26, 125, 219, 0.2), transparent 46%),
    radial-gradient(circle at 80% 8%, rgba(115, 199, 255, 0.22), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(26, 125, 219, 0.3);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 30px rgba(15, 80, 134, 0.15);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, rgba(26, 125, 219, 0.96), rgba(96, 184, 255, 0.96));
  border-color: rgba(26, 125, 219, 0.55);
  color: #fff;
  box-shadow: 0 20px 40px rgba(26, 125, 219, 0.28);
}

.btn.ghost {
  background: rgba(26, 125, 219, 0.12);
  border-color: transparent;
  color: var(--primary);
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(26, 125, 219, 0.45);
  color: var(--primary);
}

.btn.full {
  width: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(15, 80, 134, 0.22);
  border-color: rgba(26, 125, 219, 0.46);
  background: rgba(255, 255, 255, 0.98);
}

.btn.primary:hover {
  background: linear-gradient(135deg, rgba(96, 184, 255, 1), rgba(26, 125, 219, 1));
}

.btn:focus-visible {
  outline: 3px solid rgba(26, 125, 219, 0.35);
  outline-offset: 2px;
}

.portal-topbar .btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.panel-header .btn {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(24px, 6vw, 72px);
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(26, 125, 219, 0.12);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.portal-logo {
  width: clamp(48px, 6vw, 64px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(12, 74, 132, 0.18));
}

.portal-brand small {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.portal-nav {
  display: flex;
  gap: 20px;
  color: var(--primary);
  font-weight: 500;
}

.portal-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(26, 125, 219, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-left: auto;
}

.portal-menu-toggle span {
  display: block;
  height: 2px;
  width: 60%;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.portal-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.portal-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.portal-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.portal-nav a {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.portal-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.portal-nav a:hover {
  color: var(--primary-dark);
}

.portal-nav a:hover::after {
  transform: scaleX(1);
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.portal-user span {
  display: block;
  font-weight: 600;
}

.portal-user small {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.portal-shell {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding: clamp(32px, 6vw, 72px);
  max-width: 1400px;
  margin: 0 auto;
}

.portal-main {
  display: grid;
  gap: clamp(32px, 5vw, 48px);
  align-content: start;
}

.panel {
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(226, 242, 255, 0.9));
  border: 1px solid rgba(26, 125, 219, 0.12);
  box-shadow: 0 28px 60px rgba(12, 74, 132, 0.14);
  display: grid;
  gap: 24px;
  width: 100%;
}

.panel.highlight {
  background: linear-gradient(135deg, rgba(26, 125, 219, 0.18), rgba(139, 210, 255, 0.22));
}

.guard-panel {
  background: linear-gradient(125deg, rgba(26, 125, 219, 0.14), rgba(115, 199, 255, 0.18), #ffffff);
  border: 1px solid rgba(26, 125, 219, 0.2);
}

.guard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.guard-actions .btn {
  min-width: 180px;
}

.guard-actions .btn.outline {
  background: #ffffff;
  border-color: rgba(26, 125, 219, 0.55);
  color: var(--primary-dark);
  box-shadow: 0 18px 36px rgba(12, 74, 132, 0.12);
}

.panel-note {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.booking-panel .panel-header h2,
.bookings-panel .panel-header h2 {
  color: #0b5cab;
  position: relative;
  text-shadow: 0 3px 10px rgba(26, 125, 219, 0.45);
  animation: pulseTitle 2.8s ease-in-out infinite;
}

@keyframes pulseTitle {
  0% { text-shadow: 0 3px 10px rgba(26, 125, 219, 0.45); transform: translateY(0); }
  50% { text-shadow: 0 8px 22px rgba(79, 181, 255, 0.65); transform: translateY(-2px); }
  100% { text-shadow: 0 3px 10px rgba(26, 125, 219, 0.45); transform: translateY(0); }
}

.intro-panel {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.intro-copy {
  display: grid;
  gap: 18px;
}

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-tags span {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(26, 125, 219, 0.12);
  border: 1px solid rgba(26, 125, 219, 0.2);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.intro-visual {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(12, 74, 132, 0.18);
  position: relative;
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.client-layout {
  display: grid;
  gap: clamp(28px, 4vw, 40px);
  grid-template-columns: 1fr;
  align-items: start;
}

.booking-panel {
  display: grid;
  gap: 24px;
}

.boat-summary,
.tour-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(26, 125, 219, 0.06);
  border: 1px solid rgba(26, 125, 219, 0.14);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.boat-summary__media,
.tour-summary__media {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(12, 74, 132, 0.12);
}

.boat-summary__media img,
.tour-summary__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.boat-summary__body h4,
.tour-summary__body h4 {
  margin: 0 0 6px;
  color: var(--primary-dark);
}

.boat-summary__meta,
.tour-summary__meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.boat-summary__features,
.tour-summary__features {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.bookings-panel {
  display: grid;
  gap: 20px;
}

.bookings-panel #clientBookings {
  max-height: clamp(340px, 58vh, 560px);
  overflow-y: auto;
  padding-right: 6px;
}

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 40px);
}

.admin-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-grid > * {
  min-width: 0;
}

.admin-table {
  padding: 0;
}

.admin-table .table-scroll {
  overflow-x: auto;
  padding: clamp(20px, 3vw, 28px);
}

.admin-table .table-scroll table {
  min-width: 880px;
}

.admin-calendar {
  display: grid;
  gap: 16px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-nav #calendarTitle {
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.calendar-day {
  padding: 14px 10px 18px;
  border-radius: 12px;
  background: rgba(26, 125, 219, 0.06);
  border: 1px solid rgba(26, 125, 219, 0.12);
  text-align: center;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(12, 74, 132, 0.14);
  background: rgba(26, 125, 219, 0.12);
}

.calendar-day.is-today {
  border-color: rgba(26, 125, 219, 0.5);
  background: rgba(26, 125, 219, 0.12);
}

.calendar-day.has-events {
  position: relative;
}

.calendar-day.has-events::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-50%);
}

.calendar-day.is-active {
  border-color: rgba(26, 125, 219, 0.6);
  background: rgba(26, 125, 219, 0.16);
  box-shadow: 0 12px 26px rgba(12, 74, 132, 0.18);
}

.calendar-day-detail {
  background: rgba(26, 125, 219, 0.05);
  border: 1px solid rgba(26, 125, 219, 0.12);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.calendar-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.calendar-day-list li {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(26, 125, 219, 0.12);
  display: grid;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.calendar-day-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(12, 74, 132, 0.16);
  border-color: rgba(26, 125, 219, 0.32);
}

.calendar-day-list strong {
  color: var(--primary-dark);
}

.admin-notes {
  display: grid;
  gap: 12px;
}

.staff-notes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.staff-note-form textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  padding: 12px;
  resize: vertical;
}

.staff-note-actions {
  display: flex;
  gap: 10px;
}

.staff-notes {
  display: grid;
  gap: 10px;
}

.staff-note {
  padding: 14px;
  border-radius: 16px;
  background: rgba(26, 125, 219, 0.06);
  border: 1px solid rgba(26, 125, 219, 0.16);
  display: grid;
  gap: 8px;
}

.staff-note__meta {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.staff-note__content {
  margin: 0;
  color: var(--text);
}

.staff-note__actions {
  display: flex;
  gap: 10px;
}

.modal-window--wide {
  min-width: min(900px, 96vw);
}

.booking-detail__cover {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  max-height: 320px;
}

.booking-detail__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.booking-detail__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
}

.booking-detail__cover-info {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
  display: grid;
  gap: 6px;
}

.booking-detail__status {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.booking-detail {
  display: grid;
  gap: 16px;
}

.booking-detail__grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.booking-detail__block {
  padding: 12px;
  border-radius: 12px;
  background: rgba(26, 125, 219, 0.06);
  border: 1px solid rgba(26, 125, 219, 0.12);
}

.booking-detail__block h4 {
  margin: 0 0 6px;
  color: var(--primary-dark);
}

.booking-detail__block p {
  margin: 0;
  color: var(--text);
}

.booking-detail textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  padding: 12px;
  resize: vertical;
  min-height: 160px;
}

.booking-detail__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group select {
  min-width: 180px;
  border-radius: 14px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 12px 44px 12px 16px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(26, 125, 219, 0.5) 50%), linear-gradient(135deg, rgba(26, 125, 219, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 7px), calc(100% - 12px) calc(50% - 7px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.stat-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.stat-grid article {
  padding: 18px;
  border-radius: 18px;
  background: rgba(26, 125, 219, 0.08);
  border: 1px solid rgba(26, 125, 219, 0.18);
}

.stat-grid span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-grid strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
  color: var(--primary-dark);
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

input,
textarea,
select {
  border-radius: 16px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(26, 125, 219, 0.55);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 125, 219, 0.2);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(26, 125, 219, 0.5) 50%), linear-gradient(135deg, rgba(26, 125, 219, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 7px), calc(100% - 12px) calc(50% - 7px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

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

.hidden {
  display: none !important;
}

.portal-footer {
  margin-top: clamp(32px, 6vw, 56px);
  padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, rgba(231, 244, 255, 0.95), rgba(213, 231, 255, 0.9));
  border-top: 1px solid rgba(26, 125, 219, 0.12);
  display: grid;
  gap: clamp(24px, 4vw, 36px);
}

.portal-footer__grid {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.portal-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-footer__logo {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(12, 74, 132, 0.16));
}

.portal-footer__brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.portal-footer__brand span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.portal-footer__group h4 {
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.portal-footer__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.portal-footer__group li {
  display: grid;
  gap: 4px;
}

.portal-footer__group span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.portal-footer__group a {
  color: var(--primary-dark);
  font-weight: 600;
}

.portal-footer__group p {
  margin: 0;
  color: var(--text);
}

.portal-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.portal-footer__legal a {
  color: var(--primary);
  font-weight: 600;
}

.form-feedback {
  font-size: 0.85rem;
  font-weight: 500;
}

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

.form-feedback.error {
  color: var(--danger);
}

.booking-stack {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.booking-card {
  padding: 0;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(26, 125, 219, 0.12);
  display: grid;
  gap: 0;
  box-shadow: 0 24px 60px rgba(15, 80, 134, 0.14);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.booking-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(12, 74, 132, 0.22);
  background: var(--primary);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(6px);
}

.booking-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 80px rgba(15, 80, 134, 0.18);
}

.booking-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(26, 125, 219, 0.12), rgba(115, 199, 255, 0.16));
}

.booking-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.booking-card:hover .booking-card__media img {
  transform: scale(1.06);
}

.booking-card__header {
  padding: 18px 18px 6px;
  display: grid;
  gap: 6px;
  text-align: center;
}

.booking-card__eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--muted);
}

.booking-card__header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.booking-card__time {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.status-pill {
  padding: 6px 16px;
  border-radius: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(26, 125, 219, 0.08);
  border: 1px solid rgba(26, 125, 219, 0.16);
  color: var(--primary);
}

.booking-meta {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  text-align: center;
}

.booking-meta p {
  margin: 0;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.booking-meta strong {
  color: var(--primary-dark);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.booking-note {
  grid-column: 1 / -1;
}

.status-da\\ confermare { background: rgba(115, 199, 255, 0.9); color: #0b2a3d; border-color: rgba(115, 199, 255, 0.9); }
.status-confermato { background: rgba(27, 162, 122, 0.95); color: #ffffff; border-color: rgba(27, 162, 122, 0.95); }
.status-completato { background: rgba(26, 125, 219, 0.95); color: #ffffff; border-color: rgba(26, 125, 219, 0.95); }
.status-annullato { background: rgba(227, 83, 83, 0.95); color: #ffffff; border-color: rgba(227, 83, 83, 0.95); }

.booking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: transparent;
}

.booking-table thead {
  background: rgba(26, 125, 219, 0.12);
}

.booking-table th,
.booking-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(26, 125, 219, 0.1);
  text-align: left;
  font-size: 0.9rem;
  color: var(--text);
}

.booking-table tbody tr:hover {
  background: rgba(26, 125, 219, 0.08);
}

.table-select {
  border-radius: 14px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 12px 16px;
  min-height: 46px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(26, 125, 219, 0.5) 50%), linear-gradient(135deg, rgba(26, 125, 219, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 7px), calc(100% - 12px) calc(50% - 7px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.table-note {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(26, 125, 219, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  padding: 10px 14px;
  min-height: 120px;
  resize: vertical;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  pointer-events: none;
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(240, 247, 255, 0.9);
  backdrop-filter: blur(10px);
}

.modal-window {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(231, 243, 255, 0.94));
  border: 1px solid rgba(26, 125, 219, 0.18);
  min-width: min(480px, 92vw);
  box-shadow: 0 36px 100px rgba(12, 74, 132, 0.18);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 125, 219, 0.12);
  color: var(--primary-dark);
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.08);
}

.auth-card {
  display: grid;
  gap: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(26, 125, 219, 0.16);
  border-radius: var(--radius-md);
  padding: clamp(16px, 4vw, 24px);
  box-shadow: 0 18px 40px rgba(12, 74, 132, 0.12);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: rgba(26, 125, 219, 0.12);
  border-radius: 999px;
  padding: 4px;
  gap: 6px;
}

.tab {
  min-height: 48px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 14px 30px rgba(15, 80, 134, 0.16);
}

.tab-panel {
  display: none;
  gap: 16px;
}

.tab-panel.active {
  display: grid;
}

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

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

  .bookings-panel #clientBookings {
    max-height: none;
    padding-right: 0;
  }
}

@media (max-width: 1024px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
  }

  .portal-menu-toggle {
    display: flex;
  }

  .portal-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(26, 125, 219, 0.14);
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(12, 74, 132, 0.12);
    text-align: center;
  }

  .portal-nav a {
    padding: 8px 0;
  }

  .portal-nav.is-open {
    display: flex;
  }

  .portal-user {
    display: none;
  }

  .portal-user.is-open {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(26, 125, 219, 0.14);
    background: #ffffff;
    box-shadow: 0 24px 48px rgba(12, 74, 132, 0.12);
    align-items: flex-start;
  }

  .portal-user.is-open .btn {
    width: 100%;
  }

  .portal-user.is-open .btn {
    width: 100%;
  }

  .bookings-panel #clientBookings {
    max-height: none;
  }
}

@media (max-width: 1240px) {
  .client-layout {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .portal-shell {
    padding: 24px 16px;
  }

  .portal-topbar {
    padding: 18px 20px;
    gap: 16px;
  }

  .portal-user {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .intro-panel {
    grid-template-columns: 1fr;
  }

  .admin-table .table-scroll table {
    min-width: 720px;
  }

  .portal-nav.is-open,
  .portal-user.is-open {
    padding: 14px;
    margin-top: 10px;
  }

  .modal-window {
    min-width: min(360px, 92vw);
    padding: 28px;
  }

  .tabs {
    gap: 4px;
  }

  .tab {
    min-height: 44px;
  }

  .client-layout {
    gap: 24px;
  }

  .booking-panel,
  .bookings-panel,
  .admin-summary,
  .admin-table,
  .admin-calendar,
  .admin-notes {
    padding: 20px;
  }

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

  .staff-notes {
    grid-template-columns: 1fr;
  }

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

  .portal-footer__grid {
    grid-template-columns: 1fr;
  }

  .portal-footer__brand {
    justify-content: center;
  }

  .portal-footer__legal {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
.btn.ghost:hover {
  background: rgba(26, 125, 219, 0.18);
  border-color: rgba(26, 125, 219, 0.32);
}

.btn.outline:hover {
  background: rgba(26, 125, 219, 0.1);
  color: var(--primary-dark);
}
