/* ===== NexusCode.pl — Modern Dark Theme ===== */

:root {
  --bg-primary: #050508;
  --bg-secondary: #0c0c10;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a24;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #f8f8fc;
  --text-secondary: #9ca3af;
  --text-muted: #5c6370;
  --accent: #ffffff;
  --accent-light: #f0f0f0;
  --accent-glow: rgba(255, 255, 255, 0.18);
  --accent-on-light: #050508;
  --discord: #ffffff;
  --discord-hover: #d4d4d4;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
  --glass: rgba(18, 18, 26, 0.7);
  --surface-0: transparent;
  --surface-1: rgba(255, 255, 255, 0.014);
  --surface-2: rgba(255, 255, 255, 0.028);
  --surface-3: rgba(255, 255, 255, 0.045);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --focus-ring: rgba(255, 255, 255, 0.45);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-on-light);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader__bar {
  width: 120px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.preloader__bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  border-radius: 2px;
  animation: preloaderSlide 1s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes preloaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
}

.text-accent { color: var(--accent-light); }

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #a3a3a3 45%, #fff 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ===== Background Effects ===== */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 70%);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  z-index: 1001;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.1s linear;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.gradient-orb--1 {
  width: 700px;
  height: 700px;
  background: var(--accent-glow);
  top: -250px;
  right: -150px;
  opacity: 0.35;
  animation: orbFloat 12s ease-in-out infinite;
}

