/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: #f5f6f8;
    min-height: 100vh;
    padding: 12px 20px;
    direction: rtl;
    color: #2c3e50;
    line-height: 1.8;
}

/* Button & Link Colors */
:root {
    --primary-color: #336699;
    --primary-hover: #003366;
    --primary-light: #dbeafe;
}

/* Payment Container */
.payment-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.payment-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    text-align: center;
}

.payment-header h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.payment-body {
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

/* Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Form Sections */
.form-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-section.active {
    display: block;
    opacity: 1;
}


/* Form Elements */
.form-group {
    margin-bottom: 20px;
    max-width: 350px;  /* تغییر به 350px */
    margin-left: auto;
    margin-right: 12px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    max-width: 350px;  /* تغییر به 350px */
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    color: #2c3e50;
}

/* حذف کلاس‌های سایز متفاوت */
/* Input Sizes */
.form-control.input-sm,
.form-control.input-md,
.form-control.input-lg {
    max-width: 350px;
}

/* Select Elements */
select.form-control {
    padding-right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    max-width: 350px;
}

/* Validation States */
.form-control.is-invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* Spacing */
h5 {
    margin-bottom: 25px;
    font-size: 18px;
    color: #2c3e50;
}

p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.mb-3 {
    margin-bottom: 20px;
}

.mb-4 {
    margin-bottom: 30px;
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    font-size: 15px;
    line-height: 1.5;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    min-width: 200px;
    margin: 30px auto;
    display: block;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-info {
    background-color: #ebf8ff;
    color: #2c5282;
    border: 1px solid #bee3f8;
}

/* Card Info Styles */
.card-info {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 3px;
    margin: 6px 0;
    text-align: center;
}

.card-info-box {
    background: #f8fafc;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.card-info-box h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.card-number {
    font-size: 20px;
    letter-spacing: 2px;
    direction: ltr;
    font-family: monospace;
    color: #2c3e50;
}

.card-holder {
    margin-top: 6px;
    color: #64748b;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.radio-group input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.radio-button.method-btn {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 6px 6px;
    background: #f3f4f6;
    color: #333;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
}

.radio-button.method-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-hover);
}

