/* ============================================================
   HOME — redesign v7 — shadcn/ui (zinc, New York) port
   Canonical tokens from shadcn/ui themes (zinc), dark default.
   Light via body.light-mode. Scoped to .hm-* (+ .pf-shell tokens
   consumed by profile.css). No Tailwind/React: PHP-native port.
   ============================================================ */

.hm-shell,
.hm-auth,
.pf-shell,
body:has(.pf-shell) {
    --hm-fg: 0 0% 98%;
    --hm-card: 240 10% 3.9%;
    --hm-muted: 240 3.7% 15.9%;
    --hm-muted-fg: 240 5% 64.9%;
    --hm-border: 240 3.7% 15.9%;
    --hm-input: 240 3.7% 15.9%;
    --hm-field: 240 5% 8%;
    --hm-primary: 0 0% 98%;
    --hm-primary-fg: 240 5.9% 10%;
    --hm-ring: 240 4.9% 83.9%;
    --hm-accent: 258 90% 66%;
    --hm-accent-2: 226 84% 60%;
    --hm-success: 142 71% 45%;
    --hm-warning: 38 92% 50%;
    --hm-danger: 0 72% 51%;
    --hm-radius: .625rem;
    --hm-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    color: hsl(var(--hm-fg));
    font-family: var(--hm-font);
    font-size: .9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.light-mode .hm-shell,
body.light-mode .hm-auth,
body.light-mode .pf-shell,
body.light-mode:has(.pf-shell) {
    --hm-fg: 240 10% 3.9%;
    --hm-card: 0 0% 100%;
    --hm-muted: 240 4.8% 95.9%;
    --hm-muted-fg: 240 3.8% 46.1%;
    --hm-border: 240 5.9% 90%;
    --hm-input: 240 5.9% 90%;
    --hm-field: 240 5% 98%;
    --hm-primary: 240 5.9% 10%;
    --hm-primary-fg: 0 0% 98%;
    --hm-ring: 240 10% 3.9%;
    --hm-accent: 262 83% 52%;
    --hm-accent-2: 226 80% 50%;
    --hm-success: 142 76% 30%;
    --hm-warning: 32 95% 30%;
    --hm-danger: 0 72% 45%;
}

/* ---------- page background (neutralizes legacy futuristic-ui body art) ---------- */

body:has(.hm-shell, .pf-shell) {
    background-color: hsl(240 10% 3.9%) !important;
    background-image:
        radial-gradient(90% 50% at 50% -10%, hsl(240 3.7% 15.9% / .55), transparent 70%) !important;
    background-attachment: fixed !important;
}

body:has(.hm-shell, .pf-shell)::before,
body:has(.hm-shell, .pf-shell)::after { display: none !important; }

body.light-mode:has(.hm-shell, .pf-shell) {
    background-color: hsl(0 0% 100%) !important;
    background-image:
        radial-gradient(90% 50% at 50% -10%, hsl(240 4.8% 95.9% / .8), transparent 70%) !important;
}

/* login: full-bleed backdrop, no topbar offset */
html body:has(.hm-auth) {
    padding-top: 0 !important;
    background-color: hsl(240 10% 3.6%) !important;
    background-image:
        radial-gradient(55% 45% at 6% 0%, hsl(258 90% 60% / .16), transparent 65%),
        radial-gradient(45% 40% at 100% 100%, hsl(199 89% 55% / .1), transparent 70%) !important;
    background-attachment: fixed !important;
}

html body:has(.hm-auth)::before,
html body:has(.hm-auth)::after { display: none !important; }

html body.light-mode:has(.hm-auth) {
    background-color: hsl(220 25% 97%) !important;
    background-image:
        radial-gradient(55% 45% at 6% 0%, hsl(258 90% 70% / .16), transparent 65%),
        radial-gradient(45% 40% at 100% 100%, hsl(199 89% 60% / .14), transparent 70%) !important;
}

.hm-shell a,
.hm-auth a { text-decoration: none; }

/* border-box scoped to redesigned regions — global template has no box-sizing reset */
.hm-shell,
.hm-shell *,
.hm-auth,
.hm-auth * { box-sizing: border-box; }

.hm-shell :focus-visible,
.hm-auth :focus-visible {
    outline: 2px solid hsl(var(--hm-ring) / .7);
    outline-offset: 2px;
}

.hm-shell strong { font-weight: 600; }

/* =========================
   AUTH / LOGIN
   ========================= */

.hm-auth {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: 0;
}

/* ---------- left: brand panel ---------- */

.hm-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(28px, 5vh, 56px);
    min-width: 0;
    padding: clamp(28px, 4vw, 64px);
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 0% 0%, hsl(258 85% 24% / .9), transparent 55%),
        radial-gradient(90% 80% at 100% 100%, hsl(199 80% 17% / .55), transparent 60%),
        linear-gradient(150deg, #0b1020, #0a0d17 55%, #070a12);
    border-right: 1px solid hsl(var(--hm-border));
}

