:root {
  --ink: #10212a;
  --ink-soft: #3d5560;
  --teal: #0f4c5c;
  --teal-deep: #0a3540;
  --gold: #c9a227;
  --line: #000000;
  --max: 100%;
  --pad-x: clamp(1.25rem, 4.5vw, 4.5rem);
  --nav-h: 4.25rem;
}

/* Crisp thin black outline everywhere on all plaques, cards, forms, tables, inputs */
.announcement-card,
.v3-changelog-card,
.contract-card,
.form-card,
.contract-viewer-wrap,
.contract-viewer-meta,
.contract-viewer-body,
.empty-contracts-card,
.contracts-app-banner,
.panel-sidebar,
.admin-users-table-wrap,
.admin-toolbar,
.file-upload-box,
.download-feature,
.profile-card,
.admin-login-card,
.reg-sheet-panel,
.panel-tab,
.field input,
.field select,
.field textarea,
.admin-search-input {
  border: 1px solid #000000 !important;
}

.download-v3-container {
  border: none !important;
  box-shadow: none !important;
}

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

[hidden] {
  display: none !important;
}

.empty-contracts-card[hidden] {
  display: none !important;
}

#umowy-contract-wrap[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background:
    radial-gradient(700px 420px at 50% -10%, rgba(15, 76, 92, 0.1), transparent 50%),
    radial-gradient(500px 360px at 100% 40%, rgba(100, 120, 130, 0.12), transparent 55%),
    linear-gradient(180deg, #e4e9ed 0%, #eef1f3 50%, #e6eaec 100%);
}

/* Background preset — Łupek (default & fixed) */
body.bg-slate {
  background:
    radial-gradient(700px 420px at 50% -10%, rgba(15, 76, 92, 0.1), transparent 50%),
    radial-gradient(500px 360px at 100% 40%, rgba(100, 120, 130, 0.12), transparent 55%),
    linear-gradient(180deg, #e4e9ed 0%, #eef1f3 50%, #e6eaec 100%);
}

.bg-picker {
  display: none !important;
}

.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main,
.foot {
  position: relative;
  z-index: 1;
}

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

/* —— Nav —— */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(236, 245, 246, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.top.is-scrolled,
.top-solid {
  border-bottom-color: var(--line);
  background: rgba(240, 247, 248, 0.94);
}

.top-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
  z-index: 110;
  position: relative;
}

.brand-mark span,
.brand-hero span {
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.35rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav a:hover,
.nav a.is-active {
  color: var(--teal-deep);
}

.nav-cta {
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  background: var(--teal);
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--teal-deep);
}

.top-actions-mobile {
  display: none;
}

.mobile-top-btn {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 110;
  position: relative;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--teal-deep);
}

body.nav-open .nav-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* —— Hero —— */
.hero {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 88svh;
  padding: calc(var(--nav-h) + 3rem) var(--pad-x) 3.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.brand-hero {
  margin: 0 0 1rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: clamp(3.2rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--teal);
}

.hero h1 {
  margin: 0 0 1.1rem;
  max-width: min(22ch, 100%);
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: min(48ch, 100%);
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.hero-points li {
  position: relative;
  padding-left: 1.15rem;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  --ph-w: min(268px, 60vw);
  --ph-h: calc(var(--ph-w) * 2.08);
  --ph-d: 22px;
  --ph-r: 48px;
  /* one chassis paint for rails + corner arcs */
  --ph-frame: #3c4248;
  --ph-metal: var(--ph-frame);
  --ph-metal-hi: #454b52;
  --ph-metal-lo: #353b41;
  --ph-btn: #424850;
  --ph-btn-hi: #4a5158;
  --ph-btn-lo: #3a4046;
}

.phone-stage {
  width: calc(var(--ph-w) + 48px);
  height: calc(var(--ph-h) + 48px);
  display: grid;
  place-items: center;
  perspective: 900px;
  perspective-origin: 50% 40%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 36px 42px rgba(8, 28, 34, 0.4));
}

.phone-3d {
  position: relative;
  width: var(--ph-w);
  height: var(--ph-h);
  transform-style: preserve-3d;
  /* fixed hero pose — front + slight left edge */
  transform: rotateX(12deg) rotateY(-28deg);
}

.pf {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pf-body {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.pf-arc {
  position: absolute;
  display: block;
  width: var(--ph-d);
  height: calc(0.145 * var(--ph-r));
  left: calc(var(--cx) - var(--ph-d) / 2);
  top: calc(var(--cy) - 0.0725 * var(--ph-r));
  margin: 0;
  background: var(--ph-frame);
  transform-origin: center center;
  transform: rotateZ(var(--a)) translateX(var(--ph-r)) rotateY(90deg);
  backface-visibility: visible;
}

.pf-front,
.pf-back {
  width: var(--ph-w);
  height: var(--ph-h);
  border-radius: var(--ph-r);
}

.pf-front {
  transform: translateZ(calc(var(--ph-d) / 2));
  background: linear-gradient(
    145deg,
    #4a5158 0%,
    var(--ph-frame) 28%,
    var(--ph-metal-lo) 70%,
    #2a3036 100%
  );
  padding: 6px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    inset 0 -8px 20px rgba(0, 0, 0, 0.32);
}

.pf-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 22%,
    transparent 42%,
    transparent 70%,
    rgba(255, 255, 255, 0.08) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.pf-shine-back {
  opacity: 0.35;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 28%,
    transparent 72%,
    rgba(255, 255, 255, 0.04) 100%
  );
}

.pf-frame {
  position: relative;
  height: 100%;
  border-radius: calc(var(--ph-r) - 5px);
  background: #030608;
  padding: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
}

.pf-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 92px;
  height: 26px;
  border-radius: 20px;
  background: #05080a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4);
}

.pf-island::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a5560, #0a1216 70%);
}