.gradient-orb--2 {
  width: 550px;
  height: 550px;
  background: rgba(255, 255, 255, 0.08);
  bottom: 15%;
  left: -180px;
  opacity: 0.45;
  animation: orbFloat 15s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn--primary {
  background: linear-gradient(135deg, #ffffff, #d4d4d4);
  color: var(--accent-on-light);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn--primary:hover::after {
  transform: translateX(100%);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #f5f5f5, #ffffff);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.2);
}

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

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--accent-on-light);
}

.btn--discord {
  background: var(--discord);
  color: var(--accent-on-light);
}

.btn--discord:hover {
  background: var(--discord-hover);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

/* ===== Navbar ===== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transform: translateY(-100%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

body.page-loaded .navbar {
  transform: translateY(0);
}

.navbar--scrolled {
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
}

.navbar__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.navbar__links {
  display: flex;
  gap: 32px;
}

.navbar__links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.navbar__links a:hover {
  color: var(--text-primary);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}

.navbar__links a.active {
  color: var(--text-primary);
}

.navbar__links a.active::after {
  width: 100%;
}

.navbar__cta {
  font-size: 0.82rem;
  padding: 8px 14px;
  gap: 8px;
}

.navbar__cta.btn--discord {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: none;
}

.navbar__cta.btn--discord:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  transform: none;
}

body.is-authenticated .navbar__cta.btn--discord {
  padding: 8px 10px;
}

body.is-authenticated .navbar__cta.btn--discord .navbar__cta-label {
  display: none;
}

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

.auth-area {
  display: flex;
  align-items: center;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
  transition: var(--transition);
}

.auth-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.auth-link--login {
  border-color: var(--border);
  color: var(--text-primary);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-user__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  max-width: 180px;
}

.auth-user__chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-user__chip--static {
  pointer-events: none;
  cursor: default;
}

.auth-user--mobile .auth-user__chip--static {
  max-width: none;
  width: 100%;
  justify-content: flex-start;
}

.auth-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.auth-user__name {
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user__logout {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.auth-user__logout:hover {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
}

.auth-user--mobile {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.auth-user--mobile .auth-user__logout,
.auth-user--mobile .auth-link {
  justify-content: center;
  width: 100%;
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.navbar__mobile-cta {
  display: none;
}

.navbar__mobile-auth {
  list-style: none;
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar__burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__burger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero ===== */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero__brand {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  line-height: 1.2;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__stat {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  min-width: 140px;
  transition: var(--transition);
}

.hero__stat:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.hero__stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

.hero__stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero__stat-divider {
  display: none;
}

.hero__visual {
  display: flex;
  justify-content: center;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.code-window {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: float 9s cubic-bezier(0.37, 0, 0.63, 1) infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.code-window__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-window__dot--red { background: #ff5f57; }
.code-window__dot--yellow { background: #febc2e; }
.code-window__dot--green { background: #28c840; }

.code-window__title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-window__body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-kw { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-fn { color: #82aaff; }
.code-str { color: #c3e88d; }
.code-annotation { color: #676e95; }

/* ===== Sections ===== */

.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section--tech {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section__header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 24px auto 0;
  border-radius: 2px;
}

.section__tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section__desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section__cta {
  text-align: center;
  margin-top: 48px;
}

#zespol .section__cta {
  margin-top: 40px;
}

/* ===== Services Grid ===== */

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.3);
  --tilt-lift: -10px;
  box-shadow: 0 28px 60px rgba(255, 255, 255, 0.14);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  margin-bottom: 20px;
  position: relative;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-card__tags li {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Tech Marquee ===== */

.tech-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.tech-marquee__track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.tech-marquee__track span {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.3s;
}

.tech-marquee:hover .tech-marquee__track {
  animation-play-state: paused;
}

.tech-marquee__track span:hover {
  color: var(--accent-light);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Portfolio ===== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: center;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.portfolio-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  --tilt-lift: -8px;
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.12);
}

.portfolio-card__visual {
  height: 200px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}

.portfolio-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-card__cover {
  transform: scale(1.05);
}

.portfolio-card__expand {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-xl);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateY(-4px);
  transition: var(--transition);
}

.portfolio-card:hover .portfolio-card__expand {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  pointer-events: none;
}

.portfolio-card__visual--1 {
  background: linear-gradient(135deg, #0a0a0a 0%, #2a2a2a 50%, #0a0a0a 100%);
}

.portfolio-card__visual--2 {
  background: linear-gradient(135deg, #0f0f0f 0%, #262626 50%, #141414 100%);
}

.portfolio-card__visual--3 {
  background: linear-gradient(135deg, #111111 0%, #333333 50%, #111111 100%);
}

.portfolio-card__visual--4 {
  background: linear-gradient(135deg, #1a1a1a 0%, #404040 50%, #1a1a1a 100%);
}

.portfolio-card__type {
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.portfolio-card__content {
  padding: 24px;
}

.portfolio-card__content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-card__content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Portfolio modal */

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.portfolio-modal.hidden {
  display: none;
}

.portfolio-modal.is-open {
  opacity: 1;
}

.portfolio-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.portfolio-modal.is-open .portfolio-modal__backdrop {
  opacity: 1;
}

.portfolio-modal__dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: scale(0.88) translateY(40px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-modal.is-open .portfolio-modal__dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.portfolio-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.portfolio-modal__main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: 16px;
}

.portfolio-modal__main--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-modal__main--empty::after {
  content: 'Brak zdjęć w galerii';
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.portfolio-modal__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.portfolio-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio-modal__nav.hidden {
  display: none;
}

.portfolio-modal__nav:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.portfolio-modal__nav--prev { left: 12px; }
.portfolio-modal__nav--next { right: 12px; }

.portfolio-modal__thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.portfolio-modal__thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.portfolio-modal__thumb.active,
.portfolio-modal__thumb:hover {
  border-color: var(--accent-light);
}

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

.portfolio-modal__info h2 {
  font-size: 1.35rem;
  margin: 10px 0 8px;
}

.portfolio-modal__info p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Testimonials ===== */

.testimonials-slider {
  overflow: hidden;
  position: relative;
}

.testimonials-track {
  display: flex;
  gap: 20px;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card {
  flex: 0 0 calc(50% - 10px);
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition), box-shadow 0.45s ease;
}

.testimonial-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.1);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
  font-family: Georgia, serif;
  pointer-events: none;
}

.testimonial-card__stars {
  color: #fbbf24;
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--discord));
  color: var(--accent-on-light);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-card__author strong {
  display: block;
  font-size: 0.9rem;
}

.testimonial-card__author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.testimonials-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border-hover);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.testimonials-dots button.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ===== Team ===== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 270px));
  justify-content: center;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px 32px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.team-card:hover {
  border-color: rgba(255, 255, 255, 0.35);
  --tilt-lift: -10px;
  box-shadow: 0 24px 55px rgba(255, 255, 255, 0.16);
}

.team-card:hover::before {
  opacity: 1;
}

.team-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 24px var(--accent-glow);
  background: var(--bg-secondary);
  transition: var(--transition);
}

.team-card:hover .team-card__avatar {
  border-color: var(--accent-light);
  transform: scale(1.05);
}

.team-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.team-card__role {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 14px;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 220px;
}

/* ===== Process ===== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.process-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: var(--transition);
}

.process-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  --tilt-lift: -8px;
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.12);
}

.process-card__number {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
}

.process-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: var(--accent-light);
  margin-bottom: 16px;
}

.process-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.process-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== FAQ ===== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  border-color: rgba(255, 255, 255, 0.3);
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--accent-light);
}

.faq-item summary:hover {
  color: var(--accent-light);
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== CTA Section ===== */

.cta-section {
  position: relative;
  z-index: 1;
  padding: 80px 0 100px;
}

.cta-box {
  text-align: center;
  padding: 72px 40px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent, rgba(255,255,255,0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 60%);
  opacity: 0.3;
}

.cta-box__logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: var(--radius-md);
  position: relative;
}

.cta-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
  position: relative;
}

.cta-box .btn {
  position: relative;
}

/* ===== Footer ===== */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: linear-gradient(to top, var(--bg-secondary), transparent);
}

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

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

.footer__logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer__copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent-light);
}

/* ===== Floating buttons ===== */

.fab-discord {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--discord);
  color: var(--accent-on-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.15);
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.fab-discord.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.fab-discord:hover {
  background: var(--discord-hover);
  transform: scale(1.08);
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 92px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* ===== Reveal Animation ===== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left {
  transform: translateX(-40px) translateY(20px);
}

.reveal-right {
  transform: translateX(40px) translateY(20px);
}

.reveal-scale {
  transform: translateY(24px) scale(0.92);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.reveal-scale.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.section__header.reveal.visible::after {
  animation: lineGrow 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineGrow {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 70px;
    opacity: 1;
  }
}

.tilt-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  transform: perspective(1000px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x)) translateY(var(--tilt-lift));
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color var(--transition),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background var(--transition);
}

.faq-item[open] p {
  animation: faqReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes faqReveal {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cta-box {
  animation: ctaGlow 3.5s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 70px rgba(255, 255, 255, 0.12);
  }
}

.section__header.reveal.visible .section__tag {
  animation: tagPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes tagPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .navbar,
  body.page-loaded .navbar {
    transform: none;
  }

  .tilt-card {
    transform: none !important;
  }

  .cta-box,
  .code-window,
  .gradient-orb--1,
  .gradient-orb--2 {
    animation: none !important;
  }

  .hero__visual {
    transform: none !important;
  }

  .portfolio-modal,
  .portfolio-modal__dialog,
  .portfolio-modal__backdrop {
    transition: none;
  }
}

/* ===== Responsive ===== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding: calc(var(--nav-height) + 40px) 20px 60px;
    gap: 40px;
  }

  .hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
  }

  .hero__badge {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__title {
    text-align: center;
  }

  .hero__subtitle {
    margin: 0 auto 28px;
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
    width: 100%;
  }

  .hero__stats {
    justify-content: center;
    width: 100%;
  }

  .hero__visual {
    order: -1;
    width: 100%;
    max-width: 100%;
  }

  .code-window {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .section__header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 4px;
  }

  .section__title {
    font-size: clamp(1.55rem, 6.5vw, 2rem);
  }

  .section__desc {
    max-width: 100%;
    font-size: 0.95rem;
    padding: 0 4px;
  }

  .section__cta {
    margin-top: 32px;
    padding: 0 4px;
  }

  .section__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .navbar__links,
  .navbar__actions { display: none; }

  .navbar__burger { display: flex; }

  .navbar__links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(5, 5, 8, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px 16px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
  }

  .navbar__links.active a {
    width: 100%;
    text-align: center;
  }

  .navbar__mobile-cta {
    display: block;
    margin-top: 8px;
  }

  .fab-discord {
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }

  .back-to-top {
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(80px, calc(env(safe-area-inset-right) + 64px));
  }

  /* Hero mobile */
  .hero {
    padding: calc(var(--nav-height) + 24px) 16px 48px;
    gap: 28px;
  }

  .hero .container {
    padding: 0;
  }

  .hero__title {
    font-size: clamp(1.75rem, 7.5vw, 2.35rem);
    line-height: 1.15;
    text-align: center;
  }

  .hero__subtitle {
    font-size: 0.95rem;
    max-width: 100%;
    padding: 0 4px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 32px;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__stats {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .hero__stat {
    width: 100%;
    min-width: 0;
    text-align: center;
    padding: 18px 20px;
  }

  .hero__visual {
    width: 100%;
    padding: 0;
  }

  .code-window {
    max-width: 100%;
    width: 100%;
    animation: none;
  }

  .code-window__body {
    padding: 14px 12px;
    font-size: 0.68rem;
    line-height: 1.65;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .code-window__title {
    font-size: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
  }

  /* Grids — full width */
  .services-grid,
  .portfolio-grid,
  .process-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    max-width: none;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
    gap: 16px;
  }

  .team-card {
    width: 100%;
    max-width: none;
  }

  .team-card p {
    max-width: none;
  }

  .service-card,
  .portfolio-card,
  .process-card {
    width: 100%;
  }

  /* Testimonials */
  .testimonials-slider {
    width: 100%;
    margin: 0 -4px;
  }

  .testimonial-card {
    flex: 0 0 100%;
    padding: 24px 20px;
  }

  /* CTA section */
  .cta-section {
    padding: 48px 0 64px;
  }

  .cta-box {
    padding: 40px 20px;
    width: 100%;
  }

  .cta-box h2 {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }

  .cta-box .btn {
    width: 100%;
    justify-content: center;
  }

  /* FAQ */
  .faq-item summary {
    padding: 16px 18px;
    font-size: 0.9rem;
  }

  .faq-item p {
    padding: 0 18px 16px;
    font-size: 0.85rem;
  }

  /* Portfolio modal */
  .portfolio-modal {
    padding: 12px;
    align-items: flex-end;
  }

  .portfolio-modal__dialog {
    padding: 18px 16px;
    max-height: 92vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .portfolio-modal__main {
    aspect-ratio: 4 / 3;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Wyłącz tilt na mobile */
  .tilt-card {
    transform: none !important;
  }
}

/* ===== Custom cursor — glow only ===== */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  will-change: transform, opacity;
  transition: opacity 0.35s ease, width 0.35s ease, height 0.35s ease, margin 0.35s ease;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.04) 28%,
    rgba(255, 255, 255, 0.01) 52%,
    transparent 72%
  );
}

.cursor-glow--hover {
  width: 620px;
  height: 620px;
  margin: -310px 0 0 -310px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.06) 30%,
    rgba(255, 255, 255, 0.02) 55%,
    transparent 75%
  );
}

@media (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}

/* ===== Client panel ===== */

.panel-page .navbar {
  transform: none;
}

.panel {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-height) + 48px) 0 80px;
  min-height: 100vh;
}