.hm-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(hsl(0 0% 100% / .055) 1px, transparent 1px),
        linear-gradient(90deg, hsl(0 0% 100% / .055) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 25% 15%, #000 10%, transparent 78%);
    mask-image: radial-gradient(ellipse 85% 75% at 25% 15%, #000 10%, transparent 78%);
}

.hm-brand-glow {
    position: absolute;
    right: -16%;
    bottom: -22%;
    width: min(46vw, 620px);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 35% 35%, hsl(258 90% 62% / .5), hsl(258 90% 55% / .12) 45%, transparent 70%);
    filter: blur(6px);
    animation: hmBrandFloat 16s ease-in-out infinite alternate;
}

@keyframes hmBrandFloat {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-4%, -5%, 0) scale(1.08); }
}

.hm-brand-top,
.hm-brand-copy,
.hm-brand-foot { position: relative; z-index: 1; }

.hm-brand-top { display: flex; align-items: center; gap: 12px; }

.hm-auth-brand .hm-brand-logo { height: 34px; }

.hm-auth-brand .hm-brand-name {
    color: hsl(0 0% 100% / .8) !important;
    letter-spacing: .14em;
}

.hm-brand-copy { max-width: 540px; }

.hm-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: hsl(258 90% 78%) !important;
}

.hm-brand-eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: .8;
}

.hm-brand-title {
    margin: 14px 0 16px;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 650;
    line-height: 1.06;
    letter-spacing: -.035em;
    color: hsl(0 0% 98%) !important;
}

.hm-brand-desc {
    max-width: 44ch;
    margin: 0;
    font-size: clamp(.9375rem, 1vw, 1.0625rem);
    line-height: 1.65;
    color: hsl(0 0% 100% / .62) !important;
}

.hm-brand-list {
    display: grid;
    gap: 14px;
    margin: clamp(24px, 4vh, 38px) 0 0;
    padding: 0;
    list-style: none;
}

.hm-brand-list li { display: flex; align-items: flex-start; gap: 12px; }

.hm-brand-list .material-icons {
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 17px;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 9px;
    color: hsl(258 90% 80%) !important;
    background: hsl(258 90% 66% / .14);
    border: 1px solid hsl(258 90% 66% / .22);
}

.hm-brand-list strong {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: hsl(0 0% 98%) !important;
}

.hm-brand-list li div > span {
    display: block;
    margin-top: 2px;
    font-size: .8125rem;
    line-height: 1.5;
    color: hsl(0 0% 100% / .5) !important;
}

.hm-brand-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: .75rem;
    color: hsl(0 0% 100% / .55) !important;
}

.hm-auth-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    min-width: 0;
    padding: clamp(76px, 9vh, 104px) clamp(20px, 4.5vw, 64px) clamp(28px, 5vh, 52px);
}

.hm-auth-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(60% 45% at 50% 0%, hsl(var(--hm-accent) / .09), transparent 70%);
}

.hm-theme-toggle {
    position: absolute;
    top: clamp(16px, 3vw, 28px);
    right: clamp(16px, 3vw, 28px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: hsl(var(--hm-fg)) !important;
    background: hsl(var(--hm-card) / .72);
    border: 1px solid hsl(var(--hm-border));
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.hm-theme-toggle .material-icons { font-size: 20px; }

.hm-theme-toggle:hover { background: hsl(var(--hm-muted)); border-color: hsl(var(--hm-ring) / .5); }
.hm-theme-toggle:active { transform: scale(.95); }

.hm-auth-card {
    width: 100%;
    max-width: 400px;
    margin: auto 0;
    padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 32px) clamp(22px, 3vw, 28px);
    background:
        linear-gradient(hsl(var(--hm-card)), hsl(var(--hm-card))) padding-box,
        linear-gradient(160deg, hsl(var(--hm-border)), hsl(var(--hm-border) / .25)) border-box;
    border: 1px solid transparent;
    border-radius: calc(var(--hm-radius) + 10px);
    box-shadow: 0 32px 64px -32px hsl(240 10% 2% / .9);
}

body.light-mode .hm-auth-card {
    box-shadow:
        0 1px 2px hsl(240 10% 3.9% / .04),
        0 24px 48px -28px hsl(240 10% 3.9% / .22);
}

/* light-theme.css forces `.form-login { min-height: calc(100vh - 100px) }` */
body.light-mode .form-login.hm-auth-card { min-height: 0; }

.hm-auth-panel-foot {
    margin: 0;
    font-size: .75rem;
    line-height: 1.5;
    text-align: center;
    color: hsl(var(--hm-muted-fg));
}

/* small-screen brand row lives inside the card */
.hm-auth-mobilebrand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid hsl(var(--hm-border));
}

