/* ==========================================================
   MARZIN - HOME PAGE (MOBILE FIRST)
========================================================== */

html {
    min-height: 100%;
    overflow-y: auto;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    flex: 1 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    padding-block: 0;
}

.main-content > .container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    padding-inline: 0;
}

.main-content > .container > .message,
.main-content > .container > .messages {
    width: min(calc(100% - 2rem), 1360px);
    margin: 1rem auto 0;
}

.home-hero {
    position: relative;
    min-height: calc(100svh - 68px);
    overflow: visible;
    isolation: isolate;
    background:
        url("../images/home/marzyar-border-background.png")
        61% center / cover no-repeat,
        #0b2741;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(3, 18, 31, .48) 0%,
            rgba(3, 18, 31, .08) 42%,
            rgba(3, 18, 31, .55) 100%
        );
}

.home-hero-inner {
    position: relative;
    width: calc(100% - 1rem);
    min-height: calc(100svh - 68px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: .75rem 0 1rem;
}

/* ==========================================================
   SERVICE INTRODUCTION
========================================================== */

.home-brand-panel {
    width: 100%;
    padding: .9rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 20px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(8, 43, 66, .34), rgba(3, 24, 42, .14));
    box-shadow:
        0 18px 45px rgba(0, 0, 0, .2),
        inset 0 1px 0 rgba(255, 255, 255, .16);
    backdrop-filter: blur(9px) saturate(115%);
    -webkit-backdrop-filter: blur(9px) saturate(115%);
    text-align: center;
}

.home-ready-mobile-panel,
.home-admin-mobile-panel {
    width: 100%;
    padding: .72rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(145deg, rgba(3, 27, 47, .58), rgba(6, 42, 66, .28));
    box-shadow:
        0 16px 38px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .14);
    backdrop-filter: blur(12px) saturate(118%);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
}

.home-ready-mobile-panel .home-mobile-datetime,
.home-admin-mobile-panel .home-mobile-datetime {
    margin-bottom: 0;
}

.home-time-brand-footer {
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    margin-top: .75rem;
    padding-top: .7rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
    text-align: center;
}

.home-time-brand-footer strong {
    direction: ltr;
    color: #ffffff;
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .04em;
}

.home-time-brand-footer span {
    color: #d7f7f7;
    font-size: .74rem;
    font-weight: 800;
    line-height: 1.7;
}

