/* =========================
   JESUSWW SETTINGS PAGE
   Light / Dark Theme Ready
========================= */

.jw-settings-page{
  --bg:
    radial-gradient(800px 420px at 12% 0%, rgba(124,58,237,.28), transparent 62%),
    radial-gradient(740px 420px at 88% 4%, rgba(59,130,246,.24), transparent 64%),
    linear-gradient(180deg,#070914,#0B1020);

  --panel:rgba(255,255,255,.075);
  --panel2:rgba(255,255,255,.105);
  --text:#F8FAFC;
  --muted:rgba(248,250,252,.64);
  --border:rgba(255,255,255,.12);
  --accent:#7C3AED;
  --accent2:#3B82F6;
  --green:#34C759;
  --gold:#F6C453;

  min-height:100%;
  padding:24px;
  background:var(--bg) !important;
  color:var(--text) !important;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display",system-ui,sans-serif;
  transition:background .3s ease,color .3s ease;
}

/* LIGHT THEME */
html.light .jw-settings-page,
body.light .jw-settings-page,
body.theme-light .jw-settings-page,
html[data-theme="light"] .jw-settings-page,
body[data-theme="light"] .jw-settings-page,
#jwPageMount.light .jw-settings-page,
#jwPageMount.theme-light .jw-settings-page,
#jwPageMount[data-theme="light"] .jw-settings-page,
.jw-settings-page.light,
.jw-settings-page.theme-light,
.jw-settings-page[data-theme="light"]{
  --bg:
    radial-gradient(800px 420px at 12% 0%, rgba(124,58,237,.15), transparent 62%),
    radial-gradient(740px 420px at 88% 4%, rgba(59,130,246,.14), transparent 64%),
    linear-gradient(180deg,#F8FAFC,#EEF2FF);

  --panel:rgba(255,255,255,.82);
  --panel2:rgba(255,255,255,.94);
  --text:#101827;
  --muted:rgba(15,23,42,.62);
  --border:rgba(15,23,42,.12);
  --gold:#9a6a00;
}

/* DARK THEME */
html.dark .jw-settings-page,
body.dark .jw-settings-page,
body.theme-dark .jw-settings-page,
html[data-theme="dark"] .jw-settings-page,
body[data-theme="dark"] .jw-settings-page,
#jwPageMount.dark .jw-settings-page,
#jwPageMount.theme-dark .jw-settings-page,
#jwPageMount[data-theme="dark"] .jw-settings-page,
.jw-settings-page.dark,
.jw-settings-page.theme-dark,
.jw-settings-page[data-theme="dark"]{
  --bg:
    radial-gradient(800px 420px at 12% 0%, rgba(124,58,237,.28), transparent 62%),
    radial-gradient(740px 420px at 88% 4%, rgba(59,130,246,.24), transparent 64%),
    linear-gradient(180deg,#070914,#0B1020);

  --panel:rgba(255,255,255,.075);
  --panel2:rgba(255,255,255,.105);
  --text:#F8FAFC;
  --muted:rgba(248,250,252,.64);
  --border:rgba(255,255,255,.12);
  --gold:#F6C453;
}

.jw-settings-page *{
  box-sizing:border-box;
}

.jw-settings-shell{
  max-width:1180px;
  margin:0 auto 80px;
}

.jw-settings-top{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  margin-bottom:18px;
}

.jw-settings-kicker{
  color:var(--gold) !important;
  font-size:12px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.jw-settings-top h1{
  margin:10px 0 8px;
  font-size:clamp(42px,7vw,78px);
  line-height:.92;
  letter-spacing:-.07em;
  color:var(--text) !important;
}

.jw-settings-top p{
  max-width:680px;
  margin:0;
  color:var(--muted) !important;
  font-size:17px;
  line-height:1.55;
}

.jw-settings-status,
.jw-settings-rail,
.jw-settings-mini,
.jw-settings-hero-card,
.jw-settings-card,
.jw-choice,
.jw-help details{
  background:var(--panel) !important;
  border:1px solid var(--border) !important;
  color:var(--text) !important;
  backdrop-filter:blur(24px);
}

.jw-settings-status{
  min-width:230px;
  padding:16px;
  border-radius:24px;
  box-shadow:0 22px 55px rgba(0,0,0,.18);
}

.jw-settings-status strong{
  display:block;
  font-size:18px;
  margin-bottom:6px;
  color:var(--text) !important;
}

.jw-settings-status small{
  color:var(--muted) !important;
  line-height:1.4;
}

.jw-settings-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:16px;
}

.jw-settings-rail{
  position:sticky;
  top:18px;
  align-self:start;
  padding:12px;
  border-radius:30px;
  box-shadow:0 24px 60px rgba(0,0,0,.18);
}

.jw-settings-nav{
  display:grid;
  gap:8px;
}

.jw-settings-tab{
  width:100%;
  border:0;
  border-radius:20px;
  padding:14px;
  display:flex;
  gap:12px;
  align-items:center;
  text-align:left;
  background:transparent;
  color:var(--text) !important;
  cursor:pointer;
}

.jw-settings-tab span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:var(--panel2) !important;
  font-size:20px;
}

.jw-settings-tab strong{
  display:block;
  font-size:15px;
  color:var(--text) !important;
}

.jw-settings-tab small{
  display:block;
  color:var(--muted) !important;
  margin-top:3px;
}

.jw-settings-tab.active{
  background:linear-gradient(135deg,rgba(124,58,237,.95),rgba(59,130,246,.82)) !important;
  box-shadow:0 18px 34px rgba(59,130,246,.20);
}

.jw-settings-tab.active,
.jw-settings-tab.active *{
  color:#fff !important;
}

.jw-settings-mini{
  margin-top:12px;
  padding:16px;
  border-radius:22px;
}

.jw-settings-mini b{
  display:block;
  margin-bottom:6px;
  color:var(--text) !important;
}

.jw-settings-mini p{
  margin:0;
  color:var(--muted) !important;
  font-size:13px;
  line-height:1.45;
}

.jw-settings-main{
  display:grid;
  gap:16px;
}

.jw-panel{
  display:none;
}

.jw-panel.active{
  display:grid;
  gap:16px;
  animation:jwFade .22s ease both;
}

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

.jw-settings-hero-card,
.jw-settings-card{
  border-radius:32px;
  box-shadow:0 24px 60px rgba(0,0,0,.16);
}

.jw-settings-hero-card{
  padding:26px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
}

.jw-settings-card{
  padding:20px;
}

.jw-settings-hero-card h2,
.jw-settings-card h3{
  margin:0;
  letter-spacing:-.045em;
  color:var(--text) !important;
}

.jw-settings-hero-card h2{
  font-size:34px;
}

.jw-settings-hero-card p,
.jw-settings-card p{
  color:var(--muted) !important;
  line-height:1.55;
}

.jw-settings-hero-card p{
  margin:8px 0 0;
}

.jw-settings-badge{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(52,199,89,.14);
  color:#86EFAC !important;
  border:1px solid rgba(52,199,89,.25);
  font-weight:900;
}

.jw-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

.jw-setting-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:15px 0;
  border-top:1px solid var(--border);
}

.jw-setting-row:first-of-type{
  border-top:0;
}

.jw-setting-row strong{
  display:block;
  color:var(--text) !important;
}

.jw-setting-row small{
  display:block;
  margin-top:4px;
  color:var(--muted) !important;
  line-height:1.35;
}

.apple-switch{
  position:relative;
  width:56px;
  height:34px;
  display:inline-block;
  flex:0 0 auto;
}

.apple-switch input{
  opacity:0;
  width:0;
  height:0;
}

.apple-switch i{
  position:absolute;
  inset:0;
  cursor:pointer;
  border-radius:999px;
  background:rgba(120,120,128,.34);
  transition:.22s ease;
}

.apple-switch i::before{
  content:"";
  position:absolute;
  width:30px;
  height:30px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 3px 8px rgba(0,0,0,.25);
  transition:.22s cubic-bezier(.2,.8,.2,1);
}

.apple-switch input:checked + i{
  background:var(--green);
}

.apple-switch input:checked + i::before{
  transform:translateX(22px);
}

.jw-select,
.jw-input,
.jw-textarea,
.jw-link-btn{
  border:1px solid var(--border) !important;
  background:var(--panel2) !important;
  color:var(--text) !important;
}

.jw-select,
.jw-input,
.jw-textarea{
  width:100%;
  border-radius:18px;
  min-height:50px;
  padding:0 14px;
  outline:none;
  font-weight:800;
}

.jw-textarea{
  min-height:118px;
  padding:14px;
  resize:vertical;
  line-height:1.5;
}

.jw-choice-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:12px;
}

.jw-choice{
  border-radius:20px;
  padding:15px;
  cursor:pointer;
  text-align:left;
}

.jw-choice strong{
  display:block;
  color:var(--text) !important;
}

.jw-choice small{
  display:block;
  margin-top:5px;
  color:var(--muted) !important;
  line-height:1.35;
}

.jw-choice.active{
  border-color:rgba(124,58,237,.65) !important;
  background:
    radial-gradient(220px 120px at 0% 0%, rgba(124,58,237,.24), transparent 60%),
    var(--panel2) !important;
}

.jw-color-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}

.jw-color{
  width:44px;
  height:44px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.55);
  cursor:pointer;
}

.jw-color.active{
  outline:3px solid white;
  outline-offset:3px;
}

.purple{background:linear-gradient(135deg,#7C3AED,#3B82F6);}
.gold{background:linear-gradient(135deg,#F6C453,#F97316);}
.green{background:linear-gradient(135deg,#22C55E,#06B6D4);}
.rose{background:linear-gradient(135deg,#EC4899,#8B5CF6);}
.slate{background:linear-gradient(135deg,#334155,#0F172A);}

.jw-primary{
  width:100%;
  min-height:52px;
  margin-top:14px;
  border:0;
  border-radius:20px;
  color:#fff !important;
  font-weight:950;
  cursor:pointer;
  background:
    radial-gradient(130px 90px at 20% 15%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(135deg,#7C3AED,#3B82F6) !important;
  box-shadow:0 18px 36px rgba(88,28,255,.26);
}

.jw-help details{
  border-radius:22px;
  overflow:hidden;
}

.jw-help summary{
  cursor:pointer;
  list-style:none;
  padding:18px;
  display:flex;
  justify-content:space-between;
  gap:14px;
  font-weight:900;
  color:var(--text) !important;
}

.jw-help summary::-webkit-details-marker{
  display:none;
}

.jw-help p{
  margin:0;
  padding:0 18px 18px;
  color:var(--muted) !important;
  line-height:1.55;
}

.jw-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.jw-link-btn{
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
}

@media(max-width:840px){
  .jw-settings-page{
    padding:14px;
  }

  .jw-settings-top{
    display:block;
  }

  .jw-settings-status{
    margin-top:16px;
  }

  .jw-settings-layout{
    grid-template-columns:1fr;
  }

  .jw-settings-rail{
    position:relative;
    top:auto;
  }

  .jw-settings-nav{
    grid-template-columns:repeat(3,1fr);
  }

  .jw-settings-tab{
    justify-content:center;
    text-align:center;
    display:grid;
  }

  .jw-settings-tab span{
    margin:auto;
  }

  .jw-settings-mini{
    display:none;
  }

  .jw-settings-grid{
    grid-template-columns:1fr;
  }

  .jw-settings-hero-card{
    grid-template-columns:1fr;
  }

  .jw-choice-grid{
    grid-template-columns:1fr;
  }
}

.jw-primary.saved{
  background:
    linear-gradient(
      135deg,
      #22c55e,
      #16a34a
    );

  color:white;

  transform:scale(.98);

  transition:.25s;
}

.jw-primary:disabled{
  opacity:.92;
  cursor:default;
}

.jw-primary.dirty {
  background: linear-gradient(135deg, #f6c453, #f59e0b);
  color: #111827;
}

.jw-primary.saved {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
}

.jw-primary:disabled {
  opacity: .92;
  cursor: default;
}

/* ==========================================
   ACCENT SELECTOR OVERRIDE
   Add at END of file
========================================== */

.jw-color-row{
  gap:16px !important;
  padding:6px 0 10px;
}

.jw-color{

  position:relative !important;

  width:52px !important;
  height:52px !important;

  border-radius:50% !important;

  border:4px solid rgba(255,255,255,.72) !important;

  box-shadow:
    0 8px 18px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(255,255,255,.32) !important;

  transition:.22s ease;
}

.jw-color:hover{
  transform:translateY(-2px);
}

/* ACTIVE */

.jw-color.active{

  outline:4px solid #ffffff !important;

  outline-offset:4px !important;

  transform:scale(1.04);

  box-shadow:
    0 0 0 3px rgba(124,58,237,.95),
    0 14px 28px rgba(124,58,237,.22),
    inset 0 0 0 1px rgba(255,255,255,.55) !important;
}

/* CHECK */

.jw-color.active::after{

  content:"✓";

  position:absolute;

  right:-8px;
  bottom:-8px;

  width:24px;
  height:24px;

  border-radius:50%;

  display:grid;
  place-items:center;

  background:#7C3AED;

  color:#ffffff;

  border:3px solid #ffffff;

  font-size:14px;
  font-weight:950;

  box-shadow:
    0 8px 18px rgba(15,23,42,.25);

  z-index:50;
}

/* LIGHT THEME FIX */

html.light .jw-color,
body.light .jw-color,
body.theme-light .jw-color,
html[data-theme="light"] .jw-color,
body[data-theme="light"] .jw-color,
#jwPageMount.light .jw-color,
#jwPageMount.theme-light .jw-color,
#jwPageMount[data-theme="light"] .jw-color,
.jw-settings-page.light .jw-color,
.jw-settings-page.theme-light .jw-color,
.jw-settings-page[data-theme="light"] .jw-color{

  border-color:#ffffff !important;

  box-shadow:
    0 10px 24px rgba(15,23,42,.14),
    0 0 0 1px rgba(15,23,42,.10),
    inset 0 0 0 1px rgba(255,255,255,.92) !important;
}

html.light .jw-color.active,
body.light .jw-color.active,
body.theme-light .jw-color.active,
html[data-theme="light"] .jw-color.active,
body[data-theme="light"] .jw-color.active,
#jwPageMount.light .jw-color.active,
#jwPageMount.theme-light .jw-color.active,
#jwPageMount[data-theme="light"] .jw-color.active,
.jw-settings-page.light .jw-color.active,
.jw-settings-page.theme-light .jw-color.active,
.jw-settings-page[data-theme="light"] .jw-color.active{

  outline:4px solid #ffffff !important;

  outline-offset:5px !important;

  box-shadow:
    0 0 0 4px rgba(124,58,237,.95),
    0 16px 32px rgba(124,58,237,.20),
    inset 0 0 0 1px rgba(255,255,255,.96) !important;
}

/* =========================
   FINAL ACCENT COLOR FIX
   Use existing values:
   purple, gold, green, rose, slate
========================= */

.jw-color.purple,
button.jw-color.purple {
  background: linear-gradient(135deg, #6D4CFF, #4F6BFF) !important;
}

.jw-color.gold,
button.jw-color.gold {
  background: linear-gradient(135deg, #FFB347, #FF8C1A) !important;
}

.jw-color.green,
button.jw-color.green {
  background: linear-gradient(135deg, #20C997, #14B8A6) !important;
}

.jw-color.rose,
button.jw-color.rose {
  background: linear-gradient(135deg, #C84ACB, #8B5CF6) !important;
}

.jw-color.slate,
button.jw-color.slate {
  background: linear-gradient(135deg, #25324A, #111827) !important;
}

.jw-color.active::after {
  background: var(--accent, #7C3AED) !important;
}

/* =========================
   FINAL DYNAMIC ACCENT FIX
========================= */

.jw-settings-tab.active,
.jw-primary {
  background:
    radial-gradient(130px 90px at 20% 15%, rgba(255,255,255,.25), transparent 55%),
    linear-gradient(135deg, var(--accent, #7C3AED), var(--accent2, #3B82F6)) !important;
}

.jw-choice.active {
  border-color: var(--accent, #7C3AED) !important;
  background:
    radial-gradient(220px 120px at 0% 0%, color-mix(in srgb, var(--accent, #7C3AED) 24%, transparent), transparent 60%),
    var(--panel2) !important;
}

.jw-color.active {
  box-shadow:
    0 0 0 3px var(--accent, #7C3AED),
    0 14px 28px rgba(124,58,237,.22),
    inset 0 0 0 1px rgba(255,255,255,.55) !important;
}

.jw-color.active::after {
  background: var(--accent, #7C3AED) !important;
}

.apple-switch input:checked + i {
  background: var(--accent, #7C3AED) !important;
}

