:root {
  color-scheme: dark;
  --background: 230 25% 5%;
  --foreground: 220 20% 96%;
  --card: 232 25% 8%;
  --muted: 232 18% 14%;
  --muted-foreground: 220 12% 65%;
  --border: 232 22% 16%;
  --input: 232 22% 14%;
  --primary: 212 100% 56%;
  --primary-glow: 196 100% 62%;
  --accent: 195 92% 60%;
  --primary-foreground: 230 25% 5%;
  --sidebar-background: 232 25% 7%;
  --sidebar-foreground: 220 20% 90%;
  --sidebar-accent: 232 22% 12%;
  --sidebar-border: 232 22% 14%;
  --radius: 0.85rem;
  --gradient-primary: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
  --gradient-accent: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  --gradient-radial:
    radial-gradient(circle at 30% 20%, hsl(var(--primary) / 0.25), transparent 60%),
    radial-gradient(circle at 75% 80%, hsl(var(--accent) / 0.18), transparent 55%);
  --shadow-glow: 0 0 60px hsl(var(--primary) / 0.35);
  --shadow-elegant: 0 24px 60px -24px hsl(var(--primary) / 0.45);
  --shadow-card: 0 12px 40px -16px hsl(230 50% 2% / 0.6);
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  background-image: var(--gradient-radial);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

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

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.font-display,
h1,
h2,
h3,
.brand strong {
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
}

.container-prose,
.container {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
}

.glass {
  border: 1px solid rgb(255 255 255 / 0.05);
  backdrop-filter: blur(24px);
  background: hsl(var(--card) / 0.55);
}

.glass-strong {
  border: 1px solid rgb(255 255 255 / 0.1);
  backdrop-filter: blur(40px);
  background: hsl(var(--card) / 0.75);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grid-bg {
  background-image:
    linear-gradient(hsl(var(--border) / 0.6) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.6) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.hover-lift {
  transition: transform 0.5s var(--transition-smooth), box-shadow 0.5s var(--transition-smooth), border-color 0.5s var(--transition-smooth), background 0.5s var(--transition-smooth);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elegant);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up,
.reveal.visible {
  animation: fade-up 0.7s var(--transition-smooth) both;
}

.reveal {
  opacity: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 24px 0;
  transition: all 0.5s var(--transition-smooth);
}

.site-header.scrolled {
  padding: 12px 0;
}

.site-header.scrolled .nav-shell {
  background: hsl(var(--card) / 0.74);
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(28px);
}

.nav-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  min-height: 56px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: all 0.5s var(--transition-smooth);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px hsl(var(--primary) / 0.45));
  background: transparent;
  border: 0;
  border-radius: 0;
}

.brand small {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 20px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: hsl(var(--foreground));
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: hsl(var(--primary));
  transition: transform 0.25s ease;
}

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

.nav-toggle {
  display: none;
}

.button,
.chip-button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  color: hsl(var(--foreground));
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.5s var(--transition-smooth);
}

.button-primary {
  min-height: 44px;
  padding: 0 32px;
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-glow);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elegant);
}

.button-ghost,
.chip-button,
.tab-button {
  border: 1px solid hsl(var(--input));
  background: hsl(var(--background));
}

.button-ghost {
  min-height: 44px;
  padding: 0 32px;
  background: rgb(255 255 255 / 0.05);
  border-color: rgb(255 255 255 / 0.1);
  backdrop-filter: blur(24px);
}

.button-ghost:hover,
.chip-button:hover,
.tab-button:hover,
.tab-button.active,
.chip-button.active {
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--foreground));
}

.button-danger {
  border: 1px solid rgb(255 80 110 / 0.32);
  background: rgb(255 80 110 / 0.12);
}

.button-small {
  min-height: 36px;
  padding: 0 14px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 112px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(hsl(var(--border) / 0.45) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.45) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 72%);
}

.hero-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 1024px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgb(255 255 255 / 0.05);
  border-radius: 999px;
  background: hsl(var(--card) / 0.55);
  backdrop-filter: blur(24px);
  color: hsl(var(--primary));
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "✧";
  color: hsl(var(--primary));
}

