/* استایل‌های دارک مود اختصاصی (بر اساس varjinatest.html) */

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

:root {
    /* پالت رنگی استخراج شده از فایل HTML */
    --gm-primary: #2ecc71;       /* brand-green */
    --gm-primary-hover: #27ae60;
    --gm-bg-body: #000000;       /* bg-black */
    --gm-bg-section: #1a1a1a;    /* brand-dark */
    --gm-bg-card: #242424;       /* brand-card */
    --gm-text-main: #f5f6fa;     /* رنگ متن روشن */
    --gm-text-muted: #9ca3af;    /* رنگ متن توضیحات (Gray-400) */
    --gm-border: #1f2937;        /* border-gray-800 */
    --gm-input-bg: #111111;
    --gm-font-family: 'Vazirmatn', Tahoma, sans-serif;
}

/* تنظیمات کلی صفحه */
body {
    background-color: var(--gm-bg-body) !important;
    color: var(--gm-text-main) !important;
    font-family: var(--gm-font-family) !important;
}

/* کانتینر اصلی */
.gm-container, .gm-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--gm-font-family);
    direction: rtl;
    background-color: var(--gm-bg-body); /* هماهنگ با بادی */
}

/* کارت‌ها (داشبورد، محصولات، درخواست‌ها) */
.gm-card, 
.gm-request-card, 
.gm-product-card,
.gm-dashboard-section-card,
.gm-stat-card,
.gm-form {
    background-color: var(--gm-bg-card) !important;
    border: 1px solid var(--gm-border) !important;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    padding: 20px;
    margin-bottom: 20px;
    color: var(--gm-text-main);
}

/* تایپوگرافی */
h1, h2, h3, h4, h5, h6, 
.gm-dashboard-title, 
.gm-form-title,
.gm-card-title,
.gm-product-title {
    color: var(--gm-primary) !important; /* رنگ سبز برند برای تیترها */
    font-weight: bold;
}

p, span, label {
    color: var(--gm-text-main);
}

.description, .gm-text-muted, small {
    color: var(--gm-text-muted) !important;
}

/* فرم‌ها و اینپوت‌ها */
.gm-form-group {
    margin-bottom: 20px;
}

.gm-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gm-primary); /* لیبل‌ها هم سبز باشند یا سفید */
}

.gm-form-input, 
.gm-form-textarea, 
.gm-form-select,
input[type="text"],
input[type="tel"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background-color: var(--gm-input-bg) !important;
    border: 1px solid var(--gm-border) !important;
    border-radius: 8px;
    color: var(--gm-text-main) !important;
    font-family: var(--gm-font-family);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.gm-form-input:focus, 
.gm-form-textarea:focus, 
.gm-form-select:focus {
    border-color: var(--gm-primary) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* دکمه‌ها */
.gm-btn, button[type="submit"], button[type="button"] {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--gm-font-family);
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gm-btn-primary, .button-primary {
    background-color: var(--gm-primary) !important;
    color: #000 !important; /* متن مشکی روی دکمه سبز خوانایی بهتری دارد */
}

.gm-btn-primary:hover {
    background-color: var(--gm-primary-hover) !important;
    transform: translateY(-2px);
}

.gm-btn-secondary {
    background-color: var(--gm-border);
    color: var(--gm-text-main);
}

.gm-btn-secondary:hover {
    background-color: #374151;
}

.gm-btn-block {
    width: 100%;
    display: flex;
}

/* گرید بندی داشبورد */
.gm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gm-grid-span-4 { grid-column: span 4; }
.gm-grid-span-2 { grid-column: span 2; }
.gm-grid-span-1 { grid-column: span 1; }

@media (max-width: 768px) {
    .gm-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .gm-grid-span-4, .gm-grid-span-2, .gm-grid-span-1 {
        grid-column: span 1;
    }
}

/* استایل لیست محصولات */
.gm-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gm-product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.gm-product-card:hover {
    transform: translateY(-5px);
    border-color: var(--gm-primary) !important;
}

.gm-product-image {
    background-color: #000;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gm-border);
    margin: -20px -20px 15px -20px;
}

.gm-product-price {
    font-size: 1.25rem;
    color: var(--gm-primary);
    font-weight: bold;
}

/* بج‌ها و وضعیت‌ها */
.gm-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}
.gm-badge-pending { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #fbbf24; }
.gm-badge-accepted { background-color: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #34d399; }
.gm-badge-completed { background-color: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #60a5fa; }

/* مودال */
.gm-modal {
    background-color: rgba(0, 0, 0, 0.85); /* پس زمینه تاریک‌تر */
    backdrop-filter: blur(5px);
}

.gm-modal-content {
    background-color: var(--gm-bg-card);
    border: 1px solid var(--gm-border);
    color: var(--gm-text-main);
}

.gm-modal-close {
    color: var(--gm-text-muted);
}
.gm-modal-close:hover {
    color: var(--gm-primary);
}

/* تایمر OTP */
#gm-otp-timer,
#gm-login-otp-timer,
#gm-customer-otp-timer,
#gm-seller-otp-timer {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid var(--gm-primary);
    color: var(--gm-primary);
    padding: 10px;
    border-radius: 8px;
}
/* --- اضافه شده برای اصلاح فرم مرحله‌به‌مرحله --- */

/* 1. کلاس حیاتی برای مخفی کردن مراحل */
.gm-hidden {
    display: none !important;
}

/* 2. استایل نوار مراحل (Progress Bar) */
.gm-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.gm-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gm-border);
    z-index: 1;
}

.gm-step {
    position: relative;
    z-index: 2;
    background: var(--gm-bg-card);
    width: 40px; /* عرض دایره */
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.gm-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gm-bg-card);
    border: 2px solid var(--gm-border);
    color: var(--gm-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.gm-step-label {
    font-size: 11px;
    color: var(--gm-text-muted);
    white-space: nowrap;
}

/* استایل مرحله فعال */
.gm-step.active .gm-step-number {
    background: var(--gm-primary);
    border-color: var(--gm-primary);
    color: #000;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.gm-step.active .gm-step-label {
    color: var(--gm-primary);
    font-weight: bold;
}

/* 3. استایل دکمه‌های رادیویی (شهری/روستایی) */
.gm-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.gm-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--gm-input-bg);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--gm-border);
    transition: all 0.3s;
}