.pf-screen {
  flex: 1;
  border-radius: calc(var(--ph-r) - 11px);
  display: flex;
  flex-direction: column;
  padding: 2.05rem 0.95rem 0.7rem;
  background:
    radial-gradient(90% 55% at 80% 0%, rgba(201, 162, 39, 0.16), transparent 55%),
    radial-gradient(80% 50% at 10% 100%, rgba(15, 76, 92, 0.12), transparent 50%),
    linear-gradient(180deg, #f7fcfd 0%, #e8f2f4 48%, #dce9ec 100%);
  overflow: hidden;
}

.pf-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.2rem 0 0.45rem;
  min-height: 1.1rem;
  color: var(--ink);
}

.pf-time {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.pf-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #10212a;
}

.pf-status-icons svg {
  display: block;
  flex-shrink: 0;
}

.ic-battery {
  position: relative;
  width: 24px;
  height: 11px;
  border: 1.4px solid currentColor;
  border-radius: 2.5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 1.5px;
}

.ic-battery-level {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 1px;
  background: currentColor;
}

.ic-battery-cap {
  position: absolute;
  right: -3.5px;
  top: 50%;
  width: 2px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
  opacity: 0.9;
}

.pf-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.4rem 0.15rem 0.6rem;
}

.pf-home-bar {
  width: 86px;
  height: 4px;
  margin: 0.35rem auto 0.15rem;
  border-radius: 999px;
  background: rgba(16, 33, 42, 0.28);
}

.pf-back {
  transform: rotateY(180deg) translateZ(calc(var(--ph-d) / 2));
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, #4a5158 0%, transparent 42%),
    linear-gradient(165deg, #454b52 0%, var(--ph-frame) 35%, #32383e 75%, #2a3036 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 10px rgba(0, 0, 0, 0.08);
}

/* iPhone Pro camera island — match reference */
.pf-cam {
  --cam-d: 6px;
  --cam-r: 36px;
  --cam-w: 148px;
  --cam-h: 148px;
  position: absolute;
  right: 20px;
  left: auto;
  top: 24px;
  width: var(--cam-w);
  height: var(--cam-h);
  transform-style: preserve-3d;
  transform: rotateY(180deg) translateZ(calc(var(--ph-d) / 2));
  pointer-events: none;
}

.pf-cam-slab {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  border-radius: var(--cam-r);
  background: #1c1f22;
  transform: translateZ(calc(var(--i) * 1.05px));
}

.pf-cam-slab.is-base {
  inset: -1px;
  border-radius: calc(var(--cam-r) + 2px);
  background: #181b1e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
}

/* glossy glass island surface */
.pf-cam-plate {
  position: absolute;
  inset: 0;
  border-radius: var(--cam-r);
  transform-style: preserve-3d;
  transform: translateZ(var(--cam-d));
  background:
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.03) 22%,
      transparent 42%
    ),
    radial-gradient(120% 80% at 70% 100%, rgba(0, 0, 0, 0.35), transparent 55%),
    linear-gradient(160deg, #2a2e32 0%, #1a1d20 40%, #121416 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.25);
}

.pf-cam-plate .lens {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform-style: preserve-3d;
  transform: translateZ(1.2px);
}

.pf-cam-plate .lens .rim,
.pf-cam-plate .lens .glass,
.pf-cam-plate .lens b {
  display: block;
  position: absolute;
  border-radius: 50%;
  margin: 0;
  box-sizing: border-box;
}

/* thick dark metal ring — slightly proud of glass island */
.pf-cam-plate .lens .rim {
  inset: 0;
  background:
    radial-gradient(circle at 35% 28%, #3a4046 0%, #1a1e22 42%, #0a0c0e 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    inset 0 0 0 6px #121518,
    0 1px 3px rgba(0, 0, 0, 0.4);
  transform: translateZ(1px);
}

.pf-cam-plate .lens .glass {
  inset: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, #152028 0%, #0a1014 35%, #030506 75%, #000 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 0 14px rgba(0, 0, 0, 0.85),
    /* soft dome read without tall Z */
    0 1px 2px rgba(0, 0, 0, 0.25);
  transform: translateZ(2.2px);
}

/* blue / purple AR coating rings */
.pf-cam-plate .lens .coat {
  inset: 8%;
  background:
    radial-gradient(
      circle at 50% 50%,
      transparent 24%,
      rgba(70, 120, 180, 0.28) 36%,
      rgba(90, 60, 140, 0.2) 50%,
      transparent 66%
    );
  box-shadow: inset 0 0 6px rgba(60, 100, 160, 0.28);
}

/* sensor / aperture pupil */
.pf-cam-plate .lens .pupil {
  width: 32%;
  height: 32%;
  left: 34%;
  top: 34%;
  background:
    radial-gradient(circle at 40% 35%, #1a2228 0%, #000 70%);
  box-shadow:
    0 0 0 2px rgba(40, 50, 58, 0.9),
    inset 0 0 4px #000;
}

.pf-cam-plate .lens .glass::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 18%;
  left: 20%;
  top: 18%;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.5) 0%,
    transparent 70%
  );
  transform: rotate(-24deg);
  opacity: 0.7;
  pointer-events: none;
}

/* triangular Pro layout — larger lenses, tight spacing */
.pf-cam-plate .l1 { top: 8px; left: 8px; }
.pf-cam-plate .l2 { bottom: 8px; left: 8px; }
.pf-cam-plate .l3 {
  top: 50%;
  right: 7px;
  width: 56px;
  height: 56px;
  margin-top: -28px;
}

.pf-cam-plate .l3 .glass { inset: 8.5px; }
.pf-cam-plate .l3 .rim { inset: 0 0 0 0; }

.pf-cam-plate .flash,
.pf-cam-plate .lidar,
.pf-cam-plate .mic {
  position: absolute;
  border-radius: 50%;
}

