/* ===================================================================
   سامانه امور شهریه و رفاهی طلاب
   پالت روشن، الهام از کاشی‌کاری فیروزه‌ای و تذهیب ایرانی
   =================================================================== */

/* ---------- فونت ایران‌سنس ---------- */
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_UltraLight.woff') format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('fonts/IRANSansWeb_Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------- توکن‌های طراحی ---------- */
:root {
    --teal:        #0E7C86;
    --teal-dark:   #0A5A62;
    --teal-deep:   #073f45;
    --teal-soft:   #E4F1F1;
    --gold:        #C19A4B;
    --gold-light:  #D8B873;
    --gold-soft:   #F3E9D2;
    --sky:         #1C8CC4;
    --ink:         #1F373B;
    --ink-soft:    #5C6B6D;
    --ivory:       #F6F2E9;
    --ivory-2:     #EFEADD;
    --surface:     #FFFFFF;
    --line:        #E4DFD2;

    --shadow-sm: 0 2px 8px rgba(15, 60, 64, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 60, 64, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 60, 64, 0.14);

    --header-h: 78px;
    --maxw: 1240px;
}

/* ---------- پایه ---------- */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'IRANSans', Tahoma, 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { font-family: 'IRANSans', Tahoma, sans-serif; }

a { color: var(--teal); text-decoration: none; }

::selection { background: var(--gold-soft); color: var(--teal-deep); }

