/* ============================================
   Cada Idea Readers — CSS v2.0.0
   ============================================ */

:root {
  --cir-primary:  var(--color-primary,  #F4772D);
  --cir-secondary:var(--color-secondary,#FFB30F);
  --cir-accent:   var(--color-accent,   #1DDC1D);
  --cir-bg:       var(--color-bg,       #FFF3EB);
  --cir-bg2:      var(--color-bg-two,   #FFF8EB);
  --cir-text:     var(--color-text,     #1A1A1A);
  --cir-muted:    #666;
  --cir-light:    #999;
  --cir-border:   #E8DDD4;
  --cir-white:    #ffffff;
  --cir-shadow:   0 4px 24px rgba(0,0,0,.09);
  --cir-radius:   12px;
  --cir-radius-sm:8px;
}

/* ── RESET ── */
.cir-auth-wrap *, .cir-account-wrap * { box-sizing: border-box; }

/* ============================================
   AUTH FORMS (Login / Register / Reset)
   ============================================ */
.cir-auth-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 60vh;
  padding: 2.5rem 1rem;
}

.cir-auth-box {
  background: var(--cir-white);
  border-radius: var(--cir-radius);
  box-shadow: var(--cir-shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 460px;
}

.cir-auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.cir-auth-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--cir-text);
  text-align: center;
  margin: 0 0 .375rem;
  line-height: 1.2;
}

.cir-auth-sub {
  font-size: .875rem;
  color: var(--cir-muted);
  text-align: center;
  margin: 0 0 1.75rem;
}

.cir-auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: .875rem;
  color: var(--cir-muted);
}

.cir-terms {
  font-size: .75rem;
  color: var(--cir-light);
  text-align: center;
  margin: .75rem 0 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.cir-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cir-field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.cir-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--cir-muted);
  display: flex;
  align-items: center;
  gap: .375rem;
}

.cir-field input,
.cir-field textarea,
.cir-field select {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--cir-border);
  border-radius: var(--cir-radius-sm);
  font-size: .9rem;
  color: var(--cir-text);
  background: var(--cir-white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.cir-field input:focus,
.cir-field textarea:focus {
  border-color: var(--cir-primary);
  box-shadow: 0 0 0 3px rgba(244,119,45,.12);
}
.cir-field input:disabled {
  background: #f5f5f5;
  color: #aaa;
  cursor: not-allowed;
}
.cir-field textarea { resize: vertical; min-height: 90px; }
.cir-field-hint { font-size: .72rem; color: var(--cir-light); }
.cir-field-full { grid-column: 1 / -1; }

/* Password input + toggle */
.cir-pw-wrap { position: relative; }
.cir-pw-wrap input { padding-right: 2.75rem; }
.cir-pw-toggle {
  position: absolute; right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--cir-light);
  font-size: .9rem; padding: 0; line-height: 1;
  transition: color .2s;
}
.cir-pw-toggle:hover { color: var(--cir-primary); }

/* Password strength bar */
.cir-pw-strength {
  height: 3px;
  border-radius: 3px;
  margin-top: .375rem;
  background: var(--cir-border);
  overflow: hidden;
}
.cir-pw-strength::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--pw-width, 0%);
  background: var(--pw-color, #ddd);
  transition: width .3s, background .3s;
  border-radius: 3px;
}

/* Input with prefix @  */
.cir-input-group { display: flex; }
.cir-input-group span {
  padding: .7rem .875rem;
  background: var(--cir-bg);
  border: 1.5px solid var(--cir-border);
  border-right: none;
  border-radius: var(--cir-radius-sm) 0 0 var(--cir-radius-sm);
  font-size: .875rem;
  color: var(--cir-muted);
  line-height: 1;
  display: flex; align-items: center;
}
.cir-input-group input {
  border-radius: 0 var(--cir-radius-sm) var(--cir-radius-sm) 0 !important;
  flex: 1;
}

/* Form grid */
.cir-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 580px) { .cir-form-grid { grid-template-columns: 1fr; } }

/* Section title inside form */
.cir-form-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--cir-muted);
  display: flex; align-items: center; gap: .5rem;
  margin: 1.5rem 0 .25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cir-border);
}

