/* ==========================================================================
   phpTransformer Account UI — Mobile-First, RTL/LTR, Default Theme Colors
   ========================================================================== */

.pt-acnt-page {
    background-color: #F1F5F9;
    color: #0F172A;
    padding: 20px 14px 36px;
    border-radius: var(--fx-radius-lg, 14px);
    font-family: var(--fx-font-ar, 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-size: 16px;
    line-height: 1.7;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

[dir="ltr"] .pt-acnt-page {
    font-family: var(--fx-font-en, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.pt-acnt-page *,
.pt-acnt-page *::before,
.pt-acnt-page *::after,
.pt-acnt-modal-backdrop *,
.pt-acnt-modal-backdrop *::before,
.pt-acnt-modal-backdrop *::after {
    box-sizing: border-box;
}

.pt-acnt-shell {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
}

.pt-acnt-shell--compact {
    max-width: 580px;
}

/* Main Surface Card */
.pt-acnt-card {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 20px 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .pt-acnt-page {
        padding: 32px 24px 48px;
    }

    .pt-acnt-card {
        padding: 32px 32px;
    }
}

/* Card Header */
.pt-acnt-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #E2E8F0;
}

.pt-acnt-header-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.10));
    color: var(--fx-primary, #059669);
    border: 1px solid var(--fx-primary-border, rgba(5, 150, 105, 0.28));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pt-acnt-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.pt-acnt-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.4;
}

.pt-acnt-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.65;
}

@media (min-width: 768px) {
    .pt-acnt-title {
        font-size: 1.55rem;
    }
}

/* Alert Banner */
.pt-acnt-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.65;
    border: 1px solid transparent;
}

.pt-acnt-banner--info {
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.08));
    border-color: var(--fx-primary-border, rgba(5, 150, 105, 0.25));
    color: #0F172A;
}

