@font-face {
    font-family: "Vazirmatn";
    src: url("./fonts/Vazirmatn/Vazirmatn-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.ida-ga:root, :root {
    --ida-bg-start: #0B1220;
    --ida-bg-end: #0E1A2F;
    --ida-card-bg: rgba(255, 255, 255, 0.06);
    --ida-card-border: rgba(255, 255, 255, 0.1);
    --ida-card-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    --ida-text: #ffffff;
    --ida-text-secondary: rgba(255, 255, 255, 0.7);
    --ida-text-muted: rgba(255, 255, 255, 0.5);
    --ida-input-bg: rgba(255, 255, 255, 0.06);
    --ida-input-border: rgba(255, 255, 255, 0.12);
    --ida-input-focus: rgba(106, 169, 255, 0.4);
    --ida-btn-primary: linear-gradient(135deg, #4A9FFF 0%, #2D7DD2 100%);
    --ida-error: #FF6B6B;
    --ida-success: #4ADE80;
    --ida-accent: #4A9FFF;
    --ida-blur: 30px;
}

.ida-ga.ida-light {
    --ida-bg-start: #F2F6FF;
    --ida-bg-end: #E9EEFF;
    --ida-card-bg: rgba(255, 255, 255, 0.65);
    --ida-card-border: rgba(255, 255, 255, 0.8);
    --ida-card-shadow: 0 32px 64px rgba(42, 55, 90, 0.15);
    --ida-text: #1A2744;
    --ida-text-secondary: rgba(26, 39, 68, 0.7);
    --ida-text-muted: rgba(26, 39, 68, 0.5);
    --ida-input-bg: rgba(255, 255, 255, 0.7);
    --ida-input-border: rgba(26, 39, 68, 0.12);
    --ida-input-focus: rgba(45, 125, 210, 0.3);
}

.ida-ga {
    font-family: var(--ida-ga-font, "Vazirmatn", "Inter", -apple-system, sans-serif);
    position: relative;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    direction: rtl;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

.ida-auth-page {
    position: relative;
    min-height: calc(var(--vh, 1vh) * 100);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-text-size-adjust: 100%;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    overflow-x: hidden;
}

.ida-auth-layout {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: center;
}

.ida-auth-hero {
    display: none;
}

.ida-auth-hero-inner {
    max-width: 520px;
}

.ida-auth-hero-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 24px;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
}

.ida-auth-hero-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--ida-text);
    margin: 0 0 12px;
    line-height: 1.3;
}

.ida-auth-hero-subtitle {
    font-size: 16px;
    color: var(--ida-text-secondary);
    line-height: 1.8;
    margin: 0 0 20px;
}

.ida-auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ida-auth-hero-badge svg {
    width: 18px;
    height: 18px;
    color: var(--ida-success);
}

.ida-auth-hero-badge span {
    font-size: 13px;
    color: var(--ida-text-secondary);
}

.ida-ga[dir="ltr"] { direction: ltr; }

.ida-ga * { box-sizing: border-box; }

.ida-auth-page,
.ida-auth-shell,
.ida-auth-modal {
    max-width: 100%;
    overflow-x: hidden;
}

.ida-auth-shell,
.ida-auth-modal,
.ida-auth-modal-inner,
.ida-auth-body,
.ida-ga-form-group {
    min-width: 0;
}

.ida-auth-page,
.ida-auth-page * {
    box-sizing: border-box;
}

.ida-auth-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, var(--ida-bg-start) 0%, var(--ida-bg-end) 100%);
    z-index: 0;
}

.ida-auth-backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 20%, rgba(74, 159, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 55%);
}

.ida-auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--vh, 1vh) * 100);
}

.ida-auth-modal {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ida-auth-modal-inner {
    width: 100%;
    max-height: calc(var(--vh, 1vh) * 100 - 32px);
    overflow: auto;
    overflow-x: hidden;
}

.ida-ga-card {
    width: 100%;
    max-width: 560px;
    padding: 28px 28px 24px;
    border-radius: 24px;
    background: rgba(18, 18, 20, 0.72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38), 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    opacity: 1;
    transform: none;
}

.ida-ga-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.ida-auth-page.is-ready .ida-animate-in .ida-ga-card {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    animation: idaModalIn 0.26s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
    .ida-auth-page.is-ready .ida-ga-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.ida-auth-topbar {
    margin-bottom: 6px;
}

.ida-auth-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ida-auth-topbar-left,
.ida-auth-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

[dir="rtl"] .ida-auth-topbar-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .ida-auth-topbar-right {
    flex-direction: row-reverse;
}

.ida-ga-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--ida-accent);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 0;
}

