:root {
    --bg: #eef7f1;
    --bg-2: #dcefe7;
    --surface: rgba(255, 255, 250, 0.88);
    --surface-solid: #fffdf5;
    --surface-muted: #f4fbf6;
    --ink: #10231d;
    --muted: #63756d;
    --muted-2: #8a9a93;
    --line: rgba(20, 62, 51, 0.12);
    --primary: #0b6b57;
    --primary-2: #0f8f73;
    --primary-soft: #d8f2e9;
    --accent: #c79b42;
    --accent-soft: #fff1ca;
    --danger: #b94b4b;
    --danger-soft: #ffe4e1;
    --warning: #b98722;
    --warning-soft: #fff1c4;
    --shadow: 0 24px 70px rgba(17, 57, 45, 0.11);
    --shadow-soft: 0 10px 30px rgba(17, 57, 45, 0.08);
    --radius-lg: 34px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --arabic: "Times New Roman", "Amiri", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% -8%, rgba(15, 143, 115, 0.23), transparent 32rem),
        radial-gradient(circle at 92% 4%, rgba(199, 155, 66, 0.18), transparent 28rem),
        linear-gradient(135deg, var(--bg), var(--bg-2));
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ambient {
    position: fixed;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(18px);
    opacity: .58;
    z-index: -1;
}

.ambient-one {
    width: 280px;
    height: 280px;
    left: -90px;
    top: 180px;
    background: rgba(16, 143, 115, .18);
}

.ambient-two {
    width: 360px;
    height: 360px;
    right: -140px;
    bottom: 40px;
    background: rgba(199, 155, 66, .15);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(22px);
    background: rgba(238, 247, 241, .72);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 28px rgba(11, 107, 87, .24);
    font-family: var(--arabic);
    font-weight: 700;
    font-size: 1.5rem;
}
.logo-mark {
    width: 50px;
    height: 50px;
    padding: 7px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 250, .72);
    border: 1px solid rgba(11, 107, 87, .13);
    box-shadow: 0 12px 24px rgba(11, 107, 87, .13);
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand strong,
.brand small { display: block; line-height: 1.1; }
.brand strong { font-size: .98rem; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .75rem; margin-top: 3px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 250, .58);
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
    transition: .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 12px 24px rgba(11, 107, 87, .18);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
    border-radius: 999px;
}

.page-shell { padding: 34px 0 56px; }

.alert-card {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--warning-soft);
    color: #684d12;
    border: 1px solid rgba(185, 135, 34, .22);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, .78fr);
    gap: 22px;
    margin-bottom: 22px;
}

.hero-card,
.prayer-widget,
.panel,
.stat-card {
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: var(--shadow);
    background: var(--surface);
    backdrop-filter: blur(20px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    padding: clamp(28px, 5vw, 58px);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(221, 243, 233, .92), rgba(255, 253, 245, .82)),
        radial-gradient(circle at 80% 20%, rgba(199, 155, 66, .18), transparent 20rem);
}

.hero-card::after {
    content: "";
    position: absolute;
    right: -46px;
    bottom: -76px;
    width: 420px;
    height: 220px;
    background:
        linear-gradient(to top, rgba(11, 107, 87, .13), rgba(11, 107, 87, 0)),
        repeating-linear-gradient(90deg, transparent 0 42px, rgba(11, 107, 87, .12) 43px 45px);
    border-top-left-radius: 220px;
    transform: skewX(-8deg);
}

.hero-card > * { position: relative; z-index: 1; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.eyebrow.muted { color: var(--muted); }

.hero-card h1,
.page-heading h1 {
    max-width: 760px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.35rem, 5.4vw, 5.35rem);
    line-height: .96;
    letter-spacing: -.075em;
}

.hero-card p,
.page-heading p {
    max-width: 700px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions,
.heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hero-actions { margin-top: 30px; }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.hero-meta span,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.64);
    border: 1px solid var(--line);
    font-size: .86rem;
    font-weight: 700;
}

.hero-meta b { color: var(--primary); margin-right: 4px; }

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    color: var(--ink);
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .nav-link:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(15, 143, 115, .26); outline-offset: 2px; }

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 16px 32px rgba(11, 107, 87, .22);
}