/* اسکرول‌بار ظریف */
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb { background: #cdbf9c; border-radius: 8px; border: 3px solid var(--ivory); }
*::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ===================================================================
   پوسته‌ی صفحه + بافت هندسی محو
   =================================================================== */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(1200px 520px at 50% -8%, #ffffff 0%, rgba(255,255,255,0) 60%),
        radial-gradient(900px 600px at 100% 0%, var(--teal-soft) 0%, rgba(228,241,241,0) 55%),
        radial-gradient(900px 600px at 0% 4%, var(--gold-soft) 0%, rgba(243,233,210,0) 50%),
        var(--ivory);
}

/* بافت تزئینی (نقش خاتم) بسیار محو روی کل صفحه */
.app-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.16;
    background-image: url("img/pattern.png");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.app-shell > * { position: relative; z-index: 1; }

/* ===================================================================
   هدر  (RTL: لوگو سمت راست – ورود سمت چپ – منو وسط)
   =================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(193,154,75,0.18);
}

.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 28px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    justify-self: start;
}
.brand img { height: 54px; width: auto; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.08)); }

/* منوی وسط */
.main-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.55);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--shadow-sm);
}
.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.main-nav a .mud-icon-root { font-size: 1.15rem; color: var(--teal); transition: color .18s ease; }
.main-nav a:hover { background: var(--teal-soft); color: var(--teal-deep); }
.main-nav a.active { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.main-nav a.active .mud-icon-root { color: var(--gold-light); }

/* سمت چپ – ورود */
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #fff;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 6px 16px rgba(14,124,134,0.28);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(14,124,134,0.34); filter: brightness(1.04); }
.btn-login .mud-icon-root { font-size: 1.2rem; color: var(--gold-light); }

.btn-dash {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 999px;
    font-weight: 600; font-size: 0.9rem; color: var(--teal-dark); background: #fff; border: 1px solid var(--line);
    transition: background .15s ease, border-color .15s ease;
}
.btn-dash:hover { background: var(--teal-soft); border-color: #bfe0e0; }
.btn-dash .mud-icon-root { font-size: 1.1rem; color: var(--teal); }

.btn-logout {
    background: linear-gradient(135deg, #c0504d, #9e3b39) !important;
    box-shadow: 0 6px 16px rgba(178,59,59,0.26) !important;
}
.btn-logout:hover { box-shadow: 0 10px 22px rgba(178,59,59,0.34) !important; }
.btn-logout .mud-icon-root { color: #ffd9d9 !important; }

/* ===================================================================
   بخش اصلی (Hero) – سه ستون قرینه
   =================================================================== */
.hero {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 10px 28px 15px;
    width: 100%;
    box-sizing: border-box;
}

.hero-title {
    margin: 0 0 5px;
    text-align: center;
    font-family: 'IRANSans', Tahoma, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.hero-title .star {
    color: var(--gold);
    font-size: 1.05rem;
    line-height: 1;
    transform: translateY(-2px);
    text-shadow: 0 1px 2px rgba(193,154,75,0.3);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1.2fr) minmax(0, 1fr);
    align-items: end;
    gap: 22px;
}

/* ستون مرکزی – تصویر با طاقِ محراب‌گونه (بلندتر و بزرگ‌تر از کادرهای کناری) */
.cleric {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 600px;
    z-index: 2;
}
.cleric .arch {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 480px);
    border-radius: 50% 50% 16px 16px / 60% 60% 16px 16px;
    background: linear-gradient(180deg, #ffffff 0%, var(--teal-soft) 72%, #d7e9e9 100%);
    border: 1.5px solid var(--gold);
    box-shadow: inset 0 0 0 8px rgba(255,255,255,0.7), var(--shadow-lg);
}
.cleric .arch::after {
    content: "";
    position: absolute; inset: 16px;
    border-radius: 50% 50% 12px 12px / 58% 58% 12px 12px;
    border: 1px solid rgba(193,154,75,0.45);
}
.cleric .halo {
    position: absolute;
    top: 13%;
    left: 50%;
    transform: translateX(-50%);
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216,184,115,0.34) 0%, rgba(216,184,115,0) 70%);
    filter: blur(2px);
}
.cleric img {
    position: relative;
    max-width: 86%;
    max-height: 88%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 26px rgba(15,60,64,0.28));
    /* جلوگیری از راست‌کلیک/Save as و کشیدن عکس (عکس تزئینی و غیرکلیک‌پذیر است) */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ---------- کادرهای امور شهریه ---------- */
.affair-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-self: end;
    width: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.affair-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.affair-head {
    position: relative;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: #fff;
    text-align: center;
    border-bottom: 2px solid var(--gold);
}
.affair-head::before {
    /* نوار تزئینی طلایی بالای هدر */
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 4px;
    background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 20px);
    opacity: 0.7;
}
.affair-head .title { font-size: 1.18rem; font-weight: 700; letter-spacing: 0.2px; }
.affair-head .subtitle { font-size: 0.78rem; opacity: 0.85; margin-top: 3px; font-weight: 300; }
.affair-head .crest {
    width: 40px; height: 40px; margin: 0 auto 8px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.4);
}
.affair-head .crest .mud-icon-root { font-size: 1.5rem; color: var(--gold-light); }
.affair-head .crest .crest-img { width: 30px; height: 30px; object-fit: contain; display: block; }

.affair-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.affair-item {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    text-align: start;
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
.affair-item:hover { background: var(--teal-soft); border-color: #bfe0e0; transform: translateX(-3px); }
.affair-item .lead {
    width: 42px; height: 42px; flex: none;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--gold-soft), #fff);
    border: 1px solid var(--gold-soft);
}
.affair-item .lead .mud-icon-root { color: var(--teal); font-size: 1.4rem; }
.affair-item .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.affair-item .txt b { font-weight: 600; }
.affair-item .txt small { color: var(--ink-soft); font-weight: 300; font-size: 0.76rem; }
.affair-item .chev { color: var(--gold); font-size: 1.3rem; transition: transform .16s ease; }
.affair-item:hover .chev { transform: translateX(-4px); }

/* ===================================================================
   نوار تماس (نشانی / تلفن / رایانامه)
   =================================================================== */
.contact-strip {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 6px 28px 46px;
    width: 100%;
    box-sizing: border-box;
}
.contact-inner {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 14px 18px;
    overflow: hidden;
}
.contact-inner::before {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
}
.contact-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}
a.contact-item:hover { background: var(--teal-soft); transform: translateY(-1px); }
.contact-item .ci-icon {
    width: 46px; height: 46px; flex: none;
    display: grid; place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    box-shadow: 0 4px 12px rgba(14,124,134,0.22);
}
.contact-item .ci-icon .mud-icon-root { color: var(--gold-light); font-size: 1.4rem; }
.contact-item .ci-text { display: flex; flex-direction: column; line-height: 1.55; text-align: start; }
.contact-item .ci-text small { color: var(--ink-soft); font-size: 0.74rem; font-weight: 300; }
.contact-item .ci-text b { font-weight: 600; font-size: 0.95rem; color: var(--teal-deep); }
.contact-div { width: 1px; background: var(--line); align-self: stretch; margin: 8px 0; }

