:root {
  --bg: #041A22;
  --bg-2: #062832;
  --panel: rgba(7, 34, 43, 0.72);
  --panel-2: rgba(6, 40, 50, 0.82);
  --turq: #16D6C4;
  --turq-soft: rgba(22, 214, 196, 0.14);
  --coral: #FF6B4A;
  --gold: #F4C95D;
  --muted: #86aeb1;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eaf6f5;
  --radius: 18px;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(1200px 500px at 50% -10%, #0a3b46 0%, transparent 60%), linear-gradient(180deg, #052a35 0%, #041a22 55%, #031219 100%);
  min-height: 100vh;
}

.ocean-bubbles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute; bottom: -20px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(22,214,196,0.05) 60%, transparent);
  animation: rise linear infinite;
}
@keyframes rise { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 0.5; } 100% { transform: translateY(-110vh) translateX(18px); opacity: 0; } }

/* Header */
.cr-header {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6,40,50,0.55), rgba(4,26,34,0.15));
  backdrop-filter: blur(10px);
}
.cr-brand { display: flex; align-items: center; gap: 12px; }
.cr-logo { display: flex; }
.cr-logo img, .cr-logo-creator { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 8px 22px rgba(22,214,196,0.4)); }
.cr-brand-x { font-size: 32px; font-weight: 800; color: var(--turq); line-height: 1; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.cr-title h1 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: 1px; }
.cr-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cr-header-side { flex: 1; display: flex; justify-content: flex-end; }
.cr-login-tab {
  background: linear-gradient(135deg, var(--turq), #0fc9b8);
  color: #041A22;
  border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 14px;
  padding: 11px 18px; border-radius: 12px;
  box-shadow: 0 8px 18px rgba(22, 214, 196, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.cr-login-tab:hover { transform: translateY(-2px); filter: brightness(1.05); }

.cr-main { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 30px 24px 70px; }

/* Cards / panels */
.cr-card, .cr-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 22px;
}
.cr-panel-head h3 { margin: 0 0 14px; font-family: var(--font-display); font-size: 20px; }
.cr-panel-body { margin-top: 6px; }
.cr-hint { color: var(--muted); font-size: 13px; margin: 4px 0 12px; line-height: 1.5; }

/* Landing / login */
.cr-landing { max-width: 1080px; margin: 0 auto; }

/* Hero */
.cr-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 46px;
}
.cr-hero-bg {
  position: absolute; inset: -24px;
  border-radius: 26px;
  background:
    radial-gradient(700px 320px at 78% 8%, rgba(22, 214, 196, 0.22), transparent 62%),
    radial-gradient(500px 300px at 10% 100%, rgba(255, 107, 74, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(6, 40, 50, 0.6), rgba(4, 26, 34, 0.2));
  z-index: 0;
  pointer-events: none;
}
.cr-hero-content {
  position: relative; z-index: 1;
  padding: 34px 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22, 214, 196, 0.10), rgba(6, 40, 50, 0.75) 55%, rgba(255, 107, 74, 0.08));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cr-hero-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--coral), #ff3d2e);
  color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 1.5px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
  box-shadow: 0 8px 22px rgba(255, 107, 74, 0.4);
}
.cr-hero-content h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.02;
}
.cr-hero-content h1 span { color: var(--turq); }
.cr-hero-desc { color: var(--muted); margin: 0 0 22px; line-height: 1.6; font-size: 15px; max-width: 560px; }
.cr-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cr-btn-big { padding: 14px 24px; font-size: 15px; border-radius: 13px; }