.btn-ghost,
.btn-outline {
    color: var(--primary);
    background: rgba(255,255,250,.72);
    border-color: rgba(11, 107, 87, .18);
}

.btn-small { min-height: 38px; padding: 8px 14px; font-size: .88rem; }
.btn.full { width: 100%; }

.prayer-widget {
    min-height: 390px;
    padding: 28px;
    border-radius: var(--radius-lg);
    color: #fff;
    background:
        radial-gradient(circle at 10% 5%, rgba(255,255,255,.24), transparent 16rem),
        linear-gradient(145deg, #0b6b57, #063d33);
}

.widget-topline,
.section-head,
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.widget-topline {
    color: rgba(255,255,255,.72);
    font-weight: 700;
}

.live-dot {
    color: #0b3d33;
    background: #d9f7e9;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .75rem;
}

.prayer-widget h2 {
    margin: 34px 0 8px;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: .92;
    letter-spacing: -.06em;
}

.prayer-widget p { margin: 0; color: rgba(255,255,255,.72); }

.time-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 26px auto;
}

.time-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.time-ring circle {
    fill: none;
    stroke-width: 9;
    stroke: rgba(255,255,255,.16);
}

.time-ring circle:nth-child(2) {
    stroke: #d9f7e9;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset .4s ease;
}

.time-ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    font-weight: 850;
    letter-spacing: -.04em;
}

.inline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 850;
}

.prayer-widget .inline-link { color: #fff; }

.inline-link::after { content: "→"; transition: transform .18s ease; }
.inline-link:hover::after { transform: translateX(3px); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.compact-stats { margin-top: 22px; }

.stat-card {
    padding: 22px;
    border-radius: var(--radius-md);
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 900;
    font-size: .84rem;
}

.stat-card p {
    margin: 18px 0 6px;
    color: var(--muted);
    font-weight: 750;
    font-size: .9rem;
}

.stat-card h3 {
    margin: 0;
    font-size: 2.05rem;
    line-height: 1;
    letter-spacing: -.055em;
}

.stat-card small {
    margin-left: 5px;
    color: var(--muted-2);
    font-size: .9rem;
    letter-spacing: 0;
}

.dashboard-layout,
.fasting-layout,
.prayer-layout,
.quran-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .68fr);
    gap: 22px;
}

.prayer-layout { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.35fr); }

.panel {
    padding: 26px;
    border-radius: var(--radius-lg);
}

.panel-large { min-width: 0; }

.section-head {
    margin-bottom: 22px;
}

.section-head h2,
.panel h2,
.page-heading h1 {
    margin-top: 0;
}

.section-head h2,
.panel h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 2.2rem);
    letter-spacing: -.045em;
}

.section-desc {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.progress-group { display: grid; gap: 22px; }

.progress-row > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
    color: var(--muted);
    font-weight: 800;
}

.progress-row strong { color: var(--ink); }

.progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 107, 87, .10);
}

.progress-track.tall { height: 16px; margin-bottom: 22px; }

.progress-track span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .28s ease;
}

.mini-calendar-preview {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    margin-top: 26px;
}

.mini-day {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.58);
    padding: 0;
    appearance: none;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border .18s ease, background .18s ease;
}

.mini-day:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.mini-day.done { color: var(--primary); border-color: rgba(11,107,87,.22); background: linear-gradient(145deg, rgba(216,242,233,.98), rgba(255,255,255,.72)); }
.mini-day.excused { color: #7a5a00; border-color: rgba(184,134,11,.22); background: linear-gradient(145deg, rgba(255,241,196,.98), rgba(255,255,255,.72)); }
.mini-day.missed { color: #8a2a22; border-color: rgba(185,64,53,.20); background: linear-gradient(145deg, rgba(255,228,225,.98), rgba(255,255,255,.72)); }
.mini-day.current { color: var(--primary); border-color: rgba(11,107,87,.44); background: linear-gradient(145deg, rgba(216,242,233,.98), rgba(255,255,255,.72)); box-shadow: 0 12px 28px rgba(11,107,87,.12); }
.mini-day.locked { color: rgba(94,111,104,.45); background: rgba(255,255,255,.34); cursor: not-allowed; opacity: .64; }
.mini-day.locked:hover { transform: none; box-shadow: none; }

.daily-card .arabic-text {
    margin: 10px 0 18px;
    font-family: var(--arabic);
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1.55;
    text-align: right;
}

.daily-card p:not(.arabic-text) {
    color: var(--ink);
    line-height: 1.7;
}

.daily-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 24px;
}

.badge-strip,
.achievement-grid,
.surah-cards,
.sunnah-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.badge-card,
.achievement-card,
.surah-cards article,
.sunnah-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.62);
    padding: 18px;
}