/* ===================================================================
   فوتر
   =================================================================== */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.6), #fff);
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--ink-soft);
    font-size: 0.84rem;
}
.footer-inner .pray { color: var(--teal-dark); font-weight: 600; }

/* ===================================================================
   دیالوگ اطلاع‌رسانی
   =================================================================== */
.dlg-title { display: flex; align-items: center; gap: 14px; }
.dlg-title .dlg-ico {
    width: 48px; height: 48px; flex: none;
    display: grid; place-items: center; border-radius: 13px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
}
.dlg-title .dlg-ico .mud-icon-root { color: var(--gold-light); font-size: 1.7rem; }
.dlg-title h3 { margin: 0; font-size: 1.18rem; color: var(--teal-deep); font-weight: 700; }
.dlg-title small { color: var(--ink-soft); font-size: 0.8rem; font-weight: 300; }

.dlg-body { padding-top: 4px; }
.dlg-intro { margin: 0 0 14px; color: var(--ink); line-height: 2.05; font-size: 0.96rem; }
.dlg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dlg-list li {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--teal-soft); border: 1px solid #d4e8e8;
    border-radius: 11px; padding: 12px 14px; line-height: 1.95; font-size: 0.93rem;
}
.dlg-list li .li-ico { color: var(--teal); font-size: 1.2rem; margin-top: 2px; flex: none; }
.dlg-note {
    margin-top: 16px; display: flex; align-items: flex-start; gap: 10px;
    background: var(--gold-soft); border: 1px dashed var(--gold);
    border-radius: 11px; padding: 12px 14px; color: #7a5c1e; font-size: 0.88rem; line-height: 1.9;
}
.dlg-note .mud-icon-root { color: var(--gold); flex: none; margin-top: 2px; }
.dlg-ok { border-radius: 999px !important; padding-inline: 26px !important; font-weight: 600 !important; }
.dlg-ico-warn { background: linear-gradient(135deg, #c0504d, #9e3b39) !important; }
.dlg-ico-warn .mud-icon-root { color: #ffe0e0 !important; }
.confirm-msg { margin: 0; color: var(--ink); line-height: 2; font-size: 0.96rem; }

/* ===================================================================
   صفحات داخلی (placeholder)
   =================================================================== */
.page-wrap { max-width: var(--maxw); margin: 0 auto; padding: 36px 28px 64px; width: 100%; box-sizing: border-box; }
.page-hero {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
}
.page-hero .ico {
    width: 76px; height: 76px; margin: 0 auto 16px;
    display: grid; place-items: center; border-radius: 20px;
    background: linear-gradient(135deg, var(--teal-soft), #fff);
    border: 1px solid var(--line);
}
.page-hero .ico .mud-icon-root { font-size: 2.4rem; color: var(--teal); }
.page-hero h1 { margin: 0 0 8px; color: var(--teal-deep); font-size: 1.7rem; }
.page-hero p { margin: 0 auto; color: var(--ink-soft); max-width: 560px; line-height: 2; }
.page-hero .soon {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
    padding: 9px 18px; border-radius: 999px;
    background: var(--gold-soft); color: #7a5c1e; font-weight: 600; font-size: 0.86rem;
}

/* ===================================================================
   فرم‌ها (تکمیل پرونده و ...)
   =================================================================== */
.form-card {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 32px;
    overflow: hidden;
}
.form-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
}

.form-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.form-head .fh-ico {
    width: 60px; height: 60px; flex: none; display: grid; place-items: center; border-radius: 16px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}
.form-head .fh-ico .mud-icon-root { color: var(--gold-light); font-size: 1.9rem; }
.form-head h1 { margin: 0; font-size: 1.5rem; color: var(--teal-deep); }
.form-head p { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.9rem; }

.pane-hint {
    background: var(--teal-soft); border: 1px solid #d4e8e8; border-radius: 12px;
    padding: 12px 16px; color: var(--teal-deep); font-size: 0.9rem; line-height: 1.9; margin: 0 0 20px;
}

/* —— گام جست‌وجو —— */
.search-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.search-row .mud-radio { min-width: 130px; }

.srch-input {
    flex: 1; min-width: 0;
    font-family: 'IRANSans', Tahoma, sans-serif; font-size: 0.98rem;
    padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.srch-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,134,0.12); }
.srch-input:disabled { background: #f3f1ea; color: #b3aa96; cursor: not-allowed; }
.srch-input::placeholder { color: #b3aa96; }

.captcha-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; flex-wrap: wrap; }
.captcha-input { max-width: 180px; }

.captcha-box {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
}
.captcha-img { line-height: 0; }
.captcha-img svg { display: block; border-radius: 8px; }
.captcha-refresh {
    width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--line); border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark);
    transition: background .15s ease;
}
.captcha-refresh:hover { background: #d4eaea; }
.captcha-refresh .mud-icon-root { font-size: 1.3rem; color: var(--teal); }

.rounded-btn { border-radius: 999px !important; padding-inline: 28px !important; font-weight: 600 !important; }
.search-btn { margin-top: 4px; }

/* —— گام تکمیل —— */
.found-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: linear-gradient(135deg, #e9f5e9, #f3faf3);
    border: 1px solid #c9e6c9; border-radius: 14px; padding: 14px 18px; margin-bottom: 18px;
    color: #1f5b3a; font-size: 1rem;
}
.found-banner > .mud-icon-root { color: #2e7d5b; font-size: 1.5rem; }
.found-banner b { color: var(--teal-deep); font-weight: 700; }
.link-btn {
    margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px;
    background: none; border: none; cursor: pointer; color: var(--teal-dark); font-family: inherit;
    font-size: 0.86rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; transition: background .15s ease;
}
.link-btn:hover { background: rgba(14,124,134,0.08); }
.link-btn .mud-icon-root { font-size: 1.1rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 8px; }
.form-grid .fg-full { grid-column: 1 / -1; }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 8px; }
.upload-field { border: 1px dashed var(--gold); border-radius: 14px; padding: 14px; background: #fffdf8; }
.upload-field .uf-label { font-size: 0.9rem; font-weight: 600; color: var(--teal-deep); margin-bottom: 10px; }
.upload-field .uf-label small { color: var(--ink-soft); font-weight: 300; }
.uf-drop {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark);
    cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: background .15s ease;
}
.uf-drop:hover { background: #d4eaea; }
.uf-drop .mud-icon-root { color: var(--teal); }
.uf-drop input[type=file] { display: none; }
.uf-selected { display: flex; align-items: center; gap: 12px; }
.uf-selected .uf-ok .mud-icon-root { color: #2e7d5b; font-size: 1.7rem; }
.uf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.uf-info b { font-weight: 600; font-size: 0.88rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uf-info small { color: var(--ink-soft); font-size: 0.78rem; }
.uf-remove {
    width: 34px; height: 34px; flex: none; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--error, #b23b3b); transition: background .15s ease;
}
.uf-remove:hover { background: #fdecec; }
.uf-remove .mud-icon-root { font-size: 1.1rem; color: #b23b3b; }

.form-actions { display: flex; justify-content: flex-start; margin-top: 22px; }

/* —— پیام نتیجه —— */
.result-pane { text-align: center; padding: 24px 12px; }
.result-pane .rp-ico { font-size: 4rem; color: #2e7d5b; }
.result-pane h2 { margin: 10px 0 6px; color: var(--teal-deep); font-size: 1.4rem; }
.result-pane p { color: var(--ink-soft); line-height: 2; margin: 0 0 20px; }
.result-pane b { color: var(--teal-dark); }

/* ===================================================================
   ورود (Login)
   =================================================================== */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 40px 20px; width: 100%; box-sizing: border-box; }
.auth-card {
    width: 100%; max-width: 420px; position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--shadow-lg); padding: 36px 32px; text-align: center;
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal)); }
.auth-brand img { height: 62px; width: auto; }
.auth-title { margin: 14px 0 2px; color: var(--teal-deep); font-size: 1.5rem; font-weight: 700; }
.auth-sub { margin: 0 0 22px; color: var(--ink-soft); font-size: 0.85rem; }
.auth-field { margin-bottom: 14px; text-align: right; }
.auth-error { display: flex; align-items: center; gap: 8px; background: #fdecec; border: 1px solid #f3c4c4; color: #b23b3b; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 0.88rem; text-align: right; }
.auth-error .mud-icon-root { flex: none; }
.auth-captcha { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.auth-btn { margin-top: 6px; border-radius: 12px !important; height: 48px; font-weight: 600 !important; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--ink-soft); font-size: 0.85rem; }
.auth-back:hover { color: var(--teal); }
.auth-back .mud-icon-root { font-size: 1.1rem; }

/* ===================================================================
   نوار بالای داشبورد / پنل مدیریت
   =================================================================== */
.dash-bar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,0.82); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(193,154,75,0.18);
}
.dash-bar-inner { max-width: var(--maxw); margin: 0 auto; height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dash-bar .brand { display: flex; align-items: center; }
.dash-bar .brand img { height: 48px; width: auto; }
.admin-bar-mid { font-weight: 700; color: var(--teal-deep); font-size: 1.05rem; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.du-info { display: flex; flex-direction: column; text-align: left; line-height: 1.4; }
.du-info b { color: var(--teal-deep); font-size: 0.92rem; }
.du-info span { color: var(--ink-soft); font-size: 0.74rem; }
.du-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: #fff; font-weight: 700; font-size: 1.1rem; }
.du-logout, .admin-back { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 500; transition: background .15s ease, color .15s ease; text-decoration: none; }
.admin-back { padding: 9px 16px; }
.admin-back:hover { background: var(--teal-soft); color: var(--teal-dark); }
.du-logout { width: 42px; height: 42px; justify-content: center; color: #b23b3b; }
.du-logout:hover { background: #fdecec; }
.du-logout .mud-icon-root { font-size: 1.3rem; }

/* ===================================================================
   داشبورد
   =================================================================== */
.dash-wrap { flex: 1; max-width: var(--maxw); margin: 0 auto; padding: 32px 28px 56px; width: 100%; box-sizing: border-box; }
.dash-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-welcome h1 { margin: 0 0 4px; color: var(--teal-deep); font-size: 1.6rem; }
.dash-welcome p { margin: 0; color: var(--ink-soft); }
.dw-date { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; color: var(--teal-dark); font-weight: 600; box-shadow: var(--shadow-sm); }
.dw-date .mud-icon-root { color: var(--gold); }

.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dash-tile {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-md);
    text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dash-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--teal), var(--gold)); opacity: 0; transition: opacity .2s ease; }
.dash-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d8e7e7; }
.dash-tile:hover::before { opacity: 1; }
.tile-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; }
.tile-ico .mud-icon-root { font-size: 1.9rem; color: #fff; }
.tile-ico-teal { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); }
.tile-ico-gold { background: linear-gradient(135deg, var(--gold), #9e7c33); }
.tile-ico-ink { background: linear-gradient(135deg, #2c4a4e, var(--ink)); }
.tile-title { font-size: 1.2rem; font-weight: 700; color: var(--teal-deep); }
.tile-desc { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.85; flex: 1; }
.tile-go { align-self: flex-start; color: var(--gold); }
.tile-go .mud-icon-root { font-size: 1.4rem; transition: transform .2s ease; }
.dash-tile:hover .tile-go .mud-icon-root { transform: translateX(-5px); }
.dash-note { display: flex; align-items: center; gap: 10px; margin-top: 24px; background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: 14px; padding: 14px 18px; color: #7a5c1e; font-size: 0.88rem; }
.dash-note .mud-icon-root { color: var(--gold); flex: none; }

/* ===================================================================
   فرم ثبت اطلاعیه (انتخاب‌گر دسته/اهمیت)
   =================================================================== */
.field-label { font-weight: 600; color: var(--teal-deep); font-size: 0.92rem; margin: 14px 0 8px; }
.seg-group { display: inline-flex; gap: 8px; background: var(--ivory-2); border-radius: 14px; padding: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer; font-family: inherit; font-size: 0.95rem; font-weight: 600; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.seg .mud-icon-root { font-size: 1.2rem; }
.seg:hover { background: #fff; }
.seg.active { background: #fff; color: var(--teal-deep); border-color: var(--line); box-shadow: var(--shadow-sm); }
.seg.seg-important.active { color: #b8732a; border-color: #eccfa0; }
.seg.seg-important.active .mud-icon-root { color: var(--gold); }

/* ===================================================================
   نمایش اطلاعیه‌ها (تایم‌لاین)
   =================================================================== */
.ann-wrap { flex: 1; max-width: 880px; margin: 0 auto; padding: 36px 28px 64px; width: 100%; box-sizing: border-box; }
.ann-head { text-align: center; margin-bottom: 30px; }
.ann-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--teal-dark); font-weight: 600; font-size: 0.85rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; box-shadow: var(--shadow-sm); }
.ann-kicker .mud-icon-root { font-size: 1.1rem; color: var(--gold); }
.ann-head h1 { margin: 14px 0 6px; color: var(--teal-deep); font-size: 1.7rem; }
.ann-head p { margin: 0; color: var(--ink-soft); }
.ann-head p b { color: #b8732a; }

.ann-loading { display: grid; place-items: center; padding: 60px; }
.ann-empty { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); padding: 48px 24px; }
.ann-empty .mud-icon-root { font-size: 3.4rem; color: var(--gold); }
.ann-empty h3 { margin: 14px 0 6px; color: var(--teal-deep); }
.ann-empty p { margin: 0; color: var(--ink-soft); }

.ann-timeline { position: relative; }
.ann-timeline::before { content: ""; position: absolute; top: 10px; bottom: 10px; right: 45px; width: 2px; background: linear-gradient(var(--gold-soft), var(--line)); }
.ann-item { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 18px; margin-bottom: 22px; }
.ann-rail { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ann-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--teal); box-shadow: 0 0 0 4px #fff, var(--shadow-sm); z-index: 1; }
.ann-dot .mud-icon-root { font-size: 1rem; color: var(--teal); }
.ann-date { font-size: 0.76rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; background: #fff; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); }
.ann-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 20px 22px; border-right: 4px solid var(--teal); transition: transform .15s ease, box-shadow .15s ease; }
.ann-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ann-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ann-card-head h2 { margin: 0; font-size: 1.15rem; color: var(--teal-deep); font-weight: 700; line-height: 1.7; }
.ann-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.ann-badge .mud-icon-root { font-size: 0.95rem; }
.ann-badge.nrm { background: var(--teal-soft); color: var(--teal-dark); }
.ann-badge.imp { background: linear-gradient(135deg, #f7e6bf, var(--gold-soft)); color: #8a6418; border: 1px solid var(--gold); }
.ann-body p { margin: 0 0 10px; color: var(--ink); line-height: 2.05; font-size: 0.95rem; }
.ann-body p:last-child { margin-bottom: 0; }
.ann-item.important .ann-dot { border-color: var(--gold); box-shadow: 0 0 0 4px #fff, 0 0 14px rgba(193,154,75,0.5); }
.ann-item.important .ann-dot .mud-icon-root { color: var(--gold); }
.ann-item.important .ann-card { border-right-color: var(--gold); background: linear-gradient(180deg, #fffdf8, #fff); box-shadow: 0 10px 30px rgba(193,154,75,0.16); }
.ann-item.important .ann-card-head h2 { color: #7a5c1e; }

/* اکشن‌های مدیریتی روی هر اطلاعیه (فقط برای کاربر واردشده) */
.ann-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.ann-edit, .ann-del {
    width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; transition: background .15s ease, border-color .15s ease;
}
.ann-edit { color: var(--teal); }
.ann-edit:hover { background: var(--teal-soft); border-color: #bfe0e0; }
.ann-edit .mud-icon-root { font-size: 1.1rem; color: var(--teal); }
.ann-del { color: #b23b3b; }
.ann-del:hover { background: #fdecec; border-color: #f3c4c4; }
.ann-del .mud-icon-root { font-size: 1.1rem; color: #b23b3b; }

/* پیش‌نمایش تاریخ شمسیِ زیر MudDatePicker */
.date-shamsi { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.82rem; color: var(--ink-soft); }
.date-shamsi .mud-icon-root { font-size: 1rem; color: var(--gold); }
.date-shamsi b { color: var(--teal-deep); font-weight: 700; }

/* ===================================================================
   ویرایشگر متن غنی (Quill) + تنظیمات سایت
   =================================================================== */
.form-card-wide { max-width: 920px; }
.settings-group {
    display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-soft); color: var(--teal-deep); font-size: 1.15rem; font-weight: 700;
}
.settings-group:first-of-type { margin-top: 4px; }
.settings-group .mud-icon-root { color: var(--teal); }

.shmk-rte { margin-bottom: 18px; }
.shmk-rte .ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; border-color: var(--line); background: var(--ivory-2); }
.shmk-rte .ql-container.ql-snow { border-radius: 0 0 12px 12px; border-color: var(--line); font-family: 'IRANSans', Tahoma, sans-serif; font-size: 0.98rem; }
.shmk-rte .ql-editor { min-height: 150px; direction: rtl; text-align: right; line-height: 2; }
.shmk-rte .ql-editor.ql-blank::before { right: 15px; left: auto; font-style: normal; color: #b3aa96; }

/* نمای متن غنی داخل دیالوگ (از کلاس ql-editor برای اعمال استایل لیست/ترازِ Quill استفاده می‌شود) */
.rich-view {
    padding: 0 !important; min-height: auto !important;
    direction: rtl; text-align: right; line-height: 2; color: var(--ink); font-size: 0.96rem;
}
.rich-view p { margin: 0 0 8px; }
.rich-view p:last-child { margin-bottom: 0; }
.rich-view h1, .rich-view h2, .rich-view h3 { color: var(--teal-deep); margin: 10px 0 6px; }

/* کادر زیبای دورِ متنِ بارگذاری‌شده از دیتابیس در دیالوگ‌ها */
.rich-frame {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(130% 90% at 100% 0%, #ffffff 0%, rgba(255,255,255,0) 60%),
        linear-gradient(180deg, #fbfdfd 0%, var(--teal-soft) 100%);
    border: 1px solid #d4e8e8;
    border-right: 4px solid var(--gold);
    border-radius: 16px;
    padding: 20px 22px 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6), var(--shadow-sm);
}
.rich-frame::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
    opacity: 0.55;
}
.rich-quote {
    position: absolute; top: 0; left: 14px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.6rem; line-height: 1; color: var(--gold);
    opacity: 0.16; pointer-events: none; user-select: none;
}

/* جدول مبالغ پایه در دیالوگ‌ها */
.pay-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.pay-table th, .pay-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.pay-table thead th { background: var(--teal-soft); color: var(--teal-deep); font-weight: 700; }
.pay-table .pay-deg { font-weight: 600; color: var(--teal-deep); text-align: right; }
.pay-table tbody tr:hover { background: #faf8f2; }
.pay-table-2 td { text-align: right; }
.pay-table-2 .pay-deg { width: 55%; }
.rial { font-size: 0.72rem; color: var(--ink-soft); font-weight: 400; margin-inline-start: 2px; }

/* ===================================================================
   وام (تنظیمات / ثبت‌نام / پیگیری)
   =================================================================== */
.loan-active { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 8px; }
.active-toggle { display: inline-flex; gap: 8px; background: var(--ivory-2); border-radius: 14px; padding: 6px; }
.active-toggle .seg.active-on { background: #fff; color: #1f5b3a; border-color: #c9e6c9; box-shadow: var(--shadow-sm); }
.active-toggle .seg.active-on .mud-icon-root { color: #2e7d5b; }
.active-toggle .seg.active-off { background: #fff; color: #b23b3b; border-color: #f3c4c4; box-shadow: var(--shadow-sm); }
.active-toggle .seg.active-off .mud-icon-root { color: #b23b3b; }

.loan-state { display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 16px 20px; margin: 16px 0; font-size: 1rem; line-height: 1.9; }
.loan-state .mud-icon-root { font-size: 1.6rem; flex: none; }
.loan-state b { font-weight: 700; }
.loan-state.closed { background: #fdecec; border: 1px solid #f3c4c4; color: #b23b3b; }
.loan-state.closed .mud-icon-root { color: #b23b3b; }
.loan-state.soon { background: var(--gold-soft); border: 1px solid var(--gold); color: #7a5c1e; }
.loan-state.soon .mud-icon-root { color: var(--gold); }
.loan-state.info { background: var(--teal-soft); border: 1px solid #d4e8e8; color: var(--teal-deep); }
.loan-state.info .mud-icon-root { color: var(--teal); }

.result-pane.info .rp-ico, .result-pane .rp-info { color: var(--sky); }
.result-pane.warn .rp-ico, .result-pane .rp-warn { color: #c77b26; }

.loan-status { border-radius: 16px; padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.loan-status .ls-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; }
.loan-status .ls-badge .mud-icon-root { font-size: 1.4rem; color: #fff; }
.loan-status .ls-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.loan-status .ls-meta > div { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.loan-status .ls-meta small { color: var(--ink-soft); font-size: 0.76rem; }
.loan-status .ls-meta b { color: var(--teal-deep); font-size: 1rem; font-weight: 700; }
.loan-status.pending { background: linear-gradient(180deg, #fffdf6, var(--gold-soft)); }
.loan-status.pending .ls-badge { background: var(--gold); color: #fff; }
.loan-status.approved { background: linear-gradient(180deg, #f3faf3, #e9f5e9); }
.loan-status.approved .ls-badge { background: #2e7d5b; color: #fff; }
.loan-status.rejected { background: linear-gradient(180deg, #fdf3f3, #fdecec); }
.loan-status.rejected .ls-badge { background: #b23b3b; color: #fff; }

/* ===================================================================
   واکنش‌گرا
   =================================================================== */
@media (max-width: 1040px) {
    .hero-grid { grid-template-columns: 1fr 1fr; }
    .cleric { grid-column: 1 / -1; order: -1; min-height: 520px; }
}
@media (max-width: 920px) {
    .header-inner { grid-template-columns: auto auto; height: auto; padding: 12px 16px; gap: 12px; row-gap: 12px; }
    .main-nav {
        grid-column: 1 / -1;
        order: 3;
        justify-self: stretch;
        overflow-x: auto;
        justify-content: flex-start;
        border-radius: 14px;
    }
    .site-header { position: static; }
    .tile-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .hero-grid { grid-template-columns: 1fr; }
    .cleric { min-height: 440px; }
    .hero { padding: 24px 16px 40px; }
    .hero-title { font-size: 1.45rem; gap: 10px; }
    .contact-inner { flex-direction: column; gap: 4px; }
    .contact-div { display: none; }
    .contact-item { justify-content: flex-start; }
    .form-card { padding: 20px; }
    .form-grid, .upload-grid { grid-template-columns: 1fr; }
    .search-row { flex-wrap: wrap; }
    .search-row .mud-radio { min-width: 110px; }
    .tile-grid { grid-template-columns: 1fr; }
    .dash-bar-inner { height: auto; padding: 12px 16px; }
    .du-info, .admin-bar-mid { display: none; }
    .ann-timeline::before { display: none; }
    .ann-item { grid-template-columns: 1fr; gap: 10px; }
    .ann-rail { flex-direction: row; justify-content: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
