@import url('https://cdnjs.cloudflare.com/ajax/libs/vazirmatn/33.0.3/Vazirmatn-font-face.css');

* { box-sizing: border-box; }

html, body { min-height: 100vh; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: #f4f6f8;
    margin: 0;
    padding: 20px 20px 100px;
    color: #1f2933;
    direction: rtl;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1000px; margin: 0 auto; flex: 1; }
.container.narrow { max-width: 480px; }

.card {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

h1 { font-size: 22px; margin: 0 0 4px; text-align: center; }
.subtitle { text-align: center; color: #6b7280; margin: 0 0 24px; font-size: 14px; }

label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
}
input[type="text"]:focus,
input[type="password"]:focus { outline: none; border-color: #2563eb; }

.btn-primary {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-secondary {
    padding: 12px 20px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 16px;
}

.btn-skip {
    display: inline-block;
    margin-right: 12px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.summary-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.summary-table td { padding: 10px 4px; border-bottom: 1px solid #eee; }
.summary-table td:first-child { color: #6b7280; }
.summary-table td:last-child  { text-align: left; font-weight: 600; }
.row-total td { font-size: 17px; color: #2563eb; font-weight: 700; }

.help-text, .small-note { font-size: 13px; color: #9ca3af; text-align: center; margin-top: 16px; }

.link-back {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.info-request { margin-top: 10px; }
.info-request p { font-size: 13.5px; color: #4b5563; line-height: 1.8; }

.radio-group { display: flex; gap: 16px; margin-top: 6px; }
.radio-option { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }

.owner-fields { border-right: 3px solid #e5e7eb; padding-right: 12px; margin-top: 10px; }

/* Admin */
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th,
table.data-table td { padding: 8px 10px; border-bottom: 1px solid #eee; text-align: right; }
table.data-table th { background: #f9fafb; font-weight: 700; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #92400e; }

.nav { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.nav a { padding: 10px 16px; background: #eef2ff; color: #3730a3; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover { background: #e0e7ff; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-box { background: #f9fafb; border-radius: 10px; padding: 16px; text-align: center; }
.stat-box .num   { font-size: 22px; font-weight: 700; color: #2563eb; }
.stat-box .label { font-size: 13px; color: #6b7280; margin-top: 4px; }

/* Gateway selector */
.gateway-select { display: flex; gap: 12px; margin: 10px 0; }
.gateway-option {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s;
}
.gateway-option.active { border-color: #2563eb; background: #eff6ff; }
.gateway-option .gw-name { font-weight: 700; font-size: 15px; }
.gateway-option .gw-desc { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.footer-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
    justify-content: space-between;
}
.footer-name { font-size: 13px; color: #6b7280; margin: 0; }
.enamad-wrap { display: flex; align-items: center; }

.table-wrap { max-height: 500px; overflow-y: auto; border: 1px solid #eee; border-radius: 10px; }
.export-link { display: inline-block; margin-bottom: 16px; padding: 8px 16px; background: #10b981; color: #fff; border-radius: 8px; text-decoration: none; font-size: 13px; }
.logout { float: left; font-size: 13px; color: #9ca3af; text-decoration: none; }
.filters a { margin-left: 12px; font-size: 13px; color: #6b7280; text-decoration: none; }
.filters a.active { color: #2563eb; font-weight: 700; }
.btn-mini { padding: 5px 12px; font-size: 12px; border: none; border-radius: 6px; cursor: pointer; font-family: inherit; }
.btn-mini-settle   { background: #2563eb; color: #fff; }
.btn-mini-unsettle { background: #e5e7eb; color: #374151; }
.upload-box { border: 2px dashed #d1d5db; border-radius: 12px; padding: 30px; text-align: center; }
.row-changed { background: #fffbeb; }
.warning-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 14px; margin: 14px 0; font-size: 13px; }