.hm-brand-logo { width: auto; height: 30px; flex: 0 0 auto; }

.hm-logo--light { display: none; }

body.light-mode .hm-logo--dark { display: none; }
body.light-mode .hm-logo--light { display: block; }

.hm-brand-name {
    margin: 0;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: hsl(var(--hm-muted-fg));
}

.hm-auth-heading { margin-bottom: 26px; }

.hm-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    padding: 5px 10px 5px 8px;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: hsl(var(--hm-fg) / .72);
    background: hsl(var(--hm-muted) / .6);
    border: 1px solid hsl(var(--hm-border));
    border-radius: 999px;
}

.hm-auth-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--hm-accent));
    box-shadow: 0 0 0 3px hsl(var(--hm-accent) / .16);
}

.hm-auth-title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 2.4vw, 1.75rem);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.hm-auth-sub {
    max-width: 34ch;
    margin: 0;
    font-size: .875rem;
    line-height: 1.6;
    color: hsl(var(--hm-muted-fg));
}

/* ---------- form primitives (shadcn input/button) ---------- */

.hm-field { display: grid; gap: 8px; margin-bottom: 16px; }

.hm-label { font-size: .8125rem; font-weight: 500; line-height: 1.2; }

.hm-input-wrap { position: relative; display: flex; align-items: center; }

.hm-input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-family: var(--hm-font);
    font-size: .875rem;
    color: hsl(var(--hm-fg));
    background: hsl(var(--hm-field));
    border: 1px solid hsl(var(--hm-border));
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

body.light-mode .hm-input { background: hsl(var(--hm-muted) / .55); }

.hm-input::placeholder { color: hsl(var(--hm-muted-fg) / .8); }

.hm-input:hover { border-color: hsl(var(--hm-ring) / .45); }

.hm-input:focus {
    outline: none;
    background: hsl(var(--hm-field));
    border-color: hsl(var(--hm-accent) / .65);
    box-shadow: 0 0 0 3px hsl(var(--hm-accent) / .16);
}

body.light-mode .hm-input:focus { background: hsl(var(--hm-card)); }

.hm-input:-webkit-autofill {
    -webkit-text-fill-color: hsl(var(--hm-fg));
    -webkit-box-shadow: 0 0 0 1000px hsl(var(--hm-field)) inset;
}

.hm-input-wrap .hm-input { padding-left: 40px; }

.hm-input-icon {
    position: absolute;
    left: 13px;
    z-index: 1;
    font-size: 18px;
    color: hsl(var(--hm-muted-fg) / .85);
    pointer-events: none;
}

.hm-input-wrap:focus-within .hm-input-icon { color: hsl(var(--hm-accent)); }

.hm-input-wrap.has-toggle .hm-input { padding-right: 44px; }

.hm-eye {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: .875rem;
    color: hsl(var(--hm-muted-fg));
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.hm-eye:hover { color: hsl(var(--hm-fg)); background: hsl(var(--hm-muted)); }

.hm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 20px;
}

.hm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin: 0;
    font-size: .8125rem;
    color: hsl(var(--hm-muted-fg));
    cursor: pointer;
    user-select: none;
}

.hm-check:hover { color: hsl(var(--hm-fg)); }

.hm-check input { width: 15px; height: 15px; margin: 0; accent-color: hsl(var(--hm-accent)); cursor: pointer; }

.hm-forgot {
    flex: 0 0 auto;
    padding: 8px 0;
    font-size: .8125rem;
    font-weight: 500;
    color: hsl(var(--hm-muted-fg)) !important;
}

.hm-forgot:hover { color: hsl(var(--hm-fg)) !important; text-decoration: underline; }

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    font-family: var(--hm-font);
    font-size: .875rem;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, hsl(var(--hm-accent)), hsl(var(--hm-accent-2)));
    border: 1px solid hsl(var(--hm-accent) / .45);
    border-radius: 10px;
    box-shadow: 0 14px 28px -16px hsl(var(--hm-accent) / .9);
    cursor: pointer;
    transition: transform .12s ease, filter .15s ease, box-shadow .15s ease;
}

.hm-btn .material-icons { font-size: 18px; transition: transform .15s ease; }

.hm-btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 18px 32px -16px hsl(var(--hm-accent) / .95); }
.hm-btn:hover .material-icons { transform: translateX(2px); }
.hm-btn:active { transform: translateY(0); filter: brightness(.97); }