.home-mobile-datetime {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    margin-bottom: .8rem;
    padding: .5rem .62rem;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 12px;
    background: rgba(3, 24, 42, .5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.home-mobile-datetime-primary {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: .55rem;
}

.home-mobile-time {
    direction: ltr;
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.home-mobile-persian-date {
    min-width: 0;
    overflow: hidden;
    direction: rtl;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: .22em;
    color: rgba(240, 248, 252, .92);
    font-size: .7rem;
    font-weight: 750;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-mobile-gregorian-date {
    direction: ltr;
    color: rgba(220, 234, 242, .78);
    font-size: .6rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    margin-bottom: .45rem;
    padding: .25rem .7rem;
    border: 1px solid rgba(110, 229, 232, .28);
    border-radius: 999px;
    color: #d9fbfb;
    background: rgba(6, 152, 170, .16);
    font-size: .74rem;
    font-weight: 800;
}

.home-hero-title {
    direction: ltr;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.35rem, 12vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: .025em;
    text-align: center;
    text-shadow: 0 5px 24px rgba(0, 0, 0, .42);
}

.home-hero-subtitle {
    margin: .65rem 0 0;
    color: #d7f7f7;
    font-size: clamp(.94rem, 4vw, 1.08rem);
    font-weight: 850;
    line-height: 1.8;
    text-align: center;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .42);
}

.home-system-intro {
    margin-top: .75rem;
    padding-top: .7rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.home-system-intro p {
    margin: 0;
    color: rgba(242, 248, 251, .92);
    font-size: .79rem;
    line-height: 1.95;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .42);
}

.home-guest-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-top: .9rem;
}

.home-guest-button {
    min-width: 0;
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem .8rem;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 11px;
    color: #ffffff;
    background: rgba(4, 31, 51, .5);
    font-size: .8rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.home-guest-button:hover {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(110, 229, 232, .7);
    box-shadow: 0 12px 22px rgba(0, 0, 0, .2);
}

.home-guest-button-primary {
    color: #ffffff;
    border-color: #078c9d;
    background: linear-gradient(135deg, #078c9d, #0a7186);
}

.home-guest-button-primary:hover {
    color: #ffffff;
    border-color: #0698aa;
    background: linear-gradient(135deg, #0698aa, #086d83);
}

/* Hidden on mobile; enabled for tablet and desktop below. */
.home-desktop-time-panel {
    display: none;
}

.home-notice-space {
    width: 100%;
    display: block;
    padding: 0 .5rem 1.25rem;
}

.home-announcements {
    width: min(100%, 1180px);
    max-height: min(55svh, 560px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: .9rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 22px;
    background: rgba(3, 25, 43, .34);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .16);
    backdrop-filter: blur(8px) saturate(112%);
    -webkit-backdrop-filter: blur(8px) saturate(112%);
}

.home-announcements-header {
    margin-bottom: .85rem;
    text-align: center;
}

.home-announcements-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    line-height: 1.5;
}

.home-announcement-grid {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .7rem;
    padding-inline-end: .25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(124, 227, 226, .7) rgba(3, 25, 42, .32);
    scrollbar-width: thin;
}

.home-announcement-grid::-webkit-scrollbar {
    width: 7px;
}

.home-announcement-grid::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(3, 25, 42, .32);
}

.home-announcement-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(124, 227, 226, .7);
}

.home-announcement-card {
    min-width: 0;
    padding: .9rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    color: #f4fbff;
    background: rgba(3, 25, 42, .62);
    box-shadow:
        0 10px 25px rgba(0, 0, 0, .14),
        inset 0 1px 0 rgba(255, 255, 255, .1);
}

.home-announcement-card h3 {
    margin: 0 0 .35rem;
    color: #ffffff;
    font-size: .92rem;
    line-height: 1.75;
}

.home-announcement-body {
    color: rgba(232, 243, 248, .9);
    font-size: .76rem;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

/* ==========================================================
   AUTHENTICATED QUICK ACCESS
========================================================== */

.home-access-overlay {
    width: 100%;
    margin-top: auto;
    padding: .65rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 19px;
    background: rgba(4, 26, 43, .36);
    box-shadow: 0 15px 38px rgba(0, 0, 0, .16);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.home-hero-inner.is-user-ready .home-access-overlay {
    margin-top: 0;
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.home-actions-single {
    grid-template-columns: minmax(0, 1fr);
}

.home-action-card {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .32rem;
    padding: .7rem .5rem;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 14px;
    color: #0d3048;
    background: rgba(250, 253, 255, .91);
    box-shadow:
        0 10px 23px rgba(0, 0, 0, .12),
        inset 0 1px 0 rgba(255, 255, 255, .92);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.home-action-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 230, 226, .72);
    box-shadow: 0 15px 30px rgba(0, 0, 0, .16);
}

.home-action-card-primary {
    background: linear-gradient(
        145deg,
        rgba(231, 251, 251, .95),
        rgba(255, 255, 255, .93)
    );
}

.home-action-icon {
    font-size: 1.55rem;
    line-height: 1;
}

.home-action-card strong {
    font-size: .88rem;
}

.home-action-card > span:last-child {
    color: #5d7281;
    font-size: .67rem;
    line-height: 1.6;
}

.home-stat-card {
    width: min(100%, 360px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 17px;
    color: #0d3048;
    background: rgba(250, 253, 255, .92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
}

.home-stat-icon {
    font-size: 2rem;
}

.home-stat-card > div {
    display: grid;
    gap: .1rem;
}

.home-stat-value {
    color: #0f8f96;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.15;
}

.home-stat-card small {
    color: #64748b;
    font-size: .72rem;
}

/* ==========================================================
   SYSTEM ADMIN LIVE DASHBOARD
========================================================== */

.home-access-overlay-admin {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-admin-dashboard {
    direction: rtl;
    width: 100%;
    color: #ffffff;
}

.home-admin-dashboard-header {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    margin-bottom: .7rem;
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: rgba(3, 25, 43, .7);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .17);
    backdrop-filter: blur(12px) saturate(118%);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
}

.home-admin-live-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .58rem;
    border: 1px solid rgba(119, 245, 224, .32);
    border-radius: 999px;
    color: #c8fff5;
    background: rgba(18, 151, 133, .18);
    font-size: .66rem;
    font-weight: 850;
}

.home-admin-live-badge > span {
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 4px rgba(94, 234, 212, .12);
}

.home-admin-dashboard-header h2 {
    margin: .38rem 0 .12rem;
    color: #ffffff;
    font-size: clamp(1.15rem, 5vw, 1.55rem);
    line-height: 1.45;
}

.home-admin-dashboard-header p {
    margin: 0;
    color: rgba(226, 242, 248, .82);
    font-size: .7rem;
    line-height: 1.75;
}

.home-admin-updated {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .12rem .6rem;
    padding: .55rem .68rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}

.home-admin-updated > span {
    color: rgba(222, 238, 246, .78);
    font-size: .64rem;
    font-weight: 750;
}

.home-admin-updated time {
    direction: ltr;
    color: #ffffff;
    font-size: .86rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.home-admin-updated small {
    grid-column: 1 / -1;
    color: rgba(200, 255, 245, .72);
    font-size: .58rem;
}

.home-admin-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .7rem;
}

.home-admin-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 18px;
    box-shadow:
        0 16px 36px rgba(0, 0, 0, .2),
        inset 0 1px 0 rgba(255, 255, 255, .1);
    backdrop-filter: blur(12px) saturate(118%);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
}

.home-admin-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    opacity: .72;
    background: linear-gradient(90deg, transparent, #86f4eb, transparent);
}

.home-admin-card-users {
    order: 3;
    background:
        radial-gradient(circle at 12% 8%, rgba(47, 149, 232, .28), transparent 40%),
        linear-gradient(145deg, rgba(16, 67, 113, .95), rgba(5, 37, 66, .94));
}

.home-admin-card-appointments {
    order: 1;
    background:
        radial-gradient(circle at 12% 8%, rgba(74, 222, 190, .25), transparent 42%),
        linear-gradient(145deg, rgba(7, 105, 113, .96), rgba(4, 58, 76, .95));
}

.home-admin-card-tasks {
    order: 2;
    background:
        radial-gradient(circle at 8% 8%, rgba(251, 146, 60, .2), transparent 40%),
        linear-gradient(145deg, rgba(20, 50, 82, .97), rgba(7, 33, 58, .96));
}

.home-admin-card-health {
    order: 4;
    background:
        radial-gradient(circle at 10% 8%, rgba(148, 163, 184, .16), transparent 42%),
        linear-gradient(145deg, rgba(42, 52, 65, .97), rgba(19, 27, 38, .97));
}

.home-admin-card-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .62rem;
    margin-bottom: .72rem;
}

.home-admin-card-icon {
    width: 2.45rem;
    height: 2.45rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
    font-size: 1.2rem;
    line-height: 1;
}

.home-admin-card-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: .93rem;
    line-height: 1.55;
}

.home-admin-card-header p {
    margin: .05rem 0 0;
    color: rgba(223, 240, 247, .75);
    font-size: .61rem;
    line-height: 1.55;
}

.home-admin-card-total {
    display: inline-flex;
    align-items: baseline;
    gap: .22rem;
    padding: .32rem .48rem;
    border: 1px solid rgba(251, 146, 60, .26);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(234, 88, 12, .14);
    font-size: .58rem;
    white-space: nowrap;
}

.home-admin-card-total strong {
    color: #ffffff;
    font-size: .9rem;
}

.home-admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

.home-admin-metric {
    min-width: 0;
    min-height: 77px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .12rem;
    padding: .58rem;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    transition:
        transform .18s ease,
        border-color .18s ease,
        background-color .18s ease;
}

.home-admin-metric:hover,
.home-admin-metric:focus-visible {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(153, 246, 228, .48);
    background: rgba(255, 255, 255, .12);
}

.home-admin-metric > span {
    color: rgba(225, 241, 247, .78);
    font-size: .61rem;
    font-weight: 750;
    line-height: 1.45;
}

.home-admin-metric strong {
    color: #ffffff;
    font-size: clamp(1.18rem, 6vw, 1.62rem);
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.home-admin-metric small {
    color: rgba(218, 239, 245, .68);
    font-size: .53rem;
    line-height: 1.45;
}

.home-admin-metric.is-success strong {
    color: #99f6e4;
}

.home-admin-metric.is-warning strong {
    color: #fed7aa;
}

.home-admin-metric.is-danger strong {
    color: #fecaca;
}

.home-admin-metric.is-prominent {
    border-color: rgba(153, 246, 228, .25);
    background: rgba(153, 246, 228, .1);
}

.home-admin-metric .home-admin-metric-text {
    font-size: .88rem;
    line-height: 1.55;
}

.home-admin-progress-block {
    margin-top: .55rem;
    padding: .58rem .65rem;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    background: rgba(2, 23, 42, .2);
}

.home-admin-progress-block > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .4rem;
}

.home-admin-progress-block span,
.home-admin-progress-block strong {
    font-size: .58rem;
    line-height: 1.5;
}

.home-admin-progress-block strong {
    color: #c8fff5;
}

.home-admin-progress-track {
    direction: ltr;
    height: 6px;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 0, 0, .28);
}

.home-admin-progress-track > span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #5eead4);
    box-shadow: 0 0 12px rgba(94, 234, 212, .35);
    transition: width .35s ease;
}

