/* ============================================
   استایل‌های اصلی فرم ورود با بله و پنل کاربری
   ============================================ */

/* فونت وزیر */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

/* ============================================
   متغیرهای CSS
   ============================================ */
:root {
    --bale-primary-color: #00A693;
    --bale-primary-shadow: rgba(0, 166, 147, 0.3);
    --bale-btn-radius: 12px;
}

/* ============================================
   کانتینر اصلی فرم
   ============================================ */
.bale-otp-container {
    direction: rtl;
    max-width: 420px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e8e8ea;
    border-radius: var(--bale-btn-radius);
    padding: 30px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    text-align: center;
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
}

.bale-otp-container * {
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
    box-sizing: border-box;
}

.bale-otp-container input {
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
}

/* ============================================
   لوگو
   ============================================ */
.bale-otp-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    margin-bottom: 16px;
    background: var(--bale-primary-color);
}

/* ============================================
   تایتل
   ============================================ */
.bale-otp-container h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1d2327;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.bale-otp-container .bale-subtitle {
    font-size: 13px;
    color: #7a7f85;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ============================================
   نوتیفیکیشن
   ============================================ */
.bale-otp-notice {
    background: #f7f8fa;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #5a5f66;
    border-right: 3px solid var(--bale-primary-color);
}

/* ============================================
   گروه ورودی
   ============================================ */
.bale-otp-input-group {
    display: flex;
    border: 2px solid #e8e8ea;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.bale-otp-input-group:focus-within {
    border-color: var(--bale-primary-color);
    box-shadow: 0 0 0 3px var(--bale-primary-shadow);
}

.bale-otp-input-group .bale-otp-prefix {
    background: #f7f8fa;
    padding: 12px 14px;
    font-size: 14px;
    color: #5a5f66;
    font-weight: 500;
    white-space: nowrap;
}

.bale-otp-input-group input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    text-align: right;
    background: #fff;
}

/* ============================================
   دکمه‌ها
   ============================================ */
.bale-btn {
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    padding: 14px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--bale-btn-radius);
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
}

.bale-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bale-btn:active {
    transform: translateY(0px);
}

.bale-btn-primary {
    background: var(--bale-primary-color);
    color: #fff;
}

.bale-btn-primary:hover {
    background: var(--bale-primary-color);
    opacity: 0.85;
}

/* ============================================
   اینپوت کد تایید
   ============================================ */
#bale-otp-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e8e8ea;
    border-radius: 10px;
    font-size: 20px;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 16px;
    outline: none;
    font-weight: 700;
    background: #fafbfc;
    transition: border-color 0.3s;
}

#bale-otp-input:focus {
    border-color: var(--bale-primary-color);
    box-shadow: 0 0 0 3px var(--bale-primary-shadow);
}

/* ============================================
   لینک برگشت
   ============================================ */
#bale-back-to-phone {
    color: var(--bale-primary-color);
    text-decoration: none;
    font-weight: 500;
}

#bale-back-to-phone:hover {
    text-decoration: underline;
}

/* ============================================
   پیام‌ها
   ============================================ */
.bale-otp-message {
    margin-top: 18px;
    font-size: 14px;
    font-weight: 500;
    min-height: 24px;
    line-height: 1.6;
}

.bale-otp-message.success {
    color: #00a32a;
}

.bale-otp-message.error {
    color: #ef4056;
}

.bale-otp-message.loading {
    color: #008eb2;
}

/* ============================================
   پنل کاربری
   ============================================ */
.bale-user-panel {
    max-width: 450px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: var(--bale-btn-radius);
    padding: 25px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8e8ea;
    direction: rtl;
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
}

.bale-user-panel * {
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
    box-sizing: border-box;
}

/* هدر پنل */
.bale-panel-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8ea;
    margin-bottom: 15px;
    text-align: right;
}

.bale-panel-header .bale-avatar {
    flex-shrink: 0;
}

.bale-panel-header .bale-avatar img {
    border-radius: 50%;
    border: 3px solid var(--bale-primary-color);
    width: 60px;
    height: 60px;
}

.bale-panel-header .bale-user-info {
    flex: 1;
}

.bale-panel-header .bale-name {
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 3px 0;
}

.bale-panel-header .bale-role {
    display: inline-block;
    background: var(--bale-primary-color)15;
    color: var(--bale-primary-color);
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.bale-panel-header .bale-user-email {
    font-size: 12px;
    color: #7a7f85;
    margin-top: 4px;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

/* اطلاعات کاربر */
.bale-panel-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #e8e8ea;
    border-bottom: 1px solid #e8e8ea;
}

.bale-panel-info .bale-info-item {
    font-size: 13px;
    color: #1d2327;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
}

.bale-panel-info .bale-info-item .bale-info-label {
    display: block;
    font-size: 11px;
    color: #7a7f85;
    margin-bottom: 3px;
}

.bale-panel-info .bale-info-item .bale-info-value {
    font-weight: 600;
    font-size: 14px;
}

/* آمار */
.bale-panel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 15px 0 20px 0;
}

.bale-panel-stats .bale-stat {
    text-align: center;
    padding: 12px 8px;
    background: #f8f9fa;
    border-radius: 10px;
}

.bale-panel-stats .bale-stat-number {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    display: block;
}

.bale-panel-stats .bale-stat-label {
    font-size: 11px;
    color: #7a7f85;
}

/* دکمه‌های پنل */
.bale-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.bale-panel-actions .bale-btn {
    display: block;
    text-decoration: none;
    text-align: center;
    padding: 12px;
    border-radius: var(--bale-btn-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-family: "Vazir", "Vazir-Regular", Tahoma, sans-serif !important;
    width: 100%;
}

.bale-panel-actions .bale-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bale-panel-actions .bale-btn-primary {
    background: var(--bale-primary-color);
    color: #fff;
}

.bale-panel-actions .bale-btn-primary:hover {
    background: var(--bale-primary-color);
    opacity: 0.85;
}

.bale-panel-actions .bale-btn-danger {
    background: #ef4056;
    color: #fff;
}

.bale-panel-actions .bale-btn-danger:hover {
    background: #d63042;
}

/* ============================================
   انیمیشن‌ها
   ============================================ */
@keyframes bale-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.bale-loading {
    animation: bale-pulse 1.5s infinite;
}

/* ============================================
   ریسپانسیو
   ============================================ */
@media (max-width: 480px) {
    .bale-otp-container {
        margin: 20px 15px;
        padding: 20px 15px;
    }
    
    .bale-user-panel {
        margin: 20px 15px;
        padding: 20px 15px;
    }
    
    .bale-panel-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bale-panel-header .bale-user-email {
        text-align: center;
    }
    
    .bale-panel-info {
        grid-template-columns: 1fr;
    }
    
    .bale-panel-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    
    .bale-panel-stats .bale-stat {
        padding: 8px 5px;
    }
    
    .bale-panel-stats .bale-stat-number {
        font-size: 18px;
    }
}