h1 {
  max-width: 1024px;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

p {
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}

.hero-copy > p {
  max-width: 672px;
  margin-top: 32px;
  font-size: 20px;
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-actions .button-primary::after {
  content: "→";
  margin-left: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 672px;
  margin-top: 80px;
}

.hero-stats div {
  min-height: 96px;
}

.hero-stats strong {
  display: block;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 42px;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats span {
  display: block;
  margin-top: 8px;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.hero-visual {
  display: none;
}

.section-pad {
  position: relative;
  padding: 112px 0;
}

.section-head {
  max-width: 768px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-head .eyebrow {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  display: inline-block;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
}

.section-head .eyebrow::before {
  content: none;
}

.section-head p {
  margin-top: 16px;
  font-size: 18px;
}

.card-grid,
.services-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.premium-card {
  position: relative;
  height: 100%;
  min-height: 268px;
  overflow: hidden;
  padding: 32px;
  border-radius: 16px;
}

.premium-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: var(--gradient-primary);
  mix-blend-mode: overlay;
  transition: opacity 0.5s ease;
}

.premium-card:hover::after {
  opacity: 1;
}

.premium-card > * {
  position: relative;
  z-index: 1;
}

.icon-chip {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: hsl(var(--primary-foreground));
  background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}

.icon-chip svg {
  width: 25px;
  height: 25px;
}

.premium-card p {
  margin-top: 12px;
}

.timeline {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.timeline-item {
  min-height: 230px;
  padding: 24px;
  border-radius: 16px;
}

.timeline-item span {
  display: block;
  margin-bottom: 32px;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  color: hsl(var(--primary) / 0.32);
}

.timeline-item h3 {
  margin-bottom: 12px;
}

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

.benefits-grid .premium-card {
  min-height: 210px;
  padding: 24px;
  background: hsl(var(--card) / 0.4);
  border-color: hsl(var(--border));
}

.benefits-grid .icon-chip {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: none;
}

.portfolio-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portfolio-card {
  display: block;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card));
}

.portfolio-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 24%, hsl(var(--primary-glow) / 0.18), transparent 34%),
    linear-gradient(135deg, hsl(var(--primary) / 0.12), hsl(var(--card)) 52%, hsl(var(--muted) / 0.78));
}

.portfolio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-media span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: hsl(var(--primary));
  text-align: center;
}

.portfolio-card h3,
.portfolio-card p {
  padding: 0 24px;
}

.portfolio-tag {
  display: inline-flex;
  margin: 24px 24px 0;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary-glow));
  font-size: 12px;
  font-weight: 700;
}

.portfolio-card h3 {
  margin-top: 12px;
}

.portfolio-card p {
  margin-top: 12px;
}

.testimonial-row {
  width: min(1280px, 100%);
  margin: 24px auto 0;
  padding: 0 40px;
}

.testimonial-row .premium-card {
  min-height: 0;
}

.contact-grid {
  width: min(1024px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 90px;
  padding: 20px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card) / 0.55);
  backdrop-filter: blur(24px);
  transition: transform 0.5s var(--transition-smooth), border-color 0.5s var(--transition-smooth), box-shadow 0.5s var(--transition-smooth);
}

.contact-card:hover {
  border-color: hsl(var(--primary) / 0.4);
  transform: translateY(-6px);
  box-shadow: var(--shadow-elegant);
}

.contact-card img,
.contact-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  padding: 12px;
}