.cr-hero-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 14px;
}
.cr-stat-card {
  position: relative;
  flex: 1;
  min-height: 120px;
  display: flex; align-items: center; gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.cr-stat-card:hover { transform: translateY(-3px); }
.cr-stat-turq { background: linear-gradient(135deg, #0a4a56, #062832 60%, #041a22); }
.cr-stat-blue { background: linear-gradient(135deg, #0a3a5c, #062832 60%, #041a22); }
.cr-stat-gold { background: linear-gradient(135deg, #5c4a1a, #062832 60%, #041a22); }
.cr-stat-card-icon {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 26px;
}
.cr-stat-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-stat-card-text small { color: var(--muted); font-size: 11px; letter-spacing: 1px; font-weight: 700; }
.cr-stat-card-text strong { font-family: var(--font-display); font-size: 19px; color: var(--text); }
.cr-stat-card-text em { color: var(--muted); font-style: normal; font-size: 12.5px; }

/* Secciones */
.cr-section { margin-bottom: 46px; }
.cr-section-head { text-align: center; margin-bottom: 26px; }
.cr-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(22, 214, 196, 0.12);
  border: 1px solid rgba(22, 214, 196, 0.3);
  color: var(--turq);
  font-weight: 800; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
}
.cr-section-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); line-height: 1; }
.cr-section-head p { color: var(--muted); margin: 10px 0 0; }
.cr-bubbles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; }

/* Acceso */
.cr-access { padding-top: 8px; }
.cr-apply-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.cr-info-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; }
.cr-info-card h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 24px; }
.cr-info-card h3 { margin: 22px 0 10px; font-family: var(--font-display); font-size: 18px; }
/* Burbujas de información */
.cr-bubbles { display: flex; flex-direction: column; gap: 12px; margin: 16px 0 0; }
.cr-bubble {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.cr-bubble:hover { transform: translateY(-2px); }
.cr-bubble-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  font-size: 23px;
}
.cr-bubble-body { min-width: 0; }
.cr-bubble-body strong { display: block; font-family: var(--font-display); font-size: 16px; letter-spacing: 0.3px; margin-bottom: 3px; }
.cr-bubble-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.cr-bubble-turq { border-color: rgba(22,214,196,0.3); background: rgba(22,214,196,0.08); }
.cr-bubble-turq .cr-bubble-icon { background: rgba(22,214,196,0.18); }
.cr-bubble-blue { border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.08); }
.cr-bubble-blue .cr-bubble-icon { background: rgba(56,189,248,0.18); }
.cr-bubble-violet { border-color: rgba(168,85,247,0.3); background: rgba(168,85,247,0.08); }
.cr-bubble-violet .cr-bubble-icon { background: rgba(168,85,247,0.18); }
.cr-bubble-green { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.cr-bubble-green .cr-bubble-icon { background: rgba(34,197,94,0.18); }
.cr-bubble-coral { border-color: rgba(255,107,74,0.3); background: rgba(255,107,74,0.08); }
.cr-bubble-coral .cr-bubble-icon { background: rgba(255,107,74,0.18); }
.cr-bubble-gold { border-color: rgba(244,201,93,0.3); background: rgba(244,201,93,0.08); }
.cr-bubble-gold .cr-bubble-icon { background: rgba(244,201,93,0.18); }

/* Cómo funciona */
.cr-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}
.cr-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.cr-step-num {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--turq), #0fc9b8);
  color: #041A22; font-family: var(--font-display); font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 14px rgba(22, 214, 196, 0.28);
}
.cr-step-body { min-width: 0; }
.cr-step-body strong { font-family: var(--font-display); font-size: 16px; }
.cr-step-body p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.cr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cr-form-grid .cr-input { margin-bottom: 0; }

.cr-note {
  max-width: 860px;
  margin: 16px auto 0;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid rgba(244, 201, 93, 0.3);
  background: rgba(244, 201, 93, 0.08);
  border-radius: 12px;
  color: #ffe6a6; font-size: 13px; line-height: 1.5;
}
.cr-card h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; }
.cr-sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

/* Inputs & buttons */
.cr-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  margin-bottom: 10px;
}
.cr-input:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 3px rgba(22,214,196,0.15); }
textarea.cr-input { resize: vertical; }

/* Desplegables con el mismo estilo que el resto de la web */
select.cr-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2316D6C4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}
select.cr-input:hover { border-color: rgba(22,214,196,0.5); }
select.cr-input:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2316D6C4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'/%3E%3C/svg%3E");
}
select.cr-input option {
  background: #062832;
  color: #eaf6f5;
}
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; border-radius: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 14px; padding: 12px 18px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cr-btn-primary { background: linear-gradient(135deg, var(--turq), #0fc9b8); color: #041A22; }
.cr-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(22,214,196,0.3); }
.cr-btn-ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--text); }
.cr-btn-full { width: 100%; }
.cr-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.cr-link { background: none; border: none; color: var(--turq); cursor: pointer; font-size: 13px; margin-top: 10px; }
.cr-link:hover { text-decoration: underline; }