.hm-btn--ghost {
    height: 44px;
    font-weight: 500;
    color: hsl(var(--hm-fg)) !important;
    background: transparent;
    border-color: hsl(var(--hm-border));
    box-shadow: none;
}

.hm-btn--ghost:hover {
    filter: none;
    transform: none;
    box-shadow: none;
    background: hsl(var(--hm-muted) / .6);
    border-color: hsl(var(--hm-ring) / .45);
}

.hm-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    font-size: .75rem;
    color: hsl(var(--hm-muted-fg));
}

.hm-divider::before,
.hm-divider::after { content: ''; flex: 1; height: 1px; background: hsl(var(--hm-border)); }

.hm-auth-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 20px 0 0;
    padding-top: 18px;
    font-size: .75rem;
    line-height: 1.5;
    color: hsl(var(--hm-muted-fg));
    border-top: 1px solid hsl(var(--hm-border));
}

.hm-auth-note .material-icons {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1.45;
    color: hsl(var(--hm-accent));
}

/* =========================
   DASHBOARD — shell + hero
   ========================= */

.hm-shell { max-width: 1120px; margin: 0 auto; padding: 12px 0 96px; }

.hm-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 24px;
}

.hm-id { display: flex; align-items: center; gap: 14px; min-width: 0; }

.hm-avatar {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: hsl(var(--hm-fg));
    background: hsl(var(--hm-muted));
    border: 1px solid hsl(var(--hm-border));
    border-radius: 999px;
    user-select: none;
}

.hm-id-text { min-width: 0; }

.hm-eyebrow { margin: 0 0 3px; font-size: .75rem; font-weight: 500; color: hsl(var(--hm-muted-fg)); }

.hm-hello { margin: 0; font-size: 1.5rem; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }

.hm-role { margin: 3px 0 0; font-size: .8125rem; color: hsl(var(--hm-muted-fg)); }

.hm-clock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: hsl(var(--hm-card));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
}

.hm-clock-live {
    position: relative;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: hsl(var(--hm-success));
    border-radius: 50%;
}

.hm-clock-live::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid hsl(var(--hm-success) / .6);
    border-radius: 50%;
    animation: hmLive 2s ease-out infinite;
}

.hm-clock-txt { display: flex; flex-direction: column; }

.hm-clock-time {
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.hm-clock-label {
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: hsl(var(--hm-muted-fg));
}

.hm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-bottom: 30px;
}

/* =========================
   CARD PRIMITIVE + ATTENDANCE
   ========================= */

.hm-att,
.hm-prayer {
    background: hsl(var(--hm-card));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
    box-shadow: 0 1px 2px hsl(240 10% 2% / .25);
}

body.light-mode .hm-att,
body.light-mode .hm-prayer { box-shadow: 0 1px 3px hsl(240 10% 3.9% / .06); }

.hm-att { display: flex; flex-direction: column; gap: 18px; padding: 22px; }

.hm-att-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.hm-card-title { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }

.hm-card-sub { margin: 2px 0 0; font-size: .8125rem; color: hsl(var(--hm-muted-fg)); }

/* shadcn outline badge + status tints */
.hm-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    height: 26px;
    padding: 0 11px;
    font-size: .75rem;
    font-weight: 500;
    white-space: nowrap;
    color: hsl(var(--hm-muted-fg));
    background: transparent;
    border: 1px solid hsl(var(--hm-border));
    border-radius: 999px;
}

.hm-att--bekerja .hm-chip {
    color: hsl(var(--hm-warning));
    background: hsl(var(--hm-warning) / .1);
    border-color: hsl(var(--hm-warning) / .35);
}

.hm-att--selesai .hm-chip {
    color: hsl(var(--hm-success));
    background: hsl(var(--hm-success) / .1);
    border-color: hsl(var(--hm-success) / .35);
}

.hm-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }

.hm-att--bekerja .hm-dot { animation: hmPulse 1.8s ease-in-out infinite; }

/* stat tiles */
.hm-times { display: flex; align-items: stretch; gap: 10px; }

.hm-time {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 16px;
    background: hsl(var(--hm-muted) / .35);
    border: 1px solid hsl(var(--hm-border) / .7);
    border-radius: calc(var(--hm-radius) + 2px);
}

.hm-time-ic {
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: hsl(var(--hm-muted-fg));
    background: hsl(var(--hm-card));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
}

.hm-time-ic .material-icons { font-size: 19px; }

.hm-time-body { display: flex; flex-direction: column; min-width: 0; }

.hm-time-label { font-size: .75rem; font-weight: 500; color: hsl(var(--hm-muted-fg)); }

.hm-time strong {
    font-size: 1.625rem;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}