.contact-card img {
  object-fit: contain;
  padding: 6px;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.contact-copy {
  display: block;
  min-width: 0;
}

.contact-copy > span {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.contact-card strong {
  display: block;
  margin-top: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.support-band {
  display: none;
}

.support-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding: 40px;
  border: 1px solid hsl(var(--border));
  border-radius: 20px;
  background: hsl(var(--card) / 0.55);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px);
}

.support-box h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.support-box p {
  max-width: 620px;
  color: hsl(var(--muted-foreground));
}

.support-box .button-primary {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-footer {
  padding: 64px 0 32px;
  border-top: 1px solid hsl(var(--border));
}

.footer-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.5fr 0.5fr 0.5fr;
  gap: 48px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-grid p {
  max-width: 420px;
}

.footer-grid h4 {
  margin: 0 0 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-grid a:not(.brand) {
  display: block;
  margin-top: 10px;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.footer-bottom {
  width: min(1280px, 100%);
  margin: 36px auto 0;
  padding: 24px 40px 0;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom a {
  color: hsl(var(--muted-foreground));
}

.app-page {
  min-height: 100vh;
  padding: 112px 0;
}

body[data-page="area"] .app-page {
  padding: 56px 0;
}

.auth-layout {
  min-height: calc(100vh - 224px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-copy {
  display: none;
}

.app-panel {
  position: relative;
  width: min(448px, calc(100vw - 40px));
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-elegant);
}

.app-panel::before,
.admin-shell.setup::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: hsl(var(--primary) / 0.2);
  filter: blur(120px);
}

.auth-layout.client-authenticated {
  align-items: stretch;
  min-height: calc(100vh - 112px);
}

.app-panel.client-dashboard-shell {
  width: min(1180px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.08);
  background:
    linear-gradient(135deg, hsl(var(--card) / 0.92), hsl(var(--background) / 0.86)),
    hsl(var(--card));
  box-shadow: var(--shadow-elegant);
}

.app-panel.client-dashboard-shell::before {
  width: 760px;
  height: 760px;
  left: 18%;
  background: hsl(var(--primary) / 0.18);
}

.client-dashboard {
  min-height: 720px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
}

.client-sidebar {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid hsl(var(--border));
  background:
    linear-gradient(180deg, hsl(var(--sidebar-background) / 0.95), hsl(var(--background) / 0.9)),
    hsl(var(--sidebar-background));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.client-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-menu-toggle {
  display: none;
}

.client-sidebar-brand {
  align-items: center;
}

.client-sidebar-brand .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: transparent;
}

.client-menu {
  display: grid;
  gap: 6px;
}

.client-menu a {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  transition: all 0.35s var(--transition-smooth);
}

.client-menu a span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.35);
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.08);
}

.client-menu a em {
  min-width: 22px;
  min-height: 22px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.16);
  color: hsl(var(--primary-glow));
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.client-menu a:hover,
.client-menu a.active {
  color: hsl(var(--foreground));
  background: hsl(var(--sidebar-accent));
}

.client-sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: rgb(255 255 255 / 0.04);
  display: grid;
  gap: 4px;
}

.client-sidebar-card small,
.client-sidebar-card span {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-sidebar-card strong {
  overflow-wrap: anywhere;
}

.client-sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.client-main {
  min-width: 0;
  padding: 32px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.client-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid hsl(var(--border));
}

.client-topbar h1 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.client-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-button {
  min-height: 44px;
  padding: 0 12px 0 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: hsl(var(--background) / 0.62);
  color: hsl(var(--foreground));
  font-weight: 700;
}

.notification-button strong {
  min-width: 26px;
  min-height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.18);
  color: hsl(var(--primary-glow));
  font-size: 13px;
}

.client-dashboard p,
.client-dashboard h2 {
  text-align: left;
}

.client-dashboard p {
  margin: 8px 0 0;
  color: hsl(var(--muted-foreground));
}

.client-kpi-grid,
.client-workspace,
.client-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.client-kpi {
  min-height: 132px;
  padding: 20px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card) / 0.62);
  box-shadow: var(--shadow-card);
}

.client-kpi span,
.client-kpi small {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.client-kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 44px;
  line-height: 1;
}

.client-workspace {
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
}

.client-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  background: hsl(var(--card) / 0.58);
  box-shadow: var(--shadow-card);
}

.client-panel-head {
  margin-bottom: 18px;
}

.client-panel-head.row,
.client-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-panel-head h2 {
  margin-top: 5px;
  font-size: 26px;
  line-height: 1.1;
}

.client-quote-panel textarea {
  min-height: 136px;
}

.quote-message-box {
  min-height: 170px;
  line-height: 1.45;
}

.form-hint {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.client-list {
  display: grid;
  gap: 12px;
}

.client-item,
.client-empty {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 0.06);
  border-radius: 14px;
  background: hsl(var(--background) / 0.52);
}

.client-item h3,
.client-item strong,
.client-empty strong {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.client-item p,
.client-empty p {
  overflow-wrap: anywhere;
}

.client-item small {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}

.client-conversation {
  width: 100%;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
  transition: transform 0.35s var(--transition-smooth), border-color 0.35s var(--transition-smooth);
}

.client-conversation:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--primary) / 0.4);
}

.read-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.read-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.read-badge.unread {
  color: #fecdd3;
  background: rgb(244 63 94 / 0.13);
  border: 1px solid rgb(244 63 94 / 0.24);
}

