/* ============================================================
   PowerSign QR – Full stylesheet
   Palette: Kenya Power #009A58 / #FACA22 / #163366
   ============================================================ */

:root {
  --green: #009A58;
  --green-dark: #007a46;
  --green-light: #e6f7ef;
  --yellow: #FACA22;
  --yellow-dark: #e0b400;
  --blue: #163366;
  --blue-light: #1e447a;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(22, 51, 102, 0.06);
  --shadow:    0 4px 24px rgba(22, 51, 102, 0.08);
  --shadow-lg: 0 20px 50px rgba(22, 51, 102, 0.12);
  --shadow-xl: 0 25px 60px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 56px;
  --bottom-h: 64px;
  --side-w: 240px;
  --side-w-collapsed: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

:focus-visible {
  outline: 3px solid rgba(0, 154, 88, .45);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: min(1120px, 92%); margin-inline: auto; }
.micro {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 0.55rem;
  text-align: center;
  line-height: 1.45;
}
.micro strong { color: var(--slate-600); font-weight: 600; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; border-radius: 999px; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease);
}
.btn-sm { padding: 0.42rem 1rem; font-size: 0.8rem; }
.btn-md { padding: 0.7rem 1.25rem; font-size: 0.9rem; }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-block { width: 50%; }

.btn-primary {
  background: var(--green); color: #fff;
  box-shadow: 0 6px 18px rgba(0, 154, 88, .30);
  .btn-block { width: 50%; }
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 154, 88, .38);
}
.btn-outline {
  border: 2px solid var(--green); color: var(--green); background: transparent;
}
.btn-outline:hover { background: var(--green-light); transform: translateY(-1px); }

.btn-yellow {
  background: var(--yellow); color: var(--blue);
  box-shadow: 0 6px 18px rgba(250, 202, 34, .35);
}
.btn-yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(250, 202, 34, .45);
}

.btn-secondary {
  background: var(--blue); color: #fff;
  box-shadow: 0 6px 18px rgba(22, 51, 102, .28);
}
.btn-secondary:hover { background: var(--blue-light); transform: translateY(-2px); }

.btn-ghost { color: var(--slate-600); }
.btn-ghost:hover { color: var(--green); }

/* Ghost-on-dark (used on hero) */
.btn-ghost-light {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(8px);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, .18);
  border-color: #fff;
  transform: translateY(-1px);
}