.hm-time small { font-size: .75rem; color: hsl(var(--hm-muted-fg)); }

.hm-time.is-done { border-color: hsl(var(--hm-success) / .35); }

.hm-time.is-done .hm-time-ic {
    color: hsl(var(--hm-success));
    background: hsl(var(--hm-success) / .1);
    border-color: hsl(var(--hm-success) / .35);
}

.hm-time-arrow { align-self: center; font-size: 18px; color: hsl(var(--hm-muted-fg) / .6); }

/* duration strip */
.hm-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: .8125rem;
    color: hsl(var(--hm-muted-fg));
    background: hsl(var(--hm-muted) / .35);
    border: 1px dashed hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
}

.hm-duration .material-icons { font-size: 16px; }

.hm-duration strong { color: hsl(var(--hm-fg)); font-variant-numeric: tabular-nums; }

/* primary CTA */
.hm-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    font-size: .875rem;
    font-weight: 500;
    color: hsl(var(--hm-primary-fg)) !important;
    background: hsl(var(--hm-primary));
    border: 1px solid hsl(var(--hm-primary));
    border-radius: calc(var(--hm-radius) - 2px);
    transition: opacity .15s ease, transform .1s ease;
}

.hm-cta:hover { opacity: .9; }
.hm-cta:active { transform: translateY(1px); }
.hm-cta .material-icons { font-size: 18px; }

.hm-cta--done {
    color: hsl(var(--hm-muted-fg)) !important;
    background: hsl(var(--hm-muted) / .4);
    border-color: hsl(var(--hm-border));
    border-style: dashed;
    cursor: default;
}

.hm-cta--done:hover { opacity: 1; }
.hm-cta--done .material-icons { color: hsl(var(--hm-success)); }

/* =========================
   PRAYER CARD (markup: inline JS)
   ========================= */

.hm-prayer { display: flex; flex-direction: column; gap: 14px; padding: 22px; }

.hm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.hm-loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: .75rem;
    color: hsl(var(--hm-muted-fg));
}

.hm-loc .material-icons { font-size: 14px; }

.hm-loc span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hm-prayer-date { margin: 0; font-size: .75rem; line-height: 1.45; color: hsl(var(--hm-muted-fg)); }

.hm-prayer-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.hm-prayer-scroll::-webkit-scrollbar { display: none; }

.prayer-item {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 70px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid hsl(var(--hm-border) / .7);
    border-radius: calc(var(--hm-radius) + 2px);
    scroll-snap-align: center;
    transition: background .15s ease, border-color .15s ease;
}

.prayer-item-name { font-size: .6875rem; font-weight: 500; color: hsl(var(--hm-muted-fg)); }

.prayer-item-icon { font-size: .875rem; line-height: 1.4; }

.prayer-item-time { font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* active = inverted shadcn badge */
.prayer-item.active {
    color: hsl(var(--hm-primary-fg));
    background: hsl(var(--hm-primary));
    border-color: hsl(var(--hm-primary));
}

.prayer-item.active .prayer-item-name,
.prayer-item.active .prayer-item-time { color: hsl(var(--hm-primary-fg)); }

.prayer-item.active .prayer-item-name { opacity: .7; }

/* =========================
   SECTIONS + SERVICE CARDS
   ========================= */

.hm-section { margin-bottom: 30px; }

.hm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hm-section-title { margin: 0; font-size: 1.0625rem; font-weight: 650; letter-spacing: -.015em; }

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    font-size: .8125rem;
    font-weight: 500;
    color: hsl(var(--hm-muted-fg)) !important;
    border-radius: 4px;
    transition: color .15s ease;
}

.hm-link:hover { color: hsl(var(--hm-fg)) !important; }
.hm-link .material-icons { font-size: 16px; }

.hm-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hm-service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: hsl(var(--hm-fg)) !important;
    background: hsl(var(--hm-card));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.hm-service:hover {
    border-color: hsl(var(--hm-ring) / .4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsl(240 10% 2% / .3);
}

body.light-mode .hm-service:hover { box-shadow: 0 4px 12px hsl(240 10% 3.9% / .08); }

.hm-service-icon {
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: hsl(var(--hm-fg));
    background: hsl(var(--hm-muted));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
}

.hm-service-icon .material-icons { font-size: 20px; }

.hm-service-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }

.hm-service-text strong { font-size: .875rem; font-weight: 500; line-height: 1.35; }

.hm-service-text small { margin-top: 1px; font-size: .75rem; line-height: 1.4; color: hsl(var(--hm-muted-fg)); }

.hm-service > .material-icons {
    flex: 0 0 auto;
    font-size: 18px;
    color: hsl(var(--hm-muted-fg));
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .15s ease, transform .15s ease;
}