/* Field row (checkbox + forgot) */
.cir-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
}
.cir-check-label {
  display: flex; align-items: center; gap: .5rem;
  cursor: pointer; color: var(--cir-muted);
}

/* Form actions */
.cir-form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

/* ============================================
   BUTTONS
   ============================================ */
.cir-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 9999px;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.cir-btn-primary  { background: var(--cir-primary);  color: #fff; border-color: var(--cir-primary); }
.cir-btn-primary:hover  { opacity: .88; transform: translateY(-1px); color: #fff; }
.cir-btn-outline  { background: transparent; color: var(--cir-primary); border-color: var(--cir-primary); }
.cir-btn-outline:hover  { background: var(--cir-primary); color: #fff; }
.cir-btn-ghost    { background: transparent; color: var(--cir-muted); border-color: var(--cir-border); }
.cir-btn-ghost:hover    { border-color: var(--cir-primary); color: var(--cir-primary); }
.cir-btn-danger   { background: #ef4444; color: #fff; border-color: #ef4444; }
.cir-btn-danger:hover   { background: #dc2626; border-color: #dc2626; }
.cir-btn-full     { width: 100%; }
.cir-btn-sm { padding: .45rem 1rem; font-size: .8rem; }

.cir-link    { color: var(--cir-primary); text-decoration: underline; text-underline-offset: 2px; }
.cir-link:hover { opacity: .8; }
.cir-link-sm { font-size: .8rem; color: var(--cir-primary); text-decoration: underline; text-underline-offset: 2px; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }

/* ============================================
   MESSAGES / TOASTS
   ============================================ */
.cir-msgs { margin-bottom: .75rem; }
.cir-msg {
  padding: .75rem 1rem;
  border-radius: var(--cir-radius-sm);
  font-size: .875rem;
  margin-bottom: .375rem;
  display: flex; align-items: flex-start; gap: .5rem;
}
.cir-msg-error   { background: rgba(239,68,68,.08);  border: 1.5px solid #ef4444; color: #b91c1c; }
.cir-msg-success { background: rgba(29,220,29,.08);  border: 1.5px solid var(--cir-accent); color: #166534; }
.cir-msg-info    { background: rgba(244,119,45,.08); border: 1.5px solid var(--cir-primary); color: #9a3412; }

/* Toast notification */
.cir-toast {
  position: fixed;
  bottom: 88px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1a1a1a;
  color: #fff;
  padding: .7rem 1.5rem;
  border-radius: 9999px;
  font-size: .875rem;
  font-family: inherit;
  font-weight: 500;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.cir-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cir-toast.success { background: #22c55e; }

/* ============================================
   DASHBOARD LAYOUT (sidebar + main)
   ============================================ */
.cir-account-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  align-items: start;
}

/* ── SIDEBAR ── */
.cir-account-sidebar {
  background: var(--cir-white);
  border-radius: var(--cir-radius);
  box-shadow: var(--cir-shadow);
  overflow: hidden;
  position: sticky;
  top: 90px;
}

.cir-sidebar-user {
  padding: 1.25rem 1rem;
  background: var(--cir-bg);
  border-bottom: 1px solid var(--cir-border);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.cir-sidebar-user-info { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.cir-sidebar-user-info strong { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cir-sidebar-badge { font-size: .7rem; color: var(--cir-primary); display: flex; align-items: center; gap: .25rem; }

.cir-sidebar-nav { padding: .5rem 0; }
.cir-sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  font-size: .875rem;
  color: var(--cir-text);
  text-decoration: none;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
  font-weight: 500;
}
.cir-sidebar-link i { width: 16px; text-align: center; color: var(--cir-muted); font-size: .85rem; flex-shrink: 0; }
.cir-sidebar-link:hover { background: var(--cir-bg); color: var(--cir-primary); }
.cir-sidebar-link:hover i { color: var(--cir-primary); }
.cir-sidebar-link.active {
  background: var(--cir-bg);
  color: var(--cir-primary);
  border-left-color: var(--cir-primary);
  font-weight: 700;
}
.cir-sidebar-link.active i { color: var(--cir-primary); }
.cir-sidebar-count {
  margin-left: auto;
  background: var(--cir-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  min-width: 20px;
  text-align: center;
}

.cir-sidebar-logout {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.25rem;
  font-size: .8rem;
  color: #ef4444;
  text-decoration: none;
  border-top: 1px solid var(--cir-border);
  transition: background .15s;
}
.cir-sidebar-logout i { width: 16px; text-align: center; font-size: .85rem; }
.cir-sidebar-logout:hover { background: rgba(239,68,68,.05); }

/* ── MAIN ── */
.cir-account-main {
  background: var(--cir-white);
  border-radius: var(--cir-radius);
  box-shadow: var(--cir-shadow);
  padding: 1.75rem 2rem;
}

.cir-account-title {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 1.25rem;
  color: var(--cir-text);
  display: flex; align-items: center; gap: .5rem;
}
.cir-account-subtitle { font-size: .875rem; color: var(--cir-muted); margin: 0; }

/* Welcome row */
.cir-account-welcome {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cir-border);
}

/* Stats */
.cir-stat-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.cir-stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--cir-bg);
  border-radius: var(--cir-radius-sm);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--cir-text);
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column; gap: .25rem;
}
.cir-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.cir-stat-number { font-size: 2rem; font-weight: 900; color: var(--cir-primary); line-height: 1; }
.cir-stat-label  { font-size: .8rem; color: var(--cir-muted); font-weight: 500; }
.cir-stat-verified { background: rgba(244,119,45,.06); }

/* Section */
.cir-section { margin-bottom: 1.75rem; }
.cir-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cir-section-title { font-size: 1rem; font-weight: 700; margin: 0; }
.cir-section-link { font-size: .8rem; color: var(--cir-primary); text-decoration: none; font-weight: 600; }
.cir-section-link:hover { text-decoration: underline; }

/* Mini list (recent saved) */
.cir-mini-list { display: flex; flex-direction: column; gap: .75rem; }
.cir-mini-item { display: flex; gap: .875rem; text-decoration: none; align-items: flex-start; transition: opacity .15s; }
.cir-mini-item:hover { opacity: .75; }
.cir-mini-thumb { width: 60px; height: 44px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.cir-mini-body { display: flex; flex-direction: column; gap: .125rem; }
.cir-mini-title { font-size: .875rem; font-weight: 600; color: var(--cir-text); line-height: 1.35; }
.cir-mini-date  { font-size: .75rem; color: var(--cir-light); }

/* Quick links */
.cir-quick-links { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-top: .5rem; }
.cir-quick-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1rem .75rem;
  background: var(--cir-bg);
  border-radius: var(--cir-radius-sm);
  text-decoration: none;
  color: var(--cir-text);
  font-size: .78rem; font-weight: 600; text-align: center;
  transition: all .2s;
  border: 1.5px solid transparent;
}
.cir-quick-card i { font-size: 1.25rem; color: var(--cir-primary); }
.cir-quick-card:hover { border-color: var(--cir-primary); background: rgba(244,119,45,.06); }

/* ============================================
   AVATAR EDITOR
   ============================================ */
.cir-avatar-editor {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--cir-bg);
  border-radius: var(--cir-radius-sm);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.cir-avatar-current .cir-avatar { border: 3px solid var(--cir-white); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.cir-avatar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ============================================
   SAVED POSTS GRID
   ============================================ */
.cir-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 1.25rem;
}
.cir-saved-card {
  background: var(--cir-white);
  border: 1px solid var(--cir-border);
  border-radius: var(--cir-radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.cir-saved-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.cir-saved-thumb { display: block; height: 150px; overflow: hidden; }
.cir-saved-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cir-saved-card:hover .cir-saved-thumb img { transform: scale(1.04); }
.cir-saved-body { padding: 1rem; display: flex; flex-direction: column; gap: .375rem; }
.cir-saved-cat  { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cir-primary); }
.cir-saved-title { font-size: .9rem; font-weight: 700; color: var(--cir-text); text-decoration: none; line-height: 1.35; transition: color .15s; }
.cir-saved-title:hover { color: var(--cir-primary); }
.cir-saved-date { font-size: .75rem; color: var(--cir-light); }
.cir-unsave-btn {
  margin-top: .375rem;
  display: inline-flex; align-items: center; gap: .375rem;
  background: none; border: 1.5px solid var(--cir-border);
  border-radius: 9999px; padding: .3rem .875rem;
  font-size: .75rem; font-weight: 600; color: var(--cir-muted);
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.cir-unsave-btn:hover { border-color: #ef4444; color: #ef4444; }

.cir-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cir-muted);
}
.cir-empty p { font-size: .95rem; margin: 0 0 1rem; }

/* ============================================
   SETTINGS PAGE
   ============================================ */
.cir-settings-section {
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--cir-border);
}
.cir-settings-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cir-settings-section-title {
  font-size: 1rem; font-weight: 700; margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .5rem;
  color: var(--cir-text);
}
.cir-settings-section-title i { color: var(--cir-primary); }

/* ============================================
   SAVE POST BUTTON STATES
   ============================================ */
.ci-save-post-btn.saved i { color: var(--cir-primary); }
.share-fixed-btn.ci-save-post-btn.saved { border-color: var(--cir-primary); color: var(--cir-primary); }
.share-btn.ci-save-post-btn.saved { color: var(--cir-primary); background: rgba(244,119,45,.06); }

/* ============================================
   HEADER NAV AVATAR
   ============================================ */
.cir-avatar-wrap { display: inline-flex; }
.cir-nav-item    { list-style: none !important; }
.cir-badge       { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 2px; }
.cir-badge svg   { display: block; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .cir-account-wrap {
    grid-template-columns: 1fr;
  }
  .cir-account-sidebar {
    position: static;
  }
  .cir-quick-links { grid-template-columns: repeat(2,1fr); }
  .cir-saved-grid  { grid-template-columns: 1fr; }
  .cir-stat-cards  { flex-direction: column; }
}

@media (max-width: 480px) {
  .cir-auth-box { padding: 1.75rem 1.25rem; }
  .cir-account-main { padding: 1.25rem; }
  .cir-account-welcome { flex-direction: column; text-align: center; }
  .cir-avatar-editor { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   v2.4.2 — LOGIN / REGISTER / DASHBOARD / POPUP
   ============================================================ */

/* ── LOGIN FULLSCREEN (img1) ── */
.cir-login-full {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.cir-login-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.52); backdrop-filter: blur(2px);
}
.cir-login-card {
  position: relative; z-index: 1;
  background: #fff; border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 100%; max-width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.cir-login-logo { text-align: center; margin-bottom: 1.25rem; }
.cir-login-logo img { max-height: 40px; width: auto; display: block; margin: 0 auto; }
.cir-login-title {
  font-family: var(--cir-font-ui); font-size: 1.25rem; font-weight: 800;
  color: var(--cir-text); text-align: center; margin: 0 0 1.5rem;
  letter-spacing: -.02em; line-height: 1.25;
}
.cir-login-full .cir-field input {
  background: #F5F5F5; border-color: transparent; border-radius: 8px;
  padding: .875rem 1rem;
}
.cir-login-full .cir-field input:focus { background: #fff; border-color: var(--cir-primary); }
.cir-btn-auth {
  background: var(--cir-primary) !important; color: #fff !important;
  border-color: var(--cir-primary) !important; border-radius: 9999px !important;
  font-size: .95rem !important; padding: .875rem 1.5rem !important;
}
.cir-btn-auth:hover { opacity: .88 !important; }
.cir-auth-foot { font-size: .82rem; color: var(--cir-muted); text-align: center; margin-top: 1rem; }
.cir-auth-legal { font-size: .7rem; color: #bbb; text-align: center; margin-top: .5rem; }
.cir-auth-legal a { color: var(--cir-primary); }

/* ── REGISTER SPLIT (página de registro)
   v1.0.2: corrige centrado, añade fondo, mueve @ y ojo al interior de los inputs.
   ── */
.cir-reg-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  width: 100%;
  /* Cuando hay imagen de fondo, se aplica con CSS variable seteada inline */
  background-image: var(--cir-reg-bg, none);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.cir-reg-left {
  background: var(--cir-text, #1D1F2A);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}
.cir-reg-logo img {
  max-height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}
.cir-reg-tagline {
  font-family: var(--cir-font-ui);
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-transform: uppercase;
}
.cir-reg-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  margin: 0;
}
.cir-reg-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cir-reg-benefits li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
  color: rgba(255,255,255,.75);
}
.cir-reg-benefits li i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cir-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0;
}

/* Lado derecho — CENTRADO HORIZONTAL Y VERTICAL en su columna */
.cir-reg-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: rgba(255,255,255,0); /* transparente para que el bg del split se vea */
}
/* Si hay fondo en el split, le añadimos un overlay tras la columna derecha
   para que el formulario sea siempre legible */
.cir-reg-split[style*="--cir-reg-bg"] .cir-reg-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 0;
}
.cir-reg-split[style*="--cir-reg-bg"] .cir-reg-right { position: relative; }

/* El formulario en sí, con tamaño limitado, centrado, sobre fondo claro */
.cir-reg-form-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.cir-reg-right .cir-field input {
  background: #F5F5F5;
  border-color: transparent;
  border-radius: 8px;
}
.cir-reg-right .cir-field input:focus {
  background: #fff;
  border-color: var(--cir-primary);
}

/* @ y ojo DENTRO del input (UX limpia) */
.cir-username-wrap {
  position: relative;
}
.cir-username-wrap input {
  padding-left: 2.25rem;     /* espacio para el @ */
  padding-right: 2.25rem;    /* espacio para el status check */
  width: 100%;
}
.cir-username-at {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cir-muted, #94a3b8);
  font-weight: 600;
  font-size: .95rem;
  pointer-events: none;
  z-index: 2;
}
.cir-username-status {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  z-index: 2;
}

/* Ojo dentro del campo de contraseña */
.cir-pw-wrap {
  position: relative;
}
.cir-pw-wrap input {
  padding-right: 2.75rem;
  width: 100%;
}
.cir-eye {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cir-muted, #94a3b8);
  font-size: .95rem;
  padding: 4px 6px;
  line-height: 1;
  transition: color .2s;
  z-index: 2;
}
.cir-eye:hover {
  color: var(--cir-primary);
}
.cir-pw-bar {
  height: 3px;
  border-radius: 3px;
  margin-top: .375rem;
  background: var(--cir-border, #e5e7eb);
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .cir-reg-split { grid-template-columns: 1fr; min-height: auto; }
  .cir-reg-left { padding: 2rem 1.5rem; }
  .cir-reg-right { padding: 2rem 1rem; }
  .cir-reg-form-inner { padding: 2rem 1.5rem; }
  .cir-reg-tagline { font-size: 1.375rem; }
}

/* ── DASHBOARD DAILYMOTION (img4) ── */
.cir-dm-wrap { max-width: 960px; margin: 2rem auto; padding: 0 1.25rem; }
.cir-dm-header { display: flex; gap: 1.5rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--cir-border); }
.cir-dm-avatar img,
.cir-dm-avatar span { border-radius: 12px !important; width: 88px !important; height: 88px !important; display: block !important; }
.cir-dm-meta { flex: 1; }
.cir-dm-name-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.cir-dm-name { font-family: var(--cir-font-ui); font-size: 1.25rem; font-weight: 800; margin: 0; color: var(--cir-text); }
.cir-dm-username { font-size: .85rem; color: var(--cir-muted); margin-bottom: .5rem; font-family: var(--cir-font-ui); }
.cir-dm-bio { font-size: .875rem; color: var(--cir-muted); margin: 0 0 .875rem; line-height: 1.55; max-width: 460px; }
.cir-dm-actions { display: flex; align-items: center; gap: .625rem; margin-bottom: .875rem; }
.cir-dm-share {
  width: 36px; height: 36px; border-radius: 50%; background: none;
  border: 1.5px solid var(--cir-border); cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--cir-muted);
  transition: all .15s; flex-shrink: 0;
}
.cir-dm-share:hover { border-color: var(--cir-primary); color: var(--cir-primary); }
.cir-dm-socials { display: flex; gap: .5rem; flex-wrap: wrap; }
.cir-dm-social-link {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem;
  border: 1px solid var(--cir-border); border-radius: 9999px; font-size: .75rem;
  color: var(--cir-muted); text-decoration: none; transition: all .15s; font-family: var(--cir-font-ui);
}
.cir-dm-social-link:hover { border-color: var(--cir-primary); color: var(--cir-primary); }
.cir-dm-stats { display: flex; gap: 1.5rem; padding: .875rem 0; font-size: .875rem; color: var(--cir-muted); font-family: var(--cir-font-ui); }
.cir-dm-stats strong { color: var(--cir-text); font-weight: 700; margin-right: .2rem; }
.cir-dm-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--cir-border); margin-bottom: 1.5rem; }
.cir-dm-tab {
  padding: .625rem 1.25rem; font-family: var(--cir-font-ui); font-size: .875rem; font-weight: 600;
  color: var(--cir-muted); text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .15s;
}
.cir-dm-tab.active, .cir-dm-tab:hover { color: var(--cir-text); border-bottom-color: var(--cir-text); }
.cir-dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1.25rem; }
.cir-dm-card { border: 1px solid var(--cir-border); border-radius: 10px; overflow: hidden; transition: box-shadow .15s; }
.cir-dm-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.1); }
.cir-dm-card-img img { width: 100%; height: 140px; object-fit: cover; display: block; }
.cir-dm-card-body { padding: .875rem; }
.cir-dm-card-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--cir-primary); letter-spacing: .05em; display: block; margin-bottom: .375rem; }
.cir-dm-card-title { font-size: .875rem; font-weight: 600; color: var(--cir-text); text-decoration: none; display: block; margin-bottom: .5rem; line-height: 1.4; }
.cir-dm-card-title:hover { color: var(--cir-primary); }
.cir-dm-card-foot { display: flex; align-items: center; justify-content: space-between; }
.cir-dm-card-date { font-size: .75rem; color: var(--cir-muted); }
.cir-dm-unsave { background: none; border: none; cursor: pointer; color: var(--cir-muted); font-size: .8rem; padding: .25rem; }
.cir-dm-unsave:hover { color: #ef4444; }
.cir-dm-empty { text-align: center; padding: 3rem 1rem; color: var(--cir-muted); }
.cir-dm-empty i { font-size: 2.5rem; display: block; margin-bottom: 1rem; opacity: .4; }

/* Guest panel (img3) */
.cir-reader-guest { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.cir-reader-guest-inner { text-align: center; max-width: 400px; padding: 2rem; }
.cir-reader-guest-avatar { margin: 0 auto 1.25rem; width: 80px; }
.cir-reader-guest-inner h2 { font-family: var(--cir-font-ui); font-size: 1.25rem; font-weight: 800; margin: 0 0 .625rem; }
.cir-reader-guest-inner p { font-size: .875rem; color: var(--cir-muted); margin: 0 0 1.5rem; line-height: 1.55; }
.cir-reader-guest-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 600px) {
  .cir-dm-header { flex-direction: column; align-items: center; text-align: center; }
  .cir-dm-bio { max-width: 100%; }
  .cir-dm-actions { justify-content: center; }
  .cir-dm-socials { justify-content: center; }
  .cir-dm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .cir-dm-grid { grid-template-columns: 1fr; }
}

/* ── POPUP LOGIN/REGISTER ── */
.cir-popup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 8999;
}
.cir-popup-overlay.open { display: block; }
.cir-popup-wrap {
  display: none; position: fixed; inset: 0; z-index: 9000;
  align-items: center; justify-content: center; padding: 1rem;
}
.cir-popup-wrap.open { display: flex; }
.cir-popup-bg {
  position: absolute; inset: 0; filter: blur(6px); transform: scale(1.06);
}
.cir-popup-box {
  position: relative; z-index: 1; background: #fff;
  border-radius: 16px; width: 100%; max-width: 400px;
  max-height: 95vh; overflow-y: auto;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
}
.cir-popup-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 30px; height: 30px; border-radius: 50%;
  background: #f0f0f0; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #666; transition: background .15s;
}
.cir-popup-close:hover { background: #1D1F2A; color: #fff; }
.cir-popup-logo { text-align: center; margin-bottom: 1rem; }
.cir-popup-logo img { max-height: 36px; }
.cir-popup-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 1.25rem; }
.cir-popup-tab {
  flex: 1; background: none; border: none; padding: .625rem .5rem;
  font-family: var(--cir-font-ui); font-size: .875rem; font-weight: 600;
  color: var(--cir-muted); cursor: pointer; margin-bottom: -2px;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.cir-popup-tab.is-active { color: var(--cir-primary); border-bottom-color: var(--cir-primary); }
.cir-popup-pane .cir-field input { background: #F5F5F5; border-color: transparent; border-radius: 8px; }
.cir-popup-pane .cir-field input:focus { background: #fff; border-color: var(--cir-primary); }
.cir-popup-switch { background: none; border: none; cursor: pointer; padding: 0; font-weight: 600; }

/* ============================================================
   v2.4.4 — PATREON-STYLE PROFILE LAYOUT
   ============================================================ */

.cir-pat-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 0 3rem;
  font-family: var(--cir-font-ui, system-ui, sans-serif);
}

/* ── CABECERA ── */
.cir-pat-header {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--cir-border, #e8e8e8);
}

.cir-pat-avatar {
  margin: 0 auto 1rem;
}
.cir-pat-avatar img,
.cir-pat-avatar > span {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  display: block !important;
  margin: 0 auto !important;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.cir-pat-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cir-text, #1D1F2A);
  margin: 0 0 .3rem;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.cir-pat-username {
  font-size: .875rem;
  color: var(--cir-muted, #888);
  margin-bottom: .625rem;
}

.cir-pat-bio {
  font-size: .875rem;
  color: var(--cir-muted, #888);
  margin: 0 auto .875rem;
  max-width: 420px;
  line-height: 1.55;
}

/* Redes sociales */
.cir-pat-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.cir-pat-soc {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border: 1px solid var(--cir-border, #e8e8e8);
  border-radius: 9999px;
  font-size: .78rem;
  color: var(--cir-muted, #888);
  text-decoration: none;
  transition: all .15s;
}
.cir-pat-soc:hover {
  border-color: var(--cir-primary, #1D1F2A);
  color: var(--cir-primary, #1D1F2A);
}
.cir-pat-soc i { font-size: .9rem; }

/* Botones de acción */
.cir-pat-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  margin-top: .875rem;
}
.cir-pat-btn-edit {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: 9999px;
  background: var(--cir-text, #1D1F2A);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--cir-text, #1D1F2A);
  cursor: pointer;
  transition: opacity .15s;
}
.cir-pat-btn-edit:hover { opacity: .82; color: #fff; }
.cir-pat-btn-share {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--cir-border, #e8e8e8);
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cir-muted, #888);
  transition: all .15s;
  font-size: .85rem;
}
.cir-pat-btn-share:hover {
  border-color: var(--cir-primary, #1D1F2A);
  color: var(--cir-primary, #1D1F2A);
}

/* ── PESTAÑAS ── */
.cir-pat-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--cir-border, #e8e8e8);
  padding: 0 1rem;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cir-pat-tabs::-webkit-scrollbar { display: none; }

.cir-pat-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .875rem 1.125rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--cir-muted, #888);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}
.cir-pat-tab:hover { color: var(--cir-text, #1D1F2A); }
.cir-pat-tab.is-active {
  color: var(--cir-text, #1D1F2A);
  border-bottom-color: var(--cir-text, #1D1F2A);
}
.cir-pat-tab-count {
  background: var(--cir-border, #e8e8e8);
  color: var(--cir-muted, #888);
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 9999px;
  min-width: 20px;
  text-align: center;
}
.cir-pat-tab.is-active .cir-pat-tab-count {
  background: var(--cir-text, #1D1F2A);
  color: #fff;
}
.cir-pat-tab-logout { margin-left: auto; color: #ef4444 !important; }
.cir-pat-tab-logout:hover { color: #dc2626 !important; }

/* ── CONTENIDO ── */
.cir-pat-content {
  padding: 1.75rem 1rem;
}

/* Grid de artículos guardados */
.cir-pat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.cir-pat-card {
  border: 1px solid var(--cir-border, #e8e8e8);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .15s;
  background: #fff;
}
.cir-pat-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.cir-pat-card-img img { width: 100%; height: 140px; object-fit: cover; display: block; }
.cir-pat-card-body { padding: .875rem; }
.cir-pat-card-cat {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  color: var(--cir-primary, #1D1F2A); letter-spacing: .05em;
  display: block; margin-bottom: .35rem;
}
.cir-pat-card-title {
  font-size: .875rem; font-weight: 600; color: var(--cir-text, #1D1F2A);
  text-decoration: none; display: block; margin-bottom: .5rem; line-height: 1.4;
}
.cir-pat-card-title:hover { color: var(--cir-primary, #1D1F2A); }
.cir-pat-card-foot { display: flex; align-items: center; justify-content: space-between; }
.cir-pat-card-date { font-size: .75rem; color: var(--cir-muted, #888); }
.cir-pat-card .cir-unsave {
  background: none; border: none; cursor: pointer;
  color: var(--cir-muted, #aaa); font-size: .8rem; padding: .2rem;
}
.cir-pat-card .cir-unsave:hover { color: #ef4444; }

/* Empty state */
.cir-pat-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cir-muted, #aaa);
}
.cir-pat-empty i { font-size: 2.5rem; display: block; margin-bottom: 1rem; opacity: .35; }
.cir-pat-empty p { margin-bottom: 1.25rem; font-size: .9rem; }

/* Perfil/settings embebidos en pestañas — ocultar layout duplicado */
.cir-pat-content .cir-layout { display: block; }
.cir-pat-content .cir-sidebar { display: none !important; }
.cir-pat-content .cir-main { padding: 0 !important; max-width: 100%; }

/* Mobile */
@media (max-width: 600px) {
  .cir-pat-grid { grid-template-columns: 1fr 1fr; }
  .cir-pat-name { font-size: 1.25rem; }
}
@media (max-width: 400px) {
  .cir-pat-grid { grid-template-columns: 1fr; }
}

/* ============================================
   CADA IDEA PRO — AUTH POPUP (login/register modal)
   v1.0.2
   ============================================ */

.cipro-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.cipro-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cipro-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  width: calc(100% - 32px);
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .25);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: transform .25s, opacity .25s, visibility .25s;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cipro-popup.is-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  visibility: visible;
}

.cipro-popup-inner {
  padding: 2rem 2rem 1.5rem;
  position: relative;
}

.cipro-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--cir-muted, #64748b);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.cipro-popup-close:hover {
  background: #f1f5f9;
  color: var(--cir-text, #0f172a);
}

.cipro-popup-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--cir-border, #e5e7eb);
  margin-bottom: 1.5rem;
  margin-top: -0.25rem;
}
.cipro-popup-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--cir-muted, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  font-family: inherit;
}
.cipro-popup-tab.is-active {
  color: var(--cir-primary);
  border-bottom-color: var(--cir-primary);
}

.cipro-popup-pane {
  display: none;
}
.cipro-popup-pane.is-active {
  display: block;
}

.cipro-popup-title {
  font-family: var(--cir-font-ui);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cir-text, #0f172a);
  margin: 0 0 0.35rem;
  text-align: center;
}
.cipro-popup-sub {
  font-size: .85rem;
  color: var(--cir-muted, #64748b);
  text-align: center;
  margin: 0 0 1.25rem;
}

.cipro-popup-form .cir-field input {
  background: #F5F5F5;
  border-color: transparent;
  border-radius: 8px;
}
.cipro-popup-form .cir-field input:focus {
  background: #fff;
  border-color: var(--cir-primary);
}

.cipro-popup-foot {
  font-size: .85rem;
  color: var(--cir-muted, #64748b);
  text-align: center;
  margin: 1rem 0 0;
}

/* En móvil: popup ocupa más espacio cómodamente */
@media (max-width: 480px) {
  .cipro-popup {
    border-radius: 12px;
    width: calc(100% - 16px);
  }
  .cipro-popup-inner {
    padding: 1.5rem 1.25rem 1rem;
  }
  .cipro-popup-title {
    font-size: 1.2rem;
  }
}
