.smart-auth-wrapper {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: inherit;
    text-align: center;
}
.sa-title { margin-top: 0; margin-bottom: 10px; font-size: 20px; font-weight: 600; }
.sa-desc { color: #666; font-size: 14px; margin-bottom: 25px; }
.sa-input-group { margin-bottom: 15px; }
.sa-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}
.sa-input-group input:focus { border-color: #007cba; outline: none; }
.sa-btn {
    width: 100%;
    padding: 12px;
    background: #ef394e; /* رنگ شبیه دیجی‌کالا */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.sa-btn:disabled { background: #ccc; cursor: not-allowed; }
.sa-btn:hover:not(:disabled) { background: #d33245; }
.sa-error { color: #d93025; font-size: 12px; margin-bottom: 15px; text-align: right; min-height: 18px;}
.sa-back-btn { display: inline-block; margin-top: 20px; color: #007cba; font-size: 13px; text-decoration: none; }
.sa-timer-wrap { margin-top: 15px; font-size: 13px; color: #777; }


/* مدال تغییر شماره ووکامرس */
.sa-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    backdrop-filter: blur(4px);
}
.sa-modal-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.sa-modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
.sa-modal-close:hover { color: #d93025; }
.sa-modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}
.sa-modal-input:focus { border-color: #007cba; outline: none; }
.sa-woo-phone-wrapper { margin-bottom: 20px; }



/* استایل‌های بخش مدیریت نشست */
.sa-sessions-wrap { margin-bottom: 20px; text-align: right; max-height: 280px; overflow-y: auto; }
.sa-session-item {
    background: #f9f9f9; border: 1px solid #eee; border-radius: 8px;
    padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px;
}
.sa-session-header { display: flex; justify-content: space-between; align-items: center; }
.sa-session-title { font-weight: bold; font-size: 13px; color: #333; }
.sa-session-meta { font-size: 12px; color: #777; display: flex; flex-direction: column; gap: 4px; }
.sa-terminate-btn {
    background: #fff; color: #d93025; border: 1px solid #d93025;
    padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; font-family: inherit;
    transition: 0.2s; align-self: flex-start; font-weight: bold;
}
.sa-terminate-btn:hover { background: #d93025; color: #fff; }
.sa-terminate-btn:disabled { background: #eee; border-color:#ccc; color:#888; cursor:not-allowed; }

/* استایل‌های مربوط به شورت‌کد مدیریت دستگاه‌ها در پنل کاربری */
.sa-user-sessions-wrapper { 
    background: #fff; padding: 25px; border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f1f1; 
}
.sa-current-session { 
    border: 2px solid #4caf50 !important; background: #f0fdf4 !important; 
}
.sa-badge-current { 
    background: #4caf50; color: #fff; padding: 3px 10px; 
    border-radius: 12px; font-size: 11px; font-weight: bold; 
}
.sa-btn-outline { 
    background: transparent; border: 1px solid #d93025; color: #d93025; 
    padding: 8px 15px; border-radius: 6px; cursor: pointer; 
    transition: 0.3s; font-family: inherit; font-size: 13px; font-weight: 600; 
    align-self: flex-start;
}
.sa-btn-outline:hover:not(:disabled) { background: #d93025; color: #fff; }
.sa-btn-outline:disabled { border-color: #ccc; color: #aaa; cursor: not-allowed; }



/* استایل‌های اختصاصی فیلد آیدی کاربری (Username) */
.sa-woo-username-wrapper { 
    margin-top: 15px; 
    margin-bottom: 25px; 
    max-width: 100%; /* 💡 جایگزین width: 100% برای جلوگیری از بیرون‌زدگی در فرم‌ها */
    box-sizing: border-box;
}
.sa-username-input-group {
    display: flex; 
    align-items: center; 
    direction: ltr; 
    background: #f8fafc;
    border: 1.5px solid #e4e4e7;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; 
    overflow: hidden; /* 💡 مهار کردن قطعی هرگونه بیرون‌زدگی */
}
.sa-username-input-group:focus-within { 
    background: #fff; 
    border-color: #111; 
    box-shadow: 0 0 0 4px rgba(17,17,17,0.05); 
}
.sa-username-prefix {
    background: transparent;
    color: #71717a;
    padding: 16px 0 16px 16px;
    font-size: 14px;
    user-select: none;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 1; /* 💡 اجازه کوچک شدن در صورت کمبود جا در موبایل */
    overflow: hidden;
    text-overflow: ellipsis; /* 💡 اگر گوشی خیلی کوچک بود، این بخش نقطه چین می‌شود تا صفحه را نکشد */
}
.sa-username-input-group input {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 50px; /* 💡 محدودیت حداقل عرض برای جلوگیری از خراب شدن فلکس */
    width: 100%;
    border: none !important;
    padding: 16px 8px !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 15px;
    color: #111;
    font-weight: 800;
    outline: none !important;
    font-family: inherit;
}
.sa-username-input-group button {
    flex-shrink: 0;
    border-radius: 10px !important;
    margin: 6px 6px 6px 8px !important;
    padding: 8px 16px !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    height: auto;
    white-space: nowrap; /* جلوگیری از دو خطی شدن متن دکمه */
}
.sa-username-input-group button:hover {
    background: #000 !important;
    transform: translateY(-2px);
}
.sa-username-hint { 
    font-size: 12px; 
    color: #a1a1aa; 
    margin-top: 8px; 
    display: block; 
    text-align: right; 
    font-weight: 500;
}
.sa-msg-success { color: #10b981; font-size: 12px; font-weight: bold; margin-top: 8px; display: block; text-align: right; }
.sa-msg-error { color: #ef4444; font-size: 12px; font-weight: bold; margin-top: 8px; display: block; text-align: right; }

/* 💡 استایل‌های اختصاصی برای تمیزی بیشتر در موبایل */
@media (max-width: 480px) {
    .sa-username-prefix {
        font-size: 11px; /* کوچکتر شدن متن پیشوند */
        padding: 12px 0 12px 12px;
        letter-spacing: -0.5px; /* فشرده‌تر شدن متن برای اشغال فضای کمتر */
    }
    .sa-username-input-group input {
        font-size: 13px;
        padding: 12px 6px !important;
    }
    .sa-username-input-group button {
        padding: 6px 12px !important;
        font-size: 10px !important; /* متن دکمه کاملاً ظریف */
        margin: 4px 4px 4px 6px !important; 
    }
}