.gm-radio-label:hover {
    border-color: var(--gm-primary);
}

.gm-radio-label input {
    margin-left: 10px;
    accent-color: var(--gm-primary); /* رنگ دکمه رادیویی */
}

/* 4. استایل آپلود فایل */
.gm-file-upload {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.gm-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gm-file-upload-btn {
    border: 2px dashed var(--gm-border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: var(--gm-input-bg);
    color: var(--gm-text-muted);
    transition: all 0.3s;
}

.gm-file-upload:hover .gm-file-upload-btn {
    border-color: var(--gm-primary);
    color: var(--gm-primary);
}

/* 5. فاصله‌دهی‌های کاربردی */
.gm-mt-5 { margin-top: 5px; }
.gm-mt-15 { margin-top: 15px; }
.gm-mb-20 { margin-bottom: 20px; }
.gm-text-center { text-align: center; }
.gm-text-sm { font-size: 12px; }

/* استایل دکمه‌های سوال اولیه (بازدید دارم/ندارم) */
.gm-btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

/* --- اصلاح ساختار مودال (Popup) --- */

.gm-modal {
    display: none; /* در حالت عادی مخفی باشد */
    position: fixed; /* ثابت روی کل صفحه */
    z-index: 99999; /* بالاتر از همه عناصر */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* اگر ارتفاع زیاد بود اسکرول بخورد */
    background-color: rgba(0, 0, 0, 0.85); /* پس‌زمینه تاریک پشت پاپ‌آپ */
    backdrop-filter: blur(4px); /* محو کردن پشت زمینه */
}

.gm-modal-content {
    background-color: var(--gm-bg-card);
    margin: 5% auto; /* 5% فاصله از بالا و وسط‌چین */
    padding: 25px;
    border: 1px solid var(--gm-border);
    width: 90%;
    max-width: 500px; /* حداکثر عرض */
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: gmFadeIn 0.3s ease-out;
}

/* دکمه بستن (ضربدر) */
.gm-modal-close {
    position: absolute;
    top: 15px;
    left: 15px; /* سمت چپ چون راست‌چین هستیم */
    color: var(--gm-text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.gm-modal-close:hover {
    color: var(--gm-primary);
}

/* انیمیشن باز شدن */
@keyframes gmFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#gm-timer-seconds,
#gm-login-timer-seconds,
#gm-customer-timer-seconds,
#gm-seller-timer-seconds {
    color: #fff;
    font-weight: bold;
}

/* آیکون‌های آماری */
.gm-stat-card-icon {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px;
    padding: 15px;
}