.ida-ga-back-btn:hover { opacity: 0.8; }

.ida-ga-back-btn svg {
    width: 18px;
    height: 18px;
}

.ida-ga-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ida-ga-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--ida-input-bg);
    color: var(--ida-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ida-ga-icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--ida-text);
}

.ida-ga-icon-btn svg {
    width: 20px;
    height: 20px;
}

.ida-ga-title-section {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ida-ga-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    margin: 0 auto 16px;
}

.ida-ga-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--ida-text);
    margin: 0 0 8px;
    line-height: 1.4;
}

.ida-ga-subtitle {
    font-size: 14px;
    color: var(--ida-text-muted);
    margin: 0;
    line-height: 1.6;
}

.ida-ga-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ida-ga-trust-badge svg {
    width: 18px;
    height: 18px;
    color: var(--ida-success);
    flex-shrink: 0;
}

.ida-ga-trust-badge span {
    font-size: 12px;
    color: var(--ida-text-secondary);
}

.ida-ga-trust-compact {
    margin: 18px auto 0;
    justify-content: center;
}

.ida-ga-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.ida-ga-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ida-input-border);
    transition: all 0.3s ease;
}

.ida-ga-progress-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--ida-accent);
}

.ida-ga-progress-dot.completed {
    background: var(--ida-success);
}

.ida-ga-form-group {
    margin-bottom: 20px;
}

.ida-ga-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ida-text);
    margin-bottom: 8px;
}

.ida-ga-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--ida-input-border);
    background: var(--ida-input-bg);
    color: var(--ida-text);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.ida-ga-input::placeholder {
    color: var(--ida-text-muted);
}

.ida-ga-input:focus {
    outline: none;
    border-color: var(--ida-accent);
    box-shadow: 0 0 0 4px var(--ida-input-focus);
}

.ida-ga-input[data-input="mobile"] {
    text-align: center;
    direction: ltr;
    font-size: 18px;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.ida-jalali-display {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ida-ga-input-hint {
    font-size: 12px;
    color: var(--ida-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.ida-ga-inline-error {
    font-size: 12px;
    color: var(--ida-error);
    margin-top: 6px;
}

.ida-ga-otp-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
    direction: ltr;
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

.ida-ga-otp-input {
    width: clamp(40px, 13vw, 52px);
    height: 56px;
    text-align: center;
    border-radius: 16px;
    border: 1px solid var(--ida-input-border);
    background: var(--ida-input-bg);
    font-size: 22px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ida-text);
    caret-color: var(--ida-accent);
    -webkit-text-fill-color: var(--ida-text);
    font-family: inherit;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    min-font-size: 16px;
    max-width: 100%;
    line-height: 1;
}

.ida-ga-otp-input:focus {
    outline: none;
    border-color: var(--ida-accent);
    box-shadow: 0 0 0 5px var(--ida-input-focus);
}

.ida-ga-otp-input::placeholder {
    color: var(--ida-text-muted);
    opacity: 0.45;
}

.ida-otp-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.ida-otp-box {
    width: clamp(40px, 13vw, 52px);
    height: 56px;
    border-radius: 16px;
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "kern" 1;
    font-size: 22px;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "Vazirmatn", sans-serif;
    letter-spacing: 0 !important;
    line-height: 1 !important;
}

.ida-otp-row.is-error .ida-otp-box {
    border-color: var(--ida-error);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.25);
}

.ida-ga-otp-master {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.ida-ga-btn {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: none;
    background: var(--ida-btn-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ida-ga-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.ida-ga-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ida-ga-btn-secondary {
    background: var(--ida-input-bg);
    border: 1px solid var(--ida-input-border);
    color: var(--ida-text);
}

.ida-ga-btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    transform: none;
}

.ida-ga-btn-link {
    background: transparent;
    border: none;
    color: var(--ida-accent);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    font-family: inherit;
}

.ida-ga-btn-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ida-ga-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.ida-ga-resend-timer {
    font-size: 14px;
    color: var(--ida-text-muted);
    font-variant-numeric: tabular-nums;
}

.ida-ga-roles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ida-ga-role-card {
    padding: 20px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease-out;
    width: 100%;
}

.ida-ga-role-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--ida-accent);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
    .ida-ga-role-card:active {
        transform: translateY(-1px) scale(0.985);
    }
}

/* NO auto-highlight for primary roles - only active on click */
.ida-ga-role-card.ida-ga-role-active {
    border-color: var(--ida-accent);
    box-shadow: 0 0 0 1px rgba(74,159,255,0.3), 0 8px 24px rgba(0,0,0,0.25);
    transform: translateY(-2px);
    background: rgba(74,159,255,0.1);
}

.ida-ga-role-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ida-text);
}

