/* =====================================================
   استایل پایه سامانه تسویه‌حساب - راست‌به‌چپ
   ===================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/fonts/Vazirmatn-Black.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f4f6f8;
    margin: 0;
    padding: 0;
    color: #222;
}

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: #fff;
    padding: 40px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 380px;
}

.login-box h1 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 30px;
    color: #1a3c6e;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    direction: ltr;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 11px;
    background-color: #1a3c6e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary:hover {
    background-color: #14305a;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-error {
    background-color: #fdecea;
    color: #b3261e;
    border: 1px solid #f5c6c3;
}

.alert-success {
    background-color: #e7f6ec;
    color: #1e7a3c;
    border: 1px solid #bfe6cb;
}

.topbar {
    background: #1a3c6e;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px;
}

/* ===== کارت آمار داشبورد ===== */
.stats-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #1a3c6e;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* ===== منوی داشبورد ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.menu-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s;
}

.menu-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.menu-card-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.menu-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #1a3c6e;
    margin-bottom: 6px;
}

.menu-card-desc {
    font-size: 13px;
    color: #666;
}

/* ===== کارت عمومی محتوا ===== */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.card h2 {
    font-size: 17px;
    color: #1a3c6e;
    margin-top: 0;
    margin-bottom: 18px;
}

/* ===== فرم دو ستونه ===== */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    background: #fff;
}

.btn-inline {
    width: auto;
    padding: 9px 22px;
    margin-top: 6px;
}

.btn-secondary {
    background-color: #eee;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
}

.btn-small {
    padding: 5px 12px;
    font-size: 13px;
    background: #eef2f7;
    color: #1a3c6e;
    border: 1px solid #d3dce6;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

.btn-small:hover {
    background: #dfe7f0;
}

.btn-small:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== جدول داده‌ها ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f4f6f8;
    color: #444;
    font-weight: 600;
}

.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.badge-active {
    background: #e7f6ec;
    color: #1e7a3c;
}

.badge-inactive {
    background: #fdecea;
    color: #b3261e;
}

.badge-pending {
    background: #fff4e0;
    color: #9a6300;
}

.muted {
    color: #888;
    font-size: 12px;
}

/* ===== باکس کد پیگیری بعد از ثبت درخواست ===== */
.tracking-box {
    margin-top: 12px;
    padding: 16px;
    background: #fff;
    border: 1px dashed #1e7a3c;
    border-radius: 8px;
}

.tracking-label {
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.tracking-code {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #1a3c6e;
    direction: ltr;
    text-align: center;
    padding: 8px;
    background: #f4f6f8;
    border-radius: 6px;
    margin-bottom: 10px;
}

.tracking-hint {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}

/* ===== صفحه پیگیری عمومی (کارمند) ===== */
.track-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 16px;
}

.track-box {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 480px;
}

.track-box h1 {
    font-size: 19px;
    text-align: center;
    color: #1a3c6e;
    margin-bottom: 24px;
}

.track-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-result {
    margin-top: 28px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.track-employee-info {
    margin-bottom: 20px;
    font-size: 15px;
}

/* ===== تایم‌لاین گردش امضا ===== */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
    padding-bottom: 22px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 5px;
    width: 2px;
    height: 100%;
    background: #e0e0e0;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    margin-top: 4px;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-done .timeline-dot {
    background: #1e7a3c;
}

.timeline-current .timeline-dot {
    background: #d97a00;
    box-shadow: 0 0 0 4px #fff4e0;
}

.timeline-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.timeline-status {
    font-size: 12.5px;
    margin-top: 2px;
}

.timeline-status-done {
    color: #1e7a3c;
}

.timeline-status-current {
    color: #9a6300;
}

.timeline-status-waiting {
    color: #999;
}

/* ===== صفحه ورودی اصلی (Landing) — هویت بصری رسمی دانشگاهی ===== */

