﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

form#form1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.brand-icon {
    text-align: center;
    margin-bottom: 20px;
}

    .brand-icon .icon-circle {
        width: 72px;
        height: 72px;
        background: white;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        margin-bottom: 12px;
    }

    .brand-icon p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.3px;
    }

.login-container {
    background: white;
    padding: 36px 32px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

    .login-container h2 {
        text-align: center;
        color: #1f2937;
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 6px;
    }

.login-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 28px;
}

.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.4s ease;
    border: 2px solid #e5e7eb;
    background: white;
    color: #9ca3af;
}

    .step-dot.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        border-color: transparent;
        color: white;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .step-dot.done {
        background: #10b981;
        border-color: transparent;
        color: white;
    }

.step-line {
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    transition: background 0.4s ease;
}

    .step-line.done {
        background: #10b981;
    }

.message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

    .message.success::before {
        content: '✅';
    }

.message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

    .message.error::before {
        content: '⚠️';
    }

.message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

    .message.info::before {
        content: 'ℹ️';
    }

.step {
    display: none;
}

    .step.active {
        display: block;
        animation: stepIn 0.35s ease;
    }

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #374151;
        font-size: 13px;
        font-weight: 600;
    }

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}

.form-group input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    transition: all 0.3s;
    color: #1f2937;
    background: #f9fafb;
    letter-spacing: 1px;
}

    .form-group input:focus {
        outline: none;
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

    .form-group input::placeholder {
        color: #d1d5db;
        letter-spacing: 0;
        font-size: 13px;
    }

.field-hint {
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
    padding-right: 4px;
}

.btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.45);
    }

    .btn:active {
        transform: translateY(0);
    }

    .btn:disabled {
        background: #e5e7eb;
        color: #9ca3af;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

.btn-secondary {
    width: 100%;
    padding: 11px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

    .btn-secondary:hover:not(:disabled) {
        background: #f5f3ff;
    }

    .btn-secondary:disabled {
        border-color: #e5e7eb;
        color: #9ca3af;
        cursor: not-allowed;
        background: #f9fafb;
    }

.timer-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 10px;
}

.timer-icon {
    font-size: 16px;
}

.timer-text {
    font-size: 13px;
    color: #6b7280;
}

.timer-count {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    min-width: 48px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

    .timer-count.expired {
        color: #dc2626;
    }

.mobile-display {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #5b21b6;
}

    .mobile-display span {
        font-weight: 700;
        font-size: 15px;
        letter-spacing: 1px;
        flex: 1;
        text-align: center;
    }

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
    color: #d1d5db;
}

/* استایل مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 32px 28px;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h3 {
    text-align: center;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-content > p {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .login-wrapper {
        width: 100%;
    }

    .login-container {
        padding: 28px 20px;
    }

    .step-line {
        width: 40px;
    }

    .brand-icon .icon-circle {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }

    .brand-icon p {
        font-size: 13px;
    }

    .login-container h2 {
        font-size: 18px;
    }

    .form-group input {
        font-size: 14px;
        padding: 11px 40px 11px 12px;
    }

    .modal-content {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 360px) {
    body {
        padding: 10px;
    }

    .login-container {
        padding: 24px 16px;
    }

    .brand-icon .icon-circle {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}
/* نمایش شماره موبایل */
.mobile-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

    .mobile-display > span:first-child {
        font-size: 32px;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

.mobile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mobile-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.mobile-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    direction: ltr;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* دکمه‌های اکشن */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.btn-link {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

    .btn-link:hover {
        color: #764ba2;
        text-decoration: underline;
    }

    .btn-link:active {
        transform: scale(0.98);
    }

/* بهبود دکمه ثانویه */
.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

    .btn-secondary:hover {
        background: #e9ecef;
        border-color: #adb5bd;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .btn-secondary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* ریسپانسیو */
@media (max-width: 480px) {
    .mobile-display {
        padding: 16px;
        gap: 12px;
    }

        .mobile-display > span:first-child {
            font-size: 28px;
        }

    .mobile-number {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .mobile-label {
        font-size: 0.8rem;
    }
}