.ida-ga-role-note {
    margin-top: 6px;
    font-size: 11px;
    color: var(--ida-text-muted);
}

.ida-ga-select-wrap {
    position: relative;
}

.ida-ga-select {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 16px;
    border-radius: 14px;
    border: 1px solid var(--ida-input-border);
    background: var(--ida-input-bg);
    color: var(--ida-text);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.ida-ga-select:focus {
    outline: none;
    border-color: var(--ida-accent);
    box-shadow: 0 0 0 4px var(--ida-input-focus);
}

.ida-ga-select-wrap::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--ida-text-muted);
    pointer-events: none;
}

[dir="ltr"] .ida-ga-select-wrap::after {
    right: auto;
    left: 16px;
}

[dir="ltr"] .ida-ga-select {
    padding: 0 16px 0 40px;
}

.ida-ga-dropdown {
    position: relative;
}

.ida-ga-dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--ida-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ida-card-border);
    border-radius: 14px;
    box-shadow: var(--ida-card-shadow);
    z-index: 100;
    display: none;
}

.ida-ga-dropdown.open .ida-ga-dropdown-list {
    display: block;
}

.ida-ga-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--ida-text);
    font-size: 14px;
}

.ida-ga-dropdown-item:hover {
    background: var(--ida-input-bg);
}

.ida-ga-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: var(--ida-text-muted);
    font-size: 13px;
}

.ida-ga-grid {
    display: grid;
    gap: 16px;
}

.ida-ga-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.ida-ga-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    padding: 20px;
}

.ida-ga-modal-card {
    background: var(--ida-card-bg);
    backdrop-filter: blur(var(--ida-blur));
    -webkit-backdrop-filter: blur(var(--ida-blur));
    border: 1px solid var(--ida-card-border);
    padding: 28px;
    border-radius: 20px;
    color: var(--ida-text);
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: var(--ida-card-shadow);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.ida-ga-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--ida-input-bg);
    color: var(--ida-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

[dir="ltr"] .ida-ga-modal-close {
    left: auto;
    right: 16px;
}

.ida-ga-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--ida-text);
}

.ida-ga-modal-close svg {
    width: 18px;
    height: 18px;
}

.ida-ga-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ida-ga-modal-icon.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
}

.ida-ga-modal-icon.error {
    background: rgba(255, 107, 107, 0.15);
    color: var(--ida-error);
}

.ida-ga-modal-icon.success {
    background: rgba(74, 222, 128, 0.15);
    color: var(--ida-success);
}

.ida-ga-modal-icon svg {
    width: 28px;
    height: 28px;
}

.ida-ga-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--ida-text);
}

.ida-ga-modal-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--ida-text-secondary);
    margin-bottom: 24px;
}

.ida-ga-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ida-ga-success-state {
    text-align: center;
    padding: 20px 0;
}

.ida-ga-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: rgba(74, 222, 128, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ida-success);
}

.ida-ga-success-icon svg {
    width: 36px;
    height: 36px;
}

.ida-ga-success-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ida-text);
    margin-bottom: 8px;
}

.ida-ga-success-text {
    font-size: 14px;
    color: var(--ida-text-secondary);
}

.ida-ga-footer {
    text-align: center;
    padding: 12px 16px;
    font-size: 12px;
    color: var(--ida-text-muted);
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(8px + env(safe-area-inset-bottom, 0));
    z-index: 1;
}

