/* ===========================
   Focus — upgraded UI (local)
   Works with your existing HTML classes:
   .top-nav, .nav-links, .page, .card, .btn, .habits-grid, .habit-card, etc.
   =========================== */

:root{
  --bg: #0b0f17;
  --panel: rgba(255,255,255,.06);
  --panel-2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --muted-2: rgba(255,255,255,.45);
  --accent: #2563eb; /* blue */
  --accent-2: #22c55e; /* green */
  --danger: #ef4444;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.25);
  --radius: 16px;
  --radius-lg: 22px;
  --ring: 0 0 0 4px rgba(37,99,235,.22);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  color:var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height:1.4;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:4px; }

.page{
  padding: 26px 18px 60px;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
}

/* ===========================
   Top Navigation
   =========================== */
.top-nav{
  position: sticky;
  top: 0;
  z-index: 20;
  display:flex;
  gap:14px;
  align-items:center;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,14,22,.88), rgba(10,14,22,.68));
  border-bottom: 1px solid var(--border);
}

.logo{
  margin:0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.logo::before{
  content:"";
  width:18px; height:18px;
  border-radius: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='32' cy='32' r='28'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%232563eb'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='url(%23g)'%3E%3Cpath d='M32 10c7 0 10 9 5 14s-14 2-14-5 2-9 9-9z'/%3E%3Cpath d='M54 32c0 7-9 10-14 5s-2-14 5-14 9 2 9 9z'/%3E%3Cpath d='M32 54c-7 0-10-9-5-14s14-2 14 5-2 9-9 9z'/%3E%3Cpath d='M10 32c0-7 9-10 14-5s2 14-5 14-9-2-9-9z'/%3E%3Cpath d='M18 18c5-5 14 0 13 7s-9 10-13 6-5-8 0-13z'/%3E%3Cpath d='M46 18c5 5 0 14-7 13s-10-9-6-13 8-5 13 0z'/%3E%3Cpath d='M46 46c-5 5-14 0-13-7s9-10 13-6 5 8 0 13z'/%3E%3Cpath d='M18 46c-5-5 0-14 7-13s10 9 6 13-8 5-13 0z'/%3E%3C/g%3E%3Ccircle cx='32' cy='32' r='7' fill='%23ffffff' fill-opacity='.95'/%3E%3Ccircle cx='32' cy='32' r='4' fill='%232563eb'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat:no-repeat;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}

.nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-left:auto;
}

.nav-links a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.nav-links a:hover{
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,.05);
  border-color: var(--border);
  transform: translateY(-1px);
}

/* ===========================
   Typography helpers
   =========================== */
.muted{ color: var(--muted); }
.small{ font-size: 12px; color: var(--muted); }
h1,h2,h3{ margin: 0 0 12px; }
h2{ font-size: 20px; letter-spacing: .2px; }
h3{ font-size: 16px; }

/* ===========================
   Cards / Sections
   =========================== */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.card + .card{ margin-top: 14px; }

hr{
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
  opacity: .8;
}

/* ===========================
   Buttons / Inputs
   =========================== */
.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
  font-weight: 650;
}
.btn:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.btn:active{ transform: translateY(0px); }
.btn:focus-visible{ outline: none; box-shadow: var(--ring); }
.btn:disabled{ opacity: .6; cursor: not-allowed; transform:none; }

.btn.primary{
  background: linear-gradient(180deg, rgba(37,99,235,.98), rgba(37,99,235,.72));
  border-color: rgba(37,99,235,.75);
  color: #fff;
}
.btn.primary:hover{
  background: linear-gradient(180deg, rgba(37,99,235,1), rgba(37,99,235,.78));
  border-color: rgba(37,99,235,.95);
}

.btn.soft{
  background: rgba(255,255,255,.06);
}

.btn.danger{
  background: linear-gradient(180deg, rgba(239,68,68,.95), rgba(239,68,68,.65));
  border-color: rgba(239,68,68,.7);
}