.home-admin-task-list,
.home-admin-health-list {
    display: grid;
    gap: .45rem;
}

.home-admin-task-item {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    padding: .62rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .06);
    transition:
        transform .18s ease,
        border-color .18s ease,
        background-color .18s ease;
}

.home-admin-task-item:hover,
.home-admin-task-item:focus-visible {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(251, 146, 60, .42);
    background: rgba(255, 255, 255, .1);
}

.home-admin-task-marker {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, .1);
}

.home-admin-task-item > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: .1rem;
}

.home-admin-task-item strong {
    color: #ffffff;
    font-size: .68rem;
    line-height: 1.55;
}

.home-admin-task-item small {
    color: rgba(226, 238, 246, .67);
    font-size: .55rem;
    line-height: 1.45;
}

.home-admin-task-item b {
    min-width: 2rem;
    color: #fed7aa;
    font-size: 1.22rem;
    text-align: center;
}

.home-admin-health-light {
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 5px rgba(94, 234, 212, .1);
}

.home-admin-card-health.is-warning .home-admin-health-light {
    background: #fbbf24;
    box-shadow: 0 0 0 5px rgba(251, 191, 36, .1);
}

.home-admin-card-health.is-danger {
    border-color: rgba(248, 113, 113, .38);
}

.home-admin-card-health.is-danger .home-admin-health-light {
    background: #f87171;
    box-shadow: 0 0 0 5px rgba(248, 113, 113, .1);
}

