/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --primary: #16234f;
    --primary-dark: #0e1836;
    --primary-light: #eaecf8;

    --danger: #dc2626;
    --danger-light: #fef2f2;
    --success: #16a34a;
    --success-light: #f0fdf4;

    --ink: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;

    --sidebar-bg: #0c1636;
    --sidebar-muted: #97a0c9;
    --sidebar-active: #16234f;

    /* Gold accent + focus treatment, matched from islahimamulat.com's form theme */
    --accent: #c9a227;
    --accent-wash: #faf3e0;
    --accent-soft: #f0e0b0;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px -14px rgba(15, 23, 42, 0.18);
    --shadow-hover: 0 16px 32px -12px rgba(15, 23, 42, 0.22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(1100px 560px at 100% -12%, rgba(22, 35, 79, 0.08), transparent 60%),
        radial-gradient(760px 460px at -8% 10%, rgba(201, 162, 39, 0.07), transparent 55%),
        radial-gradient(900px 520px at 50% 115%, rgba(22, 35, 79, 0.045), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 4px;
}
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }

/* ==========================================================================
   Admin shell: sidebar + topbar
   ========================================================================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    transition: width .2s ease;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    padding: 0 20px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .brand .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.sidebar .brand .brand-text { white-space: nowrap; }

.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-muted);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border-inline-start: 3px solid transparent;
    transition: background .15s, color .15s;
}
.sidebar nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar nav a .nav-label { white-space: nowrap; overflow: hidden; }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; }
.sidebar nav a.active {
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.16), rgba(201, 162, 39, 0.02));
    color: #fff;
    border-inline-start-color: var(--accent);
    font-weight: 600;
}

.sidebar-profile-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 8px 10px; margin-bottom: 4px;
    border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff; background: rgba(255, 255, 255, 0.05);
    font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.sidebar-profile-btn svg { width: 14px; height: 14px; }
.sidebar-profile-btn:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }

.main { flex: 1; min-width: 0; }

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar .page-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content { padding: 32px; max-width: 1760px; }

@media (max-width: 640px) {
    .content { padding: 18px; }
}

/* Lets a hero break out of .content's side padding to read as a true edge-to-edge
   banner, while everything else on the page keeps its normal inset margins. */
.dash-hero-bleed {
    margin-left: -32px;
    margin-right: -32px;
}
@media (max-width: 640px) {
    .dash-hero-bleed { margin-left: -18px; margin-right: -18px; }
}

/* ==========================================================================
   Admin shell: responsive sidebar (mobile/tablet off-canvas drawer)
   ========================================================================== */
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    margin-inline-end: 12px;
}
.sidebar-toggle svg { width: 18px; height: 18px; }
.sidebar-toggle:hover { background: var(--bg); }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity .2s ease;
}
.sidebar-backdrop.visible { opacity: 1; }

/* ==========================================================================
   Admin shell: collapsible sidebar (desktop icon rail)
   ========================================================================== */
@media (min-width: 901px) {
    .sidebar.collapsed { width: 68px; }
    .sidebar.collapsed .brand { justify-content: center; padding-inline: 0; }
    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .nav-group-label,
    .sidebar.collapsed .nav-soon-tag { display: none; }
    .sidebar.collapsed nav { padding-inline: 10px; }
    .sidebar.collapsed nav a { justify-content: center; padding-inline: 0; gap: 0; }

    /* Let content use the width the rail just freed up instead of leaving it empty. */
    .sidebar.collapsed ~ .main .content { max-width: 1922px; }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-hover);
        overflow-y: auto;
    }
    html[dir="rtl"] .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }

    .sidebar-backdrop.visible { display: block; }

    body.sidebar-open { overflow: hidden; }

    .topbar { padding-inline: 18px; gap: 10px; }
}

@media (max-width: 480px) {
    .topbar { padding-inline: 14px; }
    .user-menu-name { display: none; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px;
}

.card ~ .card { margin-top: 20px; }

/* Dashboard-only accent: a warm top edge so secondary cards don't read as
   flat white next to the navy-topped stat/chart cards above them. */
.dash-card { border-top: 3px solid var(--accent); }

.page-header { margin-bottom: 26px; }
.page-header h1 {
    font-size: 26px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-header p { color: var(--muted); margin: 4px 0 0; }
.page-header-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.page-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 6px;
}
.page-header-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.page-header-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ==========================================================================
   Dashboard hero banner (mosque photo + greeting)
   ========================================================================== */
.dash-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 330px;
    padding: 28px 30px;
    margin-bottom: 24px;
    /* border-radius: 18px; */
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    isolation: isolate;
}
/* Background photo lives on its own layer so the zoom can animate via transform
   (scale) instead of background-size — background-size can't tween smoothly
   from the "cover" keyword to a percentage, so it used to jump instead of ease. */
.dash-hero::after {
    content: '';
    position: absolute; inset: 0;
    z-index: 0;
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    transform: scale(1);
    transition: transform 1s cubic-bezier(.25, .8, .25, 1);
    will-change: transform;
}
.dash-hero:hover::after { transform: scale(1.08); }
.dash-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8, 14, 36, 0.08) 0%, rgba(8, 14, 36, 0.32) 45%, rgba(6, 11, 28, 0.88) 100%);
    z-index: 1;
}
.dash-hero-content { position: relative; z-index: 2; max-width: 640px; margin-inline-start: auto; margin-bottom: 34px; }
.dash-hero-content.dash-hero-content--rtl { text-align: right; }

.dash-hero-left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: flex-start;
    gap: 8px;
}
.dash-hero-left .page-eyebrow {
    color: rgba(255, 255, 255, 0.78);
    display: inline-block;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--accent);
    margin-top: 4px;
}
.dash-hero-content h1 {
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}
.dash-hero-content h1.dash-hero-greeting-line {
    direction: rtl;
    unicode-bidi: isolate;
    line-height: 2.3;
    margin: 0 0 8px;
}
.dash-hero-greeting,
.dash-hero-name-ur {
    font-family: 'Noto Nastaliq Urdu', 'Traditional Arabic', serif;
    font-size: 22px;
    font-weight: 700;
}
.dash-hero-name-ur { margin-inline-start: 8px; }
@media (max-width: 600px) {
    .dash-hero-greeting,
    .dash-hero-name-ur { font-size: 17px; }
}
.dash-hero-content p { color: rgba(255, 255, 255, 0.86); margin: 0; font-size: 14px; }

.dash-hero-badges {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.dash-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 14, 36, 0.45);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.dash-hero-pill svg { width: 14px; height: 14px; flex-shrink: 0; }
.dash-hero-pill-accent { color: var(--accent-soft); border-color: rgba(201, 162, 39, 0.4); }
.dash-hero-pill-accent svg { color: var(--accent); }

/* 40-Day Consistency pill — two numbers, no label clutter beyond what's needed
   to tell them apart, sitting in the same pill-stack as the date/streak pills. */
