:root {
  --bg-base: #070b14;
  --bg-surface: #0e1526;
  --bg-surface-elevated: #131d33;
  --bg-surface-alt: #0a101d;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(56, 189, 248, 0.35);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-amber: #f59e0b;
  --accent-danger: #ef4444;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 22px 50px -12px rgba(0, 0, 0, 0.65);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

[hidden] {
  display: none !important;
}

/* Ambient Background Glow */
.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  filter: blur(110px);
  opacity: 0.35;
  border-radius: 50%;
}

.bg-glow--primary {
  width: 540px;
  height: 540px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.55) 0%, rgba(7, 11, 20, 0) 70%);
}

.bg-glow--secondary {
  width: 480px;
  height: 480px;
  top: 120px;
  right: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32) 0%, rgba(7, 11, 20, 0) 70%);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =========================================================
 * 1. Pantalla de Login Gatekeeper
 * ========================================================= */

.gatekeeper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.gatekeeper-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(155deg, rgba(19, 29, 51, 0.96), rgba(10, 16, 29, 0.98));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem 1.85rem;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(56, 189, 248, 0.06) inset;
  position: relative;
  overflow: hidden;
  animation: fadeSlideUp 0.25s ease-out;
}

.gatekeeper-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-emerald));
}

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

.gatekeeper-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.gatekeeper-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.95rem;
}

.gatekeeper-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gatekeeper-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

.gatekeeper-title {
  margin: 0 0 0.45rem;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.gatekeeper-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.gatekeeper-subtitle strong {
  color: var(--text-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-primary--gate {
  margin-top: 0.35rem;
  padding: 0.92rem 1.2rem;
  font-size: 0.96rem;
}

.gatekeeper-footer {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.gatekeeper-footer svg {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* =========================================================
 * 2. Portal Privado Desbloqueado
 * ========================================================= */

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

.main-content {
  flex: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.86);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-text {
  min-width: 0;
}

.brand-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  line-height: 1.2;
}

.brand-title {
  margin: 0.1rem 0 0;
  font-size: clamp(0.92rem, 1.8vw, 1.08rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.42rem 0.68rem;
  border-radius: 8px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.09);
}

.nav-link--admin {
  color: #34d399;
}

.nav-link--admin:hover {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

/* User Session Pill in Header */
.user-session-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  flex-shrink: 0;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.46rem;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  white-space: nowrap;
}

.role-chip.is-admin {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fca5a5;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.36rem 0.68rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffffff;
}

/* Hero & Download Card */
.hero-section {
  padding: 2.5rem 0 2.25rem;
}

.download-card {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 2rem;
  background: linear-gradient(145deg, rgba(19, 29, 51, 0.92), rgba(11, 18, 33, 0.96));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.35rem;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(56, 189, 248, 0.06) inset;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-emerald));
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.32);
  color: #34d399;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.android-icon {
  width: 17px;
  height: 17px;
}

.hero-heading {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.hero-subtitle {
  margin: 0 0 1.6rem;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 58ch;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

/* Dynamic Version Meta */
.version-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.meta-box {
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.15rem 0.65rem;
  border-radius: 7px;
}

.meta-value {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

.is-loading {
  opacity: 0.7;
  animation: pulseFade 1.5s ease-in-out infinite;
}

@keyframes pulseFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.95; }
}

/* Primary CTA Button */
.cta-group {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.btn-download {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: inherit;
  padding: 1.05rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 55%, #047857 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-download:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -6px rgba(16, 185, 129, 0.6);
  filter: brightness(1.05);
}

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

.btn-download:disabled {
  background: #1e293b;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-download__label {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-download__sub {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 0.18rem;
}

.btn-icon-secondary {
  width: 54px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn-icon-secondary:hover:not(:disabled) {
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(30, 41, 59, 0.9);
}

.btn-icon-secondary svg {
  width: 20px;
  height: 20px;
}

.btn-icon-secondary.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.download-progress {
  margin-top: 0.95rem;
  background: rgba(7, 11, 20, 0.74);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.upload-progress__fill.is-indeterminate {
  width: 45% !important;
  animation: indeterminateBar 1.2s ease-in-out infinite;
}

@keyframes indeterminateBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(240%); }
}

.status-banner {
  margin: 0.95rem 0 0;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}

.status-banner.is-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.status-banner.is-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Release Notes Panel */
.download-card__notes {
  display: flex;
  flex-direction: column;
  background: rgba(7, 11, 20, 0.68);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.notes-header__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.notes-header__title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

.notes-header__title h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #34d399;
}

.live-indicator::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.live-indicator.is-offline {
  color: #fbbf24;
}

.live-indicator.is-offline::before {
  background: #f59e0b;
  box-shadow: none;
}

.notes-body {
  flex: 1;
  font-size: 0.9rem;
  color: #cbd5e1;
  white-space: pre-line;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 0.35rem;
  line-height: 1.65;
}

.notes-body::-webkit-scrollbar {
  width: 6px;
}

.notes-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 99px;
}

.requirements-strip {
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.req-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.req-item svg {
  width: 15px;
  height: 15px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section--alt {
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.55) 0%, rgba(7, 11, 20, 0.9) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 660px;
  margin-bottom: 2.1rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-cyan);
  margin-bottom: 0.45rem;
}

.section-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.38rem, 2.5vw, 1.82rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.section-desc code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  padding: 0.08rem 0.36rem;
  border-radius: 5px;
}

/* Installation 3 Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
}

.step-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.step-illustration {
  width: 58px;
  height: 58px;
}

.step-illustration svg {
  width: 100%;
  height: 100%;
}

.step-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.step-text strong {
  color: var(--text-primary);
}

.step-text code {
  font-family: var(--font-mono);
  font-size: 0.84em;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  padding: 0.1rem 0.38rem;
  border-radius: 5px;
}

/* Field Quick Manual Cards */
.manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.manual-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.45rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.manual-card:hover {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(19, 29, 51, 0.9);
}

.manual-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.manual-icon svg {
  width: 22px;
  height: 22px;
}

.manual-icon--blue {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.manual-icon--amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.manual-icon--emerald {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.manual-icon--purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #c084fc;
}

.manual-title {
  margin: 0 0 0.4rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-primary);
}

.manual-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.manual-text strong {
  color: #e2e8f0;
}

/* =========================================================
 * 3. Panel de Publicación Integrado (Admin / SuperAdmin)
 * ========================================================= */

.admin-publish-section {
  padding-top: 3.25rem;
  padding-bottom: 3.5rem;
}

.publish-panel {
  background: linear-gradient(145deg, rgba(19, 29, 51, 0.9), rgba(10, 16, 29, 0.96));
  border: 1px solid rgba(16, 185, 129, 0.32);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-card);
}