.panel__container {
  max-width: 1100px;
}

.panel-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.panel-hero__profile {
  display: flex;
  align-items: center;
  gap: 18px;
}

.panel-hero__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--bg-card);
}

.panel-hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.panel-hero__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.panel-hero__meta {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.panel-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-card--wide {
  grid-column: 1 / -1;
}

.panel-card__head {
  margin-bottom: 20px;
}

.panel-card__head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.panel-card__head p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.panel-steps {
  display: grid;
  gap: 14px;
}

.panel-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.panel-steps__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 28px;
  padding-top: 2px;
}

.panel-steps strong {
  display: block;
  margin-bottom: 4px;
}

.panel-steps p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.panel-actions {
  display: grid;
  gap: 10px;
}

.panel-action {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}

.panel-action:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.panel-action__label {
  font-weight: 650;
  font-size: 0.95rem;
}

.panel-action__desc {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.panel-meta {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.panel-meta dd {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.panel-meta__mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.panel-empty {
  text-align: center;
  padding: 36px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
}

.panel-empty h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.panel-empty p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.btn--full {
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel-card--wide {
    grid-column: auto;
  }

  .panel-hero {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .panel {
    padding-top: calc(var(--nav-height) + 28px);
  }

  .panel-hero__actions {
    width: 100%;
  }

  .panel-hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Mode chooser ===== */

.mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(16px);
}

.mode-overlay.hidden,
.hidden {
  display: none !important;
}

.mode-dialog {
  width: min(720px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
}

.mode-dialog__logo {
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
}

.mode-dialog__eyebrow {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.mode-dialog h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 10px;
}

.mode-dialog__desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.mode-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mode-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: grid;
  gap: 8px;
}

.mode-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.mode-card__tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mode-card strong {
  font-size: 1.05rem;
}

.mode-card span:last-child {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ===== Forms / tables ===== */

.panel-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel-form label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.panel-form__full {
  grid-column: 1 / -1;
}

.panel-form input,
.panel-form textarea,
.panel-form select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
  color-scheme: dark;
}

input[type="month"],
input[type="date"],
input[type="datetime-local"],
.staff-section__actions input[type="month"],
.balance-filters input[type="month"],
#filterMonth,
#reportMonth,
#goalsMonth {
  appearance: none;
  -webkit-appearance: none;
  background: #12121a !important;
  color: #f8f8fc !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 38px;
  font: inherit;
  color-scheme: dark;
  box-shadow: none;
}

input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.75);
  cursor: pointer;
}

input[type="month"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
}

.panel-form select option,
.modal select option,
select option {
  background: #12121a;
  color: #f8f8fc;
}

.panel-form input:focus,
.panel-form textarea:focus,
.panel-form select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
}

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

