/* ══════════════════════════════════════════════════
   RZ360 — CSS Compartido
   Colores oficiales (del logo SVG):
   - Azul: #013C74
   - Rojo: #C1272D
   Esto asegura consistencia visual en todas las páginas.
   ══════════════════════════════════════════════════ */

:root {
  /* Colores oficiales */
  --primary: #013C74;      /* azul oficial */
  --primary-dark: #0A52A0;
  --accent: #C1272D;       /* rojo oficial */
  --accent-dark: #DC3540;

  /* Neutros */
  --navy: #0A1628;
  --navy2: #0D1E36;
  --navy3: #122540;
  --white: #F0F4F8;
  --grey: #7A8A9A;
  --grey2: #4A5A6A;
  --border: #1B2E4A;
  --success: #2A9D8F;

  /* Tipografía */
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Espaciado */
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 14px;
  --gap-lg: 22px;
  --gap-xl: 32px;
  --gap-2xl: 48px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 100px;

  /* Transiciones */
  --trans-fast: 0.2s;
  --trans-normal: 0.3s;
}

/* ══════════════════════════════════════════════════
   RESET
   ══════════════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   TOPBAR / HEADER
   ══════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-md) 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(14px);
}

.topbar img {
  height: 34px;
}

.topbar .phase {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 1px;
}

.topbar .spacer {
  margin-left: auto;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-size: 12px;
  color: var(--grey);
  font-family: var(--font-mono);
  cursor: pointer;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--trans-fast);
}

.user-pill:hover {
  border-color: var(--grey2);
  color: var(--white);
}

/* ══════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════ */
.progress-bar {
  height: 3px;
  background: var(--border);
  position: sticky;
  top: 63px;
  z-index: 49;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.6s ease;
}

/* ══════════════════════════════════════════════════
   SHELL / LAYOUT
   ══════════════════════════════════════════════════ */
.shell {
  position: relative;
  z-index: 10;
  max-width: 680px;
  margin: 0 auto;
  padding: var(--gap-2xl) 24px 80px;
}

/* ══════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--gap-md);
}

.h-title {
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.h-sub {
  font-size: 15px;
  color: #B0BEC5;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: var(--gap-xl);
}

/* ══════════════════════════════════════════════════
   FORM FIELDS
   ══════════════════════════════════════════════════ */
.field {
  margin-bottom: var(--gap-lg);
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--gap-sm);
}

.field .opt {
  font-size: 12px;
  color: var(--grey);
  font-weight: 400;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  background: var(--navy3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  transition: border-color var(--trans-fast);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(1, 60, 116, 0.8);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--grey2);
}

.field-hint {
  font-size: 12px;
  color: var(--grey);
  margin-top: var(--gap-sm);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  background: var(--accent);
  color: white;
  border: none;
  padding: 15px 34px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  font-family: var(--font-sans);
}

.btn-main:hover:not(:disabled) {
  background: var(--accent-dark);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-sm);
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  font-family: var(--font-sans);
}

.btn-secondary:hover {
  background: rgba(1, 60, 116, 0.08);
}

.btn-danger-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: color var(--trans-fast);
}

.btn-danger-link:hover {
  color: var(--accent-dark);
}

.btn-copy {
  font-size: 12px;
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--trans-fast);
}

.btn-copy:hover {
  background: var(--primary-dark);
}

/* ══════════════════════════════════════════════════
   CARDS / OPTIONS
   ══════════════════════════════════════════════════ */
.cards {
  display: grid;
  gap: var(--gap-sm);
}

.card-opt {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: 16px 18px;
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s;
  font-size: 15px;
}

.card-opt:hover {
  border-color: var(--grey2);
  background: var(--navy3);
}

.card-opt.sel {
  border-color: var(--accent);
  background: rgba(193, 39, 45, 0.08);
}

.card-opt .ico {
  font-size: 22px;
  flex-shrink: 0;
}

.card-opt .ck {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-opt.sel .ck {
  border-color: var(--accent);
  background: var(--accent);
}

.card-opt.sel .ck::after {
  content: '✓';
  font-size: 12px;
  color: white;
}

.card-opt.check .ck {
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════════════
   AI BLOCK
   ══════════════════════════════════════════════════ */
.ai-block {
  background: rgba(1, 60, 116, 0.12);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: var(--gap-md);
}

.ai-block .ai-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--gap-sm);
  color: var(--white);
}

.ai-prompt {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: #B0BEC5;
  white-space: pre-wrap;
  margin-bottom: var(--gap-sm);
}

/* ══════════════════════════════════════════════════
   SECURITY NOTE
   ══════════════════════════════════════════════════ */
.sec-note {
  background: var(--navy2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 12.5px;
  color: #B0BEC5;
  line-height: 1.65;
  margin-bottom: 16px;
}

.sec-note b {
  color: var(--white);
}

/* ══════════════════════════════════════════════════
   UPLOAD / DROPZONE
   ══════════════════════════════════════════════════ */
.drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all var(--trans-fast);
  color: var(--grey);
}

.drop:hover {
  border-color: var(--primary);
  color: var(--white);
}

.file-list {
  margin-top: var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.file-row {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}

.file-row .fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row .fstat {
  font-size: 11px;
  color: var(--success);
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.nav-btns {
  display: flex;
  gap: var(--gap-sm);
  margin-top: var(--gap-xl);
  align-items: center;
}

.save-hint {
  font-size: 12px;
  color: var(--grey);
  font-family: var(--font-mono);
  margin-left: var(--gap-md);
}

/* ══════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════ */
.hidden {
  display: none !important;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.account-zone {
  margin-top: var(--gap-2xl);
  padding-top: var(--gap-xl);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  font-size: 14px;
  color: var(--grey);
}
