/* Patient sign-in: scoped styles, inherited Persian font, RTL layout. */
.ps-signin {
    --ps-ink: #213e42;
    --ps-muted: #64797c;
    --ps-paper: #fff;
    --ps-line: #dce8e5;
    --ps-soft: #edf6f2;
    --ps-accent: #176d68;
    padding: 32px 20px 72px;
    color: var(--ps-ink);
    background: radial-gradient(ellipse at 10% 15%, #e1efea 0, transparent 50%), #f5f8f6;
    line-height: 1.8;
}
.ps-signin *, .ps-signin *::before, .ps-signin *::after {
    box-sizing: border-box;
}
.ps-signin > .ps-shell {
    width: 100%;
    max-width: 1120px !important;
    margin-inline: auto !important;
}
.ps-breadcrumb {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    color: var(--ps-muted);
    font-size: .86rem;
}
.ps-signin a { color: var(--ps-accent); text-decoration: none; }
.ps-signin a:hover { text-decoration: underline; }
.ps-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    border: 1px solid var(--ps-line);
    border-radius: 30px;
    overflow: hidden;
    background: var(--ps-paper);
    box-shadow: 0 22px 80px #173f3610;
}
.ps-form-card { min-width: 0; padding: 40px clamp(24px, 4vw, 54px); }
.ps-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--ps-line);
    border-radius: 17px;
    margin-bottom: 20px;
    background: var(--ps-soft);
    color: var(--ps-accent);
    font-size: 1.35rem;
}
.ps-eyebrow { color: var(--ps-accent); font-size: .85rem; font-weight: 700; }
.ps-signin .ps-form-card h1 {
    margin: 6px 0;
    color: var(--ps-ink);
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    font-weight: 800;
    line-height: 1.5;
}
.ps-intro { margin: 0; color: var(--ps-muted); font-size: .95rem; }
.ps-steps {
    display: flex;
    list-style: none;
    margin: 26px 0;
    padding: 12px 0;
    gap: 20px;
    border-block: 1px solid var(--ps-line);
    font-size: .83rem;
    color: var(--ps-muted);
}
.ps-steps li { display: flex; align-items: center; gap: 8px; }
.ps-steps span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--ps-soft); }
.ps-steps .ps-current { color: var(--ps-accent); font-weight: 700; }
.ps-steps .ps-current span { background: var(--ps-accent); color: white; }
.ps-field { margin-bottom: 19px; }
.ps-field label { display: block; margin: 0 0 8px; font-size: .94rem; font-weight: 700; }
.ps-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ps-label-row a { font-size: .78rem; }
.ps-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline: 16px 5px;
    min-height: 56px;
    border: 1px solid var(--ps-line);
    border-radius: 13px;
    background: var(--ps-paper);
    transition: border-color .15s, box-shadow .15s;
}
.ps-input-wrap:focus-within { border-color: var(--ps-accent); box-shadow: 0 0 0 4px var(--ps-soft); }
.ps-input-wrap > i { color: var(--ps-muted); font-size: 1.1rem; }
.ps-signin .ps-input-wrap input {
    min-width: 0;
    width: 100%;
    height: 54px;
    padding: 10px 6px;
    border: 0;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    color: var(--ps-ink);
    font: inherit;
    font-size: 16px;
}
.ps-input-wrap input::placeholder { color: var(--ps-muted); font-size: .84rem; text-align: right; opacity: .85; }
.ps-input-wrap button {
    flex: 0 0 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ps-muted);
    cursor: pointer;
}
.ps-input-wrap button:hover { background: var(--ps-soft); }
.ps-help { margin: 5px 0 0; font-size: .75rem; color: var(--ps-muted); }
.ps-primary, .ps-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.ps-primary { background: #176d68; color: #fff; box-shadow: 0 6px 18px #176d6820; }
.ps-primary:hover { background: #105a56; }
.ps-primary:disabled, .ps-secondary:disabled { opacity: .65; cursor: wait; }
.ps-secondary { min-height: 46px; background: var(--ps-soft); color: var(--ps-accent); border-color: var(--ps-line); font-size: .83rem; }
.ps-security { text-align: center; margin: 13px 0 0; color: var(--ps-muted); font-size: .73rem; }
.ps-security i { color: var(--ps-accent); margin-inline-end: 4px; }
.ps-register { display: grid; gap: 5px; text-align: center; border-top: 1px solid var(--ps-line); margin-top: 25px; padding-top: 22px; font-size: .86rem; }
.ps-register > span { color: var(--ps-muted); }
.ps-register a { font-weight: 700; }
.ps-register i { margin-inline-start: 6px; font-size: .8rem; }
.ps-extra { margin-top: 24px; font-size: .8rem; }
.ps-extra summary { color: var(--ps-muted); padding-block: 8px; cursor: pointer; }
.ps-extra summary i { margin-inline: 5px; }
.ps-extra p { color: var(--ps-muted); margin: 10px 0; }
.ps-alert { padding: 12px 15px; margin-bottom: 18px; border-radius: 12px; background: #fff0ef; color: #9b302b; font-size: .88rem; }
.ps-alert[hidden] { display: none; }
.ps-signin :is(a, button, summary):focus-visible { outline: 3px solid #63b9a7; outline-offset: 4px; }

/* Illustration is made of CSS and the project's existing icon font. */
.ps-welcome {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 34px 40px;
    overflow: hidden;
    color: #e8f4ed;
    background: radial-gradient(ellipse at 0 15%, #346c63, transparent 65%), linear-gradient(155deg, #193f3f, #164e48);
}
.ps-brand { display: flex; justify-content: space-between; gap: 14px; color: #fff; font-size: 1.12rem; font-weight: 800; letter-spacing: .12em; }
.ps-brand span { color: #b6d6ca; font-size: .73rem; font-weight: 400; letter-spacing: normal; }
.ps-art { position: relative; height: 205px; width: 100%; margin: 15px auto 12px; }
.ps-orbit { position: absolute; top: 50%; left: 50%; border: 1px solid #d9ede322; border-radius: 50%; transform: translate(-50%, -50%); }
.ps-orbit-one { width: 178px; height: 178px; }
.ps-orbit-two { width: 240px; height: 240px; border-style: dashed; }
.ps-art-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-9deg); display: grid; place-items: center; width: 110px; height: 110px; border: 1px solid #e7fff438; border-radius: 31px; color: #e7dcc0; background: linear-gradient(145deg, #68908385, #315e56); box-shadow: 0 20px 40px #09272544; font-size: 3.3rem; }
.ps-art-center i { transform: rotate(9deg); }
.ps-art-badge { position: absolute; display: grid; place-items: center; width: 49px; height: 49px; border-radius: 15px; background: #e7efe2; color: #286156; box-shadow: 0 8px 18px #062e3433; font-size: 1.3rem; }
.ps-badge-calendar { left: calc(50% - 110px); top: 29px; transform: rotate(-8deg); }
.ps-badge-file { right: calc(50% - 119px); bottom: 18px; transform: rotate(9deg); }
.ps-art-dot { position: absolute; left: calc(50% - 95px); bottom: 20px; width: 10px; height: 10px; border-radius: 50%; background: #d8c398; }
.ps-welcome-label { color: #c2d9bb; font-size: .79rem; }
.ps-signin .ps-welcome h2 { color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.2rem); line-height: 1.7; margin: 12px 0; font-weight: 800; }
.ps-welcome h2 em { color: #e5d4ad; font-style: normal; }
.ps-welcome > p { color: #c5dcd4; font-size: .88rem; margin: 0; }
.ps-benefits { list-style: none; padding: 0; margin: 25px 0; display: grid; gap: 19px; }
.ps-benefits li { display: flex; align-items: center; gap: 12px; }
.ps-benefits li > span { display: grid; place-items: center; width: 41px; height: 41px; flex: 0 0 41px; border: 1px solid #cde8dd25; border-radius: 13px; color: #dacba6; background: #ffffff08; }
.ps-benefits strong, .ps-benefits small { display: block; }
.ps-benefits strong { font-size: .88rem; font-weight: 600; }
.ps-benefits small { color: #b7d1c8; font-size: .73rem; }
.ps-welcome-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 20px; border-top: 1px solid #ffffff20; color: #bad3c9; font-size: .72rem; }
.ps-status-dot { width: 6px; height: 6px; background: #cedbbc; border-radius: 50%; }

/* Dialogs share the page palette; all dynamic response text is inserted as text. */
.ps-dialog { direction: rtl; font-family: inherit; border-radius: 24px !important; max-width: calc(100vw - 24px); }
.ps-dialog .swal2-title { font-size: 1.4rem; line-height: 1.6; }
.ps-dialog .swal2-html-container { font-size: .95rem; line-height: 1.9; }
.ps-dialog .swal2-input { max-width: calc(100% - 48px); direction: ltr; font-size: 1.2rem; letter-spacing: .15em; }
.ps-dialog .swal2-actions { gap: 8px; }
.ps-dialog button { font-family: inherit; }
.ps-dialog .swal2-confirm { background: #176d68 !important; }
.ps-dialog .swal2-deny { background: #496867 !important; }
.ps-qr { display: block; max-width: 100%; width: 220px; height: auto; margin: 16px auto; background: white; border-radius: 12px; padding: 8px; }
.ps-secret { display: block; direction: ltr; overflow-wrap: anywhere; padding: 12px; background: #eaf3f0; color: #174c48; border-radius: 10px; }

[data-bs-theme="dark"] .ps-signin {
    --ps-ink: #e1eee9; --ps-muted: #afc2bb; --ps-paper: #182c2c;
    --ps-line: #344d48; --ps-soft: #223e36; --ps-accent: #8ad4be;
    background: radial-gradient(ellipse at 10% 15%, #173d32, transparent 50%), #101e1e;
}
[data-bs-theme="dark"] .ps-dialog { background: #182c2c; color: #e1eee9; }
[data-bs-theme="dark"] .ps-dialog .swal2-input { background: #203831; color: #e1eee9; border-color: #526c61; }
[data-bs-theme="dark"] .ps-alert { background: #462d2b; color: #ffd0c8; }
@media (max-width: 820px) {
    .ps-layout { grid-template-columns: minmax(0, 1fr); }
    .ps-signin > .ps-shell { max-width: 560px !important; }
    .ps-form-card { padding: 32px; }
    .ps-welcome { padding: 26px 32px; }
    .ps-art, .ps-brand, .ps-welcome-label, .ps-benefits, .ps-welcome-footer { display: none; }
    .ps-signin .ps-welcome h2 { font-size: 1.45rem; margin: 0 0 8px; }
    .ps-welcome h2 br { display: none; }
}
@media (max-width: 420px) {
    .ps-signin { padding: 20px 12px 40px; }
    .ps-layout { border-radius: 22px; }
    .ps-form-card { padding: 26px 20px; }
    .ps-label-row { flex-wrap: wrap; gap: 0 10px; }
    .ps-welcome { padding: 22px; }
    .ps-steps { gap: 14px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ps-signin * { transition: none !important; }
}