@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* --- تنظیمات کلی و متغیرها --- */
:root {
    --primary: #328d50;       /* رنگ اصلی آبی */
    --primary-dark: #0ea842;  /* آبی تیره برای هاور */
    --secondary: #1e293b;     /* رنگ سرمه‌ای تیره */
    --bg-color: #f1f5f9;      /* رنگ پس‌زمینه کلی */
    --footer-bg: #0f172a;     /* رنگ فوتر */
    --text-color: #334155;    /* رنگ متن */
    --success: #10b981;       /* سبز موفقیت */
    --error: #ef4444;         /* قرمز خطا */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    direction: rtl;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* برای چسبیدن فوتر به پایین */
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- نوبار (منوی بالا) --- */
.navbar {
    background: white;
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* منوی سمت چپ (کاربر و کیف پول) */
.nav-left-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wallet-box {
    display: flex;
    align-items: center;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 50px;
    padding: 5px 5px 5px 15px;
    gap: 10px;
}

.balance {
    color: #0369a1;
    font-weight: bold;
    font-size: 0.9rem;
}

.balance small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.btn-charge {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: transform 0.2s, background 0.2s;
}

.btn-charge:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 5px;
}

.user-icon {
    width: 38px;
    height: 38px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
}

.phone-number {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--secondary);
}

.logout-link {
    color: var(--error);
    font-size: 1.2rem;
    margin-right: 5px;
    transition: transform 0.2s;
}

.logout-link:hover {
    transform: scale(1.1);
}

.btn-login-main {
    background: var(--primary);
    color: white;
    padding: 10px 25px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
    transition: background 0.3s;
}

.btn-login-main:hover {
    background: var(--primary-dark);
}

/* --- کانتینر اصلی --- */
.main-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    flex: 1; /* فضای خالی را پر میکند تا فوتر پایین برود */
}

/* --- کارت‌ها و گریدها --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.icon-wrapper {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.service-card h3 {
    margin: 10px 0;
    font-size: 1.1rem;
    color: var(--secondary);
}

.service-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* --- فرم‌ها و باکس‌های ورودی --- */
.auth-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 500px;
    margin: 0 auto;
}

.input-group, .form-group {
    margin-bottom: 20px;
}

.input-group label, .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Vazirmatn';
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: #f8fafc;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
}

/* --- دکمه‌های اصلی --- */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Vazirmatn';
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 30px; /* فاصله زیاد از بالا برای نچسبیدن */
    display: block;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* --- طراحی پلاک خودرو --- */
.plate-frame {
    display: flex;
    direction: ltr; /* چیدمان چپ به راست برای پلاک */
    background: white;
    border: 2px solid #000;
    border-radius: 8px;
    width: 320px;
    height: 70px;
    margin: 20px auto;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
}

.plate-blue-strip {
    background: #003399;
    width: 45px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-right: 1px solid white; /* خط سفید جداکننده */
}

.plate-inputs {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.plate-input {
    border: none;
    background: transparent;
    font-family: 'Vazirmatn';
    font-weight: 900;
    font-size: 1.6rem;
    text-align: center;
    color: #1e293b;
    outline: none;
}

.p-2 { width: 50px; }
.p-letter { 
    width: 70px; 
    font-size: 1.3rem; 
    cursor: pointer;
    text-align-last: center;
}
.p-3 { width: 70px; }

.plate-iran-section {
    width: 70px;
    height: 100%;
    border-left: 2px solid #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.plate-iran-input {
    width: 100%;
    border: none;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    outline: none;
    background: transparent;
}

/* --- فوتر (اصلاح شده و جمع‌وجور) --- */
.main-footer {
    background-color: var(--footer-bg);
    color: #94a3b8;
    padding: 25px 0 15px 0; /* ارتفاع کم */
    margin-top: auto;
    font-size: 0.9rem;
    border-top: 3px solid var(--primary);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    transition: color 0.3s, padding-right 0.3s;
}

.footer-section ul li a:hover {
    color: white;
    padding-right: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    font-size: 1.4rem;
    color: #94a3b8;
    transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
}

/* --- پیام‌ها (Alerts) --- */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error, .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}
