/* ============================================================
   Cinnamoroll Tasks  —  baby blue pastel student planner
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@400;500;600;700;800&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
  --sky-50: #f6fcff;
  --sky-100: #eaf7ff;
  --sky-150: #e0f2ff;
  --sky-200: #d3ecff;
  --sky-300: #b9e0ff;
  --sky-400: #96cffb;
  --sky-500: #74bcf4;
  --sky-600: #57a4e4;
  --ink: #40638a;
  --ink-soft: #7195b9;
  --ink-faint: #a6c3dc;
  --pink: #ffe1ec;
  --pink-deep: #ffb7d1;
  --mint: #cdf3e4;
  --cream: #fffaf3;
  --white: #ffffff;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;

  --shadow-soft: 0 10px 30px rgba(133, 179, 219, 0.18);
  --shadow-card: 0 14px 38px rgba(124, 173, 218, 0.16);
  --shadow-pop: 0 8px 20px rgba(116, 188, 244, 0.35);
  --border: 2px solid #e2f2ff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #ffffff 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 88% 4%, #e9f8ff 0%, rgba(233, 248, 255, 0) 40%),
    radial-gradient(circle at 50% 100%, #dcefff 0%, rgba(220, 239, 255, 0) 55%),
    linear-gradient(180deg, #dff1ff 0%, #eaf7ff 38%, #f5fbff 100%);
  background-attachment: fixed;
  direction: rtl;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* ---------- decorative sky (stars & clouds) ---------- */
.sky-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sky-deco .star {
  position: absolute;
  color: #ffffff;
  opacity: 0.85;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
  animation: twinkle 5s ease-in-out infinite;
}

.sky-deco .star svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sky-deco .cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 100px;
  filter: blur(0.4px);
  animation: drift 26s linear infinite;
}

.sky-deco .cloud::before,
.sky-deco .cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.sky-deco .cloud::before {
  width: 70%;
  height: 160%;
  top: -70%;
  right: 12%;
}

.sky-deco .cloud::after {
  width: 50%;
  height: 130%;
  top: -50%;
  left: 16%;
}

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.45; }
  50% { transform: scale(1.16) rotate(8deg); opacity: 0.95; }
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-60px); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- page shell ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* ---------- header ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(233, 247, 255, 0.9));
  border: var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  left: -70px;
  top: -90px;
  background: radial-gradient(circle, rgba(255, 214, 232, 0.55), rgba(255, 214, 232, 0));
  border-radius: 50%;
  pointer-events: none;
}

.brand-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 8px 22px rgba(124, 173, 218, 0.35), 0 0 0 3px #d8eeff;
  animation: floaty 5s ease-in-out infinite;
}

.brand-text {
  min-width: 0;
  flex: 1;
}