/* frosted dual-tone flash — top right */
.pf-cam-plate .flash {
  top: 22px;
  right: 16px;
  width: 15px;
  height: 15px;
  transform: translateZ(0.5px);
  background:
    radial-gradient(circle at 40% 35%, #f7f3ea 0%, #d4cfc4 45%, #9e978a 100%);
  box-shadow:
    0 0 0 1.5px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 4px rgba(255, 255, 255, 0.25);
}

.pf-cam-plate .flash::after {
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  border: 1px solid rgba(120, 110, 95, 0.35);
  opacity: 0.7;
}

/* LiDAR — flush matte black, bottom right */
.pf-cam-plate .lidar {
  bottom: 20px;
  right: 18px;
  width: 16px;
  height: 16px;
  transform: translateZ(0.3px);
  background: radial-gradient(circle at 45% 40%, #1a1e22, #050607 75%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* mic pinhole between telephoto & lidar */
.pf-cam-plate .mic {
  top: auto;
  bottom: 44px;
  right: 22px;
  left: auto;
  width: 3px;
  height: 3px;
  margin: 0;
  transform: translateZ(0.3px);
  background: #000;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

.pf-apple {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  display: grid;
  place-items: center;
  color: rgba(225, 230, 234, 0.58);
  transform: rotateY(180deg) translateZ(calc(var(--ph-d) / 2 + 1.5px));
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.pf-apple svg {
  display: block;
  width: 76px;
  height: 76px;
}

.pf-right,
.pf-left {
  width: var(--ph-d);
  height: calc(var(--ph-h) - 2 * var(--ph-r));
  left: calc((var(--ph-w) - var(--ph-d)) / 2);
  top: var(--ph-r);
  border-radius: 2px;
  backface-visibility: visible;
  background: var(--ph-frame);
}

.pf-right { transform: rotateY(90deg) translateZ(calc(var(--ph-w) / 2)); }
.pf-left { transform: rotateY(-90deg) translateZ(calc(var(--ph-w) / 2)); }

/*
  Same space-gray family as the rail — only a hair lighter,
  dark cutout seam so they read as separate parts
*/
.ph-btn {
  position: absolute;
  left: 3px;
  right: 3px;
  display: block;
  border-radius: 999px;
  transform-style: preserve-3d;
  background: #1a1e22;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.75),
    inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ph-btn b {
  position: absolute;
  inset: 1.5px 1.25px;
  display: block;
  border-radius: 999px;
  transform: translateZ(1.6px);
  background: linear-gradient(
    165deg,
    var(--ph-btn-hi) 0%,
    var(--ph-btn) 38%,
    var(--ph-btn-lo) 100%
  );
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 1px 1px rgba(0, 0, 0, 0.2);
}

.ph-btn b::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
}

.ph-btn b::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.btn-power {
  top: 19%;
  height: 50px;
}

.btn-mute {
  top: 7%;
  height: 15px;
  left: 4px;
  right: 4px;
}

.btn-mute b {
  inset: 1.25px 1px;
  transform: translateZ(1.5px);
}

.btn-vol-up {
  top: 14.5%;
  height: 40px;
}

.btn-vol-down {
  top: 29.5%;
  height: 40px;
}

.pf-top,
.pf-bottom {
  width: calc(var(--ph-w) - 2 * var(--ph-r));
  height: var(--ph-d);
  left: var(--ph-r);
  top: calc((var(--ph-h) - var(--ph-d)) / 2);
  border-radius: 2px;
  backface-visibility: visible;
  background: var(--ph-frame);
}

.pf-top { transform: rotateX(90deg) translateZ(calc(var(--ph-h) / 2)); }
.pf-bottom { transform: rotateX(-90deg) translateZ(calc(var(--ph-h) / 2)); }

.phone-app-name {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--teal);
  text-align: center;
}

.phone-app-name span { color: var(--gold); }

.phone-app-text {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.88rem 0.7rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #146a7a 0%, var(--teal) 55%, var(--teal-deep));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 16px rgba(15, 76, 92, 0.28);
}

.phone-btn:hover { filter: brightness(1.06); }

.phone-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

.phone-hint a {
  color: var(--teal);
  font-weight: 600;
  border-bottom: 1px solid var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .phone-3d {
    transform: rotateX(10deg) rotateY(-22deg);
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.45rem;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-block {
  width: 100%;
}

/* —— Content strips —— */
.strip {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 4.25rem var(--pad-x);
  border-top: 1px solid var(--line);
}

.strip h2,
.auth-intro h1 {
  margin: 0 0 0.65rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  letter-spacing: -0.03em;
  color: var(--teal-deep);
}

.section-lede {
  margin: 0 0 2.25rem;
  max-width: min(56ch, 100%);
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}

.flow li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  padding: 1.15rem 0 1.35rem;
  border-bottom: 1px solid var(--line);
}

.flow-n {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.15rem;
}

.flow h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.flow p {
  margin: 0;
  color: var(--ink-soft);
  max-width: min(60ch, 100%);
}

.strip-alt {
  background: rgba(255, 252, 246, 0.45);
}

.who {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.who article h3 {
  margin: 0 0 0.45rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.35rem;
  color: var(--teal);
}

.who article p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.gold-plus {
  color: var(--gold);
}

#wlasna-umowa {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#wlasna-umowa .section-lede {
  max-width: min(52ch, 100%);
  margin-left: auto;
  margin-right: auto;
}

.contract-cta {
  width: min(720px, 100%);
  max-width: 100%;
  margin: 0.35rem auto 0;
  padding: 1.75rem clamp(1.25rem, 4vw, 2.25rem);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.contract-cta p {
  margin: 0 auto 1.25rem;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.55;
}

.contract-cta .btn-primary {
  margin-inline: auto;
}

.strip-cta {
  text-align: left;
  padding-bottom: 5rem;
}

.strip-cta .btn-primary {
  margin-top: 0.25rem;
}

.foot {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 280px at 0% 100%, rgba(15, 76, 92, 0.1), transparent 55%),
    radial-gradient(560px 240px at 100% 0%, rgba(201, 162, 39, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(232, 242, 244, 0.55) 0%, rgba(15, 76, 92, 0.06) 100%);
}

.foot-panel {
  width: 100%;
  padding: 3.25rem var(--pad-x) 2.25rem;
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(280px, 2fr);
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 22rem;
}

.foot-logo {
  font-size: 1.55rem;
}

.foot-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.foot-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.foot-cta:hover {
  background: var(--teal-deep);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.75rem;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.foot-col h3 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.foot-col a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.foot-col a:hover {
  color: var(--teal);
  border-bottom-color: var(--gold);
}

.foot-muted {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.9;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem var(--pad-x) 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.foot-bar-links {
  display: inline-flex;
  gap: 1rem;
}

.foot-bar-links a {
  color: var(--teal);
  font-weight: 500;
}

.foot-bar-links a:hover {
  border-bottom: 1px solid var(--gold);
}

@media (max-width: 860px) {
  .foot-panel {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .foot-cols {
    grid-template-columns: 1fr;
  }
}

/* —— Registration page —— */
.page-auth {
  background:
    radial-gradient(700px 400px at 10% 0%, rgba(201, 162, 39, 0.12), transparent 50%),
    linear-gradient(180deg, #e8f1f3 0%, #f3f6f4 100%);
}

.auth-main-simple {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: calc(var(--nav-h) + 2.75rem) var(--pad-x) 4rem;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 520px);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.auth-main-simple .auth-form {
  width: 100%;
  justify-self: end;
}

.auth-intro p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.auth-form {
  background: rgba(255, 252, 246, 0.95);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.4rem 1.5rem;
  box-shadow: 0 16px 36px rgba(10, 53, 64, 0.08);
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(15, 76, 92, 0.2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.12);
}

.form-error,
.form-ok {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-error {
  background: #fce8e6;
  color: #8b2e24;
}

.form-ok {
  background: #e5f3ea;
  color: #166534;
}

.form-foot {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-foot a {
  color: var(--teal);
  font-weight: 600;
}

/* —— Registration sheet —— */
body.reg-open {
  overflow: hidden;
}

.reg-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.reg-sheet[hidden] {
  display: none;
}

.reg-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 33, 42, 0.48);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.reg-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: none;
  overflow: visible;
  padding: 2.1rem 2rem 1.85rem;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(201, 162, 39, 0.12), transparent 55%),
    linear-gradient(180deg, #f7fbfc 0%, #eef4f5 100%);
  box-shadow: 0 28px 60px rgba(8, 28, 34, 0.28);
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.28s ease;
}

.reg-sheet.is-open .reg-sheet-backdrop {
  opacity: 1;
}

.reg-sheet.is-open .reg-sheet-panel {
  transform: none;
  opacity: 1;
}

.reg-sheet-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(15, 76, 92, 0.08);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.reg-sheet-close span {
  position: absolute;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-deep);
}

.reg-sheet-close span:first-child {
  transform: rotate(45deg);
}

.reg-sheet-close span:last-child {
  transform: rotate(-45deg);
}

.reg-sheet-close:hover {
  background: rgba(15, 76, 92, 0.14);
}

.reg-sheet-brand {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--teal-deep);
}

.reg-sheet-brand span {
  color: var(--gold);
}

.reg-sheet-panel h2 {
  margin: 0 0 0.45rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.reg-sheet-lede {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.reg-sheet-form {
  margin: 0;
  box-shadow: none;
  border: 1px solid rgba(15, 76, 92, 0.1);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: 1.35rem 1.35rem 1.25rem;
}

.reg-sheet-form .field {
  margin-bottom: 0.75rem;
}

.reg-sheet-form .field input {
  padding: 0.78rem 0.9rem;
}

.reg-view[hidden] {
  display: none;
}

.form-switch {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-switch button {
  border: 0;
  background: none;
  padding: 0;
  margin-left: 0.2rem;
  font: inherit;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.form-switch button:hover {
  border-bottom-color: var(--gold);
}

@media (max-width: 640px) {
  .reg-sheet {
    padding: 0.75rem;
    place-items: center;
  }

  .reg-sheet-panel {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    border-radius: 28px;
    padding: 1.6rem 1.2rem 1.35rem;
    transform: translateY(18px) scale(0.98);
  }

  .reg-sheet.is-open .reg-sheet-panel {
    transform: none;
  }
}

@media (max-width: 860px) {
  body.nav-open {
    overflow: hidden !important;
  }

  .nav-toggle {
    display: block;
  }

  .top-actions-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 110;
  }

  .mobile-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: "Sora", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    border: 1px solid #000000 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, background 0.15s ease;
    min-height: 36px;
    box-sizing: border-box;
    cursor: pointer;
  }

  .mobile-top-btn:active {
    transform: scale(0.96);
  }

  .mobile-top-reg {
    background: var(--teal);
    color: #ffffff !important;
  }

  .mobile-top-reg:hover {
    background: var(--teal-deep);
  }

  .mobile-top-account {
    background: rgba(255, 255, 255, 0.95);
    color: var(--teal-deep) !important;
    gap: 0.4rem;
    max-width: 145px;
    padding: 0.4rem 0.75rem 0.4rem 0.85rem;
  }

  .mobile-top-name {
    display: inline-block;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--teal-deep);
    font-weight: 600;
  }

  .mobile-top-user-icon {
    flex-shrink: 0;
    color: var(--teal);
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 105;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.35rem;
    background: rgba(232, 242, 244, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: calc(var(--nav-h) + 1.25rem) 1.5rem 2rem;
  }

  body.nav-open .nav {
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
  }

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

  .auth-main-simple {
    grid-template-columns: 1fr;
  }

  .auth-main-simple .auth-form {
    justify-self: stretch;
  }

  .hero-visual {
    --ph-w: min(220px, 56vw);
  }
}

/* —— Nav user state (logged-in) —— */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-user-name {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--teal-deep) !important;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-cta-panel {
  background: var(--teal) !important;
  color: #fff !important;
}

/* —— Panel page layout —— */
.panel-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.panel-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  width: 100%;
  max-width: none;
  align-items: start;
}

.panel-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  padding: 2rem 1.25rem 2rem 1.5rem;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.38);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.panel-sidebar-greeting {
  margin: 0 0 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.panel-sidebar-greeting strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.panel-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.68rem 0.9rem;
  border-radius: 12px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
}

.panel-nav-link:hover {
  background: rgba(15, 76, 92, 0.07);
  color: var(--teal-deep);
}

.panel-nav-link.is-active {
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal-deep);
  font-weight: 600;
}

.panel-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
}

.panel-nav-link.is-active .panel-nav-icon {
  opacity: 1;
}

.panel-sidebar-sep {
  margin: 0.75rem 0;
  border: none;
  border-top: 1px solid var(--line);
}

.panel-logout {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #8b2e24;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.panel-logout:hover {
  background: rgba(139, 46, 36, 0.08);
}

.panel-content {
  padding: 2.5rem var(--pad-x) 4rem;
  min-height: calc(100vh - var(--nav-h));
  position: relative;
  z-index: 1;
}

.panel-section {
  display: none;
}

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

.panel-section-title {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  letter-spacing: -0.03em;
  color: var(--teal-deep);
}

.panel-section-lede {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 56ch;
}

/* —— Mobile tabs —— */
.panel-tabs {
  display: none;
  overflow-x: auto;
  gap: 0.25rem;
  padding: 0.85rem var(--pad-x) 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  position: sticky;
  top: var(--nav-h);
  z-index: 10;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.panel-tabs::-webkit-scrollbar { display: none; }

.panel-tab {
  flex-shrink: 0;
  padding: 0.55rem 1rem 0.65rem;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.panel-tab.is-active {
  color: var(--teal-deep);
  border-bottom-color: var(--teal);
  font-weight: 600;
}

/* —— Contract cards —— */
.contracts-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contract-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.18s;
}

.contract-card:hover {
  box-shadow: 0 8px 24px rgba(10, 53, 64, 0.08);
}

.contract-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contract-card-name {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
}

.contract-card-date {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.contract-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status-badge.active {
  background: #e5f3ea;
  color: #166534;
}

.status-badge.pending {
  background: #e0eef8;
  color: #1a4f82;
}

.status-badge.draft {
  background: #f3f0e8;
  color: #7a5c1a;
}

.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 0.95rem;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.62;
  position: relative;
}

.btn-preview:hover::after {
  content: "Podpisywanie tylko w aplikacji";
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.contracts-app-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 76, 92, 0.15);
  background: rgba(15, 76, 92, 0.05);
}

.contracts-app-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  flex: 1;
}

.contracts-app-banner a {
  color: var(--teal);
  font-weight: 600;
  border-bottom: 1px solid var(--gold);
}

/* —— Announcements —— */
.announcements-list {
  display: grid;
  gap: 1rem;
}

.announcement-card {
  padding: 1.35rem 1.45rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  transition: box-shadow 0.18s;
}

.announcement-card:hover {
  box-shadow: 0 8px 24px rgba(10, 53, 64, 0.08);
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.announcement-date {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.ann-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ann-tag.update {
  background: rgba(201, 162, 39, 0.15);
  color: #8a6200;
}

.ann-tag.new {
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal-deep);
}

.ann-tag.important {
  background: rgba(185, 60, 45, 0.1);
  color: #8b2e24;
}

.announcement-title {
  margin: 0 0 0.4rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.announcement-body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* —— Download section —— */
.download-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 0.5rem 0 2.5rem;
  max-width: 540px;
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.35rem;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  border: 1px solid rgba(255,255,255,0.06);
}

.download-btn:hover {
  background: #1a3040;
  transform: translateY(-2px);
}

.download-btn-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  fill: #fff;
}

.download-btn-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.download-btn-sub {
  font-size: 0.7rem;
  opacity: 0.72;
}

.download-btn-name {
  font-size: 1rem;
  font-weight: 600;
}

.download-note {
  margin: 0 0 2.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(15, 76, 92, 0.05);
  border: 1px solid var(--line);
  display: inline-block;
}

.download-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.download-feature {
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
}

.download-feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.55rem;
  line-height: 1;
}

.download-feature h4 {
  margin: 0 0 0.25rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1rem;
  color: var(--teal-deep);
}

.download-feature p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* —— Responsive panel —— */
.panel-tabs {
  display: none !important;
}

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

  .panel-tabs {
    display: none !important;
  }

  .panel-content {
    padding-top: 1.25rem;
  }

  .download-hero {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .download-features {
    grid-template-columns: 1fr;
  }

  .contract-card {
    grid-template-columns: 1fr;
  }

  .contract-card-actions {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .panel-content {
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
  }
}


/* ════════════════════════════════════════════════
   Panel page (panel.html)
   ════════════════════════════════════════════════ */

/* ── Top header: always solid on panel page ── */
.top-solid {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Nav user area ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 0.5rem;
}

.panel-nav-user {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  white-space: nowrap;
}

.btn-logout:hover {
  color: var(--teal);
  border-color: var(--teal);
  background: rgba(15, 76, 92, 0.05);
}

/* ── Panel main layout ── */
.panel-main {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 4rem;
  min-height: calc(100vh - var(--nav-h));
}

.panel-greeting {
  padding: 0 var(--pad-x);
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.panel-greeting strong {
  color: var(--teal);
}

/* ── Panel wrap: sidebar + content ── */
.panel-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  align-items: start;
}

/* ── Sidebar ── */
.panel-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.75rem 0.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.panel-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.panel-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.panel-nav-link svg {
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.18s;
}

.panel-nav-link:hover {
  color: var(--teal);
  background: rgba(15, 76, 92, 0.07);
}

.panel-nav-link:hover svg {
  opacity: 1;
}

.panel-nav-link.is-active {
  color: var(--teal);
  background: rgba(15, 76, 92, 0.1);
  font-weight: 600;
}

.panel-nav-link.is-active svg {
  opacity: 1;
}

/* ── Panel content ── */
.panel-content {
  min-width: 0;
}

.panel-section {
  display: none;
  animation: panelFadeIn 0.22s ease both;
}

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

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-section-header {
  margin-bottom: 1.5rem;
}

.panel-section-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  color: var(--teal-deep);
  margin: 0;
  line-height: 1.2;
}

/* ── Info banner ── */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(15, 76, 92, 0.07);
  border: 1px solid rgba(15, 76, 92, 0.18);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--teal-deep);
  margin-bottom: 1.5rem;
}

.info-banner svg {
  flex-shrink: 0;
  margin-top: 0.05rem;
  color: var(--teal);
}

.info-banner a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.info-banner a:hover {
  text-decoration: underline;
}

/* ── Contract cards ── */
.contract-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contract-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s;
}

.contract-card:hover {
  box-shadow: 0 4px 20px rgba(15, 76, 92, 0.1);
}

.contract-card-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contract-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(15, 76, 92, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
}

.contract-card-info {
  flex: 1;
  min-width: 0;
}

.contract-name {
  font-family: "Sora", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.2rem;
  line-height: 1.35;
}

.contract-date {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0;
}

.contract-status {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-active {
  background: rgba(34, 160, 100, 0.12);
  color: #1a7a50;
}

.status-pending {
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal);
}

.contract-card-bottom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.btn-preview {
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 76, 92, 0.04);
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.55;
  transition: none;
}