.panel-form__hint {
  color: #9ae6b4;
  font-size: 0.85rem;
}

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

.stats-boards {
  display: grid;
  gap: 16px;
}

.stats-board {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}

.stats-board::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(148, 163, 184, 0.35);
}

.stats-board--discord::before {
  background: linear-gradient(180deg, #5865f2, #60a5fa);
}

.stats-board--ops::before {
  background: linear-gradient(180deg, #fbbf24, #fb923c);
}

.stats-board--finance::before {
  background: linear-gradient(180deg, #4ade80, #22d3ee);
}

.stats-board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-left: 8px;
}

.stats-board__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stats-board__head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.stats-board__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding-left: 4px;
}

.stat-grid--compact {
  grid-template-columns: repeat(3, 1fr);
}

.stat-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 4px;
}

.stat-pill strong {
  font-size: 1.2rem;
}

.stat-pill span {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.stat-pill--lg strong {
  font-size: 1.45rem;
}

.stat-pill.is-accent strong { color: #93c5fd; }
.stat-pill.is-boost strong { color: #c4b5fd; }
.stat-pill.is-warn strong { color: #fbbf24; }

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

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

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

.data-table th {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

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

.data-table tr.is-selected,
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.data-table__empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 28px 14px !important;
}

.data-table__actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
}

.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  text-transform: lowercase;
}

.badge--active,
.badge--done,
.badge--vip {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.25);
}

.badge--new,
.badge--in_progress,
.badge--open,
.badge--ready {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.badge--blocked,
.badge--cancelled,
.badge--expired,
.badge--cancelled {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
}

/* ===== Staff layout ===== */

.staff {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-height) + 28px) 0 60px;
  min-height: 100vh;
}

.staff__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  max-width: 1200px;
}

.staff-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: start;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  max-height: calc(100vh - var(--nav-height) - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.staff-nav::-webkit-scrollbar {
  width: 6px;
}

.staff-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.staff-nav__notify {
  margin-top: auto;
  padding-top: 8px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 16, 0.92) 30%);
  padding-bottom: 2px;
}

.staff-nav__role {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 8px;
  padding: 0 8px;
}

.staff-nav__item {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: var(--transition);
}

.staff-nav__item:hover,
.staff-nav__item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.staff-section {
  display: none;
}

.staff-section.active {
  display: block;
}