.read-badge.unread i {
  background: #fb7185;
  box-shadow: 0 0 16px rgb(251 113 133 / 0.62);
}

.read-badge.read {
  color: #bbf7d0;
  background: rgb(34 197 94 / 0.13);
  border: 1px solid rgb(34 197 94 / 0.24);
}

.read-badge.read i {
  background: #22c55e;
  box-shadow: 0 0 16px rgb(34 197 94 / 0.62);
}

.quote-client-card,
.notification-card {
  text-align: left;
}

.quote-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quote-contact-row small {
  padding: 7px 10px;
  border-radius: 999px;
  background: hsl(var(--muted) / 0.34);
  color: hsl(var(--muted-foreground));
}

.quote-edit-form {
  margin-top: 0;
}

.notification-card.unread {
  border-color: hsl(var(--primary) / 0.32);
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.1), transparent 48%),
    hsl(var(--background) / 0.52);
  cursor: pointer;
}

.order-client-notes {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid hsl(var(--primary) / 0.18);
  border-radius: 12px;
  background: hsl(var(--primary) / 0.08);
}

.order-client-notes strong {
  margin: 0 0 6px;
}

.order-client-notes p {
  margin: 0;
}

.order-client-notes a,
.notification-card a {
  color: hsl(var(--primary-glow));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-request {
  width: 100%;
  color: hsl(var(--foreground));
  text-align: left;
  cursor: pointer;
  border-color: hsl(var(--primary) / 0.14);
}

.support-request:hover {
  border-color: hsl(var(--primary) / 0.42);
  transform: translateY(-2px);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.app-panel h2 {
  font-size: 30px;
  text-align: center;
  margin-bottom: 8px;
}

.app-panel p {
  text-align: center;
  font-size: 14px;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
}

label.wide {
  grid-column: 1 / -1;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 4px);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  outline: none;
}

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

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
}

input[type="file"] {
  min-height: 44px;
  padding: 7px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--background) / 0.7);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: hsl(var(--primary-foreground));
  background: var(--gradient-primary);
  font-weight: 700;
  cursor: pointer;
}

.dashboard-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.overview-card {
  min-height: 168px;
  padding: 22px;
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  background:
    linear-gradient(145deg, hsl(var(--card) / 0.88), hsl(var(--background) / 0.62)),
    hsl(var(--card));
  color: hsl(var(--foreground));
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--transition-smooth), border-color 0.35s var(--transition-smooth);
}

.overview-card:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--primary) / 0.36);
}

.overview-card span,
.overview-card small {
  display: block;
  color: hsl(var(--muted-foreground));
}

.overview-card span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-card strong {
  display: block;
  margin: 18px 0 10px;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 48px;
  line-height: 0.9;
}

.overview-card.alert strong {
  color: hsl(var(--primary-glow));
}

.overview-card.green strong {
  color: #6ee7b7;
}

.mini-card {
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 0.05);
  border-radius: 16px;
  background: hsl(var(--card) / 0.55);
  backdrop-filter: blur(24px);
}

.mini-card strong {
  display: block;
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 40px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--primary-glow));
  font-size: 12px;
  font-weight: 700;
}

.status.closed {
  color: #ff8ea1;
  background: rgb(255 80 110 / 0.12);
}

.status.unread {
  color: hsl(var(--primary-glow));
  background: hsl(var(--primary) / 0.16);
}

.progress {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: hsl(var(--muted));
}

.progress span {
  display: block;
  height: 100%;
  background: var(--gradient-primary);
}

.admin-page {
  padding: 0;
}

.admin-layout {
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
}

.admin-shell {
  min-height: 100vh;
  width: 100%;
}

.admin-shell.setup {
  position: relative;
  min-height: auto;
  width: min(448px, calc(100vw - 40px));
  margin: auto;
  padding: 36px;
  border-radius: 20px;
  box-shadow: var(--shadow-elegant);
  border: 1px solid hsl(var(--border));
}

.admin-grid {
  min-height: 100vh;
  display: flex;
  background: hsl(var(--background));
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  width: 256px;
  height: 100vh;
  flex: 0 0 256px;
  background: hsl(var(--sidebar-background));
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.admin-sidebar .brand {
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid hsl(var(--sidebar-border));
}

.admin-sidebar .brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
}

.admin-mobile-bar {
  display: none;
}