.home-admin-health-list {
    grid-template-columns: minmax(0, 1fr);
}

.home-admin-health-list > a {
    min-width: 0;
    display: grid;
    gap: .12rem;
    padding: .6rem;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, .055);
    transition:
        transform .18s ease,
        border-color .18s ease,
        background-color .18s ease;
}

.home-admin-health-list > a:hover,
.home-admin-health-list > a:focus-visible {
    transform: translateY(-2px);
    color: #ffffff;
    border-color: rgba(148, 163, 184, .42);
    background: rgba(255, 255, 255, .09);
}

.home-admin-health-list span {
    color: rgba(222, 235, 242, .68);
    font-size: .58rem;
    line-height: 1.45;
}

.home-admin-health-list strong {
    color: #ffffff;
    font-size: .75rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.home-admin-health-list small {
    color: rgba(222, 235, 242, .58);
    font-size: .52rem;
    line-height: 1.45;
}

.home-admin-refresh-status {
    min-height: 1.2rem;
    margin: .35rem 0 0;
    color: #fecaca;
    font-size: .62rem;
    line-height: 1.6;
    text-align: center;
}

.home-admin-dashboard.is-refreshing {
    cursor: progress;
}

.home-admin-dashboard.is-refreshing .home-admin-live-badge > span {
    animation: home-admin-live-pulse 1s ease-in-out infinite;
}

@keyframes home-admin-live-pulse {
    50% {
        opacity: .38;
        transform: scale(.72);
    }
}

.home-stage-note {
    width: fit-content;
    max-width: calc(100% - 1rem);
    margin: .65rem auto 0;
    padding: .52rem .8rem;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 10px;
    color: #f2f8fb;
    background: rgba(4, 28, 47, .64);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .1);
    font-size: .76rem;
    line-height: 1.75;
}