.staff-section__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.staff-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.chart-card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap--donut {
  height: 240px;
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

.balance-filters input,
.balance-filters select,
.ticket-pipeline-select {
  background: #1e1f22;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.ticket-item__claim,
.ticket-claim {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-notes {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ticket-notes__list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 120px;
  overflow: auto;
}

.ticket-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ticket-notes__form {
  display: flex;
  gap: 8px;
}

.ticket-notes__form input {
  flex: 1;
  background: #1e1f22;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
}

.notify-dot {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ed4245;
  color: #fff;
  font-size: 0.7rem;
  margin-left: 4px;
  padding: 0 5px;
}

.notify-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  margin-bottom: 12px;
}

.notify-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.notify-item.is-unread {
  border-color: rgba(88, 101, 242, 0.45);
}

.notify-item p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.stat-pill.is-plus strong {
  color: #4ade80;
}

.stat-pill.is-minus strong {
  color: #f87171;
}

.amount--plus {
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}

.amount--minus {
  color: #f87171;
  font-variant-numeric: tabular-nums;
}

.muted-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.staff-section h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.staff-section__top p,
.panel-card__head + .staff-section p {
  color: var(--text-secondary);
}

.staff-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-cell img {
  border-radius: 50%;
  border: 1px solid var(--border);
}

.client-cell small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.client-detail__head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.client-detail__head img {
  border-radius: 50%;
  border: 1px solid var(--border);
}

.mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.mini-list span {
  color: var(--text-secondary);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__dialog {
  position: relative;
  width: min(520px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal__dialog h2 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

@media (max-width: 980px) {
  .staff__layout,
  .staff-split,
  .mode-dialog__actions {
    grid-template-columns: 1fr;
  }

  .staff-nav {
    position: static;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    display: grid;
    padding-right: 0;
  }

  .staff-nav__notify {
    position: static;
    margin-top: 0;
    background: none;
    grid-column: 1 / -1;
  }

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

  .stat-grid--compact {
    grid-template-columns: 1fr;
  }
}

.ticket-chat--client {
  min-height: 520px;
}

.panel-card--tickets {
  overflow: hidden;
}

.panel-card__head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-chat__composer input,
.ticket-chat__composer textarea {
  flex: 1;
}

@media (max-width: 900px) {
  .ticket-chat--client {
    min-height: 65vh;
  }

  .panel-card__head--row {
    flex-direction: column;
  }
}

/* ===== Ticket chat bridge ===== */

.ticket-chat {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  min-height: 480px;
}

.ticket-chat--staff {
  min-height: 560px;
}

.ticket-chat__list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: auto;
  max-height: 560px;
  background: rgba(255, 255, 255, 0.015);
}

.ticket-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: inherit;
  padding: 12px 14px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.ticket-item:hover,
.ticket-item.is-active {
  background: rgba(255, 255, 255, 0.04);
}

.ticket-item__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.ticket-item__id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-item__q {
  font-size: 0.82rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-chat__thread {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 480px;
  background: #313338;
  overflow: hidden;
}

.ticket-chat__meta {
  padding: 12px 16px;
  border-bottom: 1px solid #1e1f22;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: #2b2d31;
}

.ticket-chat__meta-main {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ticket-chat__meta-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-chat__messages {
  padding: 8px 0 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 520px;
  background: #313338;
}

.dc-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
  padding: 4px 16px;
  margin-top: 12px;
  border-radius: 0;
}

.dc-msg:hover {
  background: rgba(0, 0, 0, 0.08);
}

.dc-msg__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #2b2d31;
  margin-top: 2px;
}

.dc-msg__head {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.dc-msg__name {
  color: #f2f3f5;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
}

.dc-msg--bot .dc-msg__name {
  color: #f2f3f5;
}

.dc-clan-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f2f3f5;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px 1px 4px;
  border-radius: 4px;
  line-height: 1.35;
  vertical-align: middle;
}

.dc-clan-tag img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.dc-clan-tag--staff {
  background: rgba(237, 66, 69, 0.18);
  border-color: rgba(237, 66, 69, 0.45);
  color: #f23f43;
}

.dc-clan-tag--web {
  background: rgba(88, 101, 242, 0.2);
  border-color: rgba(88, 101, 242, 0.45);
  color: #c9cdfb;
}

.dc-role-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  vertical-align: middle;
}

.dc-role-emoji {
  font-size: 0.9rem;
  line-height: 1;
}

.dc-bot-tag {
  display: inline-flex;
  align-items: center;
  background: #5865f2;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.dc-msg__time {
  color: #949ba4;
  font-size: 0.72rem;
}

.dc-msg__text {
  color: #dbdee1;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.375;
}

.dc-mention {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 500;
}

.dc-embed {
  margin-top: 6px;
  max-width: 520px;
  background: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  padding: 12px 14px 12px 12px;
}

.dc-embed__author {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #f2f3f5;
}

.dc-embed__author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.dc-embed__title {
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.dc-embed__title a {
  color: #00a8fc;
}

.dc-embed__desc {
  color: #dbdee1;
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.375;
}

.dc-embed__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.dc-embed__field {
  min-width: 100%;
}

.dc-embed__field--inline {
  min-width: 30%;
  flex: 1;
}

.dc-embed__field-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f2f3f5;
  margin-bottom: 2px;
}

.dc-embed__field-value {
  font-size: 0.85rem;
  color: #dbdee1;
  white-space: pre-wrap;
}

.dc-embed__image {
  margin-top: 10px;
  max-width: 100%;
  border-radius: 4px;
}

.dc-embed__thumb {
  margin-top: 8px;
  max-width: 80px;
  border-radius: 4px;
}

.dc-embed__footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #949ba4;
}

.dc-msg__files {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.dc-attach {
  color: #00a8fc;
  font-size: 0.88rem;
}

.dc-attach--image img {
  max-width: min(400px, 100%);
  border-radius: 4px;
  display: block;
}

.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dc-btn {
  background: #4e5058;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 32px;
}

.dc-btn:hover {
  background: #6d6f78;
}

.dc-btn--primary {
  background: #5865f2;
}

.dc-btn--primary:hover {
  background: #4752c4;
}

.dc-btn--success {
  background: #248046;
}

.dc-btn--success:hover {
  background: #1a6334;
}

.dc-btn--danger {
  background: #da373c;
}

.dc-btn--danger:hover {
  background: #a12d31;
}

.dc-btn--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.dc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ticket-chat__composer {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: #232428;
}

.ticket-chat__composer input {
  flex: 1;
  background: #383a40;
  border: none;
  border-radius: 8px;
  color: #dbdee1;
  padding: 12px 14px;
  font: inherit;
}

.ticket-chat__composer input:focus {
  outline: none;
}

.ticket-chat__empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: var(--text-secondary);
}

.badge--unpaid,
.badge--partial {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}

.badge--paid {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.25);
}

.badge--refunded {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.25);
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(20, 22, 30, 0.96);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.22s ease;
}

.toast--ok { border-color: rgba(74, 222, 128, 0.35); }
.toast--error { border-color: rgba(248, 113, 113, 0.4); }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: 0.25s ease; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.goal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.goal-card.is-done {
  border-color: rgba(74, 222, 128, 0.35);
}

.goal-card__top,
.goal-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.goal-card__top span,
.goal-card__foot {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.goal-bar {
  margin: 10px 0;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.goal-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #22d3ee);
  border-radius: 999px;
}

.order-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.75rem;
}

.order-step {
  color: var(--text-secondary);
  opacity: 0.55;
}