.admin-sidebar nav {
  padding: 16px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
}

.admin-sidebar .chip-button {
  width: 100%;
  justify-content: flex-start;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: hsl(var(--sidebar-foreground) / 0.7);
}

.admin-sidebar .chip-button.active {
  background: hsl(var(--sidebar-accent));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-card);
}

.admin-user {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid hsl(var(--sidebar-border));
}

.admin-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.admin-content-wrap {
  flex: 1;
  min-width: 0;
}

.admin-topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.92);
  backdrop-filter: blur(16px);
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.admin-content {
  padding: 40px;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.admin-heading h1 {
  font-size: 30px;
  line-height: 1.2;
}

.admin-heading p {
  margin-top: 4px;
}

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

.admin-resource-card {
  padding: 24px;
  border-radius: 16px;
}

.admin-resource-card .form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-display-card {
  display: grid;
  gap: 18px;
}

.resource-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.resource-card-head h2 {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.resource-card-head p {
  margin-top: 6px;
  color: hsl(var(--muted-foreground));
  overflow-wrap: anywhere;
}

.resource-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-field {
  min-width: 0;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--background) / 0.36);
}

.resource-field small {
  display: block;
  margin-bottom: 6px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-field strong {
  display: block;
  color: hsl(var(--foreground));
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

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

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-toolbar label {
  min-width: 0;
}

.users-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.64);
}

.users-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  padding: 14px;
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  vertical-align: middle;
}

.users-table th {
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: hsl(var(--background) / 0.35);
}

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

.users-table tbody tr {
  transition: background 0.25s ease;
}

.users-table tbody tr:hover {
  background: hsl(var(--muted) / 0.16);
}

.users-table tbody tr.editing {
  background: hsl(var(--primary) / 0.08);
}

.users-table input,
.users-table select {
  min-height: 38px;
  border-radius: 10px;
  background: hsl(var(--background) / 0.72);
}

.users-table td:nth-child(1) {
  width: 22%;
}

.users-table td:nth-child(2) {
  width: 30%;
}

.users-table td:nth-child(3) {
  width: 18%;
}

.users-table td:nth-child(5) {
  width: 180px;
  text-align: right;
}

.table-primary {
  display: block;
  color: hsl(var(--foreground));
  overflow-wrap: anywhere;
}

.table-muted {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  white-space: nowrap;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted) / 0.32);
  font-size: 12px;
  font-weight: 800;
}

.role-assistenza {
  color: hsl(var(--primary-glow));
  border-color: hsl(var(--primary) / 0.28);
  background: hsl(var(--primary) / 0.12);
}

.role-admin {
  color: hsl(var(--foreground));
  border-color: hsl(var(--accent) / 0.32);
  background: hsl(var(--accent) / 0.13);
}

.table-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
}

.user-role-card {
  min-width: 0;
}

.user-role-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.user-role-head strong,
.user-role-head small {
  display: block;
  overflow-wrap: anywhere;
}

.user-role-head small,
.role-help {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.role-help {
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--muted) / 0.28);
}

.admin-chat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-chat-detail {
  width: 100%;
  padding: 22px;
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  background: hsl(var(--card) / 0.72);
  box-shadow: var(--shadow-card);
}

.admin-chat-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid hsl(var(--border));
}

.admin-chat-detail-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.admin-chat-messages {
  min-height: 220px;
  max-height: 360px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
}

.admin-chat-detail .chat-form {
  margin-top: 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--background) / 0.42);
}

.quote-list {
  display: grid;
  gap: 14px;
}

.quote-request-card {
  padding: 20px;
  border: 1px solid hsl(var(--border));
  border-radius: 18px;
  background: hsl(var(--card) / 0.66);
  box-shadow: var(--shadow-card);
}

.quote-request-card.unread {
  border-color: hsl(var(--primary) / 0.28);
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.09), transparent 45%),
    hsl(var(--card) / 0.68);
}

.quote-request-card.read {
  opacity: 0.82;
}

.quote-request-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.quote-request-head h2 {
  margin-top: 10px;
  font-size: 22px;
}

.quote-request-head small,
.quote-notes {
  color: hsl(var(--muted-foreground));
}

.quote-request-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  text-align: right;
}

.quote-request-card p {
  margin: 0;
  color: hsl(var(--foreground));
  text-align: left;
  overflow-wrap: anywhere;
}