/*
 * Login/logout feedback owns the viewport for three seconds.
 * The normal page stays invisible for the first second, then both
 * layers crossfade until the feedback stage is removed.
 */

body.home-auth-feedback-active {
    overflow: hidden;
}

body.home-auth-feedback-active
    > :not(.home-auth-feedback-stage):not(script) {
    animation: home-auth-page-reveal 3s cubic-bezier(.4, 0, .2, 1) both;
}

.home-auth-feedback-stage {
    position: fixed;
    inset: 0;
    z-index: 5000;
    overflow: hidden;
    display: grid;
    place-items: center;
    isolation: isolate;
    background:
        url("../images/home/marzyar-border-background.png")
        61% center / cover no-repeat,
        #0b2741;
    animation: home-auth-feedback-stage-lifetime 3s cubic-bezier(.4, 0, .2, 1) forwards;
}

.home-auth-feedback-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(3, 18, 31, .48) 0%,
            rgba(3, 18, 31, .08) 42%,
            rgba(3, 18, 31, .55) 100%
        );
}

.home-auth-feedback-card {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), 620px);
    min-height: 112px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(.65rem, 2.5vw, 1.15rem);
    padding: clamp(1.15rem, 4vw, 1.6rem) clamp(1rem, 4vw, 1.75rem) 1.45rem;
    overflow: hidden;
    border: 1px solid rgba(143, 248, 243, .62);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(8, 51, 74, .9),
            rgba(3, 24, 42, .84)
        );
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .4),
        0 0 34px rgba(15, 226, 220, .2),
        inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    animation: home-auth-feedback-card-lifetime 3s cubic-bezier(.2, .8, .25, 1) both;
}

.home-auth-feedback-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 209, 102, .8),
        rgba(143, 248, 243, .95),
        rgba(255, 209, 102, .8),
        transparent
    );
}

.home-auth-feedback-flower {
    display: inline-grid;
    place-items: center;
    color: #ffd166;
    font-size: clamp(1.45rem, 5vw, 2.15rem);
    line-height: 1;
    text-shadow:
        0 0 8px rgba(255, 209, 102, .7),
        0 0 18px rgba(15, 226, 220, .28);
    animation: home-auth-feedback-flower-bloom 3s ease both;
}

.home-auth-feedback-flower-end {
    animation-name: home-auth-feedback-flower-bloom-reverse;
}

.home-auth-feedback {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #8ff8f3;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font-size: clamp(1.15rem, 4vw, 1.95rem);
    font-weight: 900;
    line-height: 1.6;
    text-align: center;
    text-shadow:
        0 2px 5px rgba(0, 0, 0, .75),
        0 0 18px rgba(15, 226, 220, .42);
    pointer-events: none;
}

.home-auth-feedback-progress {
    position: absolute;
    right: 1.1rem;
    bottom: .65rem;
    left: 1.1rem;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
}

.home-auth-feedback-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffd166, #8ff8f3);
    box-shadow: 0 0 10px rgba(143, 248, 243, .7);
    transform-origin: right center;
    animation: home-auth-feedback-progress 3s linear forwards;
}

@keyframes home-auth-feedback-card-lifetime {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.9);
    }

    16%,
    82% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-13px) scale(.96);
    }
}

@keyframes home-auth-feedback-flower-bloom {
    0% {
        opacity: 0;
        transform: scale(.25) rotate(-65deg);
    }

    20%,
    82% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }

    100% {
        opacity: 0;
        transform: scale(.75) rotate(24deg);
    }
}