.pt-acnt-banner--error {
    background-color: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

.pt-acnt-banner--success {
    background-color: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}

.pt-acnt-banner-icon {
    flex: 0 0 auto;
    margin-top: 2px;
}

.pt-acnt-banner--info .pt-acnt-banner-icon {
    color: var(--fx-primary, #059669);
}

.pt-acnt-banner--error .pt-acnt-banner-icon {
    color: #DC2626;
}

.pt-acnt-banner--success .pt-acnt-banner-icon {
    color: #059669;
}

/* ==========================================================================
   Responsive Form Layout: Cards on Mobile (< 768px), Table on Desktop (>= 768px)
   ========================================================================== */
.pt-acnt-form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pt-acnt-field-row {
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pt-acnt-field-row:focus-within {
    border-color: var(--fx-primary, #059669);
    box-shadow: 0 0 0 3px var(--fx-primary-soft, rgba(5, 150, 105, 0.12));
}

.pt-acnt-field-row.is-error {
    border-color: #FCA5A5;
    background-color: #FEF2F2;
}

@media (min-width: 768px) {
    .pt-acnt-form-grid {
        gap: 0;
        background-color: #FFFFFF;
        border: 1px solid #E2E8F0;
        border-radius: 12px;
    }

    .pt-acnt-field-row {
        background-color: transparent;
        border: none;
        border-bottom: 1px solid #E2E8F0;
        border-radius: 0;
        padding: 16px 20px;
        display: grid;
        grid-template-columns: minmax(190px, 235px) 1fr;
        align-items: center;
        gap: 16px;
        box-shadow: none;
    }

    .pt-acnt-field-row:first-child {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .pt-acnt-field-row:last-child {
        border-bottom: none;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .pt-acnt-field-row:focus-within {
        box-shadow: inset 3px 0 0 var(--fx-primary, #059669);
        background-color: #F8FAFC;
    }

    [dir="rtl"] .pt-acnt-field-row:focus-within {
        box-shadow: inset -3px 0 0 var(--fx-primary, #059669);
    }

    .pt-acnt-field-row.is-error {
        background-color: #FEF2F2;
    }

    .pt-acnt-field-row--stacked {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}

.pt-acnt-field-label-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pt-acnt-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
    cursor: pointer;
}

.pt-acnt-label-icon {
    color: var(--fx-primary, #059669);
    flex: 0 0 auto;
    display: inline-flex;
}

.pt-acnt-label-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

/* Info / Status Trigger Buttons */
.pt-acnt-badge-btn {
    background: transparent;
    border: none;
    padding: 4px;
    margin: 0;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    min-width: 30px;
    min-height: 30px;
}

.pt-acnt-badge-btn--info {
    color: var(--fx-primary, #059669);
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.10));
}

.pt-acnt-badge-btn--info:hover {
    background-color: var(--fx-primary-border, rgba(5, 150, 105, 0.22));
}

.pt-acnt-badge-btn--err {
    color: #DC2626;
    background-color: #FEE2E2;
}

.pt-acnt-badge-btn--err:hover {
    background-color: #FECACA;
}

.pt-acnt-status-ok {
    color: #059669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

/* Input Controls */
.pt-acnt-field-input-col {
    position: relative;
    width: 100%;
    min-width: 0;
}

.pt-acnt-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.pt-acnt-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    color: #0F172A;
    background-color: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.pt-acnt-input:focus {
    border-color: var(--fx-primary, #059669);
    box-shadow: 0 0 0 3px var(--fx-primary-soft, rgba(5, 150, 105, 0.15));
}

.pt-acnt-input--has-toggle {
    padding-inline-end: 46px;
}

.pt-acnt-pwd-toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748B;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.pt-acnt-pwd-toggle:hover {
    color: var(--fx-primary, #059669);
    background-color: #F1F5F9;
}

/* Password Strength Bar */
.pt-acnt-pwd-meter {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pt-acnt-pwd-bar {
    height: 6px;
    width: 100%;
    background-color: #E2E8F0;
    border-radius: 9999px;
    overflow: hidden;
}

.pt-acnt-pwd-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.pt-acnt-pwd-force-text {
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 20px;
    color: #475569;
}

.pt-acnt-pwd-force-text .password_easy {
    color: #DC2626;
}

.pt-acnt-pwd-force-text .password_medium {
    color: #D97706;
}

.pt-acnt-pwd-force-text .password_strong {
    color: #059669;
}

/* Math Captcha (Inline SVG) */
.pt-acnt-captcha-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pt-acnt-captcha-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.10));
    border: 1.5px solid var(--fx-primary-border, rgba(5, 150, 105, 0.30));
    border-radius: 10px;
    padding: 6px 12px;
    min-height: 46px;
    flex: 0 0 auto;
    user-select: none;
}

.pt-acnt-captcha-eq {
    font-weight: 800;
    font-size: 1.15rem;
    color: #334155;
}

.pt-acnt-captcha-input {
    flex: 1 1 120px;
    min-width: 100px;
}

/* Email Autocomplete Dropdown */
.pt-acnt-autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    background-color: #FFFFFF;
    border: 1.5px solid var(--fx-primary-border, rgba(5, 150, 105, 0.35));
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    z-index: 90;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    display: none;
}

.pt-acnt-autocomplete-list.is-open {
    display: block;
}

.pt-acnt-autocomplete-header {
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748B;
    border-bottom: 1px solid #F1F5F9;
}

.pt-acnt-autocomplete-item {
    width: 100%;
    text-align: start;
    background: transparent;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0F172A;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    direction: ltr;
}

.pt-acnt-autocomplete-item:hover,
.pt-acnt-autocomplete-item.is-active {
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.10));
    color: var(--fx-primary, #059669);
    font-weight: 600;
}

/* Action Buttons — Wrap cleanly onto multiple lines, zero horizontal scroll */
.pt-acnt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.pt-acnt-actions--center {
    justify-content: center;
}

.pt-acnt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    flex: 1 1 auto;
}

@media (min-width: 520px) {
    .pt-acnt-btn {
        flex: 0 1 auto;
    }
}

.pt-acnt-btn--primary {
    background-color: var(--fx-primary, #059669);
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px var(--fx-primary-soft, rgba(5, 150, 105, 0.25));
}

.pt-acnt-btn--primary:hover {
    background-color: var(--fx-primary-hover, #047857);
    transform: translateY(-1px);
}

.pt-acnt-btn--secondary {
    background-color: #F1F5F9;
    color: #1E293B !important;
    border-color: #CBD5E1;
}

.pt-acnt-btn--secondary:hover {
    background-color: #E2E8F0;
    color: #0F172A !important;
}

.pt-acnt-btn--ghost {
    background-color: transparent;
    color: var(--fx-primary, #059669) !important;
    border-color: var(--fx-primary-border, rgba(5, 150, 105, 0.30));
}

.pt-acnt-btn--ghost:hover {
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.08));
}

/* Status Card (Success / Error / Closed) */
.pt-acnt-status-box {
    text-align: center;
    padding: 16px 8px;
}

.pt-acnt-status-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-acnt-status-icon--success {
    background-color: #ECFDF5;
    color: #059669;
    border: 2px solid #A7F3D0;
}

.pt-acnt-status-icon--error {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 2px solid #FECACA;
}

.pt-acnt-status-icon--info {
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.10));
    color: var(--fx-primary, #059669);
    border: 2px solid var(--fx-primary-border, rgba(5, 150, 105, 0.28));
}

.pt-acnt-status-msg {
    font-size: 1.05rem;
    color: #1E293B;
    line-height: 1.75;
    margin: 0 0 20px;
}

/* ==========================================================================
   Custom Popup Modal (Replaces JS alert())
   ========================================================================== */
.pt-acnt-modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pt-acnt-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.pt-acnt-modal {
    background-color: #FFFFFF;
    color: #0F172A;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    padding: 24px 20px 20px;
    transform: scale(0.94) translateY(8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--fx-font-ar, 'Cairo', 'Tajawal', sans-serif);
    text-align: center;
}

[dir="ltr"] .pt-acnt-modal {
    font-family: var(--fx-font-en, 'Inter', sans-serif);
}

.pt-acnt-modal-backdrop.is-open .pt-acnt-modal {
    transform: scale(1) translateY(0);
}

.pt-acnt-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: #F1F5F9;
    border: none;
    color: #475569;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pt-acnt-modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.pt-acnt-modal-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pt-acnt-modal-icon--info {
    background-color: var(--fx-primary-soft, rgba(5, 150, 105, 0.12));
    color: var(--fx-primary, #059669);
}

.pt-acnt-modal-icon--error {
    background-color: #FEF2F2;
    color: #DC2626;
}

.pt-acnt-modal-icon--success {
    background-color: #ECFDF5;
    color: #059669;
}

.pt-acnt-modal-title {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0F172A;
}

.pt-acnt-modal-body {
    margin: 0 0 20px;
    font-size: 1rem;
    color: #334155;
    line-height: 1.7;
}

.pt-acnt-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
