*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    color: #1e293b;
}

/* main card */
.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-top: 10px solid #003b7e;
}

/* header */
.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header img {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.card-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #003b7e;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 14px;
    color: #64748b;
}

.card-header p a{
    text-decoration: none;
    color: #003b7e;
    font-weight: bold;
}

/* field form */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.3s ease;
    outline: none;
}
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 16px; 
    padding-left: 40px; 
    cursor: pointer;
}

input[type="tel"] {
    direction: ltr;
    text-align: right;
}

input:focus, select:focus {
    border-color: #003b7e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 59, 126, 0.1);
}

/* submit */
.btn {
    width: 100%;
    padding: 14px;
    background: #003b7e;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover:not(:disabled) {
    background: #002855;
    transform: translateY(-2px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* loading animation */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.alert {
    border-radius: 12px;
    padding: 15px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    display: none;
    line-height: 1.6;
    text-align: right;
}

.alert.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}


.debug-box {
    margin-top: 20px;
    background: #1e293b;
    border-radius: 12px;
    padding: 15px;
    display: none;
    direction: ltr;
    text-align: left;
}

.debug-box.show {
    display: block;
}

.debug-box p {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: bold;
}

.debug-box pre {
    font-size: 13px;
    color: #10b981;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
}