@keyframes home-auth-feedback-flower-bloom-reverse {
    0% {
        opacity: 0;
        transform: scale(.25) rotate(65deg);
    }

    20%,
    82% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }

    100% {
        opacity: 0;
        transform: scale(.75) rotate(-24deg);
    }
}

@keyframes home-auth-feedback-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@keyframes home-auth-feedback-stage-lifetime {
    0%,
    33.3333% {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    99.9% {
        visibility: visible;
        pointer-events: auto;
    }

    100% {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }
}

@keyframes home-auth-page-reveal {
    0%,
    33.3333% {
        opacity: 0;
        pointer-events: none;
    }

    99.9% {
        pointer-events: none;
    }

    100% {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ==========================================================
   SMALL MOBILE
========================================================== */

@media (max-width: 359px) {
    .home-auth-feedback-card {
        gap: .5rem;
        min-height: 100px;
        padding-inline: .75rem;
        border-radius: 19px;
    }

    .home-mobile-datetime-primary {
        gap: .35rem;
    }

    .home-mobile-time {
        font-size: 1.05rem;
    }

    .home-mobile-persian-date {
        font-size: .64rem;
    }

    .home-mobile-gregorian-date {
        font-size: .55rem;
    }

    .home-guest-actions,
    .home-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   TABLET AND DESKTOP
========================================================== */

@media (min-width: 761px) {
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .home-mobile-datetime {
        display: none;
    }

    .home-ready-mobile-panel,
    .home-admin-mobile-panel {
        display: none;
    }

    .home-hero {
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
        background-position: center center;
    }

    .home-hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(3, 18, 31, .06) 0%,
                rgba(3, 18, 31, .12) 100%
            );
    }

    .home-hero-inner {
        width: min(calc(100% - 2rem), 1180px);
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "time"
            "brand"
            "access";
        align-content: start;
        justify-items: center;
        gap: .85rem;
        padding: 1rem 0 1.5rem;
    }

    .home-hero-inner.is-admin-dashboard {
        grid-template-areas:
            "time"
            "access";
        gap: .7rem;
        padding-bottom: 1rem;
    }

    .home-brand-panel {
        grid-area: brand;
        position: static;
        width: min(100%, 1180px);
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: clamp(.9rem, 2vw, 1.35rem);
        border-radius: 26px;
        background:
            linear-gradient(145deg, rgba(4, 30, 49, .3), rgba(2, 19, 33, .12));
        backdrop-filter: blur(6px) saturate(110%);
        -webkit-backdrop-filter: blur(6px) saturate(110%);
        text-align: center;
        transform: none;
    }

    .home-desktop-time-panel {
        grid-area: time;
        position: static;
        width: min(100%, 640px);
        display: block;
        padding: .85rem;
        border: 1px solid rgba(255, 255, 255, .25);
        border-radius: 20px;
        color: #ffffff;
        background:
            linear-gradient(145deg, rgba(3, 27, 47, .58), rgba(6, 42, 66, .28));
        box-shadow:
            0 16px 38px rgba(0, 0, 0, .18),
            inset 0 1px 0 rgba(255, 255, 255, .14);
        backdrop-filter: blur(13px) saturate(120%);
        -webkit-backdrop-filter: blur(13px) saturate(120%);
    }

    .home-desktop-time-panel.is-user-ready {
        width: min(100%, 760px);
        min-height: 245px;
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }

    .home-desktop-time-panel.is-admin-dashboard {
        width: min(100%, 760px);
        min-height: 205px;
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }

    .home-desktop-time-panel.is-admin-dashboard .home-border-clocks {
        flex: 1 0 auto;
        align-items: stretch;
    }

    .home-desktop-time-panel.is-admin-dashboard .home-border-clock {
        align-content: center;
        min-height: 70px;
    }

    .home-desktop-time-panel.is-user-ready .home-border-clocks {
        flex: 1 0 auto;
        align-items: stretch;
    }

    .home-desktop-time-panel.is-user-ready .home-border-clock {
        align-content: center;
        min-height: 78px;
    }

    .home-desktop-time-panel.is-user-ready .home-time-brand-footer {
        margin-top: .85rem;
        padding-top: .8rem;
    }

    .home-desktop-time-panel.is-user-ready .home-time-brand-footer strong {
        font-size: 1.55rem;
    }

    .home-desktop-time-panel.is-user-ready .home-time-brand-footer span {
        font-size: .8rem;
    }

    .home-desktop-date-row {
        direction: rtl;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .7rem;
        padding: .05rem .15rem .7rem;
        border-bottom: 1px solid rgba(255, 255, 255, .2);
    }

    .home-desktop-persian-date {
        direction: rtl;
        flex: 1 1 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: .3em;
        color: #ffffff;
        font-size: clamp(.82rem, 1.35vw, 1.02rem);
        font-weight: 900;
        line-height: 1.6;
        text-align: right;
        white-space: nowrap;
    }

    .home-persian-date-number {
        direction: ltr;
        unicode-bidi: isolate;
    }

    .home-desktop-gregorian-date {
        direction: ltr;
        color: rgba(222, 238, 246, .82);
        font-size: clamp(.58rem, .8vw, .7rem);
        font-weight: 650;
        white-space: nowrap;
    }

    .home-border-clocks {
        direction: rtl;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .55rem;
        padding-top: .75rem;
        margin-inline: auto;
    }

    .home-border-clock {
        min-width: 0;
        display: grid;
        justify-items: center;
        gap: .25rem;
        padding: .58rem .35rem;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 13px;
        background: rgba(2, 22, 38, .32);
    }

    .home-border-clock-country {
        direction: ltr;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        color: rgba(218, 244, 246, .9);
        font-size: clamp(.64rem, .9vw, .75rem);
        font-weight: 850;
    }

    .home-border-clock-flag {
        font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
        font-size: 1rem;
        line-height: 1;
    }

    .home-border-clock time {
        direction: ltr;
        color: #ffffff;
        font-size: clamp(.88rem, 1.55vw, 1.22rem);
        font-weight: 900;
        font-variant-numeric: tabular-nums;
        letter-spacing: .03em;
        line-height: 1.15;
    }

    .home-hero-title {
        font-size: clamp(2.9rem, 5vw, 4.25rem);
        text-align: center;
    }

    .home-hero-subtitle {
        max-width: none;
        margin-inline: auto;
        font-size: clamp(1rem, 1.5vw, 1.22rem);
        text-align: center;
    }

    .home-system-intro {
        width: min(100%, 1060px);
    }

    .home-system-intro p {
        max-width: none;
        font-size: .87rem;
        text-align: center;
    }

    .home-guest-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: .65rem;
    }

    .home-guest-button {
        min-width: 148px;
        padding-inline: 1.15rem;
        font-size: .84rem;
    }

    .home-access-overlay {
        grid-area: access;
        position: static;
        grid-column: 1 / -1;
        width: min(100%, 1040px);
        margin-inline: auto;
        padding: .75rem;
        border-radius: 21px;
    }

    .home-access-overlay.home-access-overlay-admin {
        width: min(100%, 1180px);
        padding: 0;
        border: 0;
        border-radius: 0;
    }

    .home-admin-dashboard-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.2rem;
        padding: 1rem 1.1rem;
    }

    .home-admin-dashboard-header p {
        font-size: .76rem;
    }

    .home-admin-updated {
        min-width: 210px;
    }

    .home-admin-card {
        padding: 1rem;
        border-radius: 20px;
    }

    .home-admin-card-header h3 {
        font-size: 1rem;
    }

    .home-admin-card-header p {
        font-size: .66rem;
    }

    .home-admin-metric-grid-appointments {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .home-admin-metric {
        min-height: 84px;
        padding: .65rem;
    }

    .home-admin-metric > span {
        font-size: .66rem;
    }

    .home-admin-metric strong {
        font-size: 1.55rem;
    }

    .home-admin-health-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-admin-health-list > a {
        min-height: 76px;
        align-content: center;
    }

    .home-notice-space {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        display: block;
        padding: 0 1rem 1.5rem;
        border: 0;
        background: transparent !important;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .home-announcements {
        padding: 1.15rem;
        border-radius: 25px;
    }

    .home-announcement-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: .85rem;
    }

    .home-announcement-card {
        padding: 1rem 1.1rem;
    }

    .home-announcement-card h3 {
        font-size: 1rem;
    }

    .home-announcement-body {
        font-size: .82rem;
    }

    .home-actions {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: .65rem;
    }

    .home-actions-single {
        grid-template-columns: minmax(240px, 430px);
        justify-content: center;
    }

    .home-action-card {
        min-height: 120px;
        padding: .8rem .72rem;
    }

    .home-action-card strong {
        font-size: .92rem;
    }

    .home-action-card > span:last-child {
        font-size: .72rem;
    }
}

@media (min-width: 980px) {
    .home-hero-inner.is-admin-dashboard {
        width: min(calc(100% - 2rem), 1180px);
        grid-template-areas:
            "time"
            "access";
    }

    .home-admin-dashboard-grid {
        grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr);
        align-items: stretch;
    }

    .home-admin-card-users,
    .home-admin-card-appointments,
    .home-admin-card-tasks,
    .home-admin-card-health {
        order: initial;
    }

    .home-admin-card-users,
    .home-admin-card-appointments {
        min-height: 376px;
    }

    .home-admin-card-tasks,
    .home-admin-card-health {
        min-height: 292px;
    }
}