.ida-ga-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ida-text);
}

.ida-ga-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--ida-accent);
    cursor: pointer;
}

.ida-ga-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ida-auth-body {
    width: 100%;
    max-width: 100%;
}

.ida-loading-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 0 10px;
}

.ida-loading-text {
    font-size: 14px;
    color: var(--ida-text-secondary);
}

.ida-auth-footer {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

[dir="rtl"] .ida-auth-hero {
    text-align: right;
}

[dir="ltr"] .ida-auth-hero {
    text-align: left;
}

[dir="rtl"] .ida-auth-hero-inner {
    margin-left: auto;
}

[dir="ltr"] .ida-auth-hero-inner {
    margin-right: auto;
}

.ida-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.ida-modal.is-open {
    display: flex;
}

.ida-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ida-modal__panel {
    position: relative;
    z-index: 1;
    width: min(480px, 92vw);
    background: rgba(18, 18, 20, 0.72);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 22px;
    padding: 22px 20px 18px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    transition: all 0.24s ease-out;
}

.ida-modal.is-open .ida-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ida-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

[dir="rtl"] .ida-modal__header {
    flex-direction: row-reverse;
}

.ida-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ida-text);
}

.ida-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: var(--ida-text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.ida-modal__body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--ida-text-secondary);
}

.ida-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

[dir="rtl"] .ida-modal__actions {
    flex-direction: row-reverse;
}

.ida-modal__btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.ida-modal__btn--primary {
    background: var(--ida-btn-primary);
    color: #fff;
}

.ida-modal__btn--ghost {
    background: transparent;
    color: var(--ida-accent);
}

.ida-modal__btn--secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--ida-text);
}

.ida-ga.ida-light .ida-modal__panel {
    background: rgba(255,255,255,0.72);
    border-color: rgba(255,255,255,0.45);
    box-shadow: 0 26px 60px rgba(42, 55, 90, 0.2);
}

.ida-ga.ida-light .ida-modal__close {
    background: rgba(26,39,68,0.08);
    color: rgba(26,39,68,0.7);
}