.dash-hero-pill-stats strong { color: #fff; font-weight: 800; }
.dash-hero-pill-sep { width: 1px; height: 12px; background: rgba(201, 162, 39, 0.4); flex-shrink: 0; }

@media (max-width: 600px) {
    .dash-hero { min-height: 210px; padding: 22px 20px; }
    .dash-hero-content h1 { font-size: 22px; }
    .dash-hero-badges { position: static; align-items: flex-start; margin-bottom: 14px; flex-direction: row; flex-wrap: wrap; }
    .dash-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
    .dash-hero-left { flex-direction: row; flex-wrap: wrap; align-items: center; row-gap: 10px; }
    .dash-hero-left .page-eyebrow { flex-basis: 100%; margin-top: 2px; }
    .dash-hero-content { margin-inline-start: 0; }
    .dash-hero-content.dash-hero-content--rtl { align-self: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
    .dash-hero::after { transition: none; }
}

.prayer-widget {
    margin-top: -75px;
    margin-bottom: 24px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    background: linear-gradient(165deg, #fff1c2 0%, #e2b944 35%, #e2b944 65%, #fff1c2 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        inset 0 0 0 1px rgba(255,255,255,.04),
        0 24px 60px -24px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
    perspective: 1400px;
    transform-style: preserve-3d;
    animation: prayerWidgetIn .5s cubic-bezier(.2,.7,.3,1) both;
    transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}
/* A faint gold glow in the top corner, echoing the accent colour without
   reintroducing a full gold card — keeps the panel reading as dark glass.
   border-radius: inherit (rather than clipping the widget with overflow:
   hidden) so the floating .prayer-clock badge, which deliberately sits
   partly outside this box, is never cut off. */
.prayer-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(560px circle at 88% -8%, rgba(201, 162, 39, 0.16), transparent 62%),
        radial-gradient(520px circle at 6% 108%, rgba(125, 179, 255, 0.16), transparent 60%);
    pointer-events: none;
}
.prayer-widget:hover {
    transform: perspective(1400px) rotateX(2deg) rotateY(-1deg) translateY(-3px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 0 1px rgba(255,255,255,.05),
        0 34px 70px -26px rgba(0, 0, 0, 0.65);
}
@keyframes prayerWidgetIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.prayer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
}
.prayer-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    color: #8a6a17;
}
.prayer-location {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 700;
    color: #0f1838;
    font-family: 'Fraunces', Georgia, serif;
}
.prayer-clock {
    position: absolute;
    /* top: -40px; */
    inset-inline-end: 24px;
    z-index: 5;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    color: #3d2a05;
    background: linear-gradient(155deg, #fff1c2 0%, #f3cf6b 45%, #c9a227 100%);
    border: 1px solid #e6c15a;
    border-radius: 20px;
    padding: 10px 22px;
    min-width: 118px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.6),
        0 12px 26px -10px rgba(0, 0, 0, 0.55),
        0 0 22px -6px rgba(243, 207, 107, 0.55);
}
@media (max-width: 480px) {
    .prayer-clock { top: -20px; inset-inline-end: 14px; font-size: 15px; padding: 7px 16px; min-width: 0; }
}
/* Live "time until the next prayer" — styled as a real flip clock: a brushed-gold
   bezel around a dark glass display, split-flap digit cards with a centre hinge
   line, and a flip animation whenever a digit changes. */
.prayer-countdown {
    padding: 4px;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff1c2 0%, #e2b944 28%, #a47a12 52%, #f0cf72 76%, #b98a1a 100%);
    box-shadow:
        0 14px 26px -12px rgba(60, 40, 5, 0.6),
        0 2px 0 rgba(255,255,255,.35) inset,
        0 -2px 3px rgba(90, 60, 5, .35) inset;
}
.prayer-countdown-inner {
    position: relative;
    overflow: hidden;
    padding: 10px 16px 9px;
    border-radius: 12px;
    text-align: center;
    /* background: radial-gradient(120% 140% at 50% 0%, #1f2c5a 0%, #111b3c 55%, #0a1226 100%); */
    box-shadow: inset 0 3px 8px rgba(0,0,0,.65), inset 0 -1px 0 rgba(255,255,255,.06);
}
.prayer-countdown-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 34%, rgba(255,255,255,0) 35%);
}
.prayer-countdown-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111c3e;
    margin-bottom: 7px;
}
.prayer-countdown-label strong { color: #111c3e; font-weight: 900; }
.prayer-countdown-digits { display: inline-flex; align-items: flex-start; gap: 5px; perspective: 400px; position: relative; z-index: 1; }
.prayer-countdown-digits i {
    font-style: normal; font-weight: 700; font-size: 20px; line-height: 40px;
    color: #e2b944; text-shadow: 0 0 8px rgba(226, 185, 68, .55);
}
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cd-unit b {
    position: relative;
    min-width: 46px;
    padding: 0 6px;
    border-radius: 7px;
    font-size: 26px;
    line-height: 40px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #f6f1e0;
    text-shadow: 0 1px 2px rgba(0,0,0,.6);
    background: linear-gradient(180deg, #34437a 0%, #263261 49.5%, #0c1330 50.5%, #17204a 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(0,0,0,.5);
    transform-origin: 50% 50%;
}
/* Hinge line and the two small pins at its ends, as on a split-flap card. */
.cd-unit b::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 2px;
    margin-top: -1px;
    background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(255,255,255,.12));
}
.cd-unit b::after {
    content: '';
    position: absolute;
    left: -2px; top: 50%;
    width: 4px; height: 8px;
    margin-top: -4px;
    border-radius: 2px;
    background: #0a1226;
    box-shadow: 46px 0 0 #0a1226;
}
.cd-unit b.is-flip { animation: cdFlip .38s cubic-bezier(.3, .7, .3, 1); }
@keyframes cdFlip {
    0% { transform: rotateX(-88deg); filter: brightness(.6); }
    100% { transform: rotateX(0); filter: brightness(1); }
}
.cd-unit small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #0c1636; }
@media (max-width: 760px) {
    .prayer-countdown { margin-top: 12px; align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
    .cd-unit b.is-flip { animation: none; }
}
.hijri-date {
    font-size: 13.5px;
    color: #294372;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
}
.next-prayer {
    font-size: 14.5px;
    font-weight: 700;
    color: #076a37;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
    transition: color .2s ease;
}
.next-prayer.is-prohibited { color: #f79b9b; }
.next-prayer::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #076a37;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
    flex-shrink: 0;
    animation: nextPrayerPulse 1.8s ease-in-out infinite;
    transition: background .2s ease;
}
.next-prayer.is-prohibited::before {
    background: #ef4444;
    animation: nextPrayerPulseDanger 1.8s ease-in-out infinite;
}
@keyframes nextPrayerPulseDanger {
    0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.28); }
}
@keyframes nextPrayerPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.28); }
}
.prayer-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    position: relative;
}
.prayer-item {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 14px 14px 12px;
    min-height: 108px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.55);
    transition: transform .2s ease, box-shadow .2s ease;
    opacity: 0;
    animation: prayerItemIn .5s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: calc(var(--i, 0) * 70ms + .15s);
    transform-origin: center;
}
@keyframes prayerItemIn {
    from { opacity: 0; transform: translateY(10px) scale(.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.prayer-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.6);
}

/* A small "sky photo" per prayer, built entirely from CSS gradients (no image files to
   manage): a sky-colour backdrop with atmospheric banding, a glowing sun/moon placed where
   it actually is at that prayer (below the horizon for Fajr, overhead for Zuhr, sinking for
   Asr, on the horizon for Maghrib, replaced by a moon and stars for Isha), a soft vignette
   and film-grain texture for a photographed rather than flat-design feel, and a bottom
   scrim on every tile so the name/time text stays readable over any sky colour. */
.prayer-item[data-prayer="Fajr"] {
    background:
        radial-gradient(circle at 78% 122%, rgba(255,214,180,.9) 0%, rgba(255,190,150,.45) 14%, rgba(255,190,150,0) 34%),
        linear-gradient(180deg, #131f3a 0%, #29406c 30%, #5b7fa6 58%, #a6bfd2 82%, #e0cec3 100%);
}
.prayer-item[data-prayer="Zuhr"] {
    background:
        radial-gradient(circle at 76% 4%, #fffef4 0%, rgba(255,250,220,.75) 7%, rgba(255,250,220,0) 24%),
        linear-gradient(180deg, #144a85 0%, #2c72b0 45%, #5b9bd0 75%, #9cc7e4 100%);
}
.prayer-item[data-prayer="Asr"] {
    background:
        radial-gradient(circle at 70% 36%, #fff7e2 0%, rgba(255,216,145,.8) 13%, rgba(255,180,90,0) 40%),
        linear-gradient(180deg, #2f5c8c 0%, #b3803f 48%, #d98a3f 72%, #e6975a 100%);
}
.prayer-item[data-prayer="Maghrib"] {
    background:
        radial-gradient(circle at 74% 98%, #ffdca0 0%, rgba(255,150,95,.85) 16%, rgba(255,150,95,0) 44%),
        linear-gradient(180deg, #241a3a 0%, #5c3457 32%, #9c4a5e 58%, #cf6a4e 82%, #e8935c 100%);
}
.prayer-item[data-prayer="Isha"] {
    background:
        radial-gradient(circle at 30% 62%, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 1.6%),
        radial-gradient(circle at 55% 78%, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 1.2%),
        radial-gradient(circle at 20% 32%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 1.4%),
        radial-gradient(circle at 85% 45%, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 1%),
        radial-gradient(circle at 62% 58%, rgba(255,255,255,.3) 0%, rgba(255,255,255,0) 1%),
        radial-gradient(circle at 76% 13%, #fbf9f0 0%, rgba(251,249,240,.55) 9%, rgba(251,249,240,0) 25%),
        radial-gradient(circle at 50% 100%, rgba(60,70,120,.35) 0%, rgba(60,70,120,0) 55%),
        linear-gradient(180deg, #0e1836 0%, #0a1128 100%);
}

/* Film grain + a soft vignette on every tile, so the gradients above read as a photographed
   sky rather than flat digital colour. */
.prayer-item::before,
.prayer-item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.prayer-item::before {
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cfilter%20id%3D%27n%27%3E%3CfeTurbulence%20type%3D%27fractalNoise%27%20baseFrequency%3D%270.85%27%20numOctaves%3D%272%27%20stitchTiles%3D%27stitch%27%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D%27100%25%27%20height%3D%27100%25%27%20filter%3D%27url%28%23n%29%27%2F%3E%3C%2Fsvg%3E");
    background-size: 140px 140px;
    mix-blend-mode: overlay;
    opacity: .5;
}
.prayer-item::after {
    background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 45%, rgba(0,0,0,.28) 100%),
                linear-gradient(0deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 50%);
}

/* Above the grain/vignette layer (which is unavoidably last in paint order as an ::after)
   so the text and marker stay crisp instead of being dimmed by it. */
.prayer-item-name, .prayer-item-foot { position: relative; z-index: 1; }

.prayer-item-name { font-size: 16px; font-weight: 700; color: #fff; margin-top: 16px; display: block; }
.prayer-item-foot { display: flex; flex-direction: column; gap: 1px; }
.prayer-item-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.75); }
.prayer-item-time { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.95); }

/* The small ring marker only shows on the currently active (or, lacking one, next) prayer. */
.prayer-item-marker {
    position: absolute; top: 10px; left: 10px; z-index: 1;
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.55);
    display: none;
}

/* A small glyph (crescent, sun, sunset, moon+stars) in the corner of every tile so its
   time-of-day reads instantly, on top of the sky-gradient backdrop. */
.prayer-item-icon {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 1;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}
.prayer-item-icon svg { width: 100%; height: 100%; display: block; }
.prayer-item.active .prayer-item-icon,
.prayer-item.next .prayer-item-icon {
    color: #fff;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}
.prayer-item.active,
.prayer-item.next {
    animation: prayerItemIn .5s cubic-bezier(.34,1.56,.64,1) both, activeGlow 2.4s ease-in-out .6s infinite;
}
.prayer-item.active:hover,
.prayer-item.next:hover {
    transform: translateY(-3px) scale(1.02);
}
.prayer-item.active .prayer-item-marker,
.prayer-item.next .prayer-item-marker {
    display: block;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.35);
}
@keyframes activeGlow {
    0%, 100% { box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.45); }
    50% { box-shadow: 0 14px 28px -10px rgba(15, 23, 42, 0.6), 0 0 0 3px rgba(255,255,255,.3); }
}
@media (max-width: 760px) {
    .prayer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .prayer-header { align-items: flex-start; flex-direction: column; }
    .prayer-clock { min-width: 0; }
}

/* ==========================================================================
   Stat cards (dashboard)
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 1050px) { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The admin dashboard always has exactly 5 stat cards, so the fixed 5-column grid above
   fits it exactly. The Salik (3 cards) and Murabbi (4 cards) dashboard rows use this
   auto-fit variant instead so the cards fill the full row width evenly rather than
   sitting stranded in a handful of a 5-column grid's tracks with empty space beside them. */
.stats-grid.stats-grid-fit { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 420px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--ink);
    text-decoration: none;
    transition: box-shadow .18s ease, border-color .18s ease;
}
/* Only anchor stat-cards are actually clickable — scoping the hover state to
   them avoids implying interactivity on the plain informational ones. */
a.stat-card:hover {
    text-decoration: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}
.stat-card .icon {
    width: 44px; height: 44px; border-radius: 11px;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-card .icon svg { width: 20px; height: 20px; }
.stat-card .value { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
.stat-card .value-sm {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stat-card .label { color: var(--muted); font-size: 13px; margin-top: 3px; font-weight: 500; }
.stat-card .value .value-of { font-size: 15px; font-weight: 600; letter-spacing: normal; color: var(--muted); }
.stat-card > div:last-child { min-width: 0; }

/* Cards that pair a KPI value with a call-to-action button (e.g. "Log Today") —
   the button pins to the row's end instead of stacking under the value, so the
   card fills its width the same way the plain value/label stat cards do. */
.stat-card-body { min-width: 0; }
.stat-card-cta-btn { margin-inline-start: auto; flex-shrink: 0; }
.stat-card.stat-card-cta:hover .stat-card-cta-btn { background: var(--primary-dark); box-shadow: 0 6px 14px -6px rgba(22, 35, 79, 0.5); }
@media (max-width: 480px) {
    .stat-card.stat-card-cta { flex-wrap: wrap; }
    .stat-card-cta-btn { margin-inline-start: 59px; }
}

.stat-card .icon.icon-gold { background: var(--accent-wash); color: var(--accent); }
.stat-card .icon.icon-sky { background: #e0f2fe; color: #0369a1; }
.stat-card .icon.icon-navy { background: var(--primary-light); color: var(--primary); }
.stat-card .icon.icon-indigo { background: #e0e7ff; color: #4338ca; }
.stat-card .icon.icon-green { background: var(--success-light); color: var(--success); }
.stat-card .icon.icon-teal { background: #ccfbf1; color: #0f766e; }
.stat-card .icon.icon-violet { background: #f3e8ff; color: #7e22ce; }

/* Color the card's top edge to match its icon, echoing the prayer widget's
   accent border so stat cards stop reading as flat, identical white tiles. */
.stat-card { border-top: 3px solid var(--border); }
.stat-card.stat-card-navy { border-top-color: var(--primary); }
.stat-card.stat-card-sky { border-top-color: #0369a1; }
.stat-card.stat-card-indigo { border-top-color: #4338ca; }
.stat-card.stat-card-green { border-top-color: var(--success); }
.stat-card.stat-card-gold { border-top-color: var(--accent); }
.stat-card.stat-card-teal { border-top-color: #0f766e; }
.stat-card.stat-card-violet { border-top-color: #7e22ce; }

/* Small uppercase divider label grouping a row of stat cards under a theme
   (e.g. "Content Overview" vs "People") instead of one undifferentiated row. */
.dash-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin: 4px 0 10px;
}

/* "Your Murabbi" stat card — richer than a plain value/label tile, so it opts out of
   the default icon+value flex layout and builds its own contact-row layout instead. */
.stat-card.murabbi-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.murabbi-card-label {
    font-size: 11px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}
.murabbi-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.murabbi-row + .murabbi-row { border-top: 1px solid var(--border); }
.murabbi-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent-soft);
    overflow: hidden;
}
.murabbi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.murabbi-row-info { min-width: 0; }
.murabbi-row-name {
    font-size: 14.5px; font-weight: 700; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.murabbi-row-phone {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 600; color: var(--primary);
    text-decoration: none; margin-top: 2px;
}
.murabbi-row-phone svg { width: 13px; height: 13px; flex-shrink: 0; }
.murabbi-row-phone:hover { text-decoration: underline; }
.murabbi-row-phone.is-muted { color: var(--muted); font-weight: 500; cursor: default; }
.murabbi-row-phone.is-muted:hover { text-decoration: none; }
.murabbi-row-empty { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

/* ==========================================================================
   Dashboard: two-column section + role distribution donut
   ========================================================================== */
/* Actionable warning banner (e.g. unassigned Saliks) that sits between the
   hero and the rest of the dashboard — styled distinctly from the neutral
   cards below so it reads as something to act on, not just another tile. */
.dash-alert-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--accent-wash);
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: var(--ink);
    text-decoration: none;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.dash-alert-banner:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-hover); }
.dash-alert-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--accent);
}
.dash-alert-icon svg { width: 19px; height: 19px; }
.dash-alert-text { flex: 1; font-size: 14px; }
.dash-alert-text strong { font-weight: 700; }
.dash-alert-cta { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Main (activity/actions) column + narrower side (composition charts) column —
   each stacks its own cards vertically, so ordering in markup is independent
   of CSS grid auto-placement. */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
.dash-main-col, .dash-side-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.donut-card { display: flex; flex-direction: column; }
.donut-wrap { display: flex; align-items: center; gap: 24px; margin-top: 8px; }
.donut {
    width: 120px; height: 120px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.35);
}
.donut-hole {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: var(--card);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.donut-hole .total { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1; }
.donut-hole .total-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

.donut-legend { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.donut-legend-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; padding: 8px 2px;
    border-bottom: 1px solid var(--border);
}
.donut-legend-row:last-child { border-bottom: none; }
.donut-legend-row .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-inline-end: 8px; flex-shrink: 0; }
.donut-legend-label { display: flex; align-items: center; color: var(--ink); }
.donut-legend-value { font-weight: 700; color: var(--ink); }

/* ==========================================================================
   Admin dashboard: platform engagement card (combo chart + gauge dials)
   ========================================================================== */
.engagement-card-body { display: flex; gap: 32px; align-items: stretch; }
.engagement-chart-col { flex: 1; min-width: 0; }
.engagement-gauges-col {
    width: 220px; flex-shrink: 0;
    display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 760px) {
    .engagement-card-body { flex-direction: column; }
    .engagement-gauges-col { width: 100%; }
}

.combo-legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.combo-legend-item { display: flex; align-items: center; gap: 6px; }
.combo-legend-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.combo-legend-swatch.combo-legend-bar { background: var(--accent); }
.combo-legend-swatch.combo-legend-line { background: var(--primary); border-radius: 50%; }

.combo-chart-wrap { position: relative; }
.combo-chart { display: block; width: 100%; height: 180px; overflow: visible; }
.combo-bar { fill: var(--accent); opacity: .82; transition: opacity .15s ease; cursor: pointer; }
.combo-bar:hover { opacity: 1; }
.combo-day-label { font-size: 10px; fill: var(--muted); font-weight: 600; }
.combo-line { stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.combo-dot { fill: var(--primary); stroke: #fff; stroke-width: 2; cursor: pointer; }
.combo-tooltip {
    position: absolute;
    transform: translate(-50%, -100%) translateY(-10px);
    background: var(--ink); color: #fff;
    font-size: 11.5px; line-height: 1.6;
    padding: 7px 11px; border-radius: 7px; white-space: nowrap;
    pointer-events: none; box-shadow: var(--shadow-hover); z-index: 5;
}
.combo-tooltip:after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: var(--ink);
}

.gauge-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; }
.gauge-row + .gauge-row { border-top: 1px solid var(--border); }
.gauge-text { min-width: 0; }
.gauge-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.gauge-value { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.gauge-ring-wrap { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.gauge-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--bg); stroke-width: 7; }
.gauge-fill { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.gauge-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--ink); }

/* Second-tier dashboard row: Murabbi workload + most-assigned Mamulat,
   side by side below the main activity/charts grid. */
.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 900px) { .insights-grid { grid-template-columns: 1fr; } }

/* Trailing badge on a .murabbi-row (reused from the Salik "Your Murabbi" card)
   pinned to the row's end, next to the avatar+name it already lays out. */
.murabbi-row-stat { margin-inline-start: auto; flex-shrink: 0; }

.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; padding-bottom: 0; }
.rank-number {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary);
    font-size: 12px; font-weight: 700;
}
.rank-body { flex: 1; min-width: 0; }
.rank-title {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--ink);
    margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-track { display: block; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.rank-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.rank-value { font-size: 14px; font-weight: 700; color: var(--ink); flex-shrink: 0; min-width: 18px; text-align: end; }

/* ==========================================================================
   Murabbi dashboard: today's activity bar, recent activity, pending reviews
   ========================================================================== */
.segbar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.segbar-header h2 { margin: 0; }
.segbar-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none;
}
.segbar-link:hover { text-decoration: underline; }
.segbar-track {
    display: flex; height: 10px; border-radius: 999px; overflow: hidden;
    background: var(--bg);
}
.segbar-seg { height: 100%; }
.segbar-seg-submitted { background: var(--success); }
.segbar-seg-reviewed { background: #0369a1; }
.segbar-seg-pending { background: var(--accent); }
.segbar-legend { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.segbar-legend-item { display: flex; align-items: center; gap: 9px; }
.segbar-legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.segbar-legend-value { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.segbar-legend-text { font-size: 12px; color: var(--muted); }

.recent-pending-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 20px;
}
@media (max-width: 900px) { .recent-pending-grid { grid-template-columns: 1fr; } }

.activity-feed { display: flex; flex-direction: column; }
.activity-feed-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.activity-feed-row:last-child { border-bottom: none; padding-bottom: 0; }
a.activity-feed-row { color: inherit; text-decoration: none; cursor: pointer; }
a.activity-feed-row:hover .activity-feed-name { color: var(--primary); }
.activity-feed-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.activity-feed-icon svg { width: 16px; height: 16px; }
.activity-feed-icon.is-reviewed { background: var(--success-light); color: var(--success); }
.activity-feed-icon.is-submitted { background: #e0f2fe; color: #0369a1; }

/* Shows the Salik's uploaded profile photo when there is one, falling back to
   an initial-letter circle otherwise — same image-or-initial convention as
   .murabbi-avatar / .murabbi-profile-avatar elsewhere in the app. */
.activity-feed-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    font-size: 13px; font-weight: 700;
}
.activity-feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.activity-feed-body { flex: 1; min-width: 0; }
.activity-feed-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.activity-feed-desc { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.activity-feed-time { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

.pending-reviews-card {
    background: var(--accent-wash); border: 1px solid var(--accent-soft);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 10px;
}
.pending-reviews-icon {
    width: 56px; height: 56px; border-radius: 14px; background: var(--card);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); box-shadow: var(--shadow);
}
.pending-reviews-icon svg { width: 26px; height: 26px; }
.pending-reviews-count { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.pending-reviews-sub { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

/* ==========================================================================
   Hijri calendar + upcoming events (Salik dashboard)
   ========================================================================== */
.calendar-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}
@media (max-width: 900px) { .calendar-row { grid-template-columns: 1fr; } }
.calendar-row .card { margin-top: 0; }

.islamic-calendar-card { border-top: 3px solid var(--primary); display: flex; flex-direction: column; }
.islamic-calendar-today {
    font-size: 12.5px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 4px 10px; border-radius: 999px;
    white-space: nowrap;
}
.islamic-calendar-sub { margin: -6px 0 14px; font-size: 12.5px; color: var(--muted); }

.islamic-events-list {
    display: flex; flex-direction: column;
    flex: 1; min-height: 0; overflow-y: auto;
    margin-inline: -8px; padding-inline: 8px;
}
.islamic-event-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 6px; border-bottom: 1px solid var(--border);
    border-radius: 8px;
}
.islamic-event-row:last-child { border-bottom: none; }
.islamic-event-row.is-today { background: var(--accent-wash); border-bottom-color: transparent; }
.islamic-event-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.islamic-event-hijri { font-size: 12px; color: var(--muted); margin-top: 1px; }
.islamic-event-side { text-align: end; flex-shrink: 0; }
.islamic-event-date { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.islamic-event-countdown { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 1px; }
.islamic-event-row.is-today .islamic-event-countdown { color: var(--primary); }

/* Hijri month grid */
.hijri-cal-card { border-top: 3px solid var(--accent); display: flex; flex-direction: column; }
.hijri-cal-year {
    font-size: 12.5px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 4px 10px; border-radius: 999px;
    white-space: nowrap;
}

.hijri-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 6px; }
.hijri-cal-nav-btn {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    border: 1px solid var(--border); background: #fff; color: var(--primary);
    transition: background .15s ease, border-color .15s ease;
}
.hijri-cal-nav-btn:hover { background: var(--bg); border-color: var(--accent); }
.hijri-cal-nav-btn svg { width: 16px; height: 16px; }
.hijri-cal-month-label { text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); }
.hijri-cal-month-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.hijri-cal-today-link {
    display: inline-block; align-self: center;
    font-size: 12px; font-weight: 600; color: var(--primary);
    margin: 0 0 12px; text-decoration: none;
}
.hijri-cal-today-link:hover { text-decoration: underline; }

.hijri-cal-weekdays, .hijri-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hijri-cal-weekdays { margin-bottom: 6px; }
.hijri-cal-weekday {
    text-align: center; font-size: 10px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .03em;
}
.hijri-cal-weekday.is-jumuah { color: var(--accent); }

.hijri-cal-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--bg);
    transition: background .15s ease, box-shadow .15s ease;
}
.hijri-cal-cell.is-empty { background: transparent; }
.hijri-cal-day-num { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1; }
.hijri-cal-greg { font-size: 8.5px; color: var(--muted); margin-top: 3px; }
.hijri-cal-event-dot { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* Order matters here: a day can be Jumu'ah, have an event, and be "today" all at once
   (as seen with day 28 above), so every state below is scoped to :not(.is-today) —
   otherwise a higher-specificity Friday/event tint was silently winning over the navy
   "today" background even though .is-today was declared later in the sheet. */
.hijri-cal-cell.is-jumuah:not(.is-empty):not(.is-today) { background: var(--accent-wash); }
.hijri-cal-cell.has-event:not(.is-today) { background: var(--accent-wash); box-shadow: inset 0 0 0 1.5px var(--accent-soft); cursor: help; }

.hijri-cal-cell.is-today {
    background: linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 10px -4px rgba(22, 35, 79, .5);
}
.hijri-cal-cell.is-today .hijri-cal-day-num { color: #fff; }
.hijri-cal-cell.is-today .hijri-cal-greg { color: rgba(255, 255, 255, .72); }
.hijri-cal-cell.is-today .hijri-cal-event-dot { background: #fff; }

.hijri-cal-cell:not(.is-empty):not(.is-today):hover { box-shadow: inset 0 0 0 1.5px var(--border); }

.hijri-cal-legend { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.hijri-cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.hijri-cal-legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.hijri-cal-legend-swatch.is-today { background: var(--primary); box-shadow: 0 0 0 2px var(--accent); }
.hijri-cal-legend-swatch.has-event { background: var(--accent-wash); box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.hijri-cal-legend-swatch.is-jumuah { background: var(--accent-wash); }

@media (max-width: 400px) {
    .hijri-cal-greg { display: none; }
}

/* ==========================================================================
   Month progress line chart (Salik dashboard)
   ========================================================================== */
.month-progress-card { position: relative; border-top: 3px solid var(--primary); }

.month-progress-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.month-progress-header h2 { margin-bottom: 2px; }
.month-progress-stat { text-align: end; }
.month-progress-stat-value { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1.1; letter-spacing: -0.01em; }
.month-progress-stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.month-progress-explainer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 11px 13px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}
.month-progress-explainer svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--primary); }

.month-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.month-progress-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.month-progress-legend-swatch { flex-shrink: 0; }
.month-progress-legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
}
.month-progress-legend-ring {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2.5px solid var(--primary);
    box-sizing: border-box;
}
.month-progress-legend-ring.is-today { border-color: var(--accent); box-shadow: 0 0 6px 1px rgba(243, 217, 135, .7); }

/* The card itself (.month-progress-card, header, legend) stays plain white like the rest
   of the dashboard, and this panel stays light too — a soft navy/gold-tinted wash rather
   than a solid dark block, so it doesn't break the page's light theme. The chart sits on
   a plain white card *inside* the panel so the line and gridlines stay crisp against it. */
.month-progress-panel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(201, 162, 39, .35);
    background: linear-gradient(135deg, #eef1f9 0%, #f8f4e6 60%, #f6ecd2 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.month-progress-donut, .month-progress-chart { position: relative; }

/* Bounded white card (matching .month-progress-chart-inner's treatment) that the
   ring sits centered in — it stretches to the chart column's height so the ring
   isn't left floating in a tall block of near-empty gradient background. */
.month-progress-donut-card {
    flex-shrink: 0;
    min-width: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 14px -8px rgba(14, 24, 54, .35);
}

.month-progress-donut {
    flex-shrink: 0;
    width: 152px; height: 152px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .35), 0 8px 20px -10px rgba(22, 35, 79, .3);
}
.month-progress-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.month-progress-donut-text {
    position: absolute;
    text-align: center;
    padding: 0 12px;
}
.month-progress-donut-title { font-size: 13.5px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.month-progress-donut-month { font-size: 10px; color: #8a6a17; margin-top: 3px; font-weight: 600; }
.month-progress-donut-frac { font-size: 9.5px; color: #6b5218; margin-top: 6px; line-height: 1.4; }

.month-progress-ring-track { fill: none; stroke: rgba(22, 35, 79, .12); stroke-width: 9; }
.month-progress-ring-fill {
    fill: none;
    stroke: url(#monthProgressRingGrad);
    stroke-width: 9;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(201, 162, 39, .35));
}

.month-progress-chart {
    flex: 1;
    min-width: 260px;
}
.month-progress-chart-inner {
    background: #fff;
    border-radius: 10px;
    padding: 16px 14px 10px;
    box-shadow: 0 4px 14px -8px rgba(14, 24, 54, .35);
}
.month-progress-linechart { width: 100%; height: auto; display: block; overflow: visible; }
.month-progress-gridline { stroke: rgba(22, 35, 79, .09); stroke-width: 1; }
.month-progress-axis-label { font-size: 9.5px; fill: var(--muted); font-weight: 600; }
.month-progress-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.month-progress-point { fill: var(--primary); stroke: #fff; stroke-width: 1.5; }
.month-progress-point.is-today { fill: #fff; stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 0 4px rgba(201, 162, 39, .55)); }

.month-progress-daystrip {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin-top: 12px;
    padding-top: 4px;
    overflow-x: auto;
}
.month-progress-bar {
    flex: 1 0 6px;
    min-width: 6px;
    height: 26px;
    border-radius: 3px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
.month-progress-bar-fill {
    position: absolute;
    inset: auto 0 0 0;
    height: var(--pct);
    background: var(--primary);
    border-radius: 3px;
}
.month-progress-bar.is-future { background: var(--bg); }
.month-progress-bar.is-future .month-progress-bar-fill { display: none; }
.month-progress-bar.is-today { box-shadow: 0 0 0 2px var(--accent); }

@media (max-width: 640px) {
    .month-progress-panel { flex-direction: column; align-items: stretch; }
    .month-progress-donut-card { align-self: center; width: 100%; }
    .month-progress-chart { min-width: 0; width: 100%; }
    .month-progress-chart-inner { padding-inline: 10px; }
}

/* ==========================================================================
   40-Day Consistency — a hero-banner pill on the Dashboard (see
   .dash-hero-pill-stats below) and a compact percentage-only card on History,
   styled after .pending-reviews-card. No chart/grid — numbers only, by request.
   ========================================================================== */
.consistency-mini-card { gap: 14px; }
.consistency-mini-stats { display: flex; align-items: center; gap: 18px; }
.consistency-mini-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.consistency-mini-value { font-size: 26px; font-weight: 800; color: var(--primary); line-height: 1; }
.consistency-mini-value.is-gold { color: var(--accent); }
.consistency-mini-divider { width: 1px; height: 34px; background: var(--accent-soft); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 14px -6px rgba(22, 35, 79, 0.5); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--primary); transform: translateY(-1px); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-outline-danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn-outline-danger:hover { background: var(--danger-light); border-color: var(--danger); transform: translateY(-1px); }

/* WhatsApp's own brand green — kept distinct from the primary navy so the
   "Send To Murabbi" action reads immediately as "opens WhatsApp", the way
   a payment button reads as its provider regardless of the surrounding theme. */
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1DA851; box-shadow: 0 6px 14px -6px rgba(37, 211, 102, 0.5); transform: translateY(-1px); }

.daily-log-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.action-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 6px;
    color: var(--muted); border: 1px solid var(--border); background: #fff;
    margin-inline-end: 6px; cursor: pointer; font: inherit;
}
.action-link:hover { background: var(--bg); text-decoration: none; }
.action-link.danger:hover { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }
.action-link.success:hover { background: var(--success-light); color: var(--success); border-color: #bbf7d0; }
.action-link svg { width: 15px; height: 15px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-card { max-width: 640px; }
.form-card h2 { margin-bottom: 4px; }
.form-card > .hint { display: block; margin-bottom: 22px; font-size: 13px; }

.profile-picture-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}
.profile-picture-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-picture-actions .btn {
    justify-content: center;
    white-space: nowrap;
    background: #fff;
    min-width: 88px;
    height: 34px;
    margin: 0;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}
.profile-picture-preview {
    width: 136px; height: 136px;
    border-radius: 50%;
    background: var(--primary-light) center/cover no-repeat;
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 44px;
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .form-row-3 { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 18px; }
.form-group:last-of-type { margin-bottom: 0; }

label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--ink);
    letter-spacing: 0.005em;
}
.hint { font-weight: 400; color: var(--muted); }
.form-group > p.hint { display: block; margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; }

/* Required-field marker: shown automatically next to any label whose field is required. */
.form-group > label:has(+ input:required)::after,
.form-group > label:has(+ select:required)::after,
.form-group > label:has(+ textarea:required)::after,
.form-group > label:has(+ .searchable-select input:required)::after {
    content: ' *';
    color: var(--danger);
    font-weight: 700;
}

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=tel], select, textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a3aebd; }
input:hover, select:hover, textarea:hover { border-color: #cbd5e1; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-wash);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }

input[readonly], textarea[readonly],
input:disabled, textarea:disabled {
    background: var(--bg);
    color: var(--muted);
    cursor: default;
    opacity: 1;
}
input[readonly]:focus, textarea[readonly]:focus,
input:disabled:focus, textarea:disabled:focus {
    border-color: var(--border);
    box-shadow: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    cursor: pointer;
}

input[type=date] { cursor: pointer; }

.searchable-select { position: relative; }
.searchable-select-input {
    padding-right: 38px;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}
.searchable-select-input:disabled {
    background-image: none;
}
.searchable-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.3);
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}
.searchable-select-option {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--ink);
    cursor: pointer;
}
.searchable-select-option:hover,
.searchable-select-option.is-active {
    background: var(--accent-wash);
}
.searchable-select-empty {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--muted);
}

.checkbox-row {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 13px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.checkbox-row input {
    width: 17px; height: 17px; flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.checkbox-row label { margin: 0; font-weight: 500; cursor: pointer; }

.form-actions {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; }

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.pagination-controls .btn:disabled { opacity: .45; cursor: not-allowed; }
.pagination-info { font-size: 13px; color: var(--muted); font-weight: 500; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
thead th {
    text-align: start;
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.cell-muted { color: var(--muted); }
.actions-cell { white-space: nowrap; text-align: end; }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
a.badge { text-decoration: none; cursor: pointer; }
a.badge:hover { filter: brightness(0.94); }
.badge-admin { background: var(--primary-light); color: var(--primary); }
.badge-murabbi { background: #dbeafe; color: #1d4ed8; }
.badge-salik { background: #dcfce7; color: #15803d; }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-inactive { background: #f1f5f9; color: var(--muted); }
.badge-outline { background: #fff; border: 1px solid var(--border); color: var(--muted); }
.badge-warning { background: var(--accent-wash); color: #92660b; }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13.5px;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-light); color: #15803d; border-color: #bbf7d0; }
.alert-error { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }
.alert ul { margin: 4px 0 0; padding-inline-start: 18px; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ==========================================================================
   Standalone auth pages (login / register / password screens)
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;

    /* Warm ivory + ink + gold theme, matched from islahimamulat.com's auth screens */
    background: #fbfaf3;
    --auth-ink: #16234f;
    --auth-muted: #65667b;
    --auth-border: #dedbcf;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fcfbf8;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(33, 34, 48, 0.08);
    padding: 34px 32px;
    color: var(--auth-ink);
}
.auth-brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 18px; margin-bottom: 22px;
    color: var(--auth-ink);
}
.auth-brand img { width: 40px; height: 40px; border-radius: 50%; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; color: var(--auth-ink); }
.auth-card .subtitle { color: var(--auth-muted); margin: 0 0 22px; font-size: 13.5px; }
.auth-card label { color: var(--auth-ink); }
.auth-card input { border-color: var(--auth-border); }
.auth-card .btn { width: 100%; justify-content: center; padding: 10px 16px; }
.auth-card .btn-primary { background: var(--auth-ink); }
.auth-card .btn-primary:hover { background: #15151f; }
.auth-card a, .auth-footer a { color: var(--accent); }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--auth-muted); }

/* ==========================================================================
   Split-screen auth layout (login)
   ========================================================================== */
.auth-split { min-height: 100vh; display: flex; }

.auth-visual {
    flex: 0 0 44%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(160deg, #1c2f66 0%, #101c46 65%, #080f28 100%);
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(201, 162, 39, 0.35) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
}
.auth-visual::after {
    content: '';
    position: absolute;
    width: 520px; height: 520px;
    top: -160px; right: -180px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.28), transparent 70%);
}
.auth-visual-content { position: relative; z-index: 1; max-width: 360px; text-align: center; }
.auth-visual-logo { width: 200px; height: 200px; border-radius: 50%; margin-bottom: 24px; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.4)); }
.auth-visual h2 { font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; color: #fff; margin: 0; letter-spacing: -0.01em; }
.auth-visual .divider { width: 40px; height: 2px; background: var(--accent); margin: 20px auto; border-radius: 2px; }
.auth-visual .tagline { color: rgba(255, 255, 255, 0.68); font-size: 14.5px; line-height: 1.7; margin: 0; }
.auth-role-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.role-chip {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.auth-panel-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fbfaf3;
    --auth-ink: #16234f;
    --auth-muted: #65667b;
    --auth-border: #dedbcf;
}
.auth-panel { width: 100%; max-width: 380px; color: var(--auth-ink); }
.auth-panel h1 { font-size: 24px; margin-bottom: 6px; color: var(--auth-ink); }
.auth-panel .subtitle { color: var(--auth-muted); margin: 0 0 26px; font-size: 13.5px; }
.auth-panel label { color: var(--auth-ink); }
.auth-panel input { border-color: var(--auth-border); }
.auth-panel .btn { width: 100%; justify-content: center; padding: 11px 16px; }
.auth-panel .btn-primary { background: var(--auth-ink); }
.auth-panel .btn-primary:hover { background: #15151f; }
.auth-panel .btn-primary:disabled { opacity: .65; cursor: default; }
.auth-panel a { color: var(--accent); }
.auth-panel .auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--auth-muted); }

.auth-panel input.icon-email,
.auth-panel input.icon-password {
    padding-inline-start: 40px;
    background-repeat: no-repeat;
    background-position: 13px center;
    background-size: 17px;
}
.auth-panel input.icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a0b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}
.auth-panel input.icon-password {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a0b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
    padding-inline-end: 40px;
}
.input-wrap { position: relative; }
.input-wrap input { width: 100%; }
.input-toggle {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    color: var(--auth-muted);
    cursor: pointer;
    display: flex;
}
.input-toggle:hover { color: var(--auth-ink); }

.auth-panel.auth-panel-wide { max-width: 460px; }

.role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.role-toggle-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.role-toggle-option input {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    pointer-events: none;
}
.role-toggle-option:hover { border-color: #c9c3ac; }
.role-toggle-option.is-selected {
    border-color: var(--accent);
    background: var(--accent-wash);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.role-toggle-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--auth-border);
    color: var(--auth-muted);
}
.role-toggle-icon svg { width: 17px; height: 17px; }
.role-toggle-option.is-selected .role-toggle-icon { background: var(--accent); color: #fff; }
.role-toggle-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.role-toggle-text strong { font-size: 13.5px; color: var(--auth-ink); }
.role-toggle-text small { font-size: 11.5px; color: var(--auth-muted); line-height: 1.3; }

.form-fieldset {
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 16px 16px 2px;
    margin: 0 0 18px;
    min-width: 0;
}
.form-fieldset-title {
    display: flex;
    align-items: center;
    gap: 7px;
    width: auto;
    padding: 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--auth-ink);
    margin: 0 0 14px;
}
.form-fieldset-title svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.form-fieldset .form-group,
.form-fieldset .form-row { margin-bottom: 16px; }

@media (max-width: 420px) {
    .role-toggle { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
    .auth-split { flex-direction: column; }
    .auth-visual { flex: 0 0 auto; padding: 36px 24px; }
    .auth-visual-logo { width: 64px; height: 64px; margin-bottom: 14px; }
    .auth-visual h2 { font-size: 22px; }
    .auth-visual .tagline { display: none; }
    .auth-role-chips { margin-top: 16px; }
    .auth-panel-wrap { padding: 36px 24px; }
}

/* ==========================================================================
   Simple centered page (welcome)
   ========================================================================== */
.center-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
}
.center-page .card { text-align: center; padding: 40px 50px; }

/* ==========================================================================
   Daily Log — form (left) + calendar (top right) + category checklist
   ========================================================================== */
.daily-log-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 960px) {
    .daily-log-layout { grid-template-columns: 1fr; }
}
.daily-log-side .card { position: sticky; top: 20px; }

/* Wake/Sleep time cards — icon + a custom time-picker trigger. This block was
   missing entirely (the SVG icons had no width/height constraint, so they
   rendered at raw intrinsic size — full page width instead of a small icon). */
.time-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.time-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.time-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.time-card-icon {
    width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.time-card-icon svg { width: 20px; height: 20px; }
.time-card-icon.icon-gold { background: var(--accent-wash); color: var(--accent); }
.time-card-icon.icon-navy { background: var(--primary-light); color: var(--primary); }
.time-card-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.time-card-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* The trigger button replacing the old native <input type="time">. */
.time-card-value {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: none; background: none; padding: 0; margin: 0; width: 100%;
    font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
    cursor: pointer; text-align: start;
}
.time-card-value:disabled { color: var(--muted); cursor: not-allowed; }
.time-card-value .tp-caret { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); transition: transform .15s ease; }
.time-card-value.is-open .tp-caret { transform: rotate(180deg); }

/* The dropdown panel: a themed hour / minute / AM-PM picker anchored under the card. */
.time-picker { position: relative; }
.tp-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    z-index: 40;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 16px;
    animation: tpPanelIn .16s ease both;
}
@keyframes tpPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.tp-panel-preview {
    text-align: center; font-size: 20px; font-weight: 800; color: var(--ink);
    font-variant-numeric: tabular-nums; letter-spacing: .02em;
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.tp-panel-cols { display: flex; align-items: stretch; justify-content: center; gap: 8px; }
.tp-col {
    display: flex; flex-direction: column; gap: 2px;
    width: 54px; max-height: 176px; overflow-y: auto;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.tp-col::-webkit-scrollbar { width: 4px; }
.tp-col::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.tp-col-sep { display: flex; align-items: center; font-weight: 700; font-size: 17px; color: var(--muted); padding-top: 2px; }
.tp-item {
    flex-shrink: 0;
    border: none; background: none; padding: 7px 0; border-radius: 8px;
    font-size: 14.5px; font-weight: 600; color: var(--muted);
    font-variant-numeric: tabular-nums;
    cursor: pointer; text-align: center; transition: background-color .12s ease, color .12s ease;
}
.tp-item:hover { background: var(--bg); color: var(--ink); }
.tp-item.is-selected { background: var(--primary); color: #fff; }
.tp-ampm { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.tp-ampm button {
    border: 1px solid var(--border); background: var(--card); padding: 8px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .12s ease;
}
.tp-ampm button:hover { border-color: var(--accent); color: var(--ink); }
.tp-ampm button.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.tp-panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tp-now {
    border: none; background: none; color: var(--primary); font-weight: 700; font-size: 12.5px;
    cursor: pointer; padding: 6px 4px;
}
.tp-now:hover { text-decoration: underline; }
.tp-done {
    border: none; background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
    padding: 8px 18px; border-radius: 8px; cursor: pointer; transition: background-color .12s ease;
}
.tp-done:hover { background: var(--primary-dark); }

.time-duration {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; margin-bottom: 22px; padding: 6px 12px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary); font-size: 12.5px; font-weight: 600;
}

@media (max-width: 480px) { .time-card-grid { grid-template-columns: 1fr; } }

.daily-log-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 700;
    margin: 0 0 6px;
}
.daily-log-date { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.daily-log-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; line-height: 1.5; }

.cal-card { position: relative; overflow: hidden; }
.cal-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
}
.cal-card-icon {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 14px -6px rgba(22, 35, 79, 0.5);
}
.cal-card-icon svg { width: 21px; height: 21px; }
.cal-card-head .daily-log-date { margin: 0 0 2px; }
.cal-card-head .daily-log-hint { margin: 0; }

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cal-nav-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.cal-nav-btn:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); text-decoration: none; }
.cal-nav-btn svg { width: 15px; height: 15px; }
.cal-month-label {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}
.cal-today-jump {
    display: block;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}
.cal-hijri-label {
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-wash);
    border-radius: 999px;
    padding: 5px 10px;
    margin: 0 0 10px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    margin-top: 12px;
}
.cal-weekday {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 10px;
}
.cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 50%;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink);
    text-decoration: none;
    background: var(--bg);
    transition: transform .12s, box-shadow .12s, background .12s;
}
.cal-day:hover { text-decoration: none; transform: scale(1.08); box-shadow: 0 4px 10px -4px rgba(15, 23, 42, 0.35); }
.cal-day.is-empty { visibility: hidden; }
.cal-day.is-future { color: var(--border); background: transparent; pointer-events: none; }
.cal-day.is-future .cal-day-hijri { color: var(--border); }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--primary); font-weight: 700; }
.cal-day.is-selected {
    background: var(--primary) !important;
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(22, 35, 79, 0.6);
    font-weight: 700;
    transform: scale(1.05);
}
.cal-day.is-selected:hover { transform: scale(1.05); }
.cal-day.is-selected .cal-day-dot { background: #fff; }
.cal-day.is-selected .cal-day-hijri { color: rgba(255, 255, 255, 0.75); }

.cal-day-hijri {
    font-size: 8px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1;
    margin-top: 1px;
}
.cal-day.level-3 .cal-day-hijri,
.cal-day.level-4 .cal-day-hijri { color: rgba(255, 255, 255, 0.75); }

/* Sequential single-hue ramp (light -> dark blue) for "mamulat completed that day" density */
.cal-day.level-0 { background: var(--bg); }
.cal-day.level-1 { background: #d7dbf1; }
.cal-day.level-2 { background: #a9b1de; }
.cal-day.level-3 { background: #6b74ab; color: #fff; }
.cal-day.level-4 { background: var(--primary); color: #fff; }

.cal-day-dot {
    position: absolute;
    top: 3px; right: 4px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.8);
}

.cal-legend {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.cal-legend-scale {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.cal-legend-swatch { width: 12px; height: 12px; border-radius: 50%; }
.cal-legend-swatch.level-0 { background: var(--bg); border: 1px solid var(--border); }
.cal-legend-swatch.level-1 { background: #d7dbf1; }
.cal-legend-swatch.level-2 { background: #a9b1de; }
.cal-legend-swatch.level-3 { background: #6b74ab; }
.cal-legend-swatch.level-4 { background: var(--primary); }

.cal-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink);
    background: var(--bg);
    padding: 6px 11px 6px 8px;
    border-radius: 999px;
}
.cal-legend-marker { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; background: #fff; }
.cal-legend-marker.marker-today { box-shadow: inset 0 0 0 1.5px var(--primary); border-color: transparent; }
.cal-legend-marker.marker-selected { background: var(--primary); border-color: var(--primary); }
.cal-legend-marker.marker-reviewed { border-color: var(--border); position: relative; }
.cal-legend-marker.marker-reviewed::after {
    content: '';
    position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: var(--success);
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
}
@media (max-width: 640px) {
    .category-grid { grid-template-columns: 1fr; }
}

.category-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}
.category-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}
.category-card-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.mamul-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.mamul-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.mamul-tab:hover { border-color: var(--primary); }
.mamul-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.mamul-tab-count {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
}
.mamul-tab-count.is-complete { background: var(--success-light); color: var(--success); }
.mamul-tab.is-active .mamul-tab-count { background: rgba(255, 255, 255, 0.2); color: #fff; }
.mamul-tab.is-active .mamul-tab-count.is-complete { background: rgba(255, 255, 255, 0.28); color: #fff; }

@media (max-width: 640px) {
    .mamul-tabbar {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .mamul-tab {
        width: 100%;
        justify-content: space-between;
        text-align: start;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .mamul-tabbar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .mamul-tab {
        width: 100%;
        justify-content: space-between;
        text-align: start;
    }
    .mamul-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Each mamul is one selectable row: a circular checkbox and its Urdu label
   sit on a single line (the checkbox previously had no styling at all, so it
   fell back to a default square box stacked above the wrapped label). */
.mamul-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mamul-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, background-color .15s ease;
}
.mamul-row:hover { border-color: var(--primary-light); background: #fff; }
.mamul-row:has(.circle-checkbox:checked) {
    background: var(--success-light);
    border-color: rgba(22, 163, 74, 0.3);
}
.mamul-row label {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}
.mamul-row .urdu-text {
    font-size: 15.5px;
    line-height: 1.5;
    color: var(--ink);
}
.mamul-row .hint {
    flex-shrink: 0;
    margin-inline-start: 8px;
    font-size: 12px;
    white-space: nowrap;
}
.mamul-row input[type="number"],
.mamul-row input[type="time"] {
    flex-shrink: 0;
    margin-inline-start: auto;
    width: 92px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--ink);
    background: #fff;
}
.mamul-row input[type="number"]:disabled,
.mamul-row input[type="time"]:disabled { background: var(--bg); color: var(--muted); }

/* Custom circular checkbox (the class name already called for one — this was
   the missing piece), rendered as a plain ring that fills solid with a
   checkmark once ticked. */
.circle-checkbox {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 23px;
    height: 23px;
    margin: 0;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.circle-checkbox:hover { border-color: var(--primary); }
.circle-checkbox:checked {
    border-color: var(--success);
    background-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.circle-checkbox:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.circle-checkbox:disabled { opacity: .55; cursor: not-allowed; }

/* ==========================================================================
   Masnoon Dua page hero — the cream/gold "manuscript" palette here is a
   deliberate departure from the app's navy dashboard theme, echoing the
   existing Tasbeeh Counter card so the whole page reads as one Islamic
   reading-room aesthetic rather than another admin panel.
   ========================================================================== */
.masnoon-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid #e8dcc0;
    background: linear-gradient(135deg, #f8f2e3 0%, #f2ead4 55%, #ecdfc0 100%);
    box-shadow: var(--shadow);
    padding: 40px 36px;
    margin-bottom: 22px;
}
.masnoon-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: .6;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2250%22%20height%3D%2250%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23c9a961%22%20stroke-width%3D%221%22%20stroke-opacity%3D%220.55%22%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%2222%22%20height%3D%2222%22/%3E%3Cpolygon%20points%3D%2225%2C6%2044%2C25%2025%2C44%206%2C25%22/%3E%3C/g%3E%3C/svg%3E");
    background-size: 50px 50px;
    mask-image: linear-gradient(115deg, #000 0%, transparent 65%);
    -webkit-mask-image: linear-gradient(115deg, #000 0%, transparent 65%);
}
.masnoon-hero-mosque {
    position: absolute;
    inset-block-end: -18px;
    inset-inline-end: -10px;
    width: 300px;
    height: auto;
    color: #c9a961;
    opacity: .28;
    pointer-events: none;
}
.masnoon-hero-text { position: relative; z-index: 2; max-width: 560px; }
.masnoon-hero-eyebrow {
    display: block;
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 16px;
    color: #a9811d;
    margin-bottom: 8px;
}
.masnoon-hero-text h1 { font-family: 'Fraunces', Georgia, serif; font-size: 32px; margin: 0; color: var(--primary); }
.masnoon-hero-text p { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

@media (max-width: 700px) {
    .masnoon-hero { padding: 30px 24px; }
    .masnoon-hero-mosque { width: 190px; opacity: .18; }
    .masnoon-hero-text { max-width: 100%; }
}
@media (max-width: 480px) {
    .masnoon-hero-mosque { display: none; }
}

/* Reusable ornamental section divider — two fading gold lines around a small
   crescent flourish, echoing the Tasbeeh hero's own divider. */
.masnoon-divider { display: flex; align-items: center; gap: 14px; margin: 26px 2px; }
.masnoon-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #d8c9a0, transparent); }
.masnoon-divider svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.dua-browse-card .segbar-header { margin-bottom: 20px; }
.dua-browse-sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.dua-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.dua-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.dua-cat-card:hover { border-color: var(--accent-soft); box-shadow: var(--shadow); }
.dua-cat-card.is-active { border-color: var(--accent); background: var(--accent-wash); box-shadow: var(--shadow); }
.dua-cat-icon {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.dua-cat-icon svg { width: 19px; height: 19px; }
.dua-cat-card.is-active .dua-cat-icon { background: var(--accent); color: #fff; }
.dua-cat-label { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }

.dua-panel-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.dua-panel-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    background: var(--accent-wash); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.dua-panel-icon svg { width: 17px; height: 17px; }
.dua-panel-head h3 { margin: 0; font-size: 16px; color: var(--ink); }

.dua-card {
    position: relative;
    background: linear-gradient(180deg, #fdfbf6 0%, #f9f4e8 100%);
    border: 1px solid #ece0c2;
    border-radius: var(--radius-sm);
    padding: 22px 24px;
    transition: border-color .15s;
}
.dua-card.is-learned { border-color: var(--success); }

.dua-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dua-card-category {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #8a6a17; background: var(--accent-wash); border: 1px solid var(--accent-soft);
    padding: 4px 10px; border-radius: 999px;
}
.dua-card-actions { display: flex; gap: 6px; }
.dua-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: 999px; border: 1px solid #ece0c2;
    background: rgba(255,255,255,.6); color: var(--muted);
    font-size: 11.5px; font-weight: 600; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.dua-action-btn svg { width: 12px; height: 12px; }
.dua-action-btn:hover { border-color: var(--accent-soft); color: var(--ink); }
.dua-action-btn[data-dua-action="bookmark"].is-on { background: var(--accent); border-color: var(--accent); color: #241a02; }
.dua-action-btn[data-dua-action="bookmark"].is-on svg { fill: currentColor; }
.dua-action-btn[data-dua-action="learned"].is-on { background: var(--success); border-color: var(--success); color: #fff; }

.dua-arabic {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 22px;
    line-height: 2.05;
    color: #1a2e22;
    margin: 0 0 14px;
    text-align: right;
}
.dua-urdu { font-size: 16px; line-height: 2; color: #3a2e14; margin: 0 0 12px; text-align: right; }
.dua-translit { font-style: italic; font-size: 13.5px; color: var(--muted); margin: 0 0 8px; }
.dua-translation { font-size: 14px; color: var(--ink); line-height: 1.6; margin: 0 0 14px; }
.dua-reference {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 700; color: #8a6a17;
    background: var(--accent-wash); border: 1px solid var(--accent-soft);
    padding: 4px 11px; border-radius: 999px;
}
.dua-reference svg { width: 12px; height: 12px; }

.dua-card-divider { display: flex; justify-content: center; margin: 20px 0; }
.dua-card-divider span { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, #d8c9a0, transparent); }

.dua-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 44px 20px;
    color: var(--muted);
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.dua-empty-state svg {
    width: 40px; height: 40px; padding: 10px; box-sizing: content-box;
    color: var(--accent); background: var(--accent-wash); border-radius: 50%;
}
.dua-empty-state p { margin: 0; font-size: 14px; max-width: 340px; }

/* ==========================================================================
   Tasbeeh Counter (Masnoon Dua page) — deliberately minimal: one dhikr
   selected at a time, one big tap target, one Reset. No targets, no undo,
   no custom entries — see resources/views/user/masnoon-dua.blade.php.
   ========================================================================== */
/* ==========================================================================
   Masnoon Tasbeehat page — an illuminated-manuscript look: parchment page with
   embossed arabesque corners, a brushed-gold banner, a frosted-glass counter
   with an ornate medallion, and cards flanked by faded mosque photographs.
   ========================================================================== */
.manuscript-page {
    position: relative;
    margin: -32px;
    padding: 32px 32px 48px;
    min-height: calc(100vh - 78px);
    overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .25 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"),
        radial-gradient(120% 90% at 50% 0%, #fbf6e8 0%, #f4ecd6 55%, #ecdfbf 100%);
}
.manuscript-page::before,
.manuscript-page::after {
    content: '';
    position: absolute;
    top: 0;
    width: 340px; height: 340px;
    background: url('../assets/dist/img/ornament-corner.svg') no-repeat top left / contain;
    opacity: .75;
    pointer-events: none;
}
.manuscript-page::before { left: 0; }
.manuscript-page::after { right: 0; transform: scaleX(-1); }
.manuscript-page > * { position: relative; z-index: 1; }

/* Brushed-gold banner */
.manuscript-page .masnoon-hero {
    border: 1px solid #e9d9a3;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, rgba(120,90,30,.05) 1px 3px),
        linear-gradient(100deg, #c2a769 0%, #ecdcab 22%, #b99d5f 46%, #e8d7a2 70%, #bfa363 100%);
    box-shadow: 0 16px 34px -18px rgba(90, 65, 15, .6), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(90,65,15,.25);
}
.manuscript-page .masnoon-hero-text h1 { color: #1a2247; }
.manuscript-page .masnoon-hero-text p { color: #4a3f22; }
.manuscript-page .masnoon-hero-eyebrow { color: #6b4f10; }
.manuscript-page .masnoon-hero-mosque { color: rgba(255, 246, 214, .75); }

/* Frosted-glass counter */
.manuscript-page .tasbeeh-simple {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(214, 190, 128, .8);
    background: rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 22px 44px -22px rgba(90, 65, 15, .5), inset 0 1px 0 rgba(255,255,255,.8);
}
.manuscript-page .tasbeeh-simple::before {
    content: '';
    position: absolute; inset: 0;
    background: url('../assets/dist/img/masjid-nabavi.jpg') center 42% / cover no-repeat;
    opacity: .14;
    -webkit-mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
    pointer-events: none;
}
.manuscript-page .tasbeeh-simple > * { position: relative; }
.manuscript-page .tasbeeh-simple-select { background: rgba(255,255,255,.5); border-color: #e6d7a8; }
.manuscript-page .tasbeeh-simple-option { color: #5a4a22; border: 1px solid transparent; }
.manuscript-page .tasbeeh-simple-option:hover { border-color: #d9be78; }
.manuscript-page .tasbeeh-simple-option.is-active { background: linear-gradient(180deg, #24336a, #141d40); color: #f6e7b4; border-color: #c9a74f; }

/* Ornate medallion counter */
.manuscript-page .tasbeeh-simple-circle {
    width: 210px; height: 210px;
    background: url('../assets/dist/img/ornament-ring.svg') center / 100% 100% no-repeat;
    border: 0;
    box-shadow: 0 20px 34px -14px rgba(30, 30, 70, .55);
}
.manuscript-page .tasbeeh-simple-count { color: #1a2247; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.manuscript-page .tasbeeh-simple-reset { border-color: #d3b565; color: #6b4f10; background: rgba(255,255,255,.5); }
.manuscript-page .tasbeeh-simple-reset:hover { background: #fff6da; }

/* Cards flanked by faded mosque photographs */
.tasbeehat-list { display: flex; flex-direction: column; gap: 22px; max-width: 860px; margin: 0 auto; }
.tasbeehat-card {
    position: relative;
    overflow: hidden;
    padding: 24px 28px 26px;
    border: 1px solid #e0cd94;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,254,249,.92) 0%, rgba(249,243,226,.92) 100%);
    box-shadow: 0 18px 34px -20px rgba(90, 65, 15, .55), inset 0 0 0 4px rgba(255,255,255,.55), inset 0 0 0 5px rgba(214,190,128,.45);
}
.tasbeehat-card::before,
.tasbeehat-card::after {
    content: '';
    position: absolute; top: 0; bottom: 0;
    width: 22%;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: .42;
    pointer-events: none;
}
.tasbeehat-card::before {
    left: 0;
    background-image: url('../assets/dist/img/masjid-nabavi.jpg');
    background-position: center 40%;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
}
.tasbeehat-card::after {
    right: 0;
    background-image: url('../assets/dist/img/masjid-aqsa.jpg');
    background-position: center 40%;
    -webkit-mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
}
.tasbeehat-card > * { position: relative; z-index: 1; }
.tasbeehat-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tasbeehat-card-top h2 { margin: 0; font-size: 17px; font-weight: 800; color: #1a2247; flex: 1; }
.tasbeehat-urdu-name { font-size: 15px; color: #7a5b12; }
.tasbeehat-number {
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 13px; font-weight: 800;
    color: #6b4f10;
    background: linear-gradient(155deg, #fff1c2 0%, #f3cf6b 60%, #d9ae3a 100%);
    box-shadow: 0 2px 6px -2px rgba(154, 116, 22, .55), inset 0 1px 0 rgba(255,255,255,.6);
}
.tasbeehat-arabic {
    font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
    font-size: 28px; line-height: 2.3; color: #1d2a4d;
    text-align: center; margin: 0;
}
.tasbeehat-divider { display: flex; justify-content: center; margin: 16px 0; }
.tasbeehat-divider span { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, #c9a74f, transparent); }
.tasbeehat-urdu { font-size: 17px; line-height: 2.2; color: #3a2e14; text-align: center; margin: 0; }
@media (max-width: 640px) {
    .manuscript-page { margin: -18px; padding: 18px 18px 36px; }
    .manuscript-page::before, .manuscript-page::after { width: 200px; height: 200px; }
    .tasbeehat-card { padding: 20px 18px 22px; }
    .tasbeehat-card::before, .tasbeehat-card::after { width: 34%; opacity: .4; }
    .tasbeehat-arabic { font-size: 23px; }
    .tasbeehat-urdu { font-size: 15.5px; }
}

/* Masnoon Dua page in the same manuscript look: occasions as a single scrolling row of
   white tiles (the active one dark bronze), and an illuminated empty-state badge. */
.manuscript-page .dua-browse-card {
    background: none; border: 0; box-shadow: none; padding: 0; margin: 26px 0 0;
}
.manuscript-page .dua-browse-card::before { display: none; }
.manuscript-page .dua-browse-card .segbar-header h2 { font-size: 15px; color: #1a2247; }
.manuscript-page .dua-browse-sub { color: #6b5b32; }
.manuscript-page .dua-cat-grid {
    display: flex; gap: 10px; overflow-x: auto;
    padding: 6px 2px 14px; margin-bottom: 16px;
    scrollbar-width: thin; scrollbar-color: #d3b565 transparent;
}
.manuscript-page .dua-cat-grid::-webkit-scrollbar { height: 6px; }
.manuscript-page .dua-cat-grid::-webkit-scrollbar-thumb { background: #d3b565; border-radius: 6px; }
.manuscript-page .dua-cat-card {
    flex: 0 0 116px; min-height: 96px; justify-content: center;
    border: 1px solid #e6dcc0; border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #fbf8ef 100%);
    box-shadow: 0 8px 16px -12px rgba(90, 65, 15, .5);
}
.manuscript-page .dua-cat-card:hover { border-color: #d3b565; }
.manuscript-page .dua-cat-card.is-active {
    border-color: #6b5a34;
    background: linear-gradient(160deg, #5a4d34 0%, #2b2519 100%);
    box-shadow: 0 14px 24px -12px rgba(40, 30, 10, .7), inset 0 1px 0 rgba(255,255,255,.12);
}
.manuscript-page .dua-cat-card.is-active .dua-cat-label { color: #f3e6bf; }
.manuscript-page .dua-cat-icon { background: linear-gradient(155deg, #2a3564, #141d40); color: #e6cd82; }
.manuscript-page .dua-cat-card.is-active .dua-cat-icon { background: linear-gradient(155deg, #3a3120, #17130b); color: #f0d889; box-shadow: 0 0 0 1px rgba(230, 205, 130, .5); }
.manuscript-page .dua-cat-label { color: #1a2247; }
.manuscript-page .dua-panel-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 14px; }
.manuscript-page .dua-panel-icon { background: none; color: #b8933a; width: 24px; height: 24px; }
.manuscript-page .dua-panel-head h3 { font-size: 14px; color: #1a2247; }
.manuscript-page .dua-tab-panel { padding-bottom: 16px; }
.manuscript-page .dua-empty-state {
    margin: 0 16px;
    padding: 56px 24px;
    background: #f3efe4;
    border: 1px solid #e8dfc6;
    border-radius: 12px;
    color: #4a3f22;
    box-shadow: 0 0 0 16px #fff, 0 0 0 17px #eadfc0, 0 22px 36px -22px rgba(90, 65, 15, .5);
}
.manuscript-page .dua-empty-state svg {
    width: 34px; height: 34px; padding: 14px; box-sizing: content-box;
    color: #f0d889;
    background: radial-gradient(circle at 35% 30%, #2f3c74, #0f1633 75%);
    border: 3px solid #d3b565;
    box-shadow: 0 0 0 3px rgba(211, 181, 101, .25), 0 10px 18px -8px rgba(20, 25, 60, .6);
}

/* Tasbeeh counter (base) */
.tasbeeh-simple {
    max-width: 560px;
    margin: 0 auto 32px;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.tasbeeh-simple-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.tasbeeh-simple-icon {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary);
}
.tasbeeh-simple-icon svg { width: 20px; height: 20px; }
.tasbeeh-simple-head h2 { margin: 0; font-size: 17px; }
.tasbeeh-simple-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.tasbeeh-simple-select {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px; margin-bottom: 30px;
}
.tasbeeh-simple-option {
    padding: 10px 8px; border-radius: 8px; border: none; background: none;
    font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background .15s, color .15s, box-shadow .15s;
}
.tasbeeh-simple-option:hover { color: var(--ink); }
.tasbeeh-simple-option.is-active { background: var(--primary); color: #fff; box-shadow: var(--shadow); }

.tasbeeh-simple-stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tasbeeh-simple-active-arabic {
    font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
    font-size: 24px; line-height: 1.7; color: var(--ink); margin: 0 0 22px; max-width: 460px;
}
.tasbeeh-simple-circle {
    width: 200px; height: 200px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, var(--primary), var(--primary-dark) 75%);
    border: 4px solid var(--accent-soft);
    box-shadow: 0 18px 36px -14px rgba(22, 35, 79, 0.55), inset 0 0 0 1px rgba(255,255,255,.06);
    cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
    transition: transform .12s ease;
}
.tasbeeh-simple-circle:active { transform: scale(.96); }
.tasbeeh-simple-circle.is-pulsing { animation: tasbeehPulse .28s ease; }
@keyframes tasbeehPulse {
    0% { transform: scale(1); }
    40% { transform: scale(.94); }
    100% { transform: scale(1); }
}
.tasbeeh-simple-count {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 64px; font-weight: 700; color: #fff; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tasbeeh-simple-active-translation { font-size: 13px; color: var(--muted); max-width: 400px; margin: 26px 0 22px; line-height: 1.6; }

/* Five dhikr in the counter's picker: three across the top, two below. */
.tasbeeh-simple-select { grid-template-columns: repeat(6, 1fr); }
.tasbeeh-simple-option { grid-column: span 2; }
.tasbeeh-simple-option:nth-child(n+4) { grid-column: span 3; }
.tasbeeh-simple-active-arabic.is-long { font-size: 18px; line-height: 2.1; }
.tasbeeh-simple-active-translation.urdu-text { font-size: 15px; line-height: 2.1; max-width: 440px; }


.tasbeeh-simple-reset {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
    background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.tasbeeh-simple-reset svg { width: 13px; height: 13px; }
.tasbeeh-simple-reset:hover { background: var(--danger-light); color: var(--danger); border-color: #fecaca; }

@media (prefers-reduced-motion: reduce) {
    .tasbeeh-simple-circle.is-pulsing { animation: none; }
}

@media (max-width: 480px) {
    .tasbeeh-simple { padding: 22px; }
    .tasbeeh-simple-circle { width: 168px; height: 168px; }
    .tasbeeh-simple-count { font-size: 52px; }
    .tasbeeh-simple-active-arabic { font-size: 20px; }
}

/* ==========================================================================
   Daily Log — spreadsheet-style history grid (one column per mamul)
   ========================================================================== */
.cat-wash-1 { background: var(--accent-wash); color: var(--accent); }
.cat-wash-2 { background: #e0f2fe; color: #0369a1; }
.cat-wash-3 { background: var(--primary-light); color: var(--primary); }
.cat-wash-4 { background: #e0e7ff; color: #4338ca; }
.cat-wash-5 { background: var(--success-light); color: var(--success); }
.cat-wash-6 { background: #fce7f3; color: #be185d; }

.grid-report-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.grid-report {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 12.5px;
}
.grid-report th, .grid-report td {
    border-bottom: 1px solid var(--border);
    border-inline-end: 1px solid var(--border);
    padding: 7px 9px;
    text-align: center;
    white-space: nowrap;
}
.grid-report thead th {
    background: var(--bg);
    font-weight: 700;
    color: var(--ink);
    font-size: 12px;
}
.grid-report .grid-report-cat {
    font-size: 11.5px;
    font-weight: 700;
    padding: 7px 6px;
    white-space: normal;
    font-family: 'Noto Nastaliq Urdu', 'Noto Sans Urdu', serif;
}
.grid-report .grid-report-item {
    width: 84px;
    max-width: 84px;
    min-width: 84px;
    white-space: normal;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    padding: 8px 5px;
    vertical-align: bottom;
    color: var(--muted);
}
.grid-report .urdu-cell { font-family: 'Noto Nastaliq Urdu', 'Noto Sans Urdu', serif; }
.grid-report .grid-report-pin {
    position: sticky;
    left: 0;
    background: var(--card);
    text-align: start;
    z-index: 1;
    box-shadow: 1px 0 0 var(--border);
}
.grid-report thead .grid-report-pin { z-index: 2; background: var(--bg); }
.grid-report tbody tr:nth-child(even) td { background: #fbfaf5; }
.grid-report tbody tr:nth-child(even) .grid-report-pin { background: #fbfaf5; }
.grid-report tbody tr:hover td { background: var(--accent-wash); }
.grid-report tbody tr:hover .grid-report-pin { background: var(--accent-wash); }

.grid-check { color: var(--success); font-weight: 700; font-size: 14px; }
.grid-cross { color: var(--danger); opacity: .5; font-size: 12px; }
.grid-dash { color: var(--muted); opacity: .45; }
.grid-value { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.grid-remarks { max-width: 220px; white-space: normal; text-align: start; }

.remarks-editor { position: relative; }
.remarks-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px dashed var(--primary);
    border-radius: 999px;
    padding: 5px 11px;
    white-space: nowrap;
    user-select: none;
}
.remarks-btn::-webkit-details-marker { display: none; }
.remarks-btn svg { width: 11px; height: 11px; flex-shrink: 0; }
.remarks-btn-filled {
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--border);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    white-space: nowrap;
}
.remarks-editor[open] .remarks-btn { display: none; }
.remarks-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 200px;
    padding-top: 2px;
}
.remarks-form textarea {
    width: 100%;
    font-size: 12.5px;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}
.remarks-form .btn-sm { align-self: flex-end; padding: 5px 13px; font-size: 12px; }

.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* ==========================================================================
   Topbar user menu (avatar + name dropdown, both portals)
   ========================================================================== */
.user-menu { position: relative; }
.user-menu-trigger {
    display: flex; align-items: center; gap: 9px;
    background: none; border: 1.5px solid var(--border); border-radius: 999px;
    padding: 5px 14px 5px 5px; cursor: pointer; font-family: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.user-menu-trigger:hover { border-color: var(--primary); background: var(--bg); }
.user-menu-trigger[aria-expanded="true"] { border-color: var(--primary); background: var(--primary-light); }
.user-menu-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--accent);
    overflow: hidden;
}
.user-menu-avatar img,
.user-menu-panel-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.user-menu-name {
    font-size: 13.5px; font-weight: 600; color: var(--ink);
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-chevron { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.user-menu-trigger[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }

.user-menu-panel {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
    width: 232px; background: var(--sidebar-bg);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: 20px 14px 14px; z-index: 40;
}
.user-menu-panel-head {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    margin-bottom: 18px;
}
.user-menu-panel-avatar {
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--sidebar-active); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 21px; margin-bottom: 10px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 0 5px var(--accent);
    overflow: hidden;
}
.user-menu-panel-name {
    color: #fff; font-weight: 700; font-size: 14.5px; line-height: 1.3;
    max-width: 195px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu-panel-role { color: var(--sidebar-muted); font-size: 12px; margin-top: 3px; text-transform: capitalize; }

.auth-page, .auth-panel-wrap { position: relative; }

/* ==========================================================================
   3D depth + motion (stat cards, donuts, charts)
   ========================================================================== */
.stats-grid { perspective: 1000px; }
a.stat-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
a.stat-card:hover {
    transform: perspective(700px) rotateX(4deg) translateY(-5px);
    box-shadow: 0 22px 36px -16px rgba(15, 23, 42, 0.35);
}
a.stat-card:active { transform: perspective(700px) rotateX(1deg) translateY(-1px); }

.donut-card { perspective: 900px; }
.donut {
    animation: donutPop .7s cubic-bezier(.22,1.4,.42,1) both;
    transition: transform .3s ease, box-shadow .3s ease;
    transform-style: preserve-3d;
}
.donut:hover {
    transform: rotateY(10deg) rotateX(-6deg) scale(1.04);
    box-shadow: 0 18px 30px -12px rgba(15, 23, 42, 0.45);
}
@keyframes donutPop {
    from { opacity: 0; transform: scale(.75) rotateY(30deg); }
    to { opacity: 1; transform: scale(1) rotateY(0); }
}

.month-progress-card {
    transition: transform .25s ease, box-shadow .25s ease;
}
.month-progress-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.month-progress-panel { animation: radialFadeUp .5s ease both; }
@keyframes radialFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.month-progress-donut {
    opacity: 0;
    animation: ringPop .45s cubic-bezier(.34,1.56,.64,1) .1s both;
}
@keyframes ringPop {
    from { opacity: 0; transform: scale(.8); }
    to { opacity: 1; transform: scale(1); }
}
.month-progress-line, .month-progress-point {
    opacity: 0;
    animation: chartFadeIn .5s ease .2s both;
}
@keyframes chartFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    a.stat-card, .donut, .month-progress-card,
    .month-progress-panel, .month-progress-donut, .month-progress-line, .month-progress-point,
    .prayer-widget, .prayer-item, .prayer-item.active, .prayer-item.next, .next-prayer::before {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ==========================================================================
   Seerat-un-Nabi (Salik-only) — manuscript treatment matching Masnoon Dua /
   Masnoon Tasbeehat / Quran Pak: parchment page, gold-framed cards, each
   topic banner in the same emerald-and-gold language as a surah heading.
   ========================================================================== */
.seerah-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}
.seerah-tab {
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid #d9c37e;
    background: linear-gradient(180deg, #fffdf6 0%, #f8f1da 100%);
    color: #5a4a22;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.seerah-tab:hover { border-color: #c9a74f; transform: translateY(-1px); }
.seerah-tab.is-active {
    background: linear-gradient(160deg, #0f6248 0%, #0a4534 100%);
    border-color: #0a4534;
    color: #f6e7b4;
    box-shadow: 0 10px 18px -10px rgba(10, 69, 52, .5);
}
.seerah-panel[hidden] { display: none; }

.seerah-explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.seerah-explore-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #d9c37e;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdf6 0%, #f8f1da 100%);
    box-shadow: 0 10px 20px -16px rgba(70, 50, 8, .5);
    cursor: pointer;
    text-align: start;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.seerah-explore-item:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -16px rgba(70, 50, 8, .55); border-color: #c9a74f; }
.seerah-explore-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, #2a3564, #141d40);
    color: #e6cd82;
}
.seerah-explore-icon svg { width: 19px; height: 19px; }
.seerah-explore-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.seerah-explore-title { font-size: 14px; font-weight: 700; color: #1a2247; }
.seerah-explore-sub { font-size: 12px; color: #8a7238; }
.seerah-explore-chevron { width: 16px; height: 16px; color: #a4801f; flex-shrink: 0; transition: transform .15s ease; }

.seerah-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 56px 24px;
    margin: 0 16px;
    background: #f3efe4;
    border: 1px solid #e8dfc6;
    border-radius: 12px;
    color: #4a3f22;
    box-shadow: 0 0 0 16px #fff, 0 0 0 17px #eadfc0, 0 22px 36px -22px rgba(90, 65, 15, .5);
}
.seerah-empty-state svg {
    width: 34px; height: 34px; padding: 14px; box-sizing: content-box;
    color: #f0d889;
    background: radial-gradient(circle at 35% 30%, #2f3c74, #0f1633 75%);
    border: 3px solid #d3b565;
    box-shadow: 0 0 0 3px rgba(211, 181, 101, .25), 0 10px 18px -8px rgba(20, 25, 60, .6);
}
.seerah-empty-state p { margin: 0; font-size: 14px; max-width: 340px; }

.seerah-topic { max-width: 860px; margin: 0 auto 28px; }
.seerah-topic-banner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 24px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(160deg, #0f6248 0%, #0a4534 60%, #072b21 100%);
    box-shadow: inset 0 0 0 1px rgba(230, 205, 130, .4);
}
.seerah-topic-banner h2 { margin: 0; font-size: 19px; font-weight: 700; color: #f6e7b4; }
.seerah-topic-banner-ur { font-size: 17px; color: #e6cd82; }
.seerah-topic-body {
    padding: 26px 28px 30px;
    background: linear-gradient(180deg, #fffdf6 0%, #f8f1da 100%);
    border: 1px solid #d9c37e;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 30px -20px rgba(70, 50, 8, .5);
}
.seerah-paragraph { font-size: 15.5px; line-height: 1.9; color: #3a2e14; margin: 0 0 18px; }
.seerah-paragraph:last-child { margin-bottom: 0; }
.seerah-rich-text p { margin: 0 0 18px; }
.seerah-rich-text p:last-child { margin-bottom: 0; }
.seerah-rich-text ul, .seerah-rich-text ol { margin: 0 0 18px; padding-inline-start: 26px; }
.seerah-rich-text ul:last-child, .seerah-rich-text ol:last-child { margin-bottom: 0; }
.seerah-rich-text a { color: inherit; text-decoration: underline; }
.seerah-rich-text img { max-width: 100%; border-radius: 6px; margin: 10px 0; }

.seerah-hadees-block {
    padding: 18px 20px;
    margin: 0 0 18px;
    border-radius: 10px;
    background: #fbf7ec;
    border: 1px solid #e6d7a8;
}
.seerah-hadees-block:last-child { margin-bottom: 0; }
.seerah-hadees-arabic {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 19px; line-height: 1.9; color: #14301f; text-align: center; margin: 0 0 10px;
}
.seerah-hadees-urdu { font-size: 15px; line-height: 1.9; color: #3a2e14; text-align: center; margin: 0 0 10px; }
.seerah-hadees-ref { display: block; text-align: center; font-size: 12px; font-weight: 700; color: #8a7238; }

@media (max-width: 640px) {
    .seerah-topic-banner { padding: 14px 18px; flex-direction: column; align-items: flex-start; gap: 4px; }
    .seerah-topic-body { padding: 20px 18px 24px; }
    .seerah-hadees-arabic { font-size: 17px; }
}

/* ==========================================================================
   Public landing page (guest homepage — Home / About / Features / CTA)
   ========================================================================== */
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 10px; }
.btn-outline-invert { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.4); backdrop-filter: blur(6px); }
.btn-outline-invert:hover { background: rgba(255, 255, 255, 0.18); border-color: #fff; }
/* Gold accent CTA — used consistently as the single "primary action" color
   across the landing page, since --primary navy disappears against the
   navy-toned hero/CTA photography it sits on. */
.btn-accent { background: var(--accent); color: #241a02; }
.btn-accent:hover { background: #b8901f; box-shadow: 0 8px 18px -8px rgba(201, 162, 39, 0.65); transform: translateY(-1px); }

.landing-body { background: var(--card); }
.landing-skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.landing-skip-link:focus { left: 0; }

.section-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Urdu/Arabic inline runs need an explicit font in the stack — Inter and
   Fraunces have no Arabic-script glyphs, so without this Chromium/most
   desktop browsers render notdef tofu boxes instead of silently falling
   back to the Google-Fonts Nastaliq/Naskh faces already on the page. */
.urdu-text { font-family: 'Noto Nastaliq Urdu', 'Noto Sans Urdu', serif; }
.arabic-inline { font-family: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif; }

/* --- Nav --- */
.landing-nav {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(180deg, rgba(6, 11, 28, 0.55) 0%, rgba(6, 11, 28, 0) 100%);
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease, backdrop-filter .25s ease;
    border-bottom: 1px solid transparent;
}
.landing-nav.is-scrolled { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-color: var(--border); box-shadow: var(--shadow); }
.landing-nav-inner {
    max-width: 1180px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; gap: 24px;
}
.landing-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; }
.landing-brand img { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.landing-brand span { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 17px; color: var(--ink); }
.landing-nav:not(.is-scrolled) .landing-brand span { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.landing-nav-links { display: flex; align-items: center; gap: 28px; }
.landing-nav-links a {
    font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink);
    padding: 6px 2px; border-bottom: 2px solid transparent;
}
.landing-nav:not(.is-scrolled) .landing-nav-links a { color: rgba(255, 255, 255, 0.9); }
.landing-nav-links a:hover { border-color: var(--accent); }
.landing-nav-actions { display: flex; align-items: center; gap: 10px; }
.landing-nav:not(.is-scrolled) .landing-nav-actions .btn-outline { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.4); }
.landing-nav:not(.is-scrolled) .landing-nav-actions .btn-outline:hover { background: rgba(255,255,255,.18); }
.landing-nav-toggle {
    display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--ink);
}
.landing-nav:not(.is-scrolled) .landing-nav-toggle { color: #fff; }
.landing-nav-toggle svg { width: 24px; height: 24px; }
.landing-nav-mobile {
    display: none; flex-direction: column; gap: 4px;
    background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 10px 24px 18px;
}
.landing-nav-mobile.is-open { display: flex; }
.landing-nav-mobile a { padding: 10px 4px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.landing-nav-mobile-actions { display: flex; gap: 10px; margin-top: 12px; }
.landing-nav-mobile-actions .btn { flex: 1; justify-content: center; }

@media (max-width: 860px) {
    .landing-nav-links, .landing-nav-actions { display: none; }
    .landing-nav-toggle { display: inline-flex; }
}

/* --- Hero --- */
.landing-hero {
    position: relative;
    min-height: 680px;
    display: flex;
    align-items: center;
    margin-top: -73px;
    padding-top: 73px;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
}
.landing-hero::before {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background-image: var(--hero-bg-image); background-size: cover; background-position: center 30%;
}
.landing-hero-overlay {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(900px 520px at 12% 8%, rgba(201, 162, 39, 0.16), transparent 60%),
        linear-gradient(180deg, rgba(6, 11, 28, 0.8) 0%, rgba(8, 14, 36, 0.86) 55%, rgba(6, 11, 28, 0.96) 100%);
}
.landing-hero-inner {
    padding-block: 108px 88px;
    display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
    position: relative; z-index: 1;
}
.landing-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent-soft); margin-bottom: 18px;
}
.landing-eyebrow::before { content: ''; width: 20px; height: 1.5px; background: var(--accent); display: inline-block; }
.landing-eyebrow-dark { color: var(--accent); }
.landing-hero h1 {
    font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 54px; line-height: 1.12;
    margin: 0 0 22px; letter-spacing: -0.01em; max-width: 620px;
}
.landing-hero-lede { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.82); max-width: 560px; margin: 0 0 34px; }
.landing-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.landing-hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.landing-stat { display: flex; flex-direction: column; gap: 2px; }
.landing-stat strong { font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1; }
.landing-stat span { font-size: 12.5px; color: rgba(255,255,255,.7); }

/* 3D rotating hero stack — four real product moments (Practice, Home,
   Guidance, Ilm & Amal) cycling through the same physical spot, so "more
   than tracking" is something you see, not just read. Every card carries a
   valid data-pos in the markup already, so with no JS this simply renders
   as a static front card — nothing about visibility depends on the script,
   only the cycling motion does. */
.hero-stack { position: relative; height: 360px; perspective: 1400px; padding-bottom: 44px; }
.hero-stack-card {
    position: absolute; top: 0; left: 50%; width: 320px; height: 286px; margin-left: -160px;
    background: #fff; color: var(--ink); border-radius: 16px;
    padding: 22px; border: 1px solid rgba(255,255,255,.5); box-sizing: border-box;
    box-shadow: 0 30px 60px -18px rgba(0,0,0,.5);
    display: flex; flex-direction: column;
    transition: transform .65s cubic-bezier(.22,.68,0,1.01), opacity .5s ease;
}
/* Fixed height (above) keeps every card the same size regardless of how much
   content it holds, so the back cards always peek out below the front one —
   without it, a short back card can disappear entirely inside the silhouette
   of a taller front card. */
.hero-stack-card[data-pos="front"] { transform: translateZ(0) translateY(0) rotate(-1deg) scale(1); opacity: 1; z-index: 4; }
.hero-stack-card[data-pos="back1"] { transform: translateZ(-70px) translateY(22px) rotate(4deg) scale(.94); opacity: .85; z-index: 3; }
.hero-stack-card[data-pos="back2"] { transform: translateZ(-140px) translateY(40px) rotate(-6deg) scale(.88); opacity: .55; z-index: 2; }
.hero-stack-card[data-pos="back3"] { transform: translateZ(-210px) translateY(56px) rotate(7deg) scale(.82); opacity: .3; z-index: 1; }

.hero-stack-badge {
    display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: 4px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary); margin-bottom: 12px;
}
.hero-stack-title { font-family: 'Fraunces', Georgia, serif; font-size: 15px; margin: 0 0 14px; color: var(--ink); }

.hero-stack-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; color: var(--ink); }
.hero-stack-row:last-of-type { border-bottom: none; }
.hero-stack-check {
    flex-shrink: 0; width: 19px; height: 19px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--success-light); color: var(--success); border: 1px solid transparent;
}
.hero-stack-check svg { width: 11px; height: 11px; }
.hero-stack-row.is-pending .hero-stack-check { background: transparent; border-color: var(--border); }
.hero-stack-row.is-pending span { color: var(--muted); }

.hero-mock-progress { margin-top: 14px; }
.hero-mock-progress-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.hero-mock-progress-track { height: 7px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.hero-mock-progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); width: 71%; }

.hero-stack-prayer-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.hero-stack-prayer-grid div { padding: 10px 2px; border-radius: 8px; background: var(--bg); }
.hero-stack-prayer-grid div.is-next { background: var(--primary); color: #fff; }
.hero-stack-prayer-grid strong { display: block; font-size: 11px; margin-bottom: 4px; }
.hero-stack-prayer-grid span { display: block; font-size: 10.5px; opacity: .8; }

.hero-stack-feedback { display: flex; gap: 12px; align-items: flex-start; }
.hero-stack-avatar {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.hero-stack-feedback p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink); font-style: italic; }

.hero-stack-dua-arabic { font-family: 'Noto Naskh Arabic', serif; font-size: 19px; margin: 0 0 8px; color: #1a2e22; }
.hero-stack-dua-translation { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.hero-stack-saved { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.hero-stack-saved svg { width: 13px; height: 13px; }

.hero-stack-dots { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 5; }
.hero-stack-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); border: none; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }
.hero-stack-dot.is-active { background: var(--accent); transform: scale(1.35); }

.landing-hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 1; }
.landing-hero-wave svg { width: 100%; height: 64px; display: block; }

@media (max-width: 980px) {
    .landing-hero-inner { grid-template-columns: 1fr; }
    .hero-stack { display: none; }
    .landing-hero h1 { max-width: 100%; }
}
@media (max-width: 640px) {
    .landing-hero h1 { font-size: 34px; }
    .landing-hero-lede { font-size: 15.5px; }
    .landing-hero-stats { gap: 26px; }
    .landing-hero-inner { padding-block: 84px 70px; }
}

/* --- Generic section rhythm --- */
.landing-section { padding: 88px 0; position: relative; }
.landing-section-tint { background: var(--bg); }
.landing-section-head { max-width: 680px; margin: 0 0 48px; }
.landing-section-head h2, .landing-about-text h2 {
    font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 34px; color: var(--ink);
    margin: 0 0 14px; letter-spacing: -0.01em;
}
.landing-lede { font-size: 15.5px; line-height: 1.75; color: var(--muted); margin: 0; }

/* Faint 8-point star lattice — a nod to Islamic geometric pattern, kept at
   very low opacity so it reads as texture/craft rather than decoration. */
.landing-pattern {
    position: absolute; inset: 0; z-index: 0; opacity: 0.5; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%2316234f' stroke-opacity='0.05' stroke-width='1'%3E%3Cpath d='M36 2 L44 20 L64 20 L48 32 L54 52 L36 40 L18 52 L24 32 L8 20 L28 20 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 72px 72px;
}
.landing-section > .section-container { position: relative; z-index: 1; }

/* --- About --- */
.landing-about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.landing-about-text p { font-size: 15px; line-height: 1.8; color: var(--ink); }
.landing-quote {
    margin: 22px 0; padding: 18px 22px; border-left: 3px solid var(--accent);
    background: var(--accent-wash); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.landing-quote-arabic { font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif; font-size: 22px; color: var(--primary); margin: 0 0 8px; }
.landing-quote cite { font-style: normal; font-size: 13.5px; color: var(--muted); }
.landing-check-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.landing-check-list li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.landing-check-list li::before {
    content: ''; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--success-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center; background-size: 11px;
}
.landing-about-media { position: relative; }
.landing-about-media img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.landing-about-chip-card {
    position: relative; margin-top: -46px; margin-inline: 20px; z-index: 2;
    background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); border: 1px solid var(--border);
    padding: 16px 18px;
}
.landing-about-chip-card > span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.landing-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip-light { border-color: var(--border); background: var(--primary-light); color: var(--primary); font-size: 13px; }

.landing-purpose-pillars { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.landing-purpose-pillar-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600; color: var(--primary);
    background: var(--primary-light); border: 1px solid var(--border);
    padding: 7px 13px; border-radius: 999px; text-decoration: none;
    transition: background .15s, border-color .15s, transform .15s;
}
.landing-purpose-pillar-chip svg { width: 14px; height: 14px; }
.landing-purpose-pillar-chip:hover { background: var(--accent-wash); border-color: var(--accent-soft); color: #8a6a17; text-decoration: none; transform: translateY(-1px); }

@media (max-width: 900px) {
    .landing-about { grid-template-columns: 1fr; gap: 40px; }
    .landing-about-media { order: -1; }
}

/* --- How it works (steps) --- */
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.landing-step { position: relative; padding-left: 4px; }
.landing-step-num {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 16px; margin-bottom: 18px;
}
.landing-step h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.landing-step p { font-size: 13.8px; line-height: 1.65; color: var(--muted); margin: 0; }
.landing-step-connector {
    position: absolute; top: 20px; left: calc(100% + 14px); width: calc(100% - 68px); height: 0;
    border-top: 2px dashed var(--border);
}

@media (max-width: 900px) {
    .landing-steps { grid-template-columns: 1fr; gap: 32px; }
    .landing-step-connector { display: none; }
}

/* --- Pillars (what's actually inside, mirroring the real portal nav) ---
   Cards get their 3D tilt from inline transforms set on mousemove (see the
   landing script) — the transition/box-shadow here only govern the resting
   and hover-without-JS state, so a touch device just sees a normal card. */
.landing-pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.landing-pillar-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s;
}
.landing-pillar-card:hover { box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.landing-pillar-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
    transition: transform .3s ease;
}
.landing-pillar-icon svg { width: 23px; height: 23px; }
.landing-pillar-card:hover .landing-pillar-icon { transform: scale(1.08) rotate(-4deg); }
.landing-pillar-card h3 { font-family: 'Fraunces', Georgia, serif; font-size: 18px; color: var(--ink); margin: 0 0 4px; }
.landing-pillar-tagline { font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 0 0 16px; }
.landing-pillar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.landing-pillar-list li { position: relative; padding-left: 17px; font-size: 13.3px; color: var(--muted); line-height: 1.5; }
.landing-pillar-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.landing-pillar-list li.is-soon { opacity: .65; font-style: italic; }
.landing-pillar-list li.is-soon::before { background: var(--muted); }

.landing-pillar-card-cta { background: var(--primary-light); border-color: var(--primary-light); display: flex; flex-direction: column; }
.landing-pillar-icon-accent { background: var(--accent); color: #241a02; }
.landing-pillar-cta-text { font-size: 13.3px; color: var(--ink); line-height: 1.6; margin: 0 0 18px; flex: 1; }

@media (max-width: 980px) { .landing-pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .landing-pillars-grid { grid-template-columns: 1fr; } }

/* --- CTA --- */
.landing-cta {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, #1d2c5e);
    color: #fff; padding: 92px 0; text-align: center;
}
.landing-cta .landing-pattern { opacity: 1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1'%3E%3Cpath d='M36 2 L44 20 L64 20 L48 32 L54 52 L36 40 L18 52 L24 32 L8 20 L28 20 Z'/%3E%3C/g%3E%3C/svg%3E"); }
.landing-cta-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.landing-cta h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 32px; margin: 0 0 18px; }
.landing-cta p { font-size: 15.5px; line-height: 1.8; color: rgba(255,255,255,.82); margin: 0 0 34px; }
.landing-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.landing-footer { background: var(--sidebar-bg); color: rgba(255,255,255,.7); padding: 40px 0; }
.landing-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.landing-brand-footer span { color: #fff; }
.landing-footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.landing-footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 13.5px; }
.landing-footer-links a:hover { color: #fff; }
.landing-footer-copy { width: 100%; font-size: 12.5px; color: rgba(255,255,255,.45); margin: 8px 0 0; }
.seerah-explore-item:hover .seerah-explore-chevron { transform: translateX(3px); }

/* ==========================================================================
   Site-wide page loader — shown on first paint of every page and again
   briefly on internal navigation (see partials/page-loader.blade.php).
   A 3D "gyroscope" of three rings tilted on independent axes via
   perspective + preserve-3d, each spinning at its own speed.
   ========================================================================== */
.pageload {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
    background:
        radial-gradient(900px 560px at 50% 32%, rgba(201, 162, 39, 0.10), transparent 60%),
        radial-gradient(1200px 800px at 50% 40%, #16234f 0%, #0c1636 62%, #060a1e 100%);
    opacity: 1; visibility: visible;
    transition: opacity .45s ease, visibility 0s linear 0s;
}
.pageload.is-hidden {
    opacity: 0; visibility: hidden;
    transition: opacity .45s ease, visibility 0s linear .45s;
    pointer-events: none;
}

.pageload-scene {
    position: relative; width: 132px; height: 132px;
    perspective: 700px;
}
.pageload-ring {
    position: absolute; inset: 0; border-radius: 50%;
    transform-style: preserve-3d;
    border: 3px solid transparent;
}
.pageload-ring-1 {
    border-top-color: var(--accent, #c9a227);
    border-bottom-color: var(--accent, #c9a227);
    box-shadow: 0 0 18px rgba(201, 162, 39, 0.25);
    animation: pageload-spin-1 6s linear infinite;
}
.pageload-ring-2 {
    inset: 10px;
    border-left-color: rgba(255, 255, 255, 0.85);
    border-right-color: rgba(255, 255, 255, 0.85);
    animation: pageload-spin-2 8s linear infinite;
}
.pageload-ring-3 {
    inset: 22px;
    border-top-color: rgba(124, 143, 206, 0.9);
    border-bottom-color: rgba(124, 143, 206, 0.9);
    animation: pageload-spin-3 10s linear infinite;
}
@keyframes pageload-spin-1 {
    from { transform: rotateX(68deg) rotateZ(0deg); }
    to   { transform: rotateX(68deg) rotateZ(360deg); }
}
@keyframes pageload-spin-2 {
    from { transform: rotateY(68deg) rotateZ(0deg); }
    to   { transform: rotateY(68deg) rotateZ(-360deg); }
}
@keyframes pageload-spin-3 {
    from { transform: rotateX(55deg) rotateY(25deg) rotateZ(0deg); }
    to   { transform: rotateX(55deg) rotateY(25deg) rotateZ(360deg); }
}

.pageload-core {
    position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: #0c1636;
    box-shadow: 0 0 34px rgba(201, 162, 39, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.08);
    animation: pageload-core-pulse 3.2s ease-in-out infinite;
}
.pageload-core img { width: 100%; height: 100%; object-fit: cover; }
@keyframes pageload-core-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

.pageload-brand {
    font-family: 'Fraunces', Georgia, serif; font-size: 14.5px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.88);
}
.pageload-bar { width: 150px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.pageload-bar-fill {
    height: 100%; width: 34%; border-radius: 99px;
    background: linear-gradient(90deg, var(--accent, #c9a227), #fff);
    animation: pageload-bar-slide 2.4s ease-in-out infinite;
}
@keyframes pageload-bar-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

@media (prefers-reduced-motion: reduce) {
    .pageload-ring, .pageload-core, .pageload-bar-fill { animation: none; }
}

/* ==========================================================================
   Salik portal: grouped sidebar (Home / Practice / Ilm & Amal / Reflection
   / Guidance), Home-tab additions, "Coming Soon" placeholders, My Murabbi,
   and the generic tab component shared with History & Progress.
   ========================================================================== */

/* Sidebar now carries ~5x the links it used to — keep it pinned and let it
   scroll internally instead of stretching the whole page to its height. */
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-anchor: none;
    scrollbar-width: thin;
}
@media (max-width: 900px) {
    .sidebar { position: fixed; height: auto; }
}

.nav-group { padding-top: 18px; margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.nav-group:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.nav-group-label {
    padding: 0 12px 8px;
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--sidebar-muted); opacity: .6;
}

/* "Coming soon" rows read as real nav items but visually recede — no loud
   badge competing with the icons/labels that actually go somewhere. */
.sidebar nav a.is-soon { opacity: .5; }
.sidebar nav a.is-soon:hover { opacity: .8; }
.nav-soon-tag {
    margin-inline-start: auto; flex-shrink: 0;
    font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--sidebar-muted);
}

/* --- Home: Quick Access row --- */
.quick-access-row {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
    margin-bottom: 20px;
}
.quick-access-tile {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--card); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none; text-align: center;
    font-size: 12px; font-weight: 600; line-height: 1.3;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.quick-access-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); text-decoration: none; }
.quick-access-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary);
}
.quick-access-icon svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .quick-access-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .quick-access-row { grid-template-columns: repeat(2, 1fr); } }

/* --- Home: Daily Reminder --- */
.reminder-card {
    position: relative; overflow: hidden;
    padding: 22px 26px; margin-bottom: 20px; border-radius: var(--radius);
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; box-shadow: var(--shadow-hover);
}
.reminder-card::before {
    content: ''; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M36 2 L44 20 L64 20 L48 32 L54 52 L36 40 L18 52 L24 32 L8 20 L28 20 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 72px 72px;
}
.reminder-kicker {
    position: relative; display: inline-block; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--accent-soft); margin-bottom: 10px;
}
.reminder-arabic {
    position: relative; font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif;
    font-size: 21px; line-height: 1.6; margin: 0 0 8px; color: #fff;
}
.reminder-text {
    position: relative; font-family: 'Fraunces', Georgia, serif; font-style: italic;
    font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.92); margin: 0 0 8px; max-width: 640px;
}
.reminder-source { position: relative; font-style: normal; font-size: 12.5px; color: rgba(255,255,255,.65); }

/* --- Coming Soon placeholder --- */
.feature-empty-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 56px 32px; gap: 6px;
}
.feature-empty-icon {
    width: 64px; height: 64px; border-radius: 50%; margin-bottom: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary);
    border: 1.5px dashed var(--primary);
}
.feature-empty-icon svg { width: 30px; height: 30px; }
.feature-empty-badge {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--accent); background: var(--accent-wash); border: 1px solid var(--accent-soft);
    padding: 3px 10px; border-radius: 99px; margin-bottom: 6px;
}
.feature-empty-card h2 { font-family: 'Fraunces', Georgia, serif; font-size: 22px; color: var(--ink); margin: 0 0 6px; }
.feature-empty-card p { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 460px; margin: 0 0 20px; }

/* --- My Murabbi --- */
.murabbi-profile-card { margin-bottom: 20px; }
.murabbi-profile-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.murabbi-profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 22px;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--accent-soft);
}
.murabbi-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.murabbi-profile-info h2 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; margin: 0 0 6px; color: var(--ink); }
.murabbi-profile-bio { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
.murabbi-profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.murabbi-profile-actions .btn svg { width: 15px; height: 15px; }
.murabbi-plan-card, .murabbi-feedback-card { margin-bottom: 20px; }
.murabbi-feedback-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.murabbi-feedback-row:last-child { border-bottom: none; }
.murabbi-feedback-date {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
    margin-bottom: 6px;
}
.murabbi-feedback-date svg { width: 13px; height: 13px; }
.murabbi-feedback-text { font-size: 14px; line-height: 1.65; color: var(--ink); margin: 0; }

/* --- Generic tabbar (History & Progress, and available for reuse) --- */
.tabbar {
    display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--border); margin-bottom: 22px;
}
.tabbar::-webkit-scrollbar { display: none; }
.tab {
    display: flex; align-items: center; gap: 7px; flex-shrink: 0;
    background: none; border: none; border-bottom: 2px solid transparent;
    margin-bottom: -1px; padding: 10px 2px; font-size: 14px; font-weight: 600;
    color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex-shrink: 0; transition: background .15s; }
.tab.is-active .tab-dot { background: var(--accent); }
.tab-panel[hidden] { display: none; }

/* Anchor jump targets on the Masnoon Dua page (sticky topbar would otherwise
   cover the heading when linked to from the sidebar/quick-access). */
#tasbeeh, #duas { scroll-margin-top: 90px; }


/* ==========================================================================
   Quran Pak — a mushaf-inspired page: deep emerald and gold, an ornamental
   frame around the title, and one card per para styled like the framed
   headings of a printed mushaf.
   ========================================================================== */
.quran-page {
    position: relative;
    margin: -32px;
    padding: 32px 32px 56px;
    min-height: calc(100vh - 78px);
    overflow: hidden;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23b9a15a' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M40 6 L48 32 L74 40 L48 48 L40 74 L32 48 L6 40 L32 32 Z'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(120% 90% at 50% 0%, #fbf7ea 0%, #f3ecd6 60%, #ebe0c2 100%);
}
.quran-page::before,
.quran-page::after {
    content: '';
    position: absolute; top: 0;
    width: 320px; height: 320px;
    background: url('../assets/dist/img/ornament-corner.svg') no-repeat top left / contain;
    opacity: .6;
    pointer-events: none;
}
.quran-page::before { left: 0; }
.quran-page::after { right: 0; transform: scaleX(-1); }
.quran-page > * { position: relative; z-index: 1; }

.quran-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 44px 24px 40px;
    text-align: center;
    border-radius: var(--radius);
    color: #f6e7b4;
    background:
        radial-gradient(70% 120% at 50% 0%, rgba(255, 226, 140, .18) 0%, transparent 60%),
        linear-gradient(160deg, #0f6248 0%, #0a4534 50%, #072b21 100%);
    box-shadow:
        0 26px 50px -24px rgba(4, 40, 30, .8),
        inset 0 0 0 1px rgba(230, 205, 130, .55),
        inset 0 0 0 7px #0a4534,
        inset 0 0 0 8px rgba(230, 205, 130, .45);
}
.quran-hero-lattice {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23e6cd82' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M36 4 L43 29 L68 36 L43 43 L36 68 L29 43 L4 36 L29 29 Z'/%3E%3Ccircle cx='36' cy='36' r='8'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.quran-hero-inner { position: relative; }
.quran-bismillah {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 26px; line-height: 1.8; margin: 0 0 6px; color: #e6cd82;
}
.quran-title-ar {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 64px; line-height: 1.5; font-weight: 400; margin: 0;
    color: #f7e7ac;
    text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 26px rgba(240, 210, 120, .35);
}
.quran-title-en {
    margin: 4px 0 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 15px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
    color: rgba(246, 231, 180, .8);
}

.quran-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 26px 20px;
    max-width: 1180px;
    margin: 0 auto;
}
.quran-card {
    position: relative;
    display: flex; flex-direction: column;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffdf6 0%, #f8f1da 100%);
    border: 1px solid #d9c37e;
    box-shadow:
        0 16px 28px -18px rgba(70, 50, 8, .6),
        inset 0 0 0 3px #fffdf6,
        inset 0 0 0 4px rgba(201, 167, 79, .5);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quran-card:hover {
    transform: translateY(-4px);
    border-color: #c9a74f;
    box-shadow: 0 24px 36px -18px rgba(70, 50, 8, .65), 0 0 0 3px rgba(230, 205, 130, .35), inset 0 0 0 3px #fffdf6, inset 0 0 0 4px rgba(201, 167, 79, .6);
}
.quran-card-band {
    height: 50px;
    border-radius: 13px 13px 0 0;
    background:
        radial-gradient(circle at 50% 130%, rgba(240, 210, 120, .35), transparent 60%),
        linear-gradient(180deg, #0f6248 0%, #0a4534 100%);
    border-bottom: 2px solid #c9a74f;
    display: flex; justify-content: center;
}
.quran-star {
    position: relative;
    width: 50px; height: 50px;
    margin-top: 24px;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 4px 5px rgba(60, 40, 5, .45));
}
.quran-star::before,
.quran-star::after {
    content: '';
    position: absolute; inset: 7px;
    background: linear-gradient(145deg, #fff1c2 0%, #e2b944 55%, #b98a1a 100%);
    border: 1px solid #9c7a22;
}
.quran-star::after { transform: rotate(45deg); }
.quran-star b {
    position: relative; z-index: 1;
    width: 29px; height: 29px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', Georgia, serif; font-size: 12.5px; font-weight: 700;
    color: #0a4534;
    background: #fffaf0;
    border: 1.5px solid #b98a1a;
    font-variant-numeric: tabular-nums;
}
.quran-card-body {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 30px 12px 20px;
    min-height: 150px;
}
.quran-card-caption { font-size: 14px; color: #a4801f; line-height: 1.6; }
.quran-card-name {
    margin: 0 0 16px;
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 30px; font-weight: 400; line-height: 1.7;
    color: #0b4a37;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.quran-card-rule { display: flex; align-items: center; justify-content: center; width: 100%; }
.quran-card-rule i {
    position: relative;
    width: 70%; height: 1px;
    background: linear-gradient(90deg, transparent, #c9a74f, transparent);
}
.quran-card-rule i::after {
    content: '';
    position: absolute; left: 50%; top: -3px;
    width: 7px; height: 7px; margin-left: -3.5px;
    background: #c9a74f; transform: rotate(45deg);
}
@media (max-width: 640px) {
    .quran-page { margin: -18px; padding: 18px 16px 40px; }
    .quran-page::before, .quran-page::after { width: 180px; height: 180px; }
    .quran-hero { padding: 32px 16px 30px; }
    .quran-title-ar { font-size: 46px; }
    .quran-bismillah { font-size: 20px; }
    .quran-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
    .quran-card-name { font-size: 24px; }
}

/* ==========================================================================
   Dashboard — Featured Content Row: Daily Seerah / Daily Hadith / Daily
   Masnoon Azkaar. Illuminated-manuscript cards (parchment + gold frame +
   a faint corner ornament) matching the Masnoon/Quran pages, each with a
   small painted icon that the card's text wraps around.
   ========================================================================== */
.featured-row { margin-bottom: 24px; }
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.featured-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 18px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23b9a15a' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M40 6 L48 32 L74 40 L48 48 L40 74 L32 48 L6 40 L32 32 Z'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #fffdf6 0%, #f8f1da 100%);
    border: 1px solid #d9c37e;
    border-radius: 14px;
    box-shadow: 0 14px 26px -18px rgba(70, 50, 8, .5), inset 0 0 0 3px #fffdf6, inset 0 0 0 4px rgba(201, 167, 79, .4);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.featured-card::after {
    content: '';
    position: absolute;
    top: -14px; right: -14px;
    width: 96px; height: 96px;
    background: url('../assets/dist/img/ornament-corner.svg') no-repeat top right / contain;
    transform: scaleX(-1);
    opacity: .5;
    pointer-events: none;
}
.featured-card > * { position: relative; z-index: 1; }
.featured-card:hover { transform: translateY(-3px); box-shadow: 0 20px 34px -18px rgba(70, 50, 8, .6); border-color: #c9a74f; text-decoration: none; }
.featured-card-title {
    margin: 0 0 12px;
    font-size: 15px; font-weight: 700; color: #1a2247;
    display: flex; flex-direction: column; gap: 2px;
}
.featured-card-title span { font-size: 12.5px; font-weight: 500; color: #8a7238; }
.featured-card-flow { flex: 1; }
.featured-card-flow::after { content: ''; display: table; clear: both; }
.featured-card-figure {
    float: left;
    width: 64px; height: 64px;
    margin: 0 12px 6px 0;
    filter: drop-shadow(0 3px 5px rgba(70, 50, 8, .25));
}
.featured-card-arabic {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 18px; line-height: 1.9; color: #14301f;
    margin: 0;
}
.featured-card-text {
    font-size: 13.5px; line-height: 1.85; color: #3a2e14;
    margin: 8px 0 10px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.featured-card-source {
    display: block; font-style: normal; font-size: 11.5px; color: #8a7238;
    margin-bottom: 14px;
}
.featured-card-empty {
    font-size: 13.5px; color: #6b5b32; font-style: italic;
    margin: 0;
}
.featured-card-cta {
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: auto;
    padding-top: 12px;
    font-size: 12.5px; font-weight: 700; color: #0b4a37;
}
.featured-card-cta svg { width: 13px; height: 13px; transition: transform .15s ease; }
.featured-card:hover .featured-card-cta svg { transform: translateX(3px); }
@media (max-width: 480px) {
    .featured-card-figure { width: 52px; height: 52px; }
}

/* ==========================================================================
   Admin — Seerah Topic form: Description + a simple Ahadees list, with a
   live preview beside it rendered from the exact same CSS classes as the
   real Salik-facing page (.seerah-topic / .seerah-paragraph / etc.), so
   there is no guessing what the saved topic will look like.
   ========================================================================== */
.seerah-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 24px;
    align-items: start;
}
.seerah-form-card { max-width: none; }
.seerah-preview-pane { position: sticky; top: 24px; }
.seerah-preview-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 10px;
}
.seerah-preview-frame {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23b9a15a' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M40 6 L48 32 L74 40 L48 48 L40 74 L32 48 L6 40 L32 32 Z'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(120deg, #fbf7ea 0%, #f3ecd6 60%, #ebe0c2 100%);
    border: 1px solid #e4d9ad;
    border-radius: 14px;
    padding: 18px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.seerah-preview-frame .seerah-topic { margin: 0; max-width: none; }
.seerah-preview-placeholder { color: #8a7238; font-style: italic; }
@media (max-width: 980px) {
    .seerah-form-layout { grid-template-columns: 1fr; }
    .seerah-preview-pane { position: static; }
    .seerah-preview-frame { max-height: none; }
}

.form-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0 22px; }

/* The Seerah editor: one bordered surface that reads as a single text field.
   Paragraphs are borderless auto-growing textareas that blend together like
   one flowing document; a Hadith is a visually distinct card dropped inline
   between them, inserted at the cursor rather than appended to a list. */
.content-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.content-editor-head label { margin: 0; }
.content-editor-surface {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.content-editor-surface:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }

.content-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.editor-tb-sep { width: 1px; align-self: stretch; margin: 2px 6px; background: var(--border); }
.editor-tb-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 5px;
    background: none;
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.editor-tb-btn svg { width: 16px; height: 16px; }
.editor-tb-btn:hover { background: var(--accent-wash); }
.editor-tb-btn.is-active { background: var(--accent-soft); color: var(--accent); }
.editor-tb-btn-html { font-family: monospace; font-weight: 700; font-size: 11px; width: auto; padding: 0 8px; }

.content-editor-body { padding: 14px 16px; }

.content-editor-paragraph {
    outline: none;
    min-height: 1.7em;
    padding: 4px 0;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink);
}
.content-editor-paragraph:empty:before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}
.content-editor-paragraph + .content-editor-paragraph { margin-top: 10px; }
.content-editor-paragraph p { margin: 0 0 10px; }
.content-editor-paragraph p:last-child { margin-bottom: 0; }
.content-editor-paragraph ul, .content-editor-paragraph ol { margin: 0 0 10px; padding-inline-start: 24px; }
.content-editor-paragraph a { color: var(--accent); }
.content-editor-paragraph img { max-width: 100%; border-radius: 4px; }

.content-editor-html-source {
    display: block;
    width: 100%;
    min-height: 90px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    border: 1px dashed var(--border);
    border-radius: 4px;
    padding: 8px;
    background: #fbfbfb;
    color: var(--ink);
}
.content-editor-hadith {
    position: relative;
    margin: 10px 0;
    padding: 14px 40px 14px 16px;
    border: 1px solid var(--accent-soft);
    border-radius: var(--radius-sm);
    background: var(--accent-wash);
}
.content-editor-hadith-remove {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    border: none; border-radius: 50%;
    background: rgba(255,255,255,.7);
    color: var(--muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.content-editor-hadith-remove:hover { background: var(--danger-light); color: var(--danger); }
.content-editor-hadith-remove svg { width: 13px; height: 13px; }
.section-block-type {
    display: inline-flex; align-items: center;
    padding: 3px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    margin-bottom: 8px;
}
.section-block-type-hadees { background: #fff; color: #8a6a17; }
.section-field-label {
    display: block; font-size: 12px; font-weight: 600; color: var(--muted);
    margin: 10px 0 4px;
}
.section-field-label:first-of-type { margin-top: 0; }
.content-editor-hadith textarea, .content-editor-hadith input[type="text"] {
    width: 100%; font-family: inherit; background: #fff;
}
.section-arabic-input {
    font-family: 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
    font-size: 17px; line-height: 1.9;
}
.section-urdu-input { font-size: 15px; line-height: 1.9; }

/* Past-day lock banner on Daily Log */
.daily-log-locked-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--muted);
}
.daily-log-locked-banner svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