/* Perfil */
.cr-profile {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(180deg, rgba(8,40,50,0.9), rgba(5,28,36,0.95));
  border: 1px solid rgba(22,214,196,0.25);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 28px; margin-bottom: 22px;
}
.cr-skin { width: 92px; height: 92px; border-radius: 14px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.cr-skin img { width: 100%; height: 100%; object-fit: contain; }
.cr-profile-info { flex: 1; }
.cr-profile-info h2 { margin: 6px 0 2px; font-family: var(--font-display); font-size: 24px; }
.cr-profile-info p { margin: 2px 0; color: var(--muted); font-size: 14px; }
.cr-code strong { color: var(--turq); font-family: monospace; letter-spacing: 1px; }
.cr-badge { display: inline-block; background: var(--gold); color: #041A22; font-weight: 900; font-size: 11px; letter-spacing: 1px; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; }

/* Stats */
.cr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.cr-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 6px;
}
.cr-stat-big { background: linear-gradient(160deg, rgba(22,214,196,0.16), rgba(255,107,74,0.08)); border-color: rgba(22,214,196,0.3); }
.cr-stat-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.cr-stat-value { font-family: var(--font-display); font-size: 30px; line-height: 1; color: #fff; }
.cr-stat-big .cr-stat-value { font-size: 42px; color: var(--turq); }

/* Forms */
.cr-form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cr-form-row .cr-input { flex: 1; min-width: 180px; margin-bottom: 0; }
.cr-form-col { display: flex; flex-direction: column; gap: 10px; }
.cr-file { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--turq); font-size: 13px; font-weight: 600; }
.cr-file input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.cr-file span { padding: 8px 12px; border: 1px dashed rgba(22,214,196,0.45); border-radius: 10px; background: rgba(22,214,196,0.06); }
.cr-file:hover span { background: rgba(22,214,196,0.14); }

/* Tables */
.cr-table-wrap { overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cr-table th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cr-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cr-table tr:last-child td { border-bottom: none; }
.cr-table a { color: var(--turq); text-decoration: none; }
.cr-empty { color: var(--muted); text-align: center; padding: 14px; }

/* Badges de estado */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-open { background: rgba(244,201,93,0.18); color: #ffe6a6; }
.badge-progress { background: rgba(22,214,196,0.18); color: #7fe8dd; }
.badge-closed { background: rgba(255,255,255,0.1); color: var(--muted); }
.badge-paid { background: rgba(34,197,94,0.18); color: #86efac; }
.badge-pending { background: rgba(244,201,93,0.18); color: #ffe6a6; }
.badge-rejected { background: rgba(255,78,107,0.18); color: #fda4af; }

/* Ticket detail */
.ticket-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.ticket-msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.ticket-msg.from-creator { align-self: flex-end; background: rgba(22,214,196,0.16); border: 1px solid rgba(22,214,196,0.3); }
.ticket-msg.from-admin { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid var(--line); }
.ticket-msg small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

/* Modal */
.cr-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,20,29,0.7); backdrop-filter: blur(4px); }
.cr-modal[hidden] { display: none; }
.cr-modal-card { position: relative; width: min(520px, 96vw); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-height: 92vh; overflow: auto; }
.cr-modal-card h2 { margin: 0 0 10px; font-family: var(--font-display); }
.cr-modal-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.cr-check { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: 14px; cursor: pointer; }
.cr-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); color: #fff;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease;
}
.cr-modal-close:hover { background: rgba(255, 107, 74, 0.85); transform: rotate(90deg); }
.cr-modal-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.cr-modal-foot .cr-link { margin-top: 0; }

/* Tabs / categorías */
.cr-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.cr-tabs-sep {
  width: 1px;
  align-self: stretch;
  margin: 8px 6px;
  background: var(--line);
}
.cr-tab {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); cursor: pointer; border-radius: 0;
  padding: 12px 18px; font-family: var(--font-body); font-weight: 600; font-size: 14px;
  letter-spacing: 0.2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cr-tab:hover { color: var(--text); }
.cr-tab.is-active { color: var(--turq); border-bottom-color: var(--turq); background: transparent; box-shadow: none; }
.cr-tab-panel[hidden] { display: none; }

/* PayPal mini */
.pp-widget {
  max-width: 460px; margin: 0 auto;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  color: #001435;
}
.pp-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #eaeff7; }
.pp-brand { display: flex; align-items: center; gap: 8px; }
.pp-mark { position: relative; display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 34px; line-height: 0.8; }
.pp-big { color: #003087; }
.pp-small { color: #009CDE; position: absolute; left: 55%; transform: scale(0.62); transform-origin: left center; }
.pp-word { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 24px; color: #003087; }
.pp-lock { font-size: 12px; color: #687173; font-weight: 600; }
.pp-body { padding: 22px; }
.pp-balance { background: linear-gradient(135deg, #003087, #0070E0); border-radius: 12px; padding: 18px 20px; color: #fff; margin-bottom: 18px; }
.pp-balance-label { display: block; font-size: 12px; opacity: 0.85; }
.pp-balance-value { display: block; font-size: 34px; font-weight: 800; font-family: var(--font-display); }
.pp-form { display: flex; flex-direction: column; gap: 14px; }
.pp-field { display: flex; flex-direction: column; gap: 6px; }
.pp-field-label { font-size: 13px; font-weight: 600; color: #243b53; }
.pp-input {
  width: 100%; border: 1px solid #b7c4d0; border-radius: 8px; padding: 12px 14px;
  font-size: 15px; color: #001435; background: #fff;
}
.pp-input:focus { outline: none; border-color: #0070E0; box-shadow: 0 0 0 3px rgba(0,112,224,0.15); }
.pp-btn {
  background: #0070E0; color: #fff; border: none; border-radius: 999px;
  padding: 13px 20px; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.pp-btn:hover { background: #005ea6; transform: translateY(-1px); }
.pp-hint { margin: 16px 0 0; font-size: 12px; color: #687173; text-align: center; }

/* Objetivo de directos */
.goal-row { display: flex; flex-direction: column; gap: 12px; }
.goal-info { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.goal-bar { height: 12px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.goal-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--turq), #0fc9b8); border-radius: 999px; transition: width 0.4s ease; }

/* Agenda de directos (calendario) */
.agenda-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.agenda-month { font-family: var(--font-display); font-size: 20px; min-width: 180px; text-align: center; }
.agenda-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.agenda-weekday { text-align: center; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.agenda-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.agenda-cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.agenda-cell:hover { transform: translateY(-2px); border-color: rgba(22,214,196,0.5); }
.agenda-cell-empty { background: transparent; border-color: transparent; cursor: default; }
.agenda-cell-empty:hover { transform: none; border-color: transparent; }
.agenda-day-num { font-size: 15px; }
.agenda-day-count { font-size: 11px; font-weight: 800; opacity: 0.95; }
.agenda-cell-green { background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.35); }
.agenda-cell-orange { background: rgba(249,115,22,0.2); border-color: rgba(249,115,22,0.45); }
.agenda-cell-red { background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.5); }
.agenda-cell.is-today { box-shadow: 0 0 0 2px var(--turq); }
.agenda-cell.is-selected { box-shadow: 0 0 0 2px var(--gold); border-color: var(--gold); }
.agenda-cell-past {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.05);
  color: var(--muted);
  opacity: 0.55;
  cursor: not-allowed;
}
.agenda-cell-past:hover { transform: none; border-color: rgba(255,255,255,0.05); }
.agenda-cell:disabled { cursor: not-allowed; }
.agenda-legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.agenda-legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.agenda-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.agenda-dot-green { background: #22c55e; }
.agenda-dot-orange { background: #f97316; }
.agenda-dot-red { background: #ef4444; }
.agenda-divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

/* Selector de horas */
.agenda-time-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.agenda-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 150px; }
.agenda-field-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.agenda-field .cr-input { width: 100%; font-size: 16px; }
.agenda-time-sep { color: var(--turq); font-size: 18px; padding-bottom: 12px; }

/* Reservas del día (tarjetas en cuadrícula) */
#agendaDayStreams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
#agendaDayStreams .cr-hint { grid-column: 1 / -1; }
.agenda-stream-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
.agenda-stream-card.is-mine { border-color: rgba(22,214,196,0.45); }
.agenda-stream-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agenda-stream-time { font-family: var(--font-display); font-size: 15px; color: var(--turq); }
.agenda-stream-own { font-size: 11px; font-weight: 800; color: #041A22; background: var(--turq); padding: 3px 9px; border-radius: 999px; }
.agenda-stream-creator { font-size: 15px; font-weight: 700; }
.agenda-stream-channel { color: var(--muted); font-size: 13px; text-decoration: none; }
.agenda-stream-channel:hover { color: var(--turq); }
.agenda-stream-card .cr-btn { align-self: flex-start; margin-top: 2px; }

/* Footer */
.cr-footer { position: relative; z-index: 2; text-align: center; padding: 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.cr-footer a { color: var(--turq); text-decoration: none; }

/* Toast */
.cr-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--panel-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; font-size: 14px; }
.cr-toast.success { border-color: rgba(34,197,94,0.5); }
.cr-toast.error { border-color: rgba(255,78,107,0.5); }

@media (max-width: 900px) {
  .cr-stats { grid-template-columns: 1fr 1fr; }
  .cr-hero { grid-template-columns: 1fr; }
  .cr-hero-side { flex-direction: row; }
  .cr-stat-card { min-height: 0; }
  .cr-bubbles-grid { grid-template-columns: 1fr; }
  .cr-steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cr-stats { grid-template-columns: 1fr; }
  .cr-profile { flex-direction: column; text-align: center; }
  .cr-header { flex-wrap: wrap; justify-content: center; }
  .cr-header-side { width: 100%; justify-content: center; }
  .cr-title h1 { font-size: 22px; }
  .cr-form-grid { grid-template-columns: 1fr; }
}

/* ---------- Refuerzo responsive: móvil, tablet y TV ---------- */
body { overflow-x: clip; }
img { max-width: 100%; height: auto; }

@media (min-width: 1600px) {
  .cr-main, .cr-landing { max-width: 1320px; }
  .cr-hero { grid-template-columns: minmax(0, 1fr) 340px; }
  .cr-stats { gap: 18px; }
}

@media (max-width: 620px) {
  .cr-main { padding: 20px 14px 60px; }
  .cr-panel, .cr-card { padding: 20px 16px; }
  .cr-tabs { gap: 2px; }
  .cr-tab { padding: 12px 13px; font-size: 13px; }
  .cr-modal-card { padding: 22px 16px; }
  .agenda-cell { border-radius: 9px; }
  .agenda-day-num { font-size: 13px; }
  .agenda-month { min-width: 130px; font-size: 17px; }
  .agenda-time-row { flex-direction: column; align-items: stretch; }
  .agenda-time-sep { display: none; }
  .agenda-field { min-width: 0; }
  #agendaDayStreams { grid-template-columns: 1fr; }
  /* Refuerzo móvil: las tarjetas del hero se apilan y los tabs no muestran separadores */
  .cr-hero-side { flex-direction: column; }
  .cr-hero-content { padding: 26px 20px; }
  .cr-hero-actions .cr-btn { flex: 1 1 auto; }
  .cr-tabs-sep { display: none; }
  .cr-tab { flex: 1 0 auto; text-align: center; }
}

@media (max-width: 380px) {
  .cr-title h1 { font-size: 19px; }
  .cr-brand-x { font-size: 24px; }
  .cr-logo img, .cr-logo-creator { width: 60px; height: 60px; }
}

/* ---------- Notificaciones (campana) ---------- */
.cr-notif { position: relative; }
.cr-notif-btn {
  position: relative;
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cr-notif-btn:hover { border-color: rgba(22,214,196,0.4); background: rgba(255,255,255,0.08); }
.cr-notif-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: linear-gradient(135deg, var(--coral), #ff3d2e);
  color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
}
.cr-notif-drop {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: min(340px, 88vw);
  max-height: 360px; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); z-index: 60;
}
.cr-notif-item { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.cr-notif-item:last-child { border-bottom: none; }
.cr-notif-item strong { display: block; font-size: 14px; margin-bottom: 2px; }
.cr-notif-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cr-notif-item small { color: var(--muted); font-size: 11px; }
.cr-notif-item.is-unread { background: rgba(22,214,196,0.06); }
.cr-notif-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Misiones ---------- */
.missions-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.missions-level { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.missions-level-label { color: var(--muted); font-size: 13px; }
.missions-count { font-family: var(--font-display); font-size: 18px; }
.lv-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }
.lv-bronce { background: rgba(205,127,50,0.2); color: #e2a76b; border: 1px solid rgba(205,127,50,0.4); }
.lv-plata { background: rgba(192,192,192,0.16); color: #d7dde3; border: 1px solid rgba(192,192,192,0.4); }
.lv-oro { background: rgba(244,201,93,0.16); color: #ffe6a6; border: 1px solid rgba(244,201,93,0.4); }
.missions-bar { height: 12px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.missions-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--turq), var(--gold)); border-radius: 999px; transition: width 0.4s ease; }
.missions-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.mission-card {
  display: grid; grid-template-columns: 48px 1fr auto;
  align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  opacity: 0.65;
}
.mission-card.is-done { opacity: 1; border-color: rgba(22,214,196,0.35); }
.mission-card.is-claimed { opacity: 1; background: rgba(34,197,94,0.08); }
.mission-num {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); font-family: var(--font-display); font-size: 19px; font-weight: 800;
}
.mission-info { display: flex; flex-direction: column; gap: 2px; }
.mission-info strong { font-size: 15px; }
.mission-info span { color: var(--text); font-size: 14px; }
.mission-info small { color: var(--muted); font-size: 12px; }
.mission-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mission-state { color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- Estadísticas ---------- */
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-chip span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-chip strong { font-family: var(--font-display); font-size: 24px; }
.stats-sub { font-family: var(--font-display); font-size: 18px; margin: 0 0 12px; }

@media (max-width: 480px) {
  .mission-card { grid-template-columns: 40px 1fr; gap: 10px; }
  .mission-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .cr-notif-drop { width: 92vw; }
}

/* ---------- Conexión con Twitch ---------- */
#twitchSection { display: flex; flex-direction: column; gap: 14px; }
.tw-status {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.tw-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tw-status-label { color: var(--muted); font-size: 13px; min-width: 180px; }
.tw-status-value { font-family: var(--font-display); font-size: 15px; color: var(--text); }
.tw-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 800;
}
.tw-ok { background: rgba(34,197,94,0.16); color: #86efac; border: 1px solid rgba(34,197,94,0.4); }
.tw-warn { background: rgba(244,201,93,0.16); color: #ffe6a6; border: 1px solid rgba(244,201,93,0.4); }
.tw-live { background: rgba(255,78,107,0.16); color: #fda4af; border: 1px solid rgba(255,78,107,0.4); }
.tw-steps-title { margin: 0; font-family: var(--font-display); font-size: 16px; }
.tw-steps { margin: 0; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.7; }
.tw-steps li { margin-bottom: 6px; }
.tw-steps code, .tw-note code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px; border-radius: 6px;
  font-size: 13px; color: var(--turq);
}
.tw-note {
  margin: 0; padding: 12px 14px;
  border: 1px solid rgba(145,70,255,0.3);
  background: rgba(145,70,255,0.08);
  border-radius: 12px;
  color: #d5c7ff; font-size: 13px; line-height: 1.55;
}
#btnTestTwitch { align-self: flex-start; }
.tw-result { padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.tw-result-ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.4); color: #d9fbe6; }
.tw-result-err { background: rgba(255,107,74,0.1); border: 1px solid rgba(255,107,74,0.4); color: #ffd6cc; }
.tw-result-head { font-weight: 700; }
.tw-result-details { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.tw-result-channel { color: var(--muted); font-size: 13px; }
.tw-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Progreso de nivel ---------- */
.level-now { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.level-now-left { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.level-now-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.level-progress-wrap { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.level-bar { height: 12px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.level-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--turq), var(--gold)); border-radius: 999px; transition: width 0.4s ease; }
.level-next { margin: 0; color: var(--muted); font-size: 13px; }
.level-next strong { color: var(--gold); }
.level-actions { margin-top: 14px; }
.level-actions .cr-btn { font-size: 13px; }

/* ---------- Vista previa de niveles ---------- */
.levels-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.level-preview-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.level-preview-card.is-current { border-color: rgba(22,214,196,0.5); box-shadow: 0 0 0 2px rgba(22,214,196,0.12); }
.level-preview-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.level-preview-min { color: var(--muted); font-size: 12px; font-weight: 600; }
.level-preview-desc { margin: 0; color: var(--muted); font-size: 12.5px; }
.level-preview-rewards { margin: 0; padding-left: 18px; color: var(--text); font-size: 13px; line-height: 1.6; }
.level-preview-rewards li { margin-bottom: 2px; }
.level-preview-rewards strong { color: var(--turq); }

/* ---------- Agenda: bloques de 30 min ---------- */
.slots-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.slots-head span { font-family: var(--font-display); font-size: 16px; }
.slots-head small { color: var(--muted); font-size: 12px; }
.slots-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.slot-cell {
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2);
  color: var(--text); font-size: 11.5px; font-weight: 700; font-family: var(--font-body);
  padding: 8px 2px; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.slot-cell:hover { transform: translateY(-1px); border-color: rgba(22,214,196,0.5); }
.slot-green { background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.35); }
.slot-orange { background: rgba(249,115,22,0.2); border-color: rgba(249,115,22,0.45); }
.slot-red { background: rgba(239,68,68,0.22); border-color: rgba(239,68,68,0.5); }
.slot-cell.is-past { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.05); color: var(--muted); opacity: 0.5; cursor: not-allowed; }
.slot-cell.is-sel-start, .slot-cell.is-sel-end { background: var(--turq); color: #041A22; border-color: var(--turq); }
.slot-cell.is-sel-range { background: rgba(22,214,196,0.35); border-color: var(--turq); color: #062832; }
.slots-divider {
  grid-column: 1 / -1;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
}
.slot-cell.slot-next { box-shadow: inset 0 0 0 1px rgba(244, 201, 93, 0.28); }
.slots-selection { margin: 0; color: var(--turq); font-size: 13px; font-weight: 600; }

.agenda-stream-featured {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; color: #041A22; background: var(--gold);
  padding: 3px 8px; border-radius: 999px; align-self: flex-start;
}

@media (max-width: 900px) {
  .levels-preview-grid { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 480px) {
  .slots-grid { grid-template-columns: repeat(4, 1fr); }
  .level-now { flex-direction: column; align-items: stretch; }
}

/* ---------- Ingresos y meta ---------- */
.inc-goal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.inc-goal-value { font-family: var(--font-display); font-size: 18px; color: var(--turq); }
.inc-goal-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.inc-goal-form .cr-input { flex: 1; min-width: 120px; margin-bottom: 0; }
.inc-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.inc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.inc-bar-wrap { height: 100px; width: 100%; max-width: 34px; display: flex; align-items: flex-end; justify-content: center; }
.inc-bar { display: block; width: 100%; background: linear-gradient(180deg, var(--turq), #0fc9b8); border-radius: 6px 6px 2px 2px; transition: height 0.4s ease; }
.inc-amount { font-size: 11px; color: var(--muted); white-space: nowrap; }
.inc-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.inc-prods { display: flex; flex-direction: column; gap: 8px; }
.inc-prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.inc-prod-row span { flex: 1; font-size: 14px; }
.inc-prod-row strong { color: var(--turq); font-family: var(--font-display); font-size: 15px; }
.inc-prod-row small { color: var(--muted); font-size: 12px; }

/* ---------- Sesiones activas ---------- */
.sessions-list { display: flex; flex-direction: column; gap: 8px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.session-info { display: flex; flex-direction: column; gap: 2px; }
.session-info strong { font-size: 14px; }
.session-info span { color: var(--muted); font-size: 12px; }

@media (max-width: 480px) {
  .session-row { flex-direction: column; align-items: stretch; }
  .session-row .cr-btn { align-self: flex-start; }
}