.badge-card.locked,
.achievement-card.locked {
    opacity: .58;
    filter: grayscale(.5);
}

.badge-card span,
.achievement-icon,
.surah-cards span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 900;
}

.badge-card strong,
.achievement-card strong,
.surah-cards strong,
.sunnah-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: .98rem;
}

.badge-card small,
.achievement-card small,
.surah-cards small,
.sunnah-card small {
    color: var(--muted);
    line-height: 1.45;
}

.page-heading {
    margin-bottom: 22px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: rgba(255, 253, 245, .58);
    border: 1px solid var(--line);
}

.page-heading h1 {
    font-size: clamp(2.15rem, 5vw, 4.7rem);
}

.field {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.compact-field { min-width: 190px; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, .75);
    resize: vertical;
}

.field-hint {
    color: var(--muted-2);
    font-size: .78rem;
    font-weight: 750;
    line-height: 1.35;
}

select {
    cursor: pointer;
}

.two-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 22px; }
.mb-0 { margin-bottom: 0; }

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
}

.legend-row span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
    background: var(--muted-2);
}
.status-dot.done { background: var(--primary-2); }
.status-dot.excused { background: var(--warning); }
.status-dot.missed { background: var(--danger); }
.status-dot.empty { background: #cad6d1; }

.calendar-grid,
.fasting-grid,
.quran-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.day-card,
.juz-card {
    position: relative;
    min-height: 112px;
    padding: 15px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    transition: transform .18s ease, box-shadow .18s ease, border .18s ease;
}

.day-card:hover,
.juz-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

.day-card.active,
.juz-card.active { border-color: rgba(11,107,87,.44); box-shadow: 0 16px 34px rgba(11,107,87,.12); }

.day-card.today::after {
    content: "Hari ini";
    position: absolute;
    right: 11px;
    top: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: var(--primary);
    font-size: .67rem;
    font-weight: 850;
}

.day-card.done,
.juz-card.done { background: linear-gradient(145deg, rgba(216,242,233,.98), rgba(255,255,255,.72)); }
.day-card.excused { background: linear-gradient(145deg, rgba(255,241,196,.98), rgba(255,255,255,.72)); }
.day-card.missed { background: linear-gradient(145deg, rgba(255,228,225,.98), rgba(255,255,255,.72)); }
.day-card.current { border-color: rgba(11,107,87,.44); background: linear-gradient(145deg, rgba(216,242,233,.98), rgba(255,255,255,.72)); box-shadow: 0 16px 34px rgba(11,107,87,.12); }
.day-card.locked { opacity: .58; cursor: not-allowed; background: rgba(255,255,255,.42); }
.day-card.locked:hover { transform: none; box-shadow: none; }

.day-number,
.juz-number {
    display: block;
    margin-bottom: 12px;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -.055em;
}

.day-card small,
.juz-card small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.day-card .micro,
.juz-card .micro {
    margin-top: 10px;
    font-size: .76rem;
    font-weight: 800;
    color: var(--primary);
}

.sticky-panel {
    align-self: start;
    position: sticky;
    top: 100px;
}

.status-actions { display: grid; gap: 10px; }

.btn-status {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
}

.status-done { color: var(--primary); background: var(--primary-soft); }
.status-excused { color: #7b560b; background: var(--warning-soft); }
.status-missed { color: var(--danger); background: var(--danger-soft); }
.status-empty { color: var(--muted); background: #edf3f0; }

.prayer-focus {
    color: #fff;
    background: linear-gradient(145deg, #0b6b57, #063d33);
}

.prayer-focus .eyebrow,
.prayer-focus small { color: rgba(255,255,255,.68); }
.prayer-focus h2 { color: #fff; margin-bottom: 8px; }
.prayer-focus p { color: rgba(255,255,255,.76); }

.large-clock {
    margin: 30px 0;
    font-size: clamp(3rem, 6vw, 5.4rem);
    line-height: 1;
    letter-spacing: -.075em;
    font-weight: 900;
}

.prayer-list { display: grid; gap: 12px; }

.prayer-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.62);
}

.prayer-item strong { display: block; margin-bottom: 4px; }
.prayer-item small { color: var(--muted); }
.prayer-time { font-size: 1.2rem; font-weight: 900; letter-spacing: -.03em; color: var(--primary); }

.check-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--muted);
    background: #fff;
    font-weight: 900;
}

.check-btn.done {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.sunnah-card {
    min-height: 132px;
}

.sunnah-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.switch {
    width: 46px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #ccd9d3;
    padding: 3px;
}

.switch::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #fff;
    transition: transform .18s ease;
}

.switch.active { background: var(--primary); }
.switch.active::before { transform: translateX(20px); }

.pill.strong {
    color: #fff;
    background: var(--primary);
}

.last-read-panel {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
}

.last-read-panel small { color: var(--muted); font-weight: 800; }
.last-read-panel strong { line-height: 1.45; }

hr {
    height: 1px;
    border: 0;
    margin: 24px 0;
    background: var(--line);
}

.surah-cards article { min-height: 150px; }

.achievement-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
}