.quote-notes {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--background) / 0.42);
  font-size: 13px;
}

.media-field {
  grid-column: 1 / -1;
}

.media-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--muted) / 0.35);
}

.media-preview img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: hsl(var(--background));
}

.media-preview span {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.media-file {
  margin-top: 8px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 25px;
}

.switch-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: hsl(var(--input));
  padding: 2px;
}

.switch-ui span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: hsl(var(--background));
  transition: transform 0.2s ease;
}

.switch-ui.on {
  background: hsl(var(--primary));
}

.switch-ui.on span {
  transform: translateX(20px);
}

.chat-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  justify-content: flex-end;
  padding: 24px;
  background: rgb(0 0 0 / 0.5);
}

.chat-drawer.open {
  display: flex;
}

.chat-card {
  width: min(430px, 100%);
  height: min(720px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.98);
  box-shadow: var(--shadow-elegant);
  backdrop-filter: blur(28px);
}

.chat-head,
.chat-form {
  padding: 16px;
  border-bottom: 1px solid hsl(var(--border));
}

.chat-form {
  border-top: 1px solid hsl(var(--border));
  border-bottom: 0;
  display: grid;
  gap: 10px;
}

.chat-account {
  padding: 11px 12px;
  border: 1px solid hsl(var(--primary) / 0.22);
  border-radius: 12px;
  color: hsl(var(--primary-glow));
  background: hsl(var(--primary) / 0.1);
  font-size: 13px;
  font-weight: 700;
}

.chat-drawer.authenticated [data-chat-name] {
  display: none;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-head span {
  display: block;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.chat-body {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  background:
    linear-gradient(180deg, hsl(var(--background) / 0.18), hsl(var(--background) / 0.4)),
    hsl(var(--card));
}

.chat-start {
  padding: 22px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--background) / 0.55);
}

.chat-start strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.chat-start p {
  text-align: left;
  margin: 0;
  color: hsl(var(--muted-foreground));
}

.chat-close-active {
  justify-self: end;
}

.chat-msg {
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 14px;
  background: hsl(var(--muted) / 0.82);
  border: 1px solid hsl(var(--border));
}

.chat-msg.mine {
  justify-self: end;
  background: hsl(var(--primary) / 0.25);
  border-color: hsl(var(--primary) / 0.24);
}

.chat-msg small {
  display: block;
  margin-top: 5px;
  color: hsl(var(--muted-foreground));
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100% - 36px));
}

.toast {
  padding: 14px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 14px;
  background: hsl(var(--card) / 0.95);
  box-shadow: var(--shadow-card);
}

.toast.ok {
  border-color: hsl(var(--primary) / 0.35);
}