.preview-hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ── Announcement cards ── */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s;
}

.announcement-card:hover {
  box-shadow: 0 4px 20px rgba(15, 76, 92, 0.1);
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.announcement-date {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.announcement-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tag-update {
  background: rgba(201, 162, 39, 0.15);
  color: #8a6a10;
}

.tag-new {
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal);
}

.tag-important {
  background: rgba(210, 60, 40, 0.1);
  color: #b33020;
}

.announcement-title {
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--teal-deep);
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.announcement-body {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

/* ── Download section ── */
.download-section {
  max-width: 560px;
}

.download-lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.download-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  text-decoration: none;
  font-family: "Sora", sans-serif;
  background: var(--teal-deep);
  color: #fff;
  border: 2px solid transparent;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(10, 53, 64, 0.22);
}

.download-btn:hover {
  background: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 53, 64, 0.28);
}

.download-btn:active {
  transform: translateY(0);
}

.download-btn-icon {
  flex-shrink: 0;
}

.download-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.download-btn-sub {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

.download-btn-name {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Phone mockup (CSS-only mini) ── */
.phone-mockup-mini {
  position: relative;
  width: 120px;
  margin: 0 auto 1.5rem;
}

.pmm-frame {
  width: 100%;
  aspect-ratio: 9 / 18;
  background: linear-gradient(160deg, #1a3a44 0%, #0a2830 100%);
  border-radius: 22px;
  padding: 10px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.12) inset,
    0 20px 48px rgba(10, 40, 48, 0.45);
  position: relative;
}

.pmm-island {
  width: 32px;
  height: 8px;
  border-radius: 10px;
  background: #000;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.pmm-screen {
  flex: 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
}

.pmm-app-label {
  font-family: "Fraunces", serif;
  font-size: 11px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.03em;
}

.pmm-app-label span {
  color: var(--gold);
}

.pmm-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
}

.pmm-lines span {
  display: block;
  height: 3px;
  width: 70%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.pmm-lines span:nth-child(2) { width: 55%; }
.pmm-lines span:nth-child(3) { width: 62%; }

.pmm-btn-row b {
  display: block;
  width: 44px;
  height: 12px;
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.55);
  margin-top: 6px;
}

.pmm-home {
  width: 28px;
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
  margin-top: 8px;
  flex-shrink: 0;
}

.pmm-shadow {
  width: 70%;
  height: 14px;
  border-radius: 50%;
  background: rgba(10, 53, 64, 0.22);
  filter: blur(8px);
  margin: 6px auto 0;
}

.download-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin: 0;
  text-align: center;
}