input, textarea, select{
  font: inherit;
  color: var(--text);
  background: rgba(0,0,0,.18);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  width: 100%;
  transition: box-shadow .12s ease, border-color .12s ease, background .12s ease;
}
input::placeholder, textarea::placeholder{ color: var(--muted-2); }
input:focus, textarea:focus, select:focus{
  outline: none;
  box-shadow: var(--ring);
  border-color: rgba(37,99,235,.65);
  background: rgba(0,0,0,.26);
}

/* ===========================
   Habit Add Row
   =========================== */
.habit-add{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.habit-add input{
  flex: 1;
  min-width: 240px;
}

/* Planned days checkboxes (if present) */
.habit-days{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  margin-top: 10px;
}
.day-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.day-chip input{
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}

/* ===========================
   Habits Grid / Cards
   =========================== */
.habits-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.habit-card{
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-soft);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  position: relative;
  overflow: hidden;
}
.habit-card::before{
  content:"";
  position:absolute;
  inset: 0;
  background: radial-gradient(700px 240px at 10% 10%, rgba(124,58,237,.14), transparent 55%);
  opacity: .9;
  pointer-events:none;
}
.habit-card > *{ position: relative; }

.habit-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
}

.habit-card.done{
  border-color: rgba(34,197,94,.55);
}
.habit-card.done::before{
  background: radial-gradient(700px 240px at 10% 10%, rgba(34,197,94,.16), transparent 55%);
}

.habit-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.habit-top h3{
  margin: 0;
  font-size: 15px;
  letter-spacing: .2px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.14);
  color: var(--muted);
}

.habit-actions{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Streak pill (if you show it) */
.streak-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow-soft);
}
.streak-pill .dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

/* Empty state */
.habits-empty{
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
}

/* ===========================
   Tables (if used in other pages)
   =========================== */
.table{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table th, .table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
}
.table th{
  font-size: 12px;
  letter-spacing: .35px;
  color: var(--muted);
  text-transform: uppercase;
  background: rgba(255,255,255,.04);
}
.table tr:hover td{ background: rgba(255,255,255,.04); }
.table tr:last-child td{ border-bottom: none; }

/* ===========================
   Responsive tweaks
   =========================== */
@media (max-width: 560px){
  .top-nav{ padding: 12px 12px; }
  .page{ padding: 18px 12px 46px; }
  .nav-links{ gap: 6px; }
  .nav-links a{ padding: 7px 10px; }
  .card{ padding: 14px; border-radius: var(--radius); }
}


/* ===========================
   Theme support (Dark / Light)
   =========================== */
:root[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,.04);
  --panel-2: rgba(0,0,0,.06);
  --border: rgba(0,0,0,.10);
  --text: rgba(0,0,0,.88);
  --muted: rgba(0,0,0,.62);
  --muted-2: rgba(0,0,0,.45);
  --shadow: 0 18px 60px rgba(0,0,0,.12);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
}

/* Center the whole app content nicely */
.app{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* Theme toggle button */
.theme-toggle{
  margin-left: 8px;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.theme-toggle .icon{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.2));
  opacity: .9;
}
:root[data-theme="light"] .theme-toggle .icon{
  background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.2));
}

/* Circular progress */
.progress-wrap{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap: wrap;
}
.progress-circle{
  width: 110px;
  height: 110px;
  display:grid;
  place-items:center;
}
.progress-circle svg{ width:110px; height:110px; transform: rotate(-90deg); }
.progress-circle .pct{
  position:absolute;
  font-weight: 800;
  font-size: 18px;
}
.progress-meta{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* Calendar numbers */
.calendar-table{
  width:100%;
  border-collapse: collapse;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow:visible;
}
.calendar-table th{
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .35px;
  padding: 10px 8px;
  background: rgba(255,255,255,.04);
}
.calendar-table td{
  padding: 10px 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  color: var(--muted);
}
:root[data-theme="light"] .calendar-table td{
  border-top: 1px solid rgba(0,0,0,.06);
}
.calendar-table td.day{
  color: var(--text);
  font-weight: 650;
}
.calendar-table td.today{
  color: #fff;
  background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(37,99,235,.65));
}
:root[data-theme="light"] .calendar-table td.today{
  color:#fff;
}