.toast.error {
  border-color: rgb(255 80 110 / 0.4);
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 20px;
  }

  .card-grid,
  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .admin-grid {
    display: block;
  }

  .admin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex: none;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-dashboard {
    grid-template-columns: 1fr;
  }

  .client-sidebar {
    border-right: 0;
    border-bottom: 1px solid hsl(var(--border));
  }

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

  .client-sidebar-actions {
    grid-template-columns: repeat(2, minmax(0, 160px));
  }

  .client-workspace {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .container,
  .container-prose,
  .hero-grid,
  .card-grid,
  .services-grid,
  .timeline,
  .portfolio-grid,
  .contact-grid,
  .testimonial-row,
  .footer-grid,
  .footer-bottom {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header {
    padding: 10px 0;
  }

  .nav-shell {
    width: calc(100% - 28px);
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid hsl(var(--border));
    border-radius: 14px;
    background: hsl(var(--card) / 0.72);
    backdrop-filter: blur(24px);
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .nav-toggle {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border: 1px solid hsl(var(--border));
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: hsl(var(--background) / 0.8);
    color: hsl(var(--foreground));
  }

  .nav-toggle span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .nav-toggle span:first-child {
    transform: translateY(-4px);
  }

  .nav-toggle span:last-child {
    transform: translateY(4px);
  }

  .nav-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 62px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 16px;
    background: hsl(var(--card) / 0.96);
    border: 1px solid hsl(var(--border));
    backdrop-filter: blur(24px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .nav-links a::after,
  .nav-cta {
    display: none;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .button {
    width: min(244px, 100%);
  }

  .hero-stats,
  .card-grid,
  .services-grid,
  .timeline,
  .benefits-grid,
  .portfolio-grid,
  .contact-grid,
  .support-box,
  .footer-grid,
  .dashboard-grid,
  .stats-grid,
  .overview-grid,
  .users-grid,
  .admin-chat-grid,
  .form-grid.two,
  .admin-resource-card .form-grid.two {
    grid-template-columns: 1fr;
  }

  .resource-card-head {
    display: grid;
  }

  .resource-field-grid {
    grid-template-columns: 1fr;
  }

  .support-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    border-radius: 16px;
  }

  .admin-content {
    padding: 18px 14px 28px;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    border-right: 0;
    border-bottom: 1px solid hsl(var(--border));
    background: hsl(var(--sidebar-background) / 0.98);
  }

  .admin-sidebar .brand {
    height: 54px;
    padding: 0 14px;
  }

  .admin-mobile-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 14px;
    border-bottom: 1px solid hsl(var(--border));
  }

  .admin-mobile-bar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: hsl(var(--muted-foreground));
    font-size: 13px;
  }

  .admin-mobile-bar a {
    white-space: nowrap;
    color: hsl(var(--primary));
    font-size: 13px;
  }

  .admin-menu-toggle {
    width: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 20px;
  }

  .admin-sidebar nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow: visible;
    padding: 10px 12px 12px;
    border-bottom: 1px solid hsl(var(--border));
  }

  .admin-sidebar.menu-open nav {
    display: grid;
  }

  .admin-sidebar nav::-webkit-scrollbar,
  .client-menu::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar .chip-button {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    min-height: 38px;
    padding: 8px 12px;
  }

  .admin-user {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }

  .admin-sidebar.menu-open .admin-user {
    display: flex;
  }

  .admin-user small {
    flex: 1;
    margin: 0;
  }

  .admin-user .button {
    width: auto !important;
    flex: 0 0 auto;
  }

  .admin-topbar {
    display: none;
  }

  .admin-topbar span {
    font-size: 13px;
  }

  .admin-topbar > div {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-topbar a {
    white-space: nowrap;
  }

  .admin-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
  }

  .admin-heading h1,
  .section-head h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  body[data-page="area"] .app-page {
    padding: 16px 0 28px;
  }

  .auth-layout {
    min-height: calc(100svh - 32px);
    padding: 0 14px;
  }

  .app-panel:not(.client-dashboard-shell) {
    width: 100%;
    max-width: 420px;
    padding: 24px;
  }

  .app-panel::before,
  .admin-shell.setup::before {
    width: 360px;
    height: 360px;
    filter: blur(92px);
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
  }

  .tab-button {
    justify-content: center;
    min-width: 0;
    padding: 0 12px;
  }

  .app-panel h2 {
    font-size: 28px;
    line-height: 1.08;
  }

  .auth-layout.client-authenticated {
    min-height: calc(100vh - 124px);
    padding: 0;
  }

  .app-panel.client-dashboard-shell {
    width: calc(100vw - 24px);
  }

  .client-main,
  .client-sidebar {
    padding: 14px;
  }

  .client-dashboard {
    min-height: auto;
  }

  .client-sidebar {
    gap: 0;
    padding: 0;
  }

  .client-mobile-bar {
    min-height: 66px;
    padding: 12px 16px;
    border-bottom: 1px solid hsl(var(--border));
  }

  .client-menu-toggle {
    display: inline-flex;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    font-size: 20px;
  }

  .client-sidebar-brand .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: transparent;
  }

  .client-sidebar-card {
    display: none;
    margin: 12px 16px;
    padding: 12px;
  }

  .client-sidebar-card small {
    display: none;
  }

  .client-topbar {
    display: grid;
    gap: 14px;
  }

  .client-topbar h1 {
    font-size: 34px;
    line-height: 1.05;
  }

  .client-menu {
    display: none;
    gap: 8px;
    overflow: visible;
    padding: 12px 16px;
    border-bottom: 1px solid hsl(var(--border));
  }

  .client-menu a {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
  }

  .client-sidebar.menu-open .client-menu {
    display: grid;
  }

  .client-sidebar.menu-open .client-sidebar-card,
  .client-sidebar.menu-open .client-sidebar-actions {
    display: grid;
  }

  .client-topbar .button,
  .client-topbar-actions,
  .notification-button,
  .client-sidebar-actions .button,
  .client-quote-panel .button {
    width: 100%;
  }

  .client-topbar-actions {
    display: grid;
    justify-content: stretch;
  }

  .notification-button {
    justify-content: space-between;
  }

  .client-menu,
  .client-kpi-grid,
  .client-list-grid {
    grid-template-columns: 1fr;
  }

  .client-sidebar-actions {
    display: none;
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }

  .client-kpi {
    min-height: 112px;
    padding: 16px;
  }

  .client-kpi strong {
    font-size: 38px;
  }

  .client-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .client-panel-head.row {
    display: grid;
  }

  .quote-request-head {
    display: grid;
  }

  .quote-request-actions {
    justify-items: start;
    text-align: left;
  }

  .chat-drawer {
    padding: 0;
    justify-content: stretch;
  }

  .chat-card {
    max-width: none;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .chat-head,
  .chat-form,
  .chat-body {
    padding: 14px;
  }

  .chat-head {
    min-height: 64px;
  }

  .chat-start {
    padding: 18px;
    border-radius: 14px;
  }

  .chat-msg {
    max-width: 94%;
  }

  .chat-form textarea {
    min-height: 96px;
  }

  .chat-form .button {
    width: 100%;
  }

  .admin-chat-detail {
    padding: 16px;
    border-radius: 16px;
  }

  .admin-chat-detail-head {
    display: grid;
    align-items: stretch;
  }

  .admin-chat-detail-head .chip-button {
    width: 100%;
    justify-content: center;
  }

  .admin-chat-messages {
    min-height: 240px;
    max-height: 46dvh;
  }

  .overview-card {
    min-height: 136px;
  }

  .overview-card strong {
    font-size: 40px;
  }
}