.publish-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  white-space: nowrap;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.publish-form__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1.15rem;
  align-items: start;
}

.publish-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.publish-actions .btn-primary {
  width: auto;
  min-width: 280px;
}

/* Shared Form Elements */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.form-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #e2e8f0;
}

.req {
  color: var(--accent-cyan);
}

.form-field input[type='email'],
.form-field input[type='password'],
.form-field input[type='text'],
.form-field textarea {
  width: 100%;
  background: rgba(7, 11, 20, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.74rem 0.92rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.field-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.field-hint code {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* APK File Dropzone */
.file-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.15rem 1rem;
  border: 1.5px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.55);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.file-dropzone:hover,
.file-dropzone.is-dragover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.06);
}

.file-dropzone.has-file {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.07);
}

.file-dropzone input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}

.file-dropzone.has-file .dropzone-icon {
  color: #34d399;
}

.dropzone-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.dropzone-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Upload Progress */
.upload-progress {
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.upload-progress__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.upload-progress__track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.upload-progress__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  transition: width 0.15s ease;
}

/* Form Feedback */
.form-feedback {
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.form-feedback.is-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.form-feedback.is-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 0.85rem 1.2rem;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.15s ease;
}

.btn-primary--publish {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
.site-footer {
  padding: 1.5rem 0;
  background: #050810;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.footer-brand {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-security-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .header-right {
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.65rem;
  }
}

@media (max-width: 940px) {
  .download-card {
    grid-template-columns: 1fr;
    padding: 1.75rem;
    gap: 1.5rem;
  }

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

  .publish-form__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .gatekeeper-card {
    padding: 1.85rem 1.35rem 1.5rem;
  }

  .header-right {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.6rem;
  }

  .user-session-pill {
    justify-content: space-between;
  }

  .header-nav {
    justify-content: space-between;
  }

  .nav-link {
    flex: 1;
    text-align: center;
    padding: 0.38rem 0.35rem;
    font-size: 0.8rem;
  }

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

  .version-meta-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 1.35rem;
  }

  .btn-download__label {
    font-size: 1rem;
  }

  .publish-panel {
    padding: 1.4rem 1.25rem;
  }

  .publish-panel__header {
    flex-direction: column;
  }

  .publish-actions .btn-primary {
    width: 100%;
    min-width: 0;
  }
}