.order-step.is-done { opacity: 0.9; color: #86efac; }
.order-step.is-active { opacity: 1; color: #93c5fd; font-weight: 600; }
.order-step__sep { opacity: 0.35; }

.create-ticket-form {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.cms-editor {
  margin-top: 4px;
}

.cms-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px 4px;
  margin: 0 0 12px;
  grid-column: 1 / -1;
}

.cms-fieldset legend {
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.cms-tabs {
  margin-bottom: 14px;
}

.cms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: start;
}

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

.cms-preview {
  position: sticky;
  top: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.cms-preview__label {
  margin: 0 0 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.cms-preview__body {
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

.cms-preview__hero h2 {
  font-size: 1.15rem;
  margin: 8px 0;
  line-height: 1.3;
}

.cms-preview__hero em {
  color: var(--accent);
  font-style: normal;
}

.cms-preview__badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cms-preview__card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.cms-preview__card img,
.cms-dropzone__preview img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.cms-preview__card--row {
  grid-template-columns: 44px 1fr;
  align-items: center;
}

.cms-preview__card--row img,
.cms-preview__ph--avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.cms-preview__ph {
  height: 72px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.cms-preview__quote {
  margin: 0;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.03);
}

.cms-preview__quote footer {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.cms-dropzone {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: border-color 0.15s, background 0.15s;
}

.cms-dropzone.is-drag {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.cms-dropzone__pick {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.cms-dropzone__preview {
  margin-top: 8px;
}

.cms-helper {
  margin: 0 0 12px;
  color: #aeb6c4;
  font-size: 0.85rem;
}

.cms-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.deadline-calendar {
  display: block;
}

.deadline-calendar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.deadline-calendar__hint {
  margin: 0 0 12px;
  color: #c5cbd6;
  font-size: 0.88rem;
  line-height: 1.45;
}

.deadline-calendar__summary {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  font-size: 0.88rem;
}

.deadline-day {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.035);
  color: #f3f4f6;
}

.deadline-day.has-items {
  border-color: rgba(147, 197, 253, 0.35);
  background: linear-gradient(180deg, rgba(147, 197, 253, 0.14), rgba(255, 255, 255, 0.04));
}

.deadline-day.is-today {
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
}

.deadline-day__week {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #aeb5c2;
}

.deadline-day strong {
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 2px;
}

.deadline-day span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dbe3f0;
}

.deadline-day em {
  color: #9aa3b2;
  font-style: normal;
  margin-top: auto;
}

/* ===== Today board polish ===== */

.today-board {
  display: grid;
  gap: 16px;
}

.today-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.today-kpi {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  display: grid;
  gap: 4px;
}

.today-kpi strong {
  font-size: 1.45rem;
  line-height: 1;
  color: #fff;
}

.today-kpi span {
  color: #aeb6c4;
  font-size: 0.78rem;
  line-height: 1.3;
}

.today-kpi.has-value {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}

.today-kpi.is-accent strong { color: #93c5fd; }
.today-kpi.is-warn strong { color: #fbbf24; }
.today-kpi.is-minus strong { color: #f87171; }

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

.today-list-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  min-height: 150px;
}

.today-list-card.has-items {
  border-color: rgba(255, 255, 255, 0.18);
}

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

.today-list-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.today-list-card__count {
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: #d7dde8;
}

.today-list-card.has-items .today-list-card__count {
  background: rgba(147, 197, 253, 0.18);
  color: #bfdbfe;
}

.today-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.today-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.today-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.today-list strong {
  font-size: 0.88rem;
}

.today-list span {
  color: #9aa3b2;
  font-size: 0.8rem;
  text-align: right;
}

.today-empty {
  margin: 0;
  color: #9aa3b2;
  font-size: 0.88rem;
  line-height: 1.45;
}

.today-calendar {
  padding: 16px;
}

.today-calendar__head {
  margin-bottom: 12px;
}

.today-calendar__head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.today-calendar__head p {
  margin: 0;
  color: #aeb6c4;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .today-lists {
    grid-template-columns: 1fr;
  }
}

.ticket-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.ticket-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.ticket-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.ticket-tab.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.ticket-tab__count {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

.ticket-tab.is-active .ticket-tab__count {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.ticket-toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 240px);
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .ticket-toolbar {
    grid-template-columns: 1fr;
  }
}

.ticket-toolbar input,
.ticket-toolbar select,
.ticket-template-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}

.ticket-sla {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.ticket-sla--ok { border-color: rgba(74, 222, 128, 0.3); color: #86efac; }
.ticket-sla--warn { border-color: rgba(251, 191, 36, 0.35); color: #fbbf24; }
.ticket-sla--critical {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  animation: sla-pulse 1.6s ease infinite;
}

@keyframes sla-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.ticket-chat__composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.ticket-chat__composer textarea:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.45);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .ticket-toolbar {
    grid-template-columns: 1fr;
  }

  .ticket-chat--staff {
    min-height: 70vh;
  }

  .ticket-chat__list {
    max-height: 180px;
  }

  .ticket-chat__composer {
    position: sticky;
    bottom: 0;
    background: rgba(8, 10, 16, 0.92);
    backdrop-filter: blur(8px);
    padding-top: 8px;
  }
}

@media print {
  .navbar,
  .staff-nav,
  .grid-bg,
  .noise-overlay,
  .gradient-orb,
  .toast-host,
  .staff-section__actions button,
  #printReportBtn {
    display: none !important;
  }

  .staff__layout {
    display: block !important;
  }

  .staff-section { display: none !important; }
  #tab-report.staff-section,
  #tab-report.staff-section.active {
    display: block !important;
  }

  body { background: #fff !important; color: #111 !important; }
}

/* ===== Condensed landing ===== */
.page-condensed .scroll-progress,
.page-condensed .cursor-glow,
.page-condensed .fab-discord,
.page-condensed .gradient-orb--2 {
  display: none !important;
}

.page-condensed .preloader__bar {
  display: none;
}

.page-condensed .hero {
  min-height: calc(100vh - var(--nav-height));
  gap: 40px;
  padding: calc(var(--nav-height) + 28px) 24px 56px;
  align-items: center;
}

.page-condensed .hero__brand {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  line-height: 1.1;
}

.page-condensed .hero__title {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  margin-bottom: 14px;
  max-width: 16ch;
}

.page-condensed .hero__subtitle {
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 36ch;
  line-height: 1.55;
}

.page-condensed .hero__actions {
  margin-bottom: 0;
  gap: 12px;
}

.page-condensed .section--tight {
  padding-top: 64px;
  padding-bottom: 64px;
}

.page-condensed .section--tech {
  padding-top: 28px;
  padding-bottom: 28px;
}

.page-condensed .section__header {
  margin-bottom: 28px;
  text-align: left;
}

.page-condensed .section__header::after {
  display: none;
}

.page-condensed .section__tag {
  display: none;
}

.page-condensed .section__title {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin-bottom: 6px;
}

.page-condensed .section__desc {
  font-size: 0.95rem;
  max-width: 42ch;
  margin: 0;
}

.page-condensed .section__desc:empty {
  display: none;
}

.page-condensed .services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 28px;
}

.page-condensed .service-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0 20px;
  box-shadow: none;
  overflow: visible;
}

.page-condensed .service-card::before {
  display: none;
}

.page-condensed .service-card:hover {
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

.page-condensed .service-card__icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 10px;
}

.page-condensed .service-card__icon svg {
  width: 18px;
  height: 18px;
}

.page-condensed .service-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.page-condensed .service-card p {
  margin: 0;
  font-size: 0.88rem;
}

.page-condensed .service-card__tags {
  display: none;
}

.page-condensed .portfolio-grid {
  gap: 16px;
}

.page-condensed .portfolio-card {
  border-radius: 14px;
}

.page-condensed .portfolio-card__content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.page-condensed .process-card {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.page-condensed .process-card:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.page-condensed .process-card__icon {
  display: none;
}

.page-condensed .process-card__number {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.page-condensed .process-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.page-condensed .process-card p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.45;
}

.page-condensed .testimonials-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  transform: none !important;
  width: auto !important;
}

.page-condensed .testimonials-dots {
  display: none;
}

.page-condensed .testimonial-card {
  background: transparent;
  border: none;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 4px 0 4px 16px;
  box-shadow: none;
  min-width: 0;
}

.page-condensed .testimonial-card__stars,
.page-condensed .testimonial-card__avatar {
  display: none;
}

.page-condensed .testimonial-card__text {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 10px;
}

.page-condensed .testimonial-card__author {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 0.85rem;
}

.page-condensed .testimonial-card__author span {
  color: var(--text-muted);
}

.page-condensed .team-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.page-condensed .team-card {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  box-shadow: none;
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
}

.page-condensed .team-card::before {
  display: none;
}

.page-condensed .team-card:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.page-condensed .team-card__avatar {
  width: 52px;
  height: 52px;
  grid-row: 1 / span 2;
  margin: 0;
}

.page-condensed .team-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.page-condensed .team-card__role {
  margin: 0;
  font-size: 0.8rem;
}

.page-condensed .team-card p {
  display: none;
}

.page-condensed .cta-box {
  padding: 40px 28px;
  text-align: left;
  display: grid;
  gap: 12px;
  justify-items: start;
}

.page-condensed .cta-box__logo {
  width: 40px;
  height: 40px;
  margin: 0;
}

.page-condensed .cta-box h2 {
  margin: 0;
  font-size: 1.5rem;
}

.page-condensed .cta-box p {
  margin: 0 0 8px;
  max-width: 36ch;
}

.page-condensed .footer__inner {
  gap: 12px;
}

@media (max-width: 900px) {
  .page-condensed .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 40px;
  }

  .page-condensed .hero__visual {
    order: -1;
  }

  .page-condensed .hero__title {
    max-width: none;
  }

  .page-condensed .services-grid,
  .page-condensed .process-grid,
  .page-condensed .testimonials-track,
  .page-condensed .team-grid {
    grid-template-columns: 1fr;
  }

  .page-condensed .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .page-condensed .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Simplified panels ===== */
.panel-simple .gradient-orb--2 { display: none; }

.panel-simple .panel__container {
  max-width: 1100px;
  padding-top: 24px;
}

.panel-hero--compact {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.panel-hero--compact .panel-hero__avatar {
  width: 56px;
  height: 56px;
}

.panel-hero--compact .panel-hero__title {
  font-size: 1.35rem;
  margin: 0;
}

.panel-hero--compact .panel-hero__meta {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

.panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.panel-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.panel-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.panel-tab.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
}

.panel-pane {
  display: none;
}

.panel-pane.is-active {
  display: block;
}

.panel-subhead {
  margin: 28px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.panel-helper {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.panel-simple .ticket-chat--client {
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.panel-simple .panel-form--account {
  max-width: 640px;
}

.panel-simple .create-ticket-form {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.panel-simple.staff-page .staff__layout {
  gap: 20px;
  padding-top: 20px;
}

.panel-simple.staff-page .staff-nav {
  padding: 12px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.panel-simple.staff-page .staff-content {
  min-width: 0;
}

.panel-simple.staff-page .staff-section__top {
  margin-bottom: 14px;
  gap: 10px;
}

.panel-simple.staff-page .staff-section__top h1,
.panel-simple.staff-page .panel-card__head h1 {
  margin: 0;
}

.panel-simple.staff-page .staff-section__top p,
.panel-simple.staff-page .panel-card__head p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.panel-simple.staff-page .ticket-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
  gap: 4px;
}

.panel-simple.staff-page .ticket-tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.panel-simple.staff-page .ticket-toolbar {
  margin-bottom: 10px;
}

.panel-simple.staff-page .ticket-chat--staff {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.staff-nav__group {
  margin: 14px 0 6px;
  padding: 0 10px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.staff-nav__group:first-of-type {
  margin-top: 4px;
}

.staff-nav__item {
  padding: 8px 10px;
  font-size: 0.9rem;
}

.staff-nav__role {
  margin-bottom: 8px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.staff-section h1 {
  font-size: 1.45rem;
}

.staff-section__top p,
.staff-section .panel-card__head p {
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .panel-hero--compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .panel-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .panel-tab {
    flex: 0 0 auto;
  }

  .panel-simple.staff-page .staff-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    align-items: center;
    padding: 8px;
  }

  .panel-simple.staff-page .staff-nav__group,
  .panel-simple.staff-page .staff-nav__role {
    display: none;
  }

  .panel-simple.staff-page .staff-nav__item {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .panel-simple.staff-page .staff-nav__notify {
    margin-left: auto;
  }
}

/* ===== UI polish refresh ===== */

.auth-link {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-link:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.page-condensed .section {
  padding: 74px 0;
}

.page-condensed .services-grid {
  gap: 14px;
}

.page-condensed .service-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
  padding: 16px 16px 14px;
}

.page-condensed .service-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.012));
}

.page-condensed .process-grid {
  gap: 12px;
}

.page-condensed .process-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.006));
}

.page-condensed .process-card__number {
  opacity: 0.55;
}

.page-condensed .testimonials-track {
  gap: 12px;
}

.page-condensed .testimonial-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
}

.page-condensed .testimonial-card__text {
  font-size: 0.98rem;
  line-height: 1.65;
}

.page-condensed .team-grid {
  gap: 12px;
}

.page-condensed .team-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0.005));
  padding: 10px 12px;
}

.page-condensed .team-card__role {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.panel-simple .panel-hero--compact {
  padding: 12px 0 14px;
  margin-bottom: 14px;
}

.panel-tabs {
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.018);
  width: fit-content;
}

.panel-tab {
  padding: 7px 13px;
}

.panel-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.panel-simple .ticket-toolbar {
  margin-bottom: 12px;
}

.panel-simple .ticket-chat {
  gap: 10px;
  min-height: 450px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0.004));
}