@media (min-width: 761px) and (max-width: 1080px) {
    .home-brand-panel {
        width: min(100%, 960px);
        min-height: 0;
    }

    .home-desktop-time-panel {
        width: min(100%, 620px);
        padding: .7rem;
    }

    .home-access-overlay {
        width: min(calc(100% - 1rem), 900px);
    }

    .home-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1081px) {
    .home-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "time"
            "brand"
            "access";
    }

    .home-brand-panel {
        grid-area: brand;
        width: min(100%, 1180px);
        justify-self: center;
    }

    .home-desktop-time-panel {
        grid-area: time;
        width: min(100%, 640px);
        justify-self: center;
    }

    .home-access-overlay {
        grid-area: access;
    }
}

@media (min-width: 761px) {
    .home-hero-inner.is-user-ready {
        grid-template-areas:
            "time"
            "access";
        gap: .7rem;
        padding-bottom: 1rem;
    }
}

@media (min-width: 992px) {
    .main-nav > ul > .nav-guest-guide-item {
        order: 1;
    }

    .main-nav > ul > .nav-guest-contact-item {
        order: 2;
        margin-inline-start: 0;
    }

    .main-nav > ul > .nav-guest-auth-item {
        order: 3;
        margin-inline-start: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-guest-button,
    .home-action-card,
    .home-admin-metric,
    .home-admin-task-item,
    .home-admin-health-list > a,
    .home-admin-progress-track > span,
    .home-admin-dashboard.is-refreshing .home-admin-live-badge > span,
    body.home-auth-feedback-active
        > :not(.home-auth-feedback-stage):not(script),
    .home-auth-feedback-stage,
    .home-auth-feedback-card,
    .home-auth-feedback-flower,
    .home-auth-feedback-progress::after {
        animation-timing-function: linear;
    }
}

/* ==========================================================
   SYSTEM ADMIN - QUICK ACCESS
========================================================== */
.home-admin-quick-access {
    display: grid;
    grid-template-columns: auto repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: .5rem;
    margin: .7rem 0 .85rem;
    padding: .55rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    background: rgba(3, 24, 42, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-admin-quick-access-title {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: .55rem;
    color: #f2d27a;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.home-admin-quick-access > a {
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    padding: .5rem .48rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 11px;
    color: #f5f9fc;
    background: rgba(255, 255, 255, .06);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.home-admin-quick-access > a:hover,
.home-admin-quick-access > a:focus-visible {
    transform: translateY(-1px);
    color: #0b2741;
    border-color: #f2d27a;
    background: #f2d27a;
    outline: none;
}

.home-admin-quick-access > a > span {
    flex: 0 0 auto;
    font-size: .95rem;
}

@media (max-width: 1080px) {
    .home-admin-quick-access {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-admin-quick-access-title {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding: .15rem .2rem;
    }
}

@media (max-width: 600px) {
    .home-admin-quick-access {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-admin-quick-access > a {
        min-height: 52px;
        font-size: .68rem;
    }
}