@media (prefers-reduced-motion: reduce) {
    .ida-modal__panel {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

.ida-alert{
  width: 100%;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}
.ida-alert--error{
  background: rgba(255, 59, 48, 0.10);
  border-color: rgba(255, 59, 48, 0.25);
}
.ida-alert__title{
  font-weight: 800;
  font-size: 14px;
}
.ida-alert__msg{
  font-size: 13px;
  line-height: 1.7;
  opacity: .9;
}
.ida-alert__action{
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--ida-accent);
}

.ida-ga-error-box {
    width: 100%;
    border-radius: 16px;
    padding: 12px 14px;
    margin: 12px 0 0;
    border: 1px solid rgba(255, 59, 48, 0.25);
    background: rgba(255, 59, 48, 0.08);
    color: var(--ida-text);
    font-size: 13px;
    line-height: 1.7;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes idaModalIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sheetIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .ida-ga {
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .ida-auth-page {
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .ida-auth-shell {
        justify-content: center;
    }

    .ida-ga-card {
        width: 100%;
        max-width: 100%;
        border-radius: 24px;
        padding: 24px 20px 28px;
        margin: 0 auto;
        position: relative;
    }

    .ida-ga-otp-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }

    .ida-ga-grid-2 {
        grid-template-columns: 1fr;
    }

    .ida-ga-input,
    .ida-ga-select,
    .ida-ga-otp-input {
        font-size: 16px !important;
    }
}

@media (min-width: 1024px) {
    .ida-auth-layout {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 40px;
        padding: 0 40px;
    }

    .ida-auth-hero {
        display: flex;
        align-items: center;
    }

    .ida-auth-shell {
        align-items: center;
        justify-content: flex-end;
    }

    .ida-auth-footer {
        display: none;
    }
}

@media (max-width: 400px) {
    .ida-ga-otp-container { gap: 6px; }
    .ida-ga-otp-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
    .ida-ga-roles { grid-template-columns: 1fr; }
    .ida-ga-brand-title { font-size: 22px; }
    .ida-ga-brand-subtitle { font-size: 13px; }
}

@supports (-webkit-touch-callout: none) {
    .ida-ga input,
    .ida-ga select,
    .ida-ga textarea {
        font-size: 16px !important;
    }
}

.ida-ga.ida-light .ida-ga-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 30px 70px rgba(42, 55, 90, 0.2), 0 2px 8px rgba(42, 55, 90, 0.1);
}

.ida-ga.ida-light .ida-ga-role-card {
    border-color: rgba(26, 39, 68, 0.12);
    background: rgba(255,255,255,0.7);
}

.ida-ga.ida-light .ida-ga-trust-badge {
    background: rgba(255,255,255,0.8);
    border-color: rgba(26, 39, 68, 0.12);
}

.ida-ga.ida-light .ida-alert{
  border-color: rgba(26,39,68,0.12);
}

.ida-ga.ida-light .ida-auth-hero-badge {
    background: rgba(255,255,255,0.8);
    border-color: rgba(26, 39, 68, 0.12);
}

.ida-ga.ida-light .ida-auth-backdrop::before {
    background:
        radial-gradient(ellipse 70% 50% at 15% 20%, rgba(74, 159, 255, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 85% 70%, rgba(45, 125, 210, 0.12) 0%, transparent 55%);
}

@media (min-width: 900px) {
    .ida-ga-roles {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Testing: Chrome Android, Safari iOS, desktop Chrome; dark/light; rtl/ltr */
.ida-auth-header {
    padding: 0 2px;
}

.ida-auth-body {
    padding: 0 2px;
    overflow-x: hidden;
}

.ida-auth-footer {
    padding: 0 2px;
}

/* v0.4.5 trusted-device / biometric / iOS install helpers */
.ida-ga-quick-actions{margin-top:18px;display:flex;flex-direction:column;gap:10px;align-items:stretch}.ida-ga-btn-secondary{background:rgba(255,255,255,.08)!important;color:var(--ida-ga-text,#fff)!important;border:1px solid rgba(255,255,255,.18)!important}.ida-ga-bio-btn{min-height:46px}.ida-ga-ios-install-link{text-align:center;display:block;margin-top:2px}

/* v0.4.7 iOS install modal: keep Add to Home Screen on the current PWA/login URL */
.ida-ga-ios-install-link{border:0;background:transparent;cursor:pointer;font-family:inherit;padding:0;color:var(--ida-ga-primary,var(--ida-accent,#6aa9ff));font-weight:700;text-decoration:none;line-height:1.7}
.ida-ga-ios-modal{display:grid;gap:14px;color:var(--ida-text-secondary)}
.ida-ga-ios-modal p{margin:0;color:inherit;line-height:1.9}
.ida-ga-ios-steps{display:grid;gap:10px;margin-top:2px}
.ida-ga-ios-step{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;border-radius:16px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.10)}
[dir="rtl"] .ida-ga-ios-step{flex-direction:row-reverse;text-align:right}
.ida-ga-ios-step span{width:28px;height:28px;min-width:28px;border-radius:999px;display:inline-grid;place-items:center;background:var(--ida-btn-primary,var(--ida-ga-primary,#6aa9ff));color:#fff;font-weight:800;font-size:13px}
.ida-ga-ios-step b{font-weight:700;color:var(--ida-text);line-height:1.8}
.ida-ga-ios-hint{font-size:12.5px;line-height:1.8;color:var(--ida-text-secondary);background:rgba(255,255,255,.045);border-radius:14px;padding:10px 12px}
.ida-ga.ida-light .ida-ga-ios-step{background:rgba(26,39,68,.055);border-color:rgba(26,39,68,.08)}
.ida-ga.ida-light .ida-ga-ios-hint{background:rgba(26,39,68,.045)}

/* IDA Glass Auth isolation: hide user-switching/adminbar artifacts on auth surface */
body #wpadminbar,
body #user_switching_switch_on,
body .user-switching-switch-back,
body .user-switching,
body .user-switching-switch-on,
body .user-switching-switch-off,
body a[href*="user_switching"],
body a[href*="switch_to_olduser"],
body a[href*="switch_back"],
body a[href*="action=switch_to_user"],
body a[href*="action=switch_to_olduser"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html { margin-top: 0 !important; }