/* ── Multi-page styles ─────────────────────────────────────── */

.page-hero-mini {
  padding: 140px 0 64px;
}

.page-hero-mini .container {
  max-width: 900px;
}

.page-hero-mini h1 {
  font-size: clamp(36px, 5vw, 72px);
  margin-top: 12px;
}

.section-lead {
  margin-top: 16px;
  font-size: 20px;
  max-width: 640px;
  color: hsl(var(--muted-foreground));
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.breadcrumb a {
  color: hsl(var(--primary));
  transition: opacity 0.2s;
}

.breadcrumb a:hover {
  opacity: 0.8;
}

.breadcrumb span {
  color: hsl(var(--muted-foreground));
}

.nav-links a.nav-active {
  color: hsl(var(--primary));
}

.nav-links a.nav-active::after {
  transform: scaleX(1);
}

body[data-page="servizi"] .support-band,
body[data-page="processo"] .support-band,
body[data-page="vantaggi"] .support-band,
body[data-page="portfolio"] .support-band,
body[data-page="contatti"] .support-band {
  display: block;
}

.portfolio-card h2,
.portfolio-card p {
  padding: 0 24px;
}

.portfolio-card h2 {
  margin-top: 12px;
  font-size: 22px;
}

.premium-card h2,
.premium-card h3,
.timeline-item h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  word-break: break-word;
  hyphens: auto;
  line-height: 1.1;
}

.timeline-item h2 {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .page-hero-mini {
    padding: 120px 0 48px;
  }

  .section-lead {
    font-size: 17px;
  }
}

/* Legal Pages */
.legal-content h2 {
  font-size: 24px;
  margin: 32px 0 16px;
  color: hsl(var(--foreground));
}

.legal-content p,
.legal-content ul,
.legal-content li {
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
}

.legal-content a {
  color: hsl(var(--primary));
  text-decoration: underline;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.legal-meta strong {
  color: hsl(var(--foreground));
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 12px;
  border: 1px solid hsl(var(--border));
  text-align: left;
}

.legal-table th {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.legal-table td {
  color: hsl(var(--muted-foreground));
}

.legal-updated {
  margin-top: 48px;
  font-style: italic;
  font-size: 14px;
}

.footer-legal-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 720px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.3);
  border-radius: 16px;
  box-shadow: var(--shadow-elegant);
  padding: 24px;
}

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-banner-text strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
  color: hsl(var(--foreground));
}

.cookie-banner-text p {
  font-size: 14px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .cookie-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .cookie-banner-actions {
    flex-shrink: 0;
  }
}