/* Today's work list */
.today-controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.today-controls input{
  flex:1;
  min-width: 240px;
}
.today-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  margin: 8px 0;
  cursor: pointer;
  user-select:none;
}
.today-item.done{
  border-color: rgba(34,197,94,.55);
  background: rgba(34,197,94,.10);
}
.today-item .check{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display:inline-block;
  position: relative;
  flex: 0 0 auto;
}
.today-item.done .check{
  background: rgba(34,197,94,.95);
  border-color: rgba(34,197,94,.95);
}
.today-item.done .check::after{
  content:"";
  position:absolute;
  left:5px; top:2px;
  width:6px; height:10px;
  border:2px solid #fff;
  border-top:0; border-left:0;
  transform: rotate(45deg);
}
.today-item .text{ flex:1; }
.today-item .x{
  opacity:.75;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.today-item .x:hover{
  border-color: var(--border);
  background: rgba(255,255,255,.06);
}

/* ===========================
   Light navbar fixes
   =========================== */
:root[data-theme="light"] .top-nav{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border-bottom: 1px solid rgba(0,0,0,.10);
}
:root[data-theme="light"] .nav-links a{
  color: rgba(0,0,0,.62);
}
:root[data-theme="light"] .nav-links a:hover{
  color: rgba(0,0,0,.90);
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.10);
}
:root[data-theme="light"] .logo{
  color: rgba(0,0,0,.90);
}
:root[data-theme="light"] .btn.theme-toggle{
  background: rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.12);
  color: rgba(0,0,0,.85);
}

/* ===========================
   Calendar: task indicator + hover tooltip bar
   =========================== */
.calendar-table td{
  position: relative;
}
.calendar-table td.has-tasks::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:6px;
  width:26px;
  height:4px;
  border-radius:999px;
  transform: translateX(-50%);
  background: rgba(37,99,235,.92);
  opacity: .9;
}
.calendar-table td.has-tasks:hover::before{
  content: attr(data-tooltip);
  position:absolute;
  left:50%;
  top:-10px;
  transform: translate(-50%, -100%);
  background: rgba(0,0,0,.70);
  color: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.25;
  width: 240px;
  max-width: 240px;
  white-space: pre-wrap;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow-soft);
  z-index: 50;
}
:root[data-theme="light"] .calendar-table td.has-tasks:hover::before{
  background: rgba(0,0,0,.78);
}

/* Home text centering */
.home-center{
  text-align:center;
}

/* Fix calendar tooltip positioning */
.calendar-table td.has-tasks:hover::before{
  left:50%;
  transform: translateX(-50%) translateY(-8px);
  max-width: 260px;
  pointer-events:none;
}

/* ===========================
   Home hero centering
   =========================== */
.card.hero{
  text-align: center;
  padding: 22px 18px;
}
.card.hero h2{
  font-size: 26px;
  letter-spacing: .2px;
}
.card.hero .subtitle{
  margin: 8px auto 0;
  max-width: 720px;
}
.card.hero .today-date{
  margin-top: 12px;
  color: var(--muted);
}

#progressArc{ color: var(--accent); }

/* ===========================
   Goals page + Home goals block
   =========================== */
.goals-toolbar{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.goals-input{
  flex: 1;
  min-width: 260px;
}
.goal-item{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  margin-top: 10px;
}
.goal-item .title{
  font-weight: 700;
}
.goal-item .meta{
  font-size: 12px;
  color: var(--muted);
}
.home-goals{
  text-align: center;
}
#homeGoals{
  margin-top: 10px;
  display:grid;
  gap: 10px;
  justify-items: center;
}
.home-goal-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.05);
  color: var(--text);
  max-width: 820px;
}
.home-goal-pill .dot{
  width:8px; height:8px; border-radius:999px; background: rgba(37,99,235,.92);
}

/* ===========================
   Background consistency fixes
   =========================== */