.hm-service:hover > .material-icons { opacity: 1; transform: translateX(0); }

/* tone is set on the anchor: .hm-service.t-* → tint the icon tile */
.hm-service.t-violet .hm-service-icon { color: hsl(262 83% 70%); background: hsl(262 83% 58% / .12); border-color: hsl(262 83% 58% / .3); }
.hm-service.t-cyan   .hm-service-icon { color: hsl(187 92% 60%); background: hsl(187 92% 43% / .12); border-color: hsl(187 92% 43% / .3); }
.hm-service.t-blue   .hm-service-icon { color: hsl(217 91% 68%); background: hsl(217 91% 60% / .12); border-color: hsl(217 91% 60% / .3); }
.hm-service.t-green  .hm-service-icon { color: hsl(142 71% 55%); background: hsl(142 71% 45% / .12); border-color: hsl(142 71% 45% / .3); }
.hm-service.t-amber  .hm-service-icon { color: hsl(38 92% 60%);  background: hsl(38 92% 50% / .12);  border-color: hsl(38 92% 50% / .3); }
.hm-service.t-rose   .hm-service-icon { color: hsl(346 77% 65%); background: hsl(346 77% 50% / .12); border-color: hsl(346 77% 50% / .3); }

/* =========================
   ARTICLES (markup: sw-scripts.js)
   ========================= */

.hm-articles .artikel-skeleton,
.hm-articles .artikel-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.hm-articles .artikel-skeleton::-webkit-scrollbar,
.hm-articles .artikel-scroll::-webkit-scrollbar { height: 4px; }

.hm-articles .artikel-skeleton::-webkit-scrollbar-thumb,
.hm-articles .artikel-scroll::-webkit-scrollbar-thumb {
    background: hsl(var(--hm-border));
    border-radius: 4px;
}

/* JS injects inline white text on empty/error states — override */
.hm-articles #artikelScroll > p {
    margin: 0;
    padding: 8px 0 !important;
    font-size: .8125rem !important;
    color: hsl(var(--hm-muted-fg)) !important;
}

.artikel-skel-card {
    flex: 0 0 240px;
    overflow: hidden;
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
}

.artikel-skel-img { height: 126px; background: hsl(var(--hm-muted)); }

.artikel-skel-body { display: grid; gap: 8px; padding: 14px; }

.artikel-skel-line { height: 10px; background: hsl(var(--hm-muted)); border-radius: 999px; }

.artikel-skel-line.short { width: 55%; }

.artikel-skel-img,
.artikel-skel-line { animation: hmFade 1.6s ease-in-out infinite; }

.artikel-card {
    display: flex;
    flex: 0 0 240px;
    flex-direction: column;
    overflow: hidden;
    color: hsl(var(--hm-fg)) !important;
    background: hsl(var(--hm-card));
    border: 1px solid hsl(var(--hm-border));
    border-radius: calc(var(--hm-radius) + 2px);
    scroll-snap-align: start;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.artikel-card:hover {
    border-color: hsl(var(--hm-ring) / .4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px hsl(240 10% 2% / .35);
}

body.light-mode .artikel-card:hover { box-shadow: 0 8px 20px hsl(240 10% 3.9% / .1); }

.artikel-card-img-wrap {
    position: relative;
    height: 126px;
    overflow: hidden;
    background: hsl(var(--hm-muted));
}

.artikel-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.artikel-card:hover .artikel-card-img { transform: scale(1.05); }

.artikel-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: hsl(var(--hm-muted-fg));
}

.artikel-no-img .material-icons { font-size: 24px; }

.artikel-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; }

.artikel-card-date {
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: hsl(var(--hm-muted-fg));
}

.artikel-card-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* =========================
   MOTION
   ========================= */

@keyframes hmPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