.brand-text h1 {
  margin: 0;
  font-family: 'Baloo Bhaijaan 2', 'Tajawal', sans-serif;
  font-size: clamp(1.45rem, 4.6vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #4a7aac;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-text h1 .en {
  font-size: 0.72em;
  color: var(--sky-600);
  font-weight: 700;
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip-btn {
  border: 2px solid #dcefff;
  background: #fff;
  color: var(--sky-600);
  border-radius: 999px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s;
  box-shadow: 0 4px 12px rgba(133, 179, 219, 0.14);
  white-space: nowrap;
}

.chip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(133, 179, 219, 0.25);
  background: var(--sky-100);
}

.chip-btn.primary {
  background: linear-gradient(135deg, #a9dcff, #79c0f4);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-pop);
}

/* ---------- nav tabs ---------- */
.tabs-wrap {
  position: sticky;
  top: 8px;
  z-index: 30;
  margin: 16px 0 18px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tab .tab-ico {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.28s ease;
}

.tab:hover {
  background: var(--sky-100);
  color: var(--sky-600);
}

.tab.active {
  background: linear-gradient(135deg, #bfe6ff, #8ecdff);
  color: #33638f;
  box-shadow: 0 6px 16px rgba(116, 188, 244, 0.42);
}

.tab.active .tab-ico {
  transform: scale(1.18) rotate(-6deg);
}

/* ---------- sections & cards ---------- */
.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: pop-in 0.38s ease both;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, #d9f0ff, #bfe3ff, #ffe3ee, #bfe3ff, #d9f0ff);
  background-size: 200% 100%;
  animation: shimmer 9s linear infinite;
  opacity: 0.9;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-head .ico-bubble {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: linear-gradient(150deg, #eaf8ff, #cfe9ff);
  border: 2px solid #e2f3ff;
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.9);
  flex: 0 0 auto;
}

.card-head h2 {
  margin: 0;
  font-family: 'Baloo Bhaijaan 2', 'Tajawal', sans-serif;
  font-size: 1.16rem;
  font-weight: 700;
  color: #4c7cab;
}

.card-head .sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.card-head .spacer { flex: 1; }

.mini-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4a86bb;
  background: var(--sky-100);
  border: 1px solid #d9eeff;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- forms ---------- */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 9px;
  align-items: end;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding-right: 6px;
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid #e2f2ff;
  border-radius: 14px;
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--ink-faint);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 4px rgba(150, 207, 251, 0.28);
  background: #fdffff;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2374bcf4' stroke-width='3' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}

.btn {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 11px 18px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #a9dcff, #78c0f5);
  box-shadow: var(--shadow-pop);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.03); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn.ghost {
  background: #fff;
  color: var(--sky-600);
  border: 2px solid #dcefff;
  box-shadow: 0 4px 12px rgba(133, 179, 219, 0.14);
}

.btn.pink {
  background: linear-gradient(135deg, #ffd9e6, #ffb8d2);
  color: #9c5573;
  box-shadow: 0 8px 18px rgba(255, 183, 209, 0.4);
}

.btn.ghost-danger {
  background: #fff;
  color: #d98ba6;
  border: 2px solid #ffe1ec;
  box-shadow: none;
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 11px;
}

.btn.ghost-danger:hover { background: #fff5f9; }

.btn.tiny {
  padding: 7px 12px;
  font-size: 0.76rem;
  border-radius: 11px;
}

/* ---------- tables ---------- */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 2px solid #e8f4ff;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  min-width: 480px;
}

thead th {
  background: linear-gradient(180deg, #eaf8ff, #dbf0ff);
  color: #4a7dab;
  font-weight: 700;
  font-size: 0.76rem;
  text-align: right;
  padding: 11px 12px;
  white-space: nowrap;
  border-bottom: 2px solid #e5f3ff;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px dashed #eaf5ff;
  color: var(--ink);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.18s;
}

tbody tr:hover { background: #f8fdff; }

tbody tr.done-row td { opacity: 0.55; }
tbody tr.done-row td.subject-cell { text-decoration: line-through; }

td.num {
  font-weight: 700;
  color: var(--sky-600);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--sky-100);
  color: #4a86bb;
  white-space: nowrap;
}

.tag.pink { background: #ffeaf2; color: #c0708f; }
.tag.mint { background: #e3faf1; color: #4f9c7f; }
.tag.cream { background: #fff6e5; color: #b08b4f; }
.tag.lav { background: #f0ecff; color: #7c6bb5; }

.empty-note {
  text-align: center;
  padding: 26px 14px;
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-weight: 600;
}

.empty-note span { font-size: 1.6rem; display: block; margin-bottom: 6px; }

/* ---------- custom checkbox ---------- */
.cute-check {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  border: 2px solid #cfe8fb;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex: 0 0 auto;
  padding: 0;
}

.cute-check:hover { border-color: var(--sky-400); box-shadow: 0 0 0 4px rgba(150, 207, 251, 0.18); }

.cute-check:checked {
  background: linear-gradient(135deg, #a9dcff, #7cc3f6);
  border-color: #7cc3f6;
  box-shadow: 0 4px 10px rgba(116, 188, 244, 0.4);
}

.cute-check:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5 13l4 4L19 7'/></svg>");
  background-size: 15px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- progress ---------- */
.progress {
  height: 14px;
  background: #e9f5ff;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(150, 190, 220, 0.18);
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9dcff, #79c0f4 60%, #ffc2d8);
  background-size: 200% 100%;
  animation: shimmer 6s linear infinite;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress.slim { height: 9px; }

.stat-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

/* ---------- dashboard ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.94);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(124, 173, 218, 0.22);
}

.mini-card .label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.mini-card .big {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #4a7aac;
  line-height: 1.1;
}

.mini-card .small {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 4px;
}

.mini-card.pink-bg { background: linear-gradient(160deg, #fff, #fff3f8); }
.mini-card.mint-bg { background: linear-gradient(160deg, #fff, #f0fdf8); }

/* ---------- prayer grid ---------- */
.prayer-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.prayer-tile {
  background: linear-gradient(165deg, #ffffff, #f2faff);
  border: 2px solid #e4f3ff;
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.prayer-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }

.prayer-tile.next {
  border-color: #ffc9dc;
  background: linear-gradient(165deg, #fff, #fff1f7);
  box-shadow: 0 8px 20px rgba(255, 183, 209, 0.3);
}

.prayer-tile .p-ico { font-size: 1.2rem; }
.prayer-tile .p-name { font-size: 0.8rem; font-weight: 700; color: #4c7cab; margin-top: 3px; }
.prayer-tile input {
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--sky-600);
  padding: 4px;
  font-variant-numeric: tabular-nums;
}
.prayer-tile input:focus { box-shadow: none; background: #fff; border-radius: 9px; }

.week-grid {
  display: grid;
  grid-template-columns: 74px repeat(7, 1fr);
  gap: 4px;
  font-size: 0.72rem;
}

.week-grid .h {
  text-align: center;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 4px 0;
}

.week-grid .row-label {
  font-weight: 700;
  color: #4c7cab;
  display: flex;
  align-items: center;
  font-size: 0.74rem;
}

.week-grid .cell {
  display: grid;
  place-items: center;
  padding: 3px 0;
}

.week-grid .cell .cute-check {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.week-grid .col-today { background: #fff7fb; border-radius: 10px; }

/* ---------- calendar ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cal-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #4a7aac;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-dow {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-faint);
  padding: 4px 0;
}

.cal-day {
  aspect-ratio: 1 / 1;
  border: 2px solid #eef8ff;
  border-radius: 13px;
  background: #fbfeff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  padding: 2px;
}

.cal-day:hover {
  border-color: var(--sky-300);
  background: #f1faff;
  transform: translateY(-2px);
}

.cal-day.muted { color: #cfe2f1; background: transparent; border-color: transparent; cursor: default; }
.cal-day.muted:hover { transform: none; border-color: transparent; background: transparent; }

.cal-day.today {
  background: linear-gradient(150deg, #bfe7ff, #8ecdff);
  color: #fff;
  border-color: #8ecdff;
  box-shadow: 0 6px 16px rgba(116, 188, 244, 0.4);
}

.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-deep);
}

.cal-day.today.has-event::after { background: #fff; }

.cal-day.selected { outline: 3px solid #ffc9dc; outline-offset: 1px; }

.cal-detail {
  margin-top: 12px;
  background: #f7fcff;
  border: 2px dashed #ddefff;
  border-radius: var(--radius-md);
  padding: 12px;
  display: none;
}

.cal-detail.show { display: block; animation: pop-in 0.25s ease both; }
.cal-detail h4 { margin: 0 0 8px; font-size: 0.86rem; color: #4c7cab; }
.cal-events { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.cal-events li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  background: #fff;
  border: 2px solid #eaf6ff;
  border-radius: 12px;
  padding: 7px 10px;
}
.cal-events li span { flex: 1; }

/* ---------- savings jars ---------- */
.jars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.jar {
  background: linear-gradient(165deg, #ffffff, #f6fcff);
  border: 2px solid #e8f4ff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 6px 18px rgba(133, 179, 219, 0.12);
}

.jar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.jar-head .jar-ico { font-size: 1.4rem; }
.jar-head .jar-name { font-weight: 700; font-size: 0.9rem; color: #4c7cab; flex: 1; }

.jar .amounts {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 8px 0 5px;
}

.jar-actions { display: flex; gap: 6px; margin-top: 10px; }
.jar-actions input { padding: 7px 10px; font-size: 0.8rem; border-radius: 11px; }

/* ---------- skincare ---------- */
.routine-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.routine {
  background: linear-gradient(170deg, #fff, #f8fdff);
  border: 2px solid #e8f4ff;
  border-radius: var(--radius-lg);
  padding: 14px;
}

.routine h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #4c7cab;
  display: flex;
  align-items: center;
  gap: 7px;
}

.step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 13px;
  background: #fff;
  border: 2px solid #eff9ff;
  margin-bottom: 6px;
  transition: all 0.18s;
}

.step:hover { border-color: #d9eeff; background: #fbfeff; }

.step .step-name { flex: 1; font-size: 0.84rem; font-weight: 600; }
.step.done .step-name { text-decoration: line-through; color: var(--ink-faint); }

.step .idx {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--sky-100);
  color: var(--sky-600);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}

/* ---------- quran ---------- */
.quran-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.q-card {
  border-radius: var(--radius-lg);
  padding: 14px;
  background: linear-gradient(170deg, #ffffff, #f4fbff);
  border: 2px solid #e8f4ff;
  box-shadow: 0 6px 18px rgba(133, 179, 219, 0.12);
  position: relative;
  overflow: hidden;
}

.q-card::after {
  content: '﷽';
  position: absolute;
  left: 8px;
  top: -4px;
  font-size: 2.6rem;
  color: rgba(185, 224, 255, 0.35);
  pointer-events: none;
}

.q-card .q-surah {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #4a7aac;
}

.q-card .q-range { font-size: 0.76rem; color: var(--ink-soft); font-weight: 600; margin: 2px 0 8px; }

.q-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- goals ---------- */
.goal {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 2px solid #eef8ff;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.18s;
}

.goal:hover { border-color: #d9eeff; box-shadow: var(--shadow-soft); }

.goal-emoji {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: linear-gradient(150deg, #f0faff, #dff1ff);
  flex: 0 0 auto;
}

.goal-body { flex: 1; min-width: 0; }
.goal-title { font-weight: 700; font-size: 0.9rem; color: #4c7cab; }
.goal-sub { font-size: 0.74rem; color: var(--ink-soft); font-weight: 600; margin: 1px 0 6px; }

/* ---------- stats row / dashboard lists ---------- */
.today-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }

.today-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 2px solid #eff9ff;
  border-radius: 13px;
  padding: 9px 11px;
  font-size: 0.84rem;
  font-weight: 600;
}

.today-list li .t-ico { font-size: 1rem; }
.today-list li .t-time {
  margin-right: auto;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--sky-600);
  background: var(--sky-100);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- toast / confetti ---------- */
.toast-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #d9eeff;
  color: #4a7aac;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(124, 173, 218, 0.3);
  animation: toast-in 0.3s ease both;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(12px) scale(0.95); }
}

.toast.out { animation: toast-out 0.3s ease forwards; }

.confetti {
  position: fixed;
  top: -12px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  z-index: 190;
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  to { transform: translateY(105vh) rotate(640deg); opacity: 0.15; }
}

/* ---------- modal ---------- */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(120, 160, 195, 0.32);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-back.show { display: flex; }

.modal {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(90, 135, 175, 0.35);
  padding: 22px;
  max-width: 440px;
  width: 100%;
  animation: pop-in 0.3s ease both;
  max-height: 88vh;
  overflow-y: auto;
}

.modal h3 {
  margin: 0 0 6px;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  color: #4a7aac;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal p { margin: 0 0 14px; font-size: 0.82rem; color: var(--ink-soft); font-weight: 500; line-height: 1.7; }

.modal .modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal .modal-actions .btn { flex: 1; }

.code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sky-100);
  border: 2px dashed #bfe3ff;
  border-radius: 14px;
  padding: 12px;
  font-family: 'Baloo Bhaijaan 2', monospace;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 3px;
  color: #4a86bb;
  justify-content: center;
  direction: ltr;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a9dcff;
  display: inline-block;
}

.sync-dot.on { background: #7ddcb4; box-shadow: 0 0 0 3px rgba(125, 220, 180, 0.25); }

/* ---------- footer ---------- */
.foot {
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 18px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.foot .heart { color: var(--pink-deep); }

/* ---------- responsive ---------- */
@media (max-width: 620px) {
  .app { padding: 12px 11px 30px; }
  .hero { padding: 14px; gap: 12px; border-radius: 26px; }
  .brand-logo { width: 62px; height: 62px; border-width: 3px; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .card { padding: 15px; border-radius: 26px; }
  .card-head h2 { font-size: 1.04rem; }
  .week-grid { grid-template-columns: 60px repeat(7, 1fr); font-size: 0.66rem; }
  .week-grid .cell .cute-check { width: 20px; height: 20px; }
  .cal-day { font-size: 0.72rem; border-radius: 11px; }
  .tab { padding: 8px 12px; font-size: 0.78rem; }
  table { min-width: 430px; }
}

/* mobile card-tables */
@media (max-width: 700px) {
  table.responsive { min-width: 0; }
  .table-scroll.responsive-wrap { overflow-x: visible; border: none; background: transparent; }

  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
    display: block;
    width: 100%;
  }
  table.responsive tr {
    background: #fff;
    border: 2px solid #eaf6ff;
    border-radius: var(--radius-md);
    margin-bottom: 9px;
    padding: 6px 4px;
    box-shadow: 0 4px 12px rgba(133, 179, 219, 0.1);
  }
  table.responsive td {
    border: none;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
  }
  table.responsive td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-faint);
    text-align: right;
    flex: 0 0 auto;
  }
  table.responsive td:empty { display: none; }
  table.responsive td .cell-inner { margin-right: auto; text-align: left; }
}