/* ── Gold plus in headings ── */
.gold-plus {
  color: var(--gold);
}

/* ════════════════════════════════════════════════
   Panel responsive
   ════════════════════════════════════════════════ */

.panel-sidebar-close,
.panel-sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  .panel-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  /* In client panel, hide default mobile .nav menu so toggle opens .panel-sidebar drawer instead */
  .top-panel .nav {
    display: none !important;
  }

  /* Full-width responsive layout for client panel */
  .panel-page {
    padding-top: var(--nav-h) !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .panel-body {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .panel-content {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 1.25rem 1rem 3.5rem !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .panel-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .panel-section-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
    margin: 0 0 0.5rem !important;
    word-break: break-word !important;
  }

  .panel-section-lede {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    margin: 0 0 1.25rem !important;
    word-break: break-word !important;
  }

  /* Announcements / news section 100% responsive fit */
  .announcements-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .announcement-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.25rem 1.15rem !important;
    border-radius: 14px !important;
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .announcement-meta {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    flex-wrap: wrap !important;
  }

  .announcement-date {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--ink-soft) !important;
  }

  .announcement-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0 0 0.5rem !important;
    color: var(--teal-deep) !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .announcement-body {
    font-size: 0.88rem !important;
    line-height: 1.6 !important;
    color: #2c3e50 !important;
    margin: 0 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Slide-out Side Menu Drawer on mobile */
  .panel-sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 180 !important;
    background: rgba(10, 35, 45, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
  }

  body.nav-open .panel-sidebar-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .panel-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(300px, 84vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 190 !important;
    background: #ffffff !important;
    border-right: 1.5px solid #000000 !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: 14px 0 36px rgba(0, 0, 0, 0.28) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.25rem 1.15rem 2rem !important;
    box-sizing: border-box !important;
    transform: translateX(-105%) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.nav-open .panel-sidebar {
    transform: translateX(0) !important;
  }

  .panel-sidebar-header-mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.85rem !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .panel-sidebar-greeting {
    display: block !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    color: var(--ink-soft) !important;
  }

  .panel-sidebar-greeting strong {
    display: block !important;
    font-size: 1.12rem !important;
    color: var(--teal-deep) !important;
    margin-bottom: 0.15rem !important;
  }

  .panel-sidebar-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border: 1px solid #000000 !important;
    border-radius: 50% !important;
    background: #f4f8f9 !important;
    color: var(--ink) !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease, transform 0.15s ease !important;
  }

  .panel-sidebar-close:active {
    transform: scale(0.92) !important;
  }

  .panel-sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .panel-nav-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    color: var(--ink-soft) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    text-align: left !important;
    cursor: pointer !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease, color 0.15s ease !important;
  }

  .panel-nav-link.is-active {
    background: rgba(15, 76, 92, 0.1) !important;
    color: var(--teal-deep) !important;
    border: 1px solid #000000 !important;
    font-weight: 700 !important;
  }

  .panel-nav-link svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    color: var(--teal) !important;
  }

  .panel-sidebar-sep {
    display: block !important;
    margin: 1.25rem 0 1rem !important;
    border: none !important;
    border-top: 1px solid var(--line) !important;
  }

  .panel-logout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    color: #b91c1c !important;
    background: rgba(185, 28, 28, 0.06) !important;
    border: 1px solid rgba(185, 28, 28, 0.3) !important;
    min-height: 48px !important;
    cursor: pointer !important;
    margin-top: auto !important;
  }

  .panel-content {
    padding: 1.25rem 1rem 3rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .panel-greeting {
    padding: 0 1rem;
    margin-bottom: 0;
  }

  .panel-main {
    padding-top: calc(var(--nav-h) + 0.5rem);
  }

  /* Nav user area stacking on mobile */
  .nav-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-left: 0;
    padding: 0.5rem 0;
  }

  .contract-card-top {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .contract-status {
    margin-top: 0.25rem;
  }

  .download-btns {
    flex-direction: column;
  }

  .download-btn {
    justify-content: center;
  }

  /* Download V3 layout on mobile */
  .download-v3-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.75rem;
    margin: 1rem auto 2rem;
    width: 100%;
  }

  .v3-changelog-card {
    padding: 1.35rem 1.15rem;
    border-radius: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .v3-changelog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .v3-changelog-header h3 {
    font-size: 1.2rem;
  }

  .v3-changelog-date {
    font-size: 0.8rem;
  }

  .v3-features-list {
    gap: 0.95rem;
  }

  .v3-features-list li {
    gap: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .v3-features-list strong {
    font-size: 0.96rem;
  }

  .phone-interactive-wrap {
    --ph-w: min(280px, 78vw);
    --ph-h: calc(var(--ph-w) * 2.08);
    max-width: 100%;
    overflow: visible;
  }

  .phone-stage,
  .phone-stage-panel {
    max-width: 100%;
    overflow: visible;
  }

  .phone-btn-download {
    font-size: 0.95rem;
    padding: 0.8rem 0.9rem;
  }

  /* Form & Contract viewer on mobile */
  .profile-form-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .form-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .contract-viewer-meta {
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
  }

  .contract-viewer-body {
    padding: 1rem 0.85rem;
    font-size: 0.82rem;
    max-height: 400px;
  }

  .contracts-app-banner {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Admin table & toolbar on mobile */
  .admin-users-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  .admin-users-table {
    font-size: 0.82rem;
    min-width: 580px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .admin-search-input {
    max-width: 100%;
  }
}

  .contract-meta-row {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
  }

  .contract-meta-label {
    min-width: 80px;
  }
}

@media (max-width: 480px) {
  .announcement-card,
  .contract-card {
    padding: 1rem 0.9rem;
    border-radius: 14px;
  }

  .panel-section-title {
    font-size: 1.3rem;
    line-height: 1.25;
  }

  .v3-changelog-card {
    padding: 1.15rem 0.95rem;
    border-radius: 14px;
  }

  .phone-interactive-wrap {
    --ph-w: min(250px, 80vw);
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.65rem 1.15rem;
    font-size: 0.88rem;
    min-height: 44px;
  }

  .admin-login-card {
    padding: 1.75rem 1.25rem;
    border-radius: 18px;
  }

  .admin-login-title {
    font-size: 1.35rem;
  }
}

/* Global Mobile Touch & Text Rendering Optimization */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* Prevent automatic iOS Safari zoom when focusing inputs */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  select,
  textarea,
  .admin-search-input {
    font-size: 16px !important;
  }

  /* Accessible touch targets */
  button,
  .btn-primary,
  .btn-secondary,
  .nav-cta,
  .panel-nav-link {
    touch-action: manipulation;
  }
}

/* —— Panel additions: Profil & Pomoc —— */
.panel-alert-warning {
  display: flex;
  gap: 0.85rem;
  padding: 1.15rem 1.35rem;
  border-radius: 14px;
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
  margin-bottom: 1.75rem;
}

.panel-alert-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #8a6200;
  margin-top: 0.15rem;
}

.panel-alert-content h4 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.05rem;
  color: #6d4e00;
}

.panel-alert-content p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.empty-contracts-card {
  padding: 2.5rem 1.75rem;
  text-align: center;
  border-radius: 18px;
  border: 1.5px dashed var(--line);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-contracts-icon {
  width: 52px;
  height: 52px;
  color: var(--ink-soft);
  opacity: 0.45;
  margin-bottom: 1rem;
}

.empty-contracts-card h3 {
  margin: 0 0 0.5rem;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.35rem;
  color: var(--teal-deep);
}

.empty-contracts-card p {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem 1.35rem;
}

@media (max-width: 640px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(10, 53, 64, 0.04);
}

.field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(15, 76, 92, 0.2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  min-height: 110px;
}

.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.12);
}

/* Center section for support */
.section-center {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.section-center[hidden] {
  display: none !important;
}

.section-center:not(.is-active) {
  display: none !important;
}

.section-center .panel-section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-center .panel-section-lede {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-center .form-card {
  margin-left: auto;
  margin-right: auto;
}

.file-upload-box {
  position: relative;
  border: 1.5px dashed rgba(15, 76, 92, 0.28);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.file-upload-box:hover {
  border-color: var(--teal);
  background: rgba(15, 76, 92, 0.04);
}

.file-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-icon {
  width: 28px;
  height: 28px;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.file-upload-text {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

.file-upload-hint {
  font-size: 0.76rem;
  color: var(--ink-soft);
  opacity: 0.8;
  margin: 0.2rem 0 0;
}

.file-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.file-preview-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 33, 42, 0.75);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}

.form-subheading {
  margin: 1.5rem 0 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--teal-deep);
}

/* —— Download V3 page and interactive phone —— */
.download-v3-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(15, 76, 92, 0.18);
}

.version-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #166534;
  box-shadow: 0 0 6px rgba(22, 101, 52, 0.6);
}