.btn-ms {
  background: #2f2f2f; color: #fff;
  border-radius: 10px; gap: 0.6rem;
  padding: 0.8rem 1.25rem; font-weight: 600;
}
.btn-ms:hover { background: #000; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248, 250, 252, .82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, .95);
  border-bottom-color: var(--slate-200);
  box-shadow: 0 4px 20px rgba(22, 51, 102, .06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; width: min(1120px, 92%); margin-inline: auto;
}
.logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.05rem; color: var(--blue);
}
.logo img { width: 36px; height: 36px; border-radius: 10px; }
.logo-text span { color: var(--green); }
.nav-links {
  display: flex; align-items: center; gap: 1.5rem;
  font-size: 0.9rem; font-weight: 500; color: var(--slate-600);
}
.nav-links a:not(.btn):hover { color: var(--green); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 10px; border-radius: 8px;
}

  .flip-card {
    background-color: transparent;
    width: 320px;
    height: 420px;
    perspective: 1000px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
  }

  .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
  }

  .flip-card:hover .flip-card-inner,
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }

  .flip-card-front,
  .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
  }

  /* FRONT – QR side */
  .flip-card-front {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .flip-card-front .logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
  }
  .flip-card-front .logo span:first-child { color: #c9a227; }
  .flip-card-front .logo span:last-child  { color: #1a7a3a; }

  .flip-card-front img {
    width: 240px;
    height: 240px;
    border-radius: 8px;
  }

  .flip-card-front .hint {
    margin-top: 14px;
    font-size: 13px;
    color: #555;
  }

  /* BACK */
  .flip-card-back {
    background: linear-gradient(145deg, #0f4c81, #1a7a3a);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
  }

  .flip-card-back h3 {
    margin: 0 0 12px;
    font-size: 22px;
  }

  .flip-card-back p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.4;
  }

  .flip-card-back a {
    display: inline-block;
    background: white;
    color: #0f4c81;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
  }
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--blue); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero-splash {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 110px 0 90px;
  overflow: hidden;
  background: var(--blue); /* fallback while image loads */
}
/* Single source of truth for the background */
.hero-splash .bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('background.jpg') center/cover no-repeat;
  transform: scale(1.02);
}
.hero-splash .bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 24, 48, .66) 0%, rgba(8, 24, 48, .30) 48%, rgba(8, 24, 48, .08) 100%);
}
.hero-splash .container { position: relative; z-index: 1; color: #fff; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy { animation: fadeUp .7s var(--ease) both; }
.login-card { animation: fadeUp .7s .12s var(--ease) both; }

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

.badge {
  display: inline-block;
  background: rgba(250, 202, 34, .18);
  color: var(--yellow);
  font-size: 0.75rem; font-weight: 700;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  letter-spacing: .03em; margin-bottom: 1.1rem;
  border: 1px solid rgba(250, 202, 34, .3);
  backdrop-filter: blur(6px);
}
.hero-splash h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.hero-splash h1 .grad {
  background: linear-gradient(90deg, var(--yellow) 0%, #ffe680 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-splash .lead {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  opacity: .9; max-width: 540px; margin-bottom: 1.9rem;
  line-height: 1.65;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 1.6rem; }
.token-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.85rem;
  backdrop-filter: blur(10px);
}

/* Login card */
.login-card {
  background: #fff; color: var(--slate-800);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, .1) inset;
}
.login-card h2 { font-size: 1.25rem; color: var(--blue); margin-bottom: 0.35rem; }
.login-card .sub { font-size: 0.85rem; color: var(--slate-500); margin-bottom: 1.3rem; line-height: 1.5; }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.8rem;
  color: var(--slate-600); margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem; background: #fff; color: var(--slate-800);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.form-group input:hover,
.form-group select:hover { border-color: var(--slate-300); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 154, 88, .15);
  background: #fff;
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

.divider {
  display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0;
  color: var(--slate-400); font-size: 0.8rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--slate-200);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 90px 0; }
.section-alt { background: #fff; }
.section-header {
  text-align: center; max-width: 620px; margin: 0 auto 3rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800; color: var(--blue);
  letter-spacing: -0.02em; margin-bottom: 0.55rem;
  line-height: 1.2;
}
.section-header p { color: var(--slate-500); font-size: 1.02rem; }

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-light);
}
.feature-card .ico {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--green-light), #d9f2e6);
  color: var(--green-dark);
}
.feature-card h3 { font-size: 1.05rem; color: var(--blue); margin-bottom: 0.45rem; font-weight: 700; }
.feature-card p { font-size: 0.92rem; color: var(--slate-500); line-height: 1.6; }
.feature-card code {
  background: var(--slate-100); color: var(--slate-700);
  padding: 0.1rem 0.4rem; border-radius: 5px;
  font-size: 0.82em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.feature-card.step .ico {
  background: linear-gradient(135deg, var(--yellow), #ffe680);
  color: var(--blue); font-weight: 800; font-size: 1.15rem;
}

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem; max-width: 1020px; margin: 0 auto;
  align-items: stretch;
}
.price-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 1.9rem 1.7rem;
  border: 2px solid var(--slate-200);
  display: flex; flex-direction: column; position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--green);
  box-shadow: 0 14px 44px rgba(0, 154, 88, .18);
  transform: translateY(-6px);
}
.price-card.featured:hover { transform: translateY(-9px); }
.price-card .tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 0.3rem 0.85rem; border-radius: 999px;
  letter-spacing: .06em;
  box-shadow: 0 4px 12px rgba(0, 154, 88, .35);
}
.price-card h3 { font-size: 1.25rem; color: var(--blue); font-weight: 700; }
.price-card .domain {
  font-size: 0.8rem; color: var(--green); font-weight: 600;
  margin: 0.3rem 0 0.9rem;
}
.price-card .price {
  font-size: 2.1rem; font-weight: 800; color: var(--blue);
  letter-spacing: -0.02em; line-height: 1.1;
}
.price-card .price span {
  font-size: 0.85rem; font-weight: 500; color: var(--slate-500);
  letter-spacing: 0;
}
.price-card .note {
  font-size: 0.82rem; color: var(--slate-500);
  margin: 0.3rem 0 1.4rem;
}
.price-card ul { flex: 1; margin-bottom: 1.4rem; }
.price-card ul li {
  padding: 0.4rem 0; font-size: 0.9rem; color: var(--slate-600);
  display: flex; gap: 0.55rem; align-items: flex-start;
}
.price-card ul li::before {
  content: "✓"; color: var(--green); font-weight: 800; flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--blue); color: rgba(255, 255, 255, .82);
  padding: 3rem 0 1.75rem;
}
.footer-inner {
  display: grid; gap: 1.25rem;
  justify-items: center; text-align: center;
}
.logo-footer { color: #fff; font-size: 1.15rem; }
.logo-footer img { border-radius: 8px; }
.f-desc { font-size: 0.92rem; opacity: .78; max-width: 440px; line-height: 1.6; }
.f-copy { font-size: 0.8rem; opacity: .55; }
.footer a:hover { color: var(--yellow); }

/* ============================================================
   APP SHELL  (desktop / tablet / mobile)
   ============================================================ */
.app-body { background: var(--slate-100); }

.app-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.app-top {
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; gap: 0.75rem;
  position: sticky; top: 0; z-index: 60; flex-shrink: 0;
}
.app-top .brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 700; color: var(--blue);
}
.app-top .brand img { width: 32px; height: 32px; border-radius: 8px; }
.app-top .meta {
  display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem;
}