.radio-button.method-btn input[type="radio"]:checked + span,
.radio-button.method-btn:has(input[type="radio"]:checked) {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.radio-button {
    white-space: nowrap;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Payment Method Cards */
.payment-method {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
}

.payment-method.zarlink {
    border-color: #3490dc;
    background-color: #f8fafc;
}

/* Card Number Display */
.card-display {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.card-display .number {
    font-size: 20px;
    letter-spacing: 2px;
    color: #2c3e50;
    margin: 5px 0;
}

/* Discount Code Section */
.discount-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/*
.discount-input {
    max-width: 150px !important;
    text-align: center;
    letter-spacing: 2px;
    font-family: monospace;
    font-size: 16px !important;
}
*/

/* reCAPTCHA Styles */
.g-recaptcha {
    margin-bottom: 20px;
}

.g-recaptcha > div {
    margin: 0 auto;
}

/* Message Styles */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Guide Box Styles */
.guide-box {
    background: #f8fafc;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 8px 12px;      /* کاهش padding */
    margin-bottom: 12px;    /* کاهش margin */
    font-size: 13px;
}

.guide-box h4 {
    color: #2c3e50;
    margin-bottom: 10px;     /* کاهش فاصله */
    font-size: 15px;         /* کاهش سایز عنوان */
}

.guide-box p {
    margin-bottom: 8px;
    color: #4a5568;
    font-size: 13px;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 20px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #2c3e50;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-control {
    text-align: left;
}

.login-form .btn-submit {
    width: 100%;
    margin-top: 10px;
}

.login-form .g-recaptcha {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Admin Page Layout */
.admin-page {
    background: #f8fafc;
    min-height: 100vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.admin-nav a {
    color: #4b5563;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.admin-nav a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.admin-nav a.active {
    background: var(--primary-color);
    color: #fff;
}

.admin-content {
    padding: 0 20px;
}

/* Admin Panel Tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.admin-tabs a {
    color: #4b5563;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
}

.admin-tabs a.active {
    background: #e5e7eb;
    color: #1f2937;
}

/* Admin Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    padding: 10px 14px;
    min-width: 110px;
    text-align: center;
    flex: 1 1 0;
    font-size: 13px;
}

.stat-label {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 17px;
    font-weight: bold;
    color: #1e293b;
}

.text-warning { color: #f59e0b; }
.text-success { color: #10b981; }

/* Admin Tables */
.table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: right;
    padding: 12px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

/* جدول پرداخت‌ها */
.table-card {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 0;
    margin-bottom: 24px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    white-space: nowrap;
}

/* Admin Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 100%;
    margin: 20px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Status Badges */
.badge {
    padding: 4px 0px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Success Box Styles */
.success-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 24px;
    margin: 32px auto;
    max-width: 400px;
    text-align: center;
    font-size: 15px;
}

/* دکمه‌های کوچک عملیات جدول */
.btn-action {
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 5px;
    min-width: 28px;
    height: 32px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Form Controls - Readonly/Disabled state */
.form-control[readonly],
.form-control:disabled {
    background-color: #e6e6e6;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Optional: Add a subtle border color change */
.form-control[readonly]:focus,
.form-control:disabled:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .payment-container {
        margin: 0;
        border-radius: 0;
    }

    .payment-header,
    .payment-body {
        padding: 20px 15px;
    }

    .step-label {
        font-size: 13px;
    }

    .form-section {
        padding: 0;
    }
    
    .form-control {
        max-width: none !important;
    }
    
    .payment-method {
        padding: 15px;
    }
    
    .card-display .number {
        font-size: 16px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-submit {
        width: 100%;
    }

    .admin-nav {
        flex-wrap: wrap;
    }
    
    .admin-nav a {
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }
    
    .filters-section {
        grid-template-columns: 1fr;
    }
}

.form-control.email-input {
    max-width: 350px;
    text-align: left !important;
    direction: ltr !important;
    font-family: inherit;
}

/* Override any inherited RTL properties */
input[type="email"] {
    text-align: left !important;
    direction: ltr !important;
}

/* reCAPTCHA size customization */
.g-recaptcha {
    transform: scale(0.9);
    transform-origin: right top;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row .form-label {
    min-width: 130px;
    font-size: 14px;
    color: #374151;
    margin-bottom: 0;
}

.form-row .form-control {
    flex: 1;
    font-size: 14px;
    padding: 10px 12px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .form-row .form-label {
        min-width: unset;
    }
}

.amount-text {
    font-weight: bold;
    color: maroon;
}

/* فایل: admin.php یا style.css */
.filters-form .filter-select {
    min-width: 0;
    width: 180px !important;
    display: inline-block;
}
.filters-form .search-input {
    min-width: 0;
    width: 200px !important;
    display: inline-block;
}
.filters-form .persian-date {
    width: 110px !important;
    min-width: 0;
    display: inline-block;
}

 /* Tab Navigation Styles */
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.nav-link {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.nav-link.active {
    opacity: 1;
    font-weight: bold;
}
.nav-link:hover {
    opacity: 1;
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}
.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
}
.modal-close:hover {
    color: #000;
}
.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}
/* Detail Rows */
.payment-details .detail-row {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.payment-details .detail-row strong {
    width: 200px;
    flex-shrink: 0;
}
.payment-details .detail-row span {
    flex: 1;
}

/* New Payment Method Buttons */
.payment-method-buttons {
    display: flex;
    gap: 12px;
}

.method-btn {
    flex: 1 1 0;
    min-width: 130px;
    padding: 3px 0;
    font-size: 13px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: #f3f4f6;
    color: #333;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    text-align: center;
}

.method-btn.selected,
.method-btn:focus {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #dbeafe;
}

.payment-btn-group {
    display: flex;
    gap: 12px;
    flex: 1;
}

.payer-card-field,
.tracking-number-field {
    margin-bottom: 16px;
}

.payment-info {
    margin-right:12px;
}