.v3-changelog-card {
  width: 100%;
  max-width: 640px;
  margin: 0;
  padding: 2.2rem 2.4rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(10, 53, 64, 0.08);
}

/* 2-column grid: Changelog on the left, Phone on the right */
.download-v3-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 2rem auto 3rem;
}

@media (max-width: 960px) {
  .download-v3-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2.5rem;
  }
}

.v3-changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.v3-changelog-header h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 650;
  font-size: 1.35rem;
  color: var(--teal-deep);
}

.v3-changelog-date {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.v3-features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.v3-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.55;
}

.v3-feature-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(15, 76, 92, 0.1);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 15px;
  margin-top: 2px;
}

.v3-features-list strong {
  color: var(--teal-deep);
  font-size: 1.06rem;
}

/* Standup straight phone on download page */
.phone-interactive-wrap {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  --ph-w: min(320px, 68vw);
  --ph-h: calc(var(--ph-w) * 2.08);
  --ph-d: 26px;
  --ph-r: 54px;
  --ph-frame: #3c4248;
  --ph-metal: var(--ph-frame);
  --ph-metal-hi: #454b52;
  --ph-metal-lo: #353b41;
  --ph-btn: #424850;
  --ph-btn-hi: #4a5158;
  --ph-btn-lo: #3a4046;
}