.panel-simple .ticket-chat__list,
.panel-simple .ticket-chat__thread,
.panel-simple .ticket-chat__empty {
  background: rgba(7, 9, 14, 0.62);
  border-color: rgba(255, 255, 255, 0.08);
}

.panel-simple .ticket-chat__list {
  min-width: 220px;
}

.panel-simple .ticket-chat__empty {
  display: grid;
  place-items: center;
  min-height: 220px;
}

@media (max-width: 900px) {
  .panel-tabs {
    width: 100%;
    border-radius: 14px;
  }

  .panel-simple .ticket-chat {
    min-height: 62vh;
  }
}

/* ===== Unified interaction + density ===== */

:is(
  a,
  button,
  .btn,
  .auth-link,
  .panel-tab,
  .ticket-tab,
  .staff-nav__item,
  input,
  select,
  textarea,
  summary
):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

:is(.panel-card, .table-wrap, .stats-board, .staff-nav, .ticket-chat__thread, .ticket-chat__list) {
  border-color: var(--stroke-soft);
}

:is(.panel-card, .stats-board, .stat-pill) {
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.section__header p,
.panel-card__head p,
.staff-section__top p {
  color: #9ea5b2;
}

.panel-page .container,
.staff-page .container {
  max-width: 1140px;
}

.panel-simple .table-wrap,
.panel-simple .panel-form,
.panel-simple .panel-card {
  border-radius: 12px;
}

.panel-simple .data-table th {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
}

.panel-simple .data-table td {
  font-size: 0.88rem;
}

/* ===== Landing premium-minimal pass ===== */

.page-condensed .section__header {
  margin-bottom: 22px;
}

.page-condensed .section__header h2 {
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.page-condensed .section__header p {
  max-width: 560px;
  line-height: 1.55;
}

.page-condensed .service-card,
.page-condensed .process-card,
.page-condensed .testimonial-card,
.page-condensed .team-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(3px);
}

.page-condensed .service-card::after,
.page-condensed .process-card::after,
.page-condensed .testimonial-card::after,
.page-condensed .team-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(140% 80% at 100% 0%, rgba(255, 255, 255, 0.08), transparent 58%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.page-condensed .service-card:hover::after,
.page-condensed .process-card:hover::after,
.page-condensed .testimonial-card:hover::after,
.page-condensed .team-card:hover::after {
  opacity: 1;
}

.page-condensed .service-card {
  min-height: 184px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.page-condensed .service-card__icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.page-condensed .service-card p {
  color: #b2b8c3;
  line-height: 1.55;
}

.page-condensed .process-card {
  min-height: 150px;
}

.page-condensed .process-card h3 {
  margin-bottom: 6px;
}

.page-condensed .process-card p {
  color: #adb4bf;
  line-height: 1.55;
}

.page-condensed .testimonial-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.page-condensed .testimonial-card__author strong {
  font-size: 0.95rem;
}

.page-condensed .testimonial-card__author span {
  color: #9aa1ae;
}

.page-condensed .team-card {
  min-height: 76px;
  align-items: center;
}

.page-condensed .team-card h3 {
  font-size: 0.96rem;
}

.page-condensed .team-card__role {
  font-size: 0.78rem;
  color: #d6dae2;
}

/* ===== Staff readability pass ===== */

.panel-simple.staff-page .staff__layout {
  grid-template-columns: 210px 1fr;
  gap: 18px;
}

.panel-simple.staff-page .staff-nav__item {
  padding: 8px 10px;
  border-radius: 10px;
}

.panel-simple.staff-page .staff-nav__item.active {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.panel-simple.staff-page .staff-section__top {
  margin-bottom: 12px;
}

.panel-simple.staff-page .staff-section h1 {
  font-size: 1.35rem;
}

.panel-simple.staff-page .ticket-toolbar input,
.panel-simple.staff-page .ticket-toolbar select {
  min-height: 40px;
}

.panel-simple.staff-page .table-wrap + .table-wrap {
  margin-top: 12px;
}

/* ===== Accessibility + responsive final pass ===== */

@media (max-width: 760px) {
  .page-condensed .section {
    padding: 58px 0;
  }

  .page-condensed .section__header h2 {
    font-size: 1.95rem;
  }

  .panel-simple .panel-hero__title {
    font-size: 1.18rem;
  }

  .panel-simple .ticket-chat {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .panel-simple .ticket-chat__list {
    max-height: 180px;
  }

  .panel-simple .ticket-chat__thread {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  .panel-simple .panel-tab,
  .panel-simple .ticket-tab {
    font-size: 0.82rem;
    padding: 7px 11px;
  }

  .panel-simple .staff-section__actions {
    width: 100%;
  }

  .panel-simple .staff-section__actions .btn,
  .panel-simple .staff-section__actions input,
  .panel-simple .staff-section__actions select {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