/* Hamburger for the app shell – only visible on mobile */
.app-menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  color: var(--blue); font-size: 1.3rem;
  transition: background-color .15s var(--ease);
}
.app-menu-btn:hover { background: var(--slate-100); }

.token-badge {
  background: var(--green-light); color: var(--green-dark);
  font-weight: 700; padding: 0.32rem 0.75rem;
  border-radius: 999px; font-size: 0.75rem;
  white-space: nowrap;
}
.token-badge.low   { background: #fef3c7; color: #92400e; }
.token-badge.empty { background: #fee2e2; color: #b91c1c; }

.app-body-row {
  flex: 1;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  width: min(1280px, 100%);
  margin: 0 auto;
  min-height: 0;
}

/* ---------- Sidebar ---------- */
.app-side {
  background: #fff;
  border-right: 1px solid var(--slate-200);
  padding: 1rem 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform .3s var(--ease), width .3s var(--ease);
}
.app-side .nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  font-weight: 600; font-size: 0.9rem;
  color: var(--slate-600);
  width: 100%; text-align: left;
  margin-bottom: 0.15rem;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.app-side .nav-item:hover {
  background: var(--slate-100);
  color: var(--blue);
}
.app-side .nav-item.active {
  background: linear-gradient(135deg, var(--green-light), #d9f2e6);
  color: var(--green-dark);
  box-shadow: inset 3px 0 0 var(--green);
}
.app-side .nav-item .ico {
  font-size: 1.15rem; width: 24px; text-align: center; flex-shrink: 0;
}
.app-side .nav-item .lbl {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-side .side-section { margin-top: 1.4rem; padding: 0 0.4rem; }
.app-side .side-section h4 {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--slate-400); margin-bottom: 0.5rem; font-weight: 700;
  padding-left: 0.5rem;
}

/* Backdrop for mobile drawer */
.side-backdrop {
  display: none;
  position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
  z-index: 55;
}
.side-backdrop.open { opacity: 1; visibility: visible; }

/* ---------- Main content ---------- */
.app-main {
  padding: 1.25rem;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-100);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.panel h2 { font-size: 1.2rem; color: var(--blue); margin-bottom: 0.3rem; }
.panel .sub { font-size: 0.9rem; color: var(--slate-500); margin-bottom: 1.25rem; }

.view { display: none; }
.view.active { display: block; animation: fadeUp .35s var(--ease); }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius);
  padding: 2.25rem 1.25rem;
  text-align: center; cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--ease);
  background: var(--slate-50);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--green);
  background: var(--green-light);
  transform: translateY(-2px);
}
.dropzone .big { font-size: 2.5rem; margin-bottom: 0.6rem; }
.dropzone p { color: var(--slate-500); font-size: 0.9rem; }