.phone-stage-panel {
  perspective: 1000px;
}

.phone-3d-straight {
  transform: rotateX(0deg) rotateY(0deg);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

@keyframes phoneIdlePulse {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  35% { transform: rotateX(2deg) rotateY(-10deg); }
  65% { transform: rotateX(2deg) rotateY(10deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}

.phone-3d-straight.is-swaying {
  animation: phoneIdlePulse 3.5s ease-in-out;
}

/* Phone download button inside screen */
.phone-btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #167a8c 0%, var(--teal) 50%, var(--teal-deep) 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 22px rgba(15, 76, 92, 0.35);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.phone-btn-download:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 76, 92, 0.45);
}

.phone-btn-download svg {
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════
   ADMIN PANEL STYLES
   ═════════════════════════════════════════════ */

/* Admin login screen */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--pad-x);
}

.admin-login-wrap[hidden],
.admin-panel-wrap[hidden] {
  display: none !important;
}

.admin-login-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(15,76,92,0.12);
  border-radius: 22px;
  box-shadow: 0 12px 48px rgba(15,76,92,0.13);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 440px;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-login-title {
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  font-weight: 650;
  color: var(--teal-deep);
  margin: 0 0 1.5rem;
}

/* Admin badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--gold), #e6bb40);
  color: #3a2800;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
}

/* Admin panel wrapper */
.admin-panel-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Admin toolbar (search bar above table) */
.admin-toolbar {
  margin-bottom: 1.25rem;
}

.admin-search-input {
  width: 100%;
  max-width: 440px;
  padding: 0.6rem 1rem;
  border: 1.5px solid rgba(15,76,92,0.18);
  border-radius: 10px;
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.75);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-input:focus {
  border-color: var(--teal);
}

/* Users table */
.admin-users-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(15,76,92,0.1);
  background: rgba(255,255,255,0.75);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-users-table th {
  background: rgba(15,76,92,0.07);
  color: var(--teal-deep);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: left;
  padding: 0.7rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid rgba(15,76,92,0.1);
}

.admin-users-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(15,76,92,0.06);
  vertical-align: middle;
}

.admin-users-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-users-table tbody tr:hover td {
  background: rgba(15,76,92,0.03);
}

.admin-pesel-cell {
  font-family: monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}

.admin-empty-note {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Admin tags */
.admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.admin-tag-ok {
  background: rgba(22,122,140,0.12);
  color: var(--teal);
}

.admin-tag-none {
  background: rgba(0,0,0,0.06);
  color: var(--ink-soft);
}

/* Admin action buttons */
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Sora", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 1.5px solid var(--teal);
  background: transparent;
  color: var(--teal);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-right: 0.35rem;
}

.admin-action-btn:hover {
  background: var(--teal);
  color: #fff;
}

.admin-action-btn-danger {
  border-color: #c0392b;
  color: #c0392b;
}

.admin-action-btn-danger:hover {
  background: #c0392b;
  color: #fff;
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 12px;
  border: 2px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.btn-secondary:hover {
  background: var(--teal);
  color: #fff;
}

/* APK file upload drag state */
.file-upload-box.is-drag {
  border-color: var(--teal);
  background: rgba(15,76,92,0.05);
}

/* Contract viewer */
.contract-viewer-wrap {
  margin-bottom: 1.25rem;
}

.contract-viewer-meta {
  background: rgba(15,76,92,0.05);
  border: 1px solid rgba(15,76,92,0.12);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contract-meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.contract-meta-label {
  color: var(--ink-soft);
  font-weight: 500;
  min-width: 90px;
  flex-shrink: 0;
}

.contract-viewer-body {
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(15,76,92,0.14);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  font-size: 0.875rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 480px;
  overflow-y: auto;
  color: var(--ink);
}

@media (max-width: 700px) {
  .admin-login-card {
    padding: 2rem 1.25rem;
  }

  .admin-users-table th,
  .admin-users-table td {
    padding: 0.55rem 0.6rem;
    font-size: 0.8rem;
  }

  .contract-viewer-body {
    padding: 1rem 1.1rem;
  }
}