:root {
    --navy-deep:   #0f2547;
    --navy:        #1a3c6e;
    --navy-soft:   #2c5490;
    --gold:        #b08d57;
    --gold-light:  #d4b483;
    --paper:       #f6f4ef;
    --ink:         #2a2f3a;
    --ink-muted:   #6b7280;
}

body.landing-page {
    background-color: var(--paper);
}

.landing-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    overflow: hidden;
}

/* الگوی ظریف برگرفته از بال‌های آرم دانشگاه، به‌عنوان واترمارک پس‌زمینه */
.landing-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 900px 500px at 50% -10%, rgba(26,60,110,0.07), transparent 60%),
        repeating-linear-gradient(115deg, rgba(26,60,110,0.035) 0px, rgba(26,60,110,0.035) 2px, transparent 2px, transparent 34px),
        repeating-linear-gradient(65deg, rgba(176,141,87,0.035) 0px, rgba(176,141,87,0.035) 2px, transparent 2px, transparent 34px);
    pointer-events: none;
    z-index: 0;
}

.landing-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: landingFadeIn 0.6s ease-out;
}

@keyframes landingFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.landing-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 22px;
    filter: drop-shadow(0 4px 10px rgba(15,37,71,0.15));
}

.landing-eyebrow {
    font-size: 13px;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.landing-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--navy-deep);
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

.landing-rule {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    margin: 18px 0 16px;
}

.landing-org {
    font-size: 19px;
    color: var(--ink-muted);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

.landing-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 46px;
}

.landing-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 20px 22px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e6e2d8;
    box-shadow: 0 2px 10px rgba(15,37,71,0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    text-align: right;
}

.landing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15,37,71,0.12);
    border-color: var(--gold-light);
}

.landing-btn-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-btn-track .landing-btn-icon {
    background: #eef5f0;
    color: #2f8557;
}

.landing-btn-login .landing-btn-icon {
    background: #eef2f9;
    color: var(--navy);
}

.landing-btn-body {
    flex: 1;
}

.landing-btn-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy-deep);
    margin-bottom: 3px;
}

.landing-btn-desc {
    font-size: 15.5px;
    color: var(--ink-muted);
    line-height: 1.6;
}

.landing-btn-arrow {
    flex-shrink: 0;
    color: #c9c2b3;
}

.landing-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid #e6e2d8;
    width: 100%;
    max-width: 700px;
}

.landing-footer-credit {
    font-size: 11.5px;
    color: #9a978d;
}

.landing-footer-credit strong {
    color: var(--ink-muted);
    font-weight: 700;
}

/* ===== کارت درخواست در پنل رییس دایره ===== */
.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.request-item-name {
    font-size: 15px;
    font-weight: bold;
    color: #222;
    margin-bottom: 4px;
}

.request-item-meta {
    font-size: 12.5px;
    color: #666;
}

.btn-approve {
    background-color: #1e7a3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.btn-approve:hover {
    background-color: #17612f;
}
.request-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-reject {
    background-color: #fff;
    color: #b3261e;
    border: 1px solid #e3a8a1;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.btn-reject:hover {
    background-color: #fdecea;
}

.btn-reject-submit {
    background-color: #b3261e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 22px;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
}

.btn-reject-submit:hover {
    background-color: #92201a;
}

.timeline-rejected .timeline-dot {
    background: #b3261e;
    box-shadow: 0 0 0 4px #fdecea;
}

.timeline-status-rejected {
    color: #b3261e;
    font-weight: 700;
}

.reject-reason-box {
    margin-top: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f0c4c0;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.8;
}

/* ===== تصویر کوچک امضا در جدول کاربران ===== */
.signature-thumb {
    max-width: 70px;
    max-height: 30px;
    background: #f9f8f5;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 2px;
}

.field-hint {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.required-mark {
    color: #b3261e;
}

/* ===== مودال ===== */
.modal-overlay {
    position: fixed;
    top: 0; right: 0; left: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
}

.modal-box h3 {
    margin-top: 0;
    font-size: 16px;
    color: #1a3c6e;
}