/* Stop gradient bleed across sections */
.page{
  background: transparent;
}

/* Force clean card background in light mode */
:root[data-theme="light"] .card{
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* Ensure calendar + progress sections don't inherit gradients */
.home-goals,
.progress-wrap,
.calendar-table,
.today-item,
.home-goal-pill{
  background-clip: padding-box;
}

/* Fix month background striping */
.calendar-table tr{
  background: transparent !important;
}
.calendar-table td{
  background: transparent;
}

/* Fix today highlight */
.calendar-table td.today{
  background: rgba(37,99,235,.92);
  color: #fff;
}

/* ===========================
   Quote centering
   =========================== */
.quote-card{
  text-align: center;
}
.quote-card blockquote{
  margin: 0 auto;
  max-width: 720px;
  font-style: italic;
}

#progressArc{ stroke: rgba(37,99,235,.98) !important; }

/* ===========================
   Simple (non-gradient) look
   =========================== */
.card{
  background: rgba(255,255,255,.06);
}
:root[data-theme="light"] .card{
  background: #fff;
}

/* Life goals emphasis */
.home-goal-pill{
  font-weight: 700;
}

/* Date underline */
.today-date{
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 3px solid rgba(37,99,235,.9);
}

/* Hero title color */
.card.hero h2{
  color: rgba(37,99,235,1);
}

/* Today label & date styling */
.today-date{
  font-weight: 700;
  color: #000;
}
.today-date::before{
  content: "Today: ";
  color: rgba(37,99,235,1);
  font-weight: 700;
}

.today-date span.label{
  display:none;
}

/* Quote emphasis */
.quote-card blockquote{
  text-align: center;
  font-weight: 700;
  font-size: 18px;
}

/* Quote new position spacing */
.quote-card{
  margin-top: 8px;
}

/* ===========================
   Navbar quote
   =========================== */
.nav-quote{
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-style: italic;
  color: rgba(37,99,235,0.9);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px){
  .nav-quote{
    display:none;
  }
}

/* ===========================
   Hero: date left + progress right
   =========================== */
.hero-bottom{
  margin-top: 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 18px;
}
.hero-date{ flex: 1; text-align:left; }
.today-line{
  display:inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid rgba(37,99,235,.9);
}
.today-label{ color: rgba(37,99,235,1); font-weight: 800; }
.today-value{ color: #000; font-weight: 800; }
:root[data-theme="dark"] .today-value{ color: rgba(255,255,255,.92); }

.hero-progress{ flex:0 0 auto; }
.hero-progress .progress-wrap{
  margin:0;
  display:flex;
  align-items:center;
  gap: 14px;
}
.hero-progress .progress-meta{ min-width: 180px; }

@media (max-width: 820px){
  .hero-bottom{ flex-direction: column; align-items: stretch; }
  .hero-date{ text-align: center; }
  .today-line{ margin: 0 auto; }
  .hero-progress .progress-meta{ min-width: unset; }
}

/* ===========================
   About: contact zone (blue)
   =========================== */
.contact-card h2{ color: rgba(37,99,235,1); }
.contact-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}
.contact-item{
  border: 1px solid rgba(37,99,235,.22);
  background: rgba(37,99,235,.06);
  border-radius: 14px;
  padding: 12px 12px;
}
.contact-label{
  font-size: 12px;
  color: rgba(37,99,235,.92);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.contact-value{
  margin-top: 6px;
  font-weight: 700;
}
@media (max-width: 820px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* Delete habit button (danger outline) */
.btn.danger.outline{
  background: transparent;
  border: 1px solid rgba(239,68,68,.45);
  color: rgba(239,68,68,1);
}
.btn.danger.outline:hover{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.75);
}

/* Calendar habit status underline colors */

.calendar-table td.day{
  position: relative;
}
.calendar-table td.day::after{
  content:"";
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  bottom: 8px;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: rgba(37,99,235,.9); /* default (fallback) */
  opacity: 0;
}
.calendar-table td.day.habit-all::after{
  background: rgba(34,197,94,1); /* green */
  opacity: 1;
}
.calendar-table td.day.habit-none::after{
  background: rgba(239,68,68,1); /* red */
  opacity: 1;
}
.calendar-table td.day.habit-partial::after{
  background: rgba(245,158,11,1); /* orange */
  opacity: 1;
}

/* ===========================
   Auth pages
   =========================== */
.auth-wrap{
  max-width: 520px;
  margin: 0 auto;
}
.auth-card{
  padding: 22px;
}
.auth-field{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field input{
  padding: 12px 14px;
  border-radius: 14px;
}
.auth-actions{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.logout-btn{
  margin-left: 10px;
}

.radio-group{margin-top:16px;display:flex;flex-direction:column;gap:10px;}
.radio-group label{padding:10px;border:1px solid rgba(37,99,235,.25);border-radius:12px;}

/* Logo link */
.logo a{
  color: inherit;
  text-decoration: none;
}
.logo a:hover{
  text-decoration: underline;
}

/* Life goal clarification tooltip */
.life-goal{
  position: relative;
  cursor: help;
}

.life-goal::after{
  content: attr(data-life-tooltip);
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);
  width: 320px;
  white-space: pre-line;
  background: #ffffff;
  color: #000;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  border: 1px solid rgba(37,99,235,.35);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.life-goal:hover::after{
  opacity: 1;
}

:root[data-theme="dark"] .life-goal::after{
  background: #0f172a;
  color: #e5e7eb;
}

/* Life goal clarification (General Goals) */
.title-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.goal-left{
  display:flex;
  flex-direction: column;
  gap:2px;
}
.life-goal-help{
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.45);
  background: rgba(37,99,235,.10);
  color: rgba(37,99,235,1);
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.life-goal-help:hover{
  background: rgba(37,99,235,.16);
  border-color: rgba(37,99,235,.75);
}
.life-goal-tooltip{
  position: fixed;
  z-index: 9999;
  white-space: pre-line;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,.35);
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  font-size: 13px;
  line-height: 1.55;
}
:root[data-theme="dark"] .life-goal-tooltip{
  background: #0f172a;
  color: #e5e7eb;
  border-color: rgba(37,99,235,.45);
}

/* Language toggle button */
#langToggle{
  margin-left: 10px;
}

/* Settings radio cards */
.radio-card{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding: 12px;
  border: 1px solid rgba(37,99,235,.25);
  border-radius: 14px;
  background: rgba(37,99,235,.05);
  cursor: pointer;
}
.radio-card input{
  margin-top: 4px;
}
.radio-title{
  font-weight: 800;
}

/* RTL tweaks */
:root[dir="rtl"] .top-nav{
  direction: rtl;
}
:root[dir="rtl"] .nav-links a{
  margin-left: 0;
  margin-right: 14px;
}
:root[dir="rtl"] .hero-bottom{
  flex-direction: row-reverse;
}
:root[dir="rtl"] .today-line{
  direction: rtl;
}

/* Responsive mobile */
@media (max-width: 720px){
  .top-nav{flex-wrap:wrap; gap:10px; padding:12px;}
  .nav-left{width:100%; display:flex; justify-content:center;}
  .nav-links{width:100%; display:flex; flex-wrap:wrap; gap:10px; justify-content:center;}
  .page{padding:14px 10px;}
  .app{grid-template-columns:1fr !important;}
  .hero-bottom{flex-direction:column; gap:14px;}
  .calendar-card{overflow-x:auto;}
  .calendar-table{min-width:520px;}
  input, button{font-size:16px;}
  .quote-text{display:none;}
}
/* RTL tweaks */
:root[dir="rtl"] body{direction:rtl;}
:root[dir="rtl"] .hero-bottom{flex-direction:row-reverse;}
:root[dir="rtl"] .today-controls{flex-direction:row-reverse;}
:root[dir="rtl"] .nav-links{justify-content:center;}


/* Admin */
.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width: 900px){.admin-grid{grid-template-columns:1fr}}
textarea.input{min-height:120px;resize:vertical}
.notice{margin-top:10px}