/* Action tiles */
.action-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem; margin-top: 1rem;
}
.action-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  padding: 1.15rem 0.75rem;
  border-radius: 14px;
  border: 1.5px solid var(--slate-200);
  background: #fff;
  font-weight: 600; font-size: 0.85rem; color: var(--slate-700);
  transition: border-color .18s var(--ease), background-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease);
}
.action-tile:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
  transform: translateY(-2px);
}
.action-tile .t-ico { font-size: 1.5rem; }

/* File rows */
.file-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 0.5rem;
  border-radius: 10px;
  border-bottom: 1px solid var(--slate-100);
  cursor: pointer;
  transition: background-color .15s var(--ease);
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--slate-50); }
.file-row .fname {
  flex: 1; font-weight: 500; font-size: 0.9rem; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-row .fmeta { font-size: 0.75rem; color: var(--slate-400); white-space: nowrap; }

/* QR box */
.qr-box {
  width: 168px; height: 168px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}
.stamp-meta { text-align: center; margin-top: 0.9rem; font-size: 0.85rem; color: var(--slate-500); }
.stamp-meta strong {
  display: block; color: var(--green); font-size: 0.98rem; margin-bottom: 0.25rem;
}

/* Profile card */
.profile-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, var(--green-light), #fef9e7);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.profile-card .av,
.profile-card img {
  width: 56px; height: 56px; border-radius: 14px;
  object-fit: cover; flex-shrink: 0;
}
.profile-card .av {
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.profile-card h3 { font-size: 1.05rem; color: var(--blue); }
.profile-card p { font-size: 0.8rem; color: var(--slate-600); }
.profile-card .url {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.72rem; color: var(--green); margin-top: 0.25rem;
  word-break: break-all;
}

/* Bottom nav – mobile only */
.app-bottom {
  display: none;
  height: calc(var(--bottom-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--slate-200);
  justify-content: space-around; align-items: center;
  flex-shrink: 0; z-index: 50;
}
.app-bottom button {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  font-size: 0.65rem; font-weight: 600; color: var(--slate-400);
  min-width: 56px; padding: 0.4rem;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.app-bottom button.active { color: var(--green); }
.app-bottom button:active { transform: scale(.94); }
.app-bottom .bico { font-size: 1.3rem; }

/* ============================================================
   MODAL & TOAST
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  padding: 1.5rem 1.5rem calc(1.5rem + var(--safe-b));
  transform: translateY(100%);
  transition: transform .3s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h2 { font-size: 1.25rem; color: var(--blue); margin-bottom: 0.35rem; }
.modal .sub { color: var(--slate-500); font-size: 0.9rem; margin-bottom: 1.25rem; }

.toast {
  position: fixed;
  bottom: calc(var(--bottom-h) + var(--safe-b) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
  background: var(--blue); color: #fff;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-weight: 500; font-size: 0.87rem;
  z-index: 400;
  max-width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--green); }

.plan-badge {
  display: inline-flex;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 0.22rem 0.55rem; border-radius: 999px;
}
.plan-badge.free { background: var(--green-light); color: var(--green-dark); }
.plan-badge.business { background: #eef2ff; color: var(--blue); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Tablet / smaller desktop: collapse sidebar to icon rail --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .app-body-row { grid-template-columns: var(--side-w-collapsed) 1fr; }
  .app-side { padding: 1rem 0.5rem; }
  .app-side .nav-item { justify-content: center; padding: 0.8rem 0.5rem; }
  .app-side .nav-item .lbl { display: none; }
  .app-side .nav-item .ico { width: auto; font-size: 1.25rem; }
  .app-side .side-section h4 { display: none; }
  .app-side .side-section { padding: 0; margin-top: 0.75rem; }
}

/* --- Mobile: full drawer sidebar --- */
@media (max-width: 767px) {
  .app-body { height: 100dvh; overflow: hidden; }
  .app-shell { height: 100dvh; overflow: hidden; }
  .app-body-row {
    grid-template-columns: 1fr;
    flex: 1; min-height: 0; overflow: hidden;
  }

  .app-menu-btn { display: inline-flex; }

  .app-side {
    position: fixed;
    left: 0; top: var(--header-h); bottom: 0;
    width: min(280px, 84vw);
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(15, 23, 42, .18);
    z-index: 56;
    padding: 1.1rem 0.85rem;
  }
  .app-side.open { transform: translateX(0); }

  .side-backdrop { display: block; }

  .app-main {
    padding: 0.85rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1; min-height: 0;
  }
  .app-bottom { display: flex; }
  .app-top .meta .hide-mobile { display: none; }

  /* Landing mobile nav */
  .nav-links {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: #fff;
    padding: 1rem 1.25rem 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 12px 30px rgba(22, 51, 102, .1);
    z-index: 99;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform .25s var(--ease), opacity .25s var(--ease), visibility .25s var(--ease);
  }
  .nav-links a:not(.btn) {
    padding: 0.7rem 0.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
  }
  .nav-links a:not(.btn):hover { background: var(--slate-50); }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links .btn { margin-top: 0.5rem; }
  .menu-toggle { display: flex; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-splash { min-height: auto; padding: 92px 0 56px; }
  .hero-splash h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }
  .login-card { padding: 1.5rem; }
  .hero-cta { gap: 0.6rem; }
  .btn-lg { padding: 0.85rem 1.4rem; font-size: 0.95rem; }

  /* Landing grids */
  .feature-grid,
  .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-3px); }
  .section { padding: 64px 0; }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 1.15rem; border-radius: 14px; }
  .qr-box { width: 148px; height: 148px; }
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
  .modal {
    border-radius: 20px;
    transform: translateY(16px);
    max-height: 85vh;
  }
  .modal-overlay.open .modal { transform: translateY(0); }
}

@media (max-width: 400px) {
  .action-grid { gap: 0.5rem; }
  .action-tile { padding: 0.9rem 0.5rem; font-size: 0.78rem; }
  .hero-splash { padding: 84px 0 48px; }
}

/* ============================================================
   A11Y: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   POWER SIGN LANDING: image-first hero + click-to-open login
   Keep background.jpg in the same root folder as index.html.
   ============================================================ */
.hero-splash {
  min-height: 100vh;
  padding: 105px 0 70px;
  background: #163366;
}
.hero-splash .bg {
  background-image: url('background.jpg');
  background-position: center;
  background-size: cover;
}
.hero-splash .hero-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 24, 48, .66) 0%, rgba(8, 24, 48, .30) 48%, rgba(8, 24, 48, .08) 100%);
}
.hero-splash .container { z-index: 1; }
.hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}
.hero-copy { max-width: 650px; }
.hero-copy .lead { max-width: 570px; }
.login-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  z-index: 5;
}
.login-hidden { display: none !important; }
.login-visible { display: block; animation: fadeUp .28s var(--ease) both; }
.login-close {
  position: absolute;
  top: .65rem;
  right: .8rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--slate-500);
  font-size: 1.7rem;
  line-height: 1;
}
.login-close:hover { background: var(--slate-100); color: var(--blue); }
.login-card h2 { padding-right: 2rem; }
body.login-open::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 4;
  background: rgba(8, 24, 48, .18);
  pointer-events: auto;
}
.hero-cta button { cursor: pointer; }

@media (max-width: 767px) {
  .hero-splash { min-height: 100vh; padding: 100px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .login-card {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 440px);
    max-height: 88dvh;
    overflow-y: auto;
    z-index: 200;
    margin: 0;
    box-shadow: 0 25px 70px rgba(0,0,0,.38);
  }
  .login-visible { animation: loginPop .22s var(--ease) both; }
  @keyframes loginPop {
    from { opacity: 0; transform: translate(-50%, -47%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
  }
  body.login-open::after {
    z-index: 150;
    background: rgba(8, 24, 48, .58);
    pointer-events: auto;
  }
  .login-card { z-index: 200; }
}
@media (min-width: 768px) {
  .login-card.login-visible { grid-column: 2; }
}