.achievement-card .reward {
    margin-top: auto;
    display: inline-flex;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: .8rem;
    font-weight: 900;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 10px;
    z-index: 100;
}

.toast {
    width: min(360px, calc(100vw - 36px));
    padding: 14px 16px;
    border-radius: 18px;
    color: #fff;
    background: #0b3d33;
    box-shadow: var(--shadow);
    animation: toast-in .22s ease;
}

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

@media (max-width: 1020px) {
    .hero-grid,
    .dashboard-layout,
    .fasting-layout,
    .prayer-layout,
    .quran-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .badge-strip,
    .achievement-grid,
    .surah-cards,
    .sunnah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-grid,
    .fasting-grid,
    .quran-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .sticky-panel { position: static; }
}

@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
        padding: 10px;
        background: rgba(255,253,245,.96);
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .nav-link { text-align: center; }
    .page-heading,
    .section-head,
    .widget-topline { flex-direction: column; align-items: stretch; }
    .heading-actions { width: 100%; }
    .heading-actions .btn,
    .heading-actions .field { flex: 1; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 22px, 1180px); }
    .header-inner { height: 70px; }
    .logo-mark {
        width: 44px;
        height: 44px;
        padding: 6px;
        border-radius: 16px;
    }
    .brand {
        gap: 10px;
    }
    .brand strong {
        font-size: .92rem;
    }
    .brand small {
        font-size: .7rem;
    }
    .hero-card,
    .prayer-widget,
    .panel,
    .page-heading { border-radius: 24px; padding: 20px; }
    .hero-card { min-height: auto; }
    .hero-card h1,
    .page-heading h1 { letter-spacing: -.055em; }
    .hero-actions,
    .heading-actions { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .stats-grid,
    .badge-strip,
    .achievement-grid,
    .surah-cards,
    .sunnah-grid { grid-template-columns: 1fr; }
    .calendar-grid,
    .fasting-grid,
    .quran-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mini-calendar-preview { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .prayer-item { grid-template-columns: 1fr auto; }
    .prayer-time { grid-column: 1 / 2; }
    .check-btn { grid-row: 1 / 3; grid-column: 2 / 3; }
    .two-fields { grid-template-columns: 1fr; }
}

.mini-day.current {
    color: var(--primary);
    border-color: rgba(11,107,87,.44);
    background: linear-gradient(145deg, rgba(216,242,233,.98), rgba(255,255,255,.72));
    box-shadow: 0 12px 26px rgba(11,107,87,.12);
}
.mini-day.current::after {
    content: '•';
    display: block;
    line-height: 1;
    font-size: 18px;
    color: var(--primary);
    margin-top: 2px;
}
.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Merge no-DB login additions */
.logout-link {
    color: var(--danger) !important;
    border: 1px solid rgba(185, 75, 75, .18);
    background: rgba(185, 75, 75, .06);
}

.logout-link:hover {
    color: #fff !important;
    background: var(--danger);
}

.success-card {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(11, 107, 87, .22);
}

code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(16, 35, 29, .08);
    color: inherit;
}