@keyframes hmLive {
    0% { transform: scale(.6); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes hmFade {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (min-width: 768px) {
    .hm-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .hm-shell { padding-right: 15px; padding-left: 15px; }
    .hm-layout { grid-template-columns: minmax(0, 1fr); }
    .hm-prayer { order: 2; }

    /* login: single column, brand panel folds into the card */
    .hm-auth { grid-template-columns: minmax(0, 1fr); }
    .hm-auth-brand { display: none; }
    .hm-auth-panel { padding: 88px 20px 40px; }
    .hm-auth-mobilebrand { display: flex; }
}

@media (max-width: 767px) {
    .hm-shell { padding-bottom: 88px; }

    /* 16px inputs: prevents iOS focus zoom */
    .hm-input { font-size: 16px; }

    .hm-hello { font-size: 1.3125rem; }

    .hm-clock { width: 100%; padding: 10px 14px; }

    .hm-clock-txt { flex-direction: row; align-items: baseline; gap: 8px; width: 100%; justify-content: space-between; }

    .hm-eye { width: 36px; height: 36px; }
}

@media (max-width: 639px) {
    .hm-auth-panel { justify-content: flex-start; gap: 14px; padding: 84px 16px 28px; }
    .hm-auth-card { padding: 24px 20px 22px; border-radius: 18px; }
    .hm-auth-mobilebrand { margin-bottom: 20px; padding-bottom: 18px; }
    .hm-auth-heading { margin-bottom: 22px; }
    .hm-auth-title { font-size: 1.375rem; }
    .hm-auth-sub { font-size: .8438rem; }
    .hm-theme-toggle { top: 16px; right: 16px; }
    .hm-auth-note { margin-top: 18px; padding-top: 16px; }

    .hm-service { gap: 10px; padding: 12px 14px; }
    .hm-service-icon { flex-basis: 34px; width: 34px; height: 34px; }
    .hm-service-icon .material-icons { font-size: 18px; }
    .hm-service-text small { display: none; }
    .hm-service > .material-icons { display: none; }
}

@media (max-width: 575px) {
    .hm-att { padding: 16px; }
    .hm-times { gap: 8px; }
    .hm-time { padding: 12px; gap: 10px; }
    .hm-time-ic { flex-basis: 34px; width: 34px; height: 34px; }
    .hm-time-ic .material-icons { font-size: 17px; }
    .hm-time strong { font-size: 1.375rem; }
    .hm-time-arrow { font-size: 15px; }

    .hm-prayer { padding: 16px; }
    .hm-section { margin-bottom: 22px; }
}

@media (max-width: 359px) {
    .hm-att-head { flex-wrap: wrap; }
    .hm-times { flex-direction: column; }
    .hm-time-arrow { display: none; }

    .hm-auth-panel { padding: 78px 12px 22px; }
    .hm-auth-card { padding: 20px 16px 18px; }
    .hm-auth-mobilebrand { margin-bottom: 18px; padding-bottom: 16px; }
}

/* short viewports (landscape phones/tablets): keep the card above the fold */
@media (max-height: 720px) and (min-width: 1024px) {
    .hm-auth-brand { gap: 20px; padding: 24px 32px; }
    .hm-brand-desc,
    .hm-brand-list { display: none; }
}

@media (max-height: 620px) and (max-width: 1023px) {
    .hm-auth-panel { justify-content: flex-start; padding-top: 76px; }
}

/* very small phones: drop the in-card brand to keep the form close to the fold */
@media (max-height: 620px) and (max-width: 639px) {
    .hm-auth-mobilebrand { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-brand-glow { animation: none; }

    .hm-att--bekerja .hm-dot,
    .hm-clock-live::after,
    .artikel-skel-img,
    .artikel-skel-line { animation: none; }

    .hm-service,
    .artikel-card,
    .artikel-card-img,
    .hm-cta,
    .hm-btn,
    .hm-input,
    .hm-eye,
    .hm-service > .material-icons { transition: none; }

    .hm-service:hover,
    .artikel-card:hover,
    .hm-cta:active,
    .hm-btn:active { transform: none; }
}

/* =========================
   LIGHT-MODE COLOR RE-ASSERT
   light-theme.css forces `body.light-mode span,p,a,small {color:#1e293b!important}`
   — re-assert token colors with higher specificity.
   ========================= */

body.light-mode .hm-eyebrow,
body.light-mode .hm-role,
body.light-mode .hm-clock-label,
body.light-mode .hm-duration,
body.light-mode .hm-card-sub,
body.light-mode .hm-auth-sub,
body.light-mode .hm-auth-note,
body.light-mode .hm-auth-panel-foot,
body.light-mode .hm-label,
body.light-mode .hm-check,
body.light-mode .hm-loc,
body.light-mode .hm-prayer-date,
body.light-mode .hm-time-label,
body.light-mode .hm-time small,
body.light-mode .hm-service-text small,
body.light-mode .prayer-item-name,
body.light-mode .artikel-card-date,
body.light-mode .hm-brand-name,
body.light-mode .hm-link { color: hsl(var(--hm-muted-fg)) !important; }

body.light-mode .hm-link:hover,
body.light-mode .hm-check:hover { color: hsl(var(--hm-fg)) !important; }

body.light-mode .hm-cta { color: hsl(var(--hm-primary-fg)) !important; }
body.light-mode .hm-cta--done { color: hsl(var(--hm-muted-fg)) !important; }
body.light-mode .hm-cta--done .material-icons { color: hsl(var(--hm-success)) !important; }

body.light-mode .hm-service,
body.light-mode .hm-time-ic,
body.light-mode .hm-avatar,
body.light-mode .prayer-item-time,
body.light-mode .artikel-card-title,
body.light-mode .artikel-no-img,
body.light-mode .hm-time-arrow { color: hsl(var(--hm-fg)) !important; }

body.light-mode .hm-duration strong { color: hsl(var(--hm-fg)) !important; }

body.light-mode .hm-service.t-violet .hm-service-icon { color: hsl(262 83% 45%) !important; }
body.light-mode .hm-service.t-cyan   .hm-service-icon { color: hsl(187 92% 30%) !important; }
body.light-mode .hm-service.t-blue   .hm-service-icon { color: hsl(217 91% 45%) !important; }
body.light-mode .hm-service.t-green  .hm-service-icon { color: hsl(142 71% 30%) !important; }
body.light-mode .hm-service.t-amber  .hm-service-icon { color: hsl(32 95% 32%) !important; }
body.light-mode .hm-service.t-rose   .hm-service-icon { color: hsl(346 77% 40%) !important; }

body.light-mode .hm-forgot { color: hsl(var(--hm-muted-fg)) !important; }
body.light-mode .hm-forgot:hover { color: hsl(var(--hm-fg)) !important; }

body.light-mode .hm-chip { color: hsl(var(--hm-muted-fg)) !important; }
body.light-mode .hm-att--bekerja .hm-chip { color: hsl(var(--hm-warning)) !important; }
body.light-mode .hm-att--selesai .hm-chip { color: hsl(var(--hm-success)) !important; }
body.light-mode .hm-dot { color: inherit !important; }

body.light-mode .hm-time.is-done .hm-time-ic { color: hsl(var(--hm-success)) !important; }

body.light-mode .prayer-item.active .prayer-item-name,
body.light-mode .prayer-item.active .prayer-item-time { color: hsl(var(--hm-primary-fg)) !important; }

body.light-mode .hm-btn { color: #fff !important; }
body.light-mode .hm-btn > span { color: #fff !important; }
body.light-mode .hm-btn .material-icons { color: #fff !important; }
body.light-mode .hm-btn--ghost,
body.light-mode .hm-btn--ghost .material-icons { color: hsl(var(--hm-fg)) !important; }
body.light-mode .hm-eye { color: hsl(var(--hm-muted-fg)) !important; }

/* light-theme.css sets `body.light-mode input` with !important — re-assert */
body.light-mode .hm-input {
    background: hsl(var(--hm-muted) / .55) !important;
    border-color: hsl(var(--hm-border)) !important;
    color: hsl(var(--hm-fg)) !important;
}

body.light-mode .hm-input:focus {
    background: hsl(var(--hm-card)) !important;
    border-color: hsl(var(--hm-accent) / .65) !important;
    box-shadow: 0 0 0 3px hsl(var(--hm-accent) / .16) !important;
}

body.light-mode .hm-input::placeholder { color: hsl(var(--hm-muted-fg) / .8) !important; }

body.light-mode .hm-input-icon { color: hsl(var(--hm-muted-fg) / .85) !important; }
body.light-mode .hm-input-wrap:focus-within .hm-input-icon { color: hsl(var(--hm-accent)) !important; }

body.light-mode .hm-auth-note .material-icons,
body.light-mode .hm-theme-toggle .material-icons { color: hsl(var(--hm-accent)) !important; }

/* login brand panel stays dark in light mode — re-assert its own palette */
body.light-mode .hm-auth-brand .hm-brand-title,
body.light-mode .hm-auth-brand .hm-brand-list strong {
    color: hsl(0 0% 98%) !important;
}

body.light-mode .hm-auth-brand .hm-brand-desc,
body.light-mode .hm-auth-brand .hm-brand-list li div > span,
body.light-mode .hm-auth-brand .hm-brand-foot,
body.light-mode .hm-auth-brand .hm-brand-foot span {
    color: hsl(0 0% 100% / .55) !important;
}

body.light-mode .hm-auth-brand .hm-brand-eyebrow { color: hsl(258 90% 78%) !important; }
body.light-mode .hm-auth-brand .hm-brand-list .material-icons { color: hsl(258 90% 80%) !important; }
body.light-mode .hm-auth-brand .hm-brand-name { color: hsl(0 0% 100% / .8) !important; }

/* brand panel is always dark, so it always needs the white logo */
body.light-mode .hm-auth-brand .hm-logo--dark { display: block; }
body.light-mode .hm-auth-brand .hm-logo--light { display: none; }

body.light-mode .hm-loc .material-icons,
body.light-mode .hm-duration .material-icons { color: hsl(var(--hm-muted-fg)) !important; }