/*
 * ظاهر ترازمان برای Greenlight v3 (online.tarazmaan.com)
 * لینک‌شده از /root/greenlight-v3/custom/application.html.erb (mount در docker-compose.yml)
 * عناصر #tz-home، #tz-authside و #tz-rail را greenlight.js می‌سازد؛ کلاس‌های body.tz-* صفحه‌ی فعلی را نشان می‌دهند.
 */

/* ---------- فونت‌ها ---------- */
@font-face {
    font-family: "Vazirmatn";
    src: url("./fonts/Vazirmatn-Arabic-wght.woff2") format("woff2-variations"), url("./fonts/Vazirmatn-Arabic-wght.woff2") format("woff2");
    font-weight: 100 900; font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: "Vazirmatn";
    src: url("./fonts/Vazirmatn-Latin-wght.woff2") format("woff2-variations"), url("./fonts/Vazirmatn-Latin-wght.woff2") format("woff2");
    font-weight: 100 900; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face { font-family: "Peyda"; src: url("./fonts/PeydaWebFaNum-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Peyda"; src: url("./fonts/PeydaWebFaNum-Bold.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }

/* ---------- پالت ---------- */
:root {
    --brand-color: #03594E;
    --brand-color-light: #e6f2ef;
    --tz-g: #03594E;
    --tz-g2: #0b6f62;
    --tz-gd: #023F37;
    --tz-gdeep: #012A25;
    --tz-y: #F8C62F;
    --tz-yd: #e6b31a;
    --tz-ink: #1F2432;
    --tz-mut: #66717b;
    --tz-paper: #EEF3F2;
    --tz-line: rgba(3, 89, 78, .11);
    --tz-tint: rgba(3, 89, 78, .07);
    --tz-shadow: 0 12px 32px rgba(1, 42, 37, .08);
    --tz-shadow-2: 0 18px 44px rgba(1, 42, 37, .14);
    --tz-rail: 248px;
    --tz-font: "Vazirmatn", Inter, Tahoma, sans-serif;
    --tz-disp: "Peyda", "Vazirmatn", Inter, Tahoma, sans-serif;
    --tz-chalk:
        radial-gradient(900px 420px at 85% -10%, rgba(248, 198, 47, .16), transparent 60%),
        radial-gradient(700px 400px at 0% 110%, rgba(255, 255, 255, .06), transparent 60%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 7px),
        linear-gradient(150deg, #0f4a41 0%, #0b3b34 45%, #072d28 100%);
    --bs-body-font-family: var(--tz-font);
    --bs-link-color: var(--tz-g2);
    --bs-link-hover-color: var(--tz-g);
    --toastify-color-success: #03594E;
    --toastify-font-family: var(--tz-font);
}

html, body, button, input, select, textarea, .tooltip, .popover, .dropdown-menu, .modal, .Toastify__toast {
    font-family: var(--tz-font) !important;
    letter-spacing: 0 !important;
}
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .card-title, .modal-title, .btn, .nav-link {
    font-family: var(--tz-disp) !important;
    letter-spacing: 0 !important;
}
body { background: var(--tz-paper) !important; color: var(--tz-ink); -webkit-font-smoothing: antialiased; }
::selection { background: rgba(248, 198, 47, .45); }
a { color: var(--tz-g2); }
a:hover { color: var(--tz-g); }
.text-link, .text-brand { color: var(--tz-g) !important; }
.text-uppercase { text-transform: none !important; }
* { scrollbar-width: thin; scrollbar-color: rgba(3, 89, 78, .3) transparent; }
#tz-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tz-i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* نوارهای سفید/طوسی تمام‌عرض Greenlight حذف؛ زمینه یکدست */
.wide-white, .background-whitesmoke { background: transparent !important; box-shadow: none !important; clip-path: none !important; }

/* تا معلوم شدن وضعیت ورود، صفحه‌ی اصلی Greenlight دیده نشود */
body.tz-boot-home #root { visibility: hidden; }

/* ---------- دکمه‌ها ---------- */
.btn { border-radius: 12px !important; font-weight: 600 !important; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn-brand, .btn-primary { background: var(--tz-g) !important; border-color: var(--tz-g) !important; color: #fff !important; box-shadow: 0 8px 18px rgba(3, 89, 78, .2); }
.btn-brand:hover, .btn-brand:focus, .btn-primary:hover, .btn-primary:focus { background: var(--tz-gd) !important; border-color: var(--tz-gd) !important; transform: translateY(-1px); }
.btn-brand:disabled { transform: none; opacity: .65; }
.btn-brand-outline, .btn-brand-outline-color, .btn-outline-primary { background: #fff !important; color: var(--tz-g) !important; border: 1.5px solid rgba(3, 89, 78, .3) !important; }
.btn-brand-outline:hover, .btn-brand-outline-color:hover, .btn-outline-primary:hover { background: var(--tz-tint) !important; border-color: var(--tz-g) !important; color: var(--tz-g) !important; }
.btn-icon { color: var(--tz-g); border-radius: 12px !important; }
.btn-icon:hover { background: var(--tz-tint) !important; }
.start-meeting-btn { background: var(--tz-y) !important; border-color: var(--tz-y) !important; color: var(--tz-ink) !important; box-shadow: 0 10px 22px rgba(248, 198, 47, .32) !important; padding-inline: 1.4rem !important; }
.start-meeting-btn:hover { background: var(--tz-yd) !important; border-color: var(--tz-yd) !important; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 .25rem rgba(3, 89, 78, .18) !important; border-color: var(--tz-g) !important; }

/* ---------- فرم‌ها ---------- */
.form-control, .form-select, .input-group-text { border-radius: 12px !important; border: 1.5px solid #dfe7e6; min-height: 46px; }
.form-label { font-weight: 600; color: var(--tz-ink); }
.form-check-input { border-color: rgba(3, 89, 78, .35); }
.form-check-input:checked { background-color: var(--tz-g) !important; border-color: var(--tz-g) !important; }
[dir="rtl"] .form-check { padding-left: 0; padding-right: 1.6em; text-align: right; }
[dir="rtl"] .form-check .form-check-input { float: right; margin-left: 0; margin-right: -1.6em; }
[dir="rtl"] .form-switch { padding-right: 2.6em; }
[dir="rtl"] .form-switch .form-check-input { margin-right: -2.6em; }
.form-check-label { line-height: 1.8; }
label[for="extend_session"] { white-space: nowrap; }

/* ---------- کارت، منو، پنجره، جدول ---------- */
.card { border-radius: 18px !important; border: 1px solid var(--tz-line) !important; }
.card-shadow, .card.shadow-sm { box-shadow: var(--tz-shadow) !important; }
.card-footer, .card-header { background: transparent !important; border-color: var(--tz-line) !important; }
.card .card-title.h5, .card .card-title.h4 { font-weight: 700 !important; color: var(--tz-ink); }
.dropdown-menu { border-radius: 14px !important; border: 1px solid var(--tz-line) !important; box-shadow: var(--tz-shadow-2) !important; padding: 6px !important; text-align: right; }
.dropdown-item { border-radius: 10px; padding: .5rem .85rem; }
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active, .dropdown-item:active { background: var(--tz-tint) !important; color: var(--tz-g) !important; }
.modal-content { border-radius: 22px !important; border: 0 !important; box-shadow: 0 30px 70px rgba(1, 42, 37, .25); }
.modal-header, .modal-footer { border-color: var(--tz-line) !important; }
.modal-backdrop.show { background: var(--tz-gdeep); opacity: .55; }
.table { --bs-table-hover-bg: rgba(3, 89, 78, .04); --bs-table-bg: transparent; }
.table thead th { color: var(--tz-mut); font-weight: 600; border-bottom-color: var(--tz-line) !important; }
.table > :not(caption) > * > * { border-bottom-color: rgba(3, 89, 78, .06); }
.pagination .page-link { border-radius: 10px !important; margin: 0 2px; color: var(--tz-g); border: 0; }
.pagination .page-item.active .page-link { background: var(--tz-g); color: #fff; }
.badge.bg-brand, .bg-brand { background: var(--tz-g) !important; }
.Toastify__toast { border-radius: 14px !important; box-shadow: var(--tz-shadow-2) !important; }
.list-group-item.active { background: var(--tz-g) !important; border-color: var(--tz-g) !important; }
.list-group-item-action:hover { background: var(--tz-tint); color: var(--tz-g); }

/* زبانه‌ها: قرص‌های گرد مثل طرح */
.nav-tabs {
    display: inline-flex !important; flex-wrap: nowrap; gap: 6px; max-width: 100%; overflow-x: auto;
    background: #fff; padding: 5px !important; border: 1px solid var(--tz-line) !important; border-radius: 14px; margin-top: 18px;
}
.nav-tabs .nav-link, .nav-tabs .nav-link:hover {
    border: 0 !important; border-radius: 10px !important; padding: 6px 18px !important; margin: 0 !important;
    color: var(--tz-mut) !important; font-weight: 500; white-space: nowrap; background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--tz-g) !important; background: var(--tz-tint) !important; }
.nav-tabs .nav-link.active, .nav-tabs .nav-link.active:hover { background: var(--tz-g) !important; color: #fff !important; border: 0 !important; font-weight: 600; }
.nav-tabs .nav-link .badge { border-radius: 999px; }

/* ---------- پانویس ---------- */
#footer, .footer.background-whitesmoke { background: var(--tz-gdeep) !important; color: rgba(255, 255, 255, .7) !important; box-shadow: none !important; }
#footer a { color: rgba(255, 255, 255, .8) !important; text-decoration: none; font-size: 13.5px; }
#footer a:hover { color: var(--tz-y) !important; }

/* ---------- اجزای ترازمان ---------- */
.tz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 20px; font-family: var(--tz-disp); font-weight: 600; font-size: 14.5px; text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.tz-btn:hover { transform: translateY(-1px); }
.tz-btn-y { background: var(--tz-y); color: var(--tz-ink) !important; box-shadow: 0 10px 22px rgba(248, 198, 47, .3); }
.tz-btn-y:hover { background: var(--tz-yd); }
.tz-btn-g { background: var(--tz-g); color: #fff !important; }
.tz-btn-g:hover { background: var(--tz-gd); }
.tz-btn-wl { background: rgba(255, 255, 255, .1); color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .3); }
.tz-btn-wl:hover { background: rgba(255, 255, 255, .16); }
.tz-input { width: 100%; min-width: 0; border: 1.5px solid #dfe7e6; background: #fff; border-radius: 12px; padding: 10px 14px; min-height: 48px; color: var(--tz-ink); font: inherit; }
.tz-input:focus { outline: none; border-color: var(--tz-g); box-shadow: 0 0 0 4px rgba(3, 89, 78, .12); }
.tz-chalk { background: var(--tz-chalk); color: #fff; }
:focus-visible { outline: 2px solid var(--tz-y); outline-offset: 2px; }

/* ---------- صفحه‌ی اصلی (#tz-home) ---------- */
#tz-home { display: none; }
body.tz-home #tz-home { display: block; }
body.tz-home #root { display: none !important; }
.tz-hnav { display: flex; align-items: center; gap: 18px; max-width: 1240px; margin: 0 auto; padding: 16px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); }
.tz-hlogo img { height: 54px; width: auto; display: block; }
.tz-hlinks { display: flex; gap: 4px; }
.tz-hlinks a { color: rgba(255, 255, 255, .8); text-decoration: none; padding: 6px 12px; border-radius: 10px; font-size: 14.5px; }
.tz-hlinks a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tz-sp { flex: 1; }
.tz-hero { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .9fr; gap: 48px; align-items: center; padding: 48px max(20px, env(safe-area-inset-right, 0px)) 72px max(20px, env(safe-area-inset-left, 0px)); }
.tz-hero h1 { font-family: var(--tz-disp); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.35; color: #fff; margin: 0; text-wrap: balance; }
.tz-hero h1 em { font-style: normal; color: var(--tz-y); }
.tz-lead { margin: 16px 0 0; color: rgba(255, 255, 255, .82); font-size: 17px; line-height: 2; max-width: 46ch; }
.tz-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.tz-facts { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: rgba(255, 255, 255, .75); font-size: 14.5px; }
.tz-facts span { display: inline-flex; align-items: center; gap: 8px; }
.tz-facts .tz-i { color: var(--tz-y); }
.tz-joinbox { position: relative; background: #fff; color: var(--tz-ink); border-radius: 24px; padding: 28px; box-shadow: 0 30px 60px rgba(0, 0, 0, .25); display: grid; gap: 14px; margin: 0; }
.tz-joinbox::before { content: ""; position: absolute; top: -10px; left: 26px; width: 92px; height: 20px; background: var(--tz-y); border-radius: 6px; transform: rotate(-4deg); }
.tz-joinbox h3 { font-family: var(--tz-disp); font-size: 1.3rem; margin: 0; }
.tz-joinbox p { color: var(--tz-mut); font-size: 14.5px; margin: 0; line-height: 1.9; }
.tz-row { display: flex; gap: 8px; }
.tz-row .tz-input { text-align: left; letter-spacing: .5px; }
.tz-joinbox small { color: var(--tz-mut); font-size: 13px; }
.tz-joinbox small.tz-err { color: #b42318; }
.tz-feat { max-width: 1240px; margin: 0 auto; padding: 40px max(20px, env(safe-area-inset-right, 0px)) 52px max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 20px; }
.tz-feat h2 { font-family: var(--tz-disp); font-size: 1.35rem; margin: 0; }
.tz-feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tz-feat-item { background: #fff; border-radius: 20px; padding: 22px; display: grid; gap: 8px; align-content: start; border: 1px solid var(--tz-line); transition: transform .2s ease, box-shadow .2s ease; }
.tz-feat-item:hover { transform: translateY(-3px); box-shadow: var(--tz-shadow-2); }
.tz-feat-item h4 { font-family: var(--tz-disp); font-size: 1.05rem; margin: 0; }
.tz-feat-item p { color: var(--tz-mut); font-size: 14.5px; line-height: 1.9; margin: 0; }
.tz-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--tz-tint); color: var(--tz-g); }
.tz-hfoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 18px max(20px, env(safe-area-inset-left, 0px)); background: var(--tz-gdeep); color: rgba(255, 255, 255, .7); font-size: 13.5px; }
.tz-hfoot a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.tz-hfoot a:hover { color: var(--tz-y); }

/* ---------- ورود / ثبت‌نام: پنل تخته‌ای سمت چپ ---------- */
#tz-authside { display: none; }
body.tz-auth #tz-authside {
    display: grid; align-content: space-between; gap: 30px;
    position: fixed; top: 0; bottom: 0; left: 0; width: 46%; padding: 48px 44px; z-index: 5;
}
#tz-authside img { height: 58px; width: auto; }
.tz-quote { font-family: var(--tz-disp); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.6; max-width: 18ch; margin: 0; }
.tz-quote em { font-style: normal; color: var(--tz-y); }
#tz-authside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; color: rgba(255, 255, 255, .85); }
#tz-authside li { display: flex; gap: 10px; align-items: center; }
#tz-authside li .tz-i { color: var(--tz-y); }
.tz-small { color: rgba(255, 255, 255, .55); font-size: 13px; direction: ltr; text-align: right; }
body.tz-auth { background: #fff !important; }
body.tz-auth #root { width: 54%; }
body.tz-auth #footer { display: none; }
body.tz-auth .card { border: 0 !important; box-shadow: none !important; background: transparent; }
body.tz-auth .card .card-title { font-size: 1.6rem !important; text-align: right !important; }
body.tz-auth .logo-wrapper { margin-inline: auto !important; }
body.tz-auth .vertical-center, body.tz-auth .no-header-height { min-height: 100vh; }

/* ---------- منوی ستونی سمت راست (کاربر واردشده) ---------- */
#tz-rail { display: none; }
body.tz-app #tz-rail {
    display: flex; flex-direction: column; gap: 22px;
    position: fixed; top: 0; bottom: 0; right: 0; width: var(--tz-rail); z-index: 1030;
    padding: 22px 14px; background: linear-gradient(180deg, var(--tz-gd), var(--tz-gdeep)); color: #fff;
    overflow-y: auto;
}
body.tz-app { padding-right: var(--tz-rail); }
body.tz-app #navbar { display: none !important; }
.tz-rlogo { align-self: center; margin-inline: auto; display: flex; justify-content: center; }
.tz-rlogo img { height: 150px; width: auto; max-width: 100%; display: block; margin-inline: auto; object-fit: contain; }
.tz-rnav { display: grid; gap: 4px; }
.tz-lbl { font-size: 12px; color: rgba(255, 255, 255, .45); padding: 0 12px; margin-top: 8px; }
.tz-rnav a { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .78) !important; text-decoration: none; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; transition: background-color .15s ease; }
.tz-rnav a:hover { background: rgba(255, 255, 255, .07); color: #fff !important; }
.tz-rnav a.on { background: #fff; color: var(--tz-g) !important; font-weight: 600; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.tz-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.tz-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; background: var(--tz-y); color: var(--tz-ink); font-family: var(--tz-disp); font-weight: 700; font-size: 14px; }
.tz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tz-me-t { min-width: 0; }
.tz-me-t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-me-t small { color: rgba(255, 255, 255, .55); font-size: 12px; }
.tz-out { margin-inline-start: auto; background: transparent; border: 0; color: rgba(255, 255, 255, .65); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.tz-out:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.tz-app #root .container { max-width: 1180px; }
body.tz-app .regular-height { padding-bottom: 32px; }

/* ---------- اتاق‌های من ---------- */
body.tz-rooms .nav-tabs { margin-top: 28px; }
body.tz-rooms .tab-pane > .hstack { padding-top: 22px !important; flex-wrap: wrap; }
body.tz-rooms .tab-pane > .hstack .btn-brand { background: var(--tz-y) !important; border-color: var(--tz-y) !important; color: var(--tz-ink) !important; box-shadow: 0 10px 22px rgba(248, 198, 47, .3); }
body.tz-rooms .tab-pane > .hstack .btn-brand:hover { background: var(--tz-yd) !important; }
body.tz-rooms .tab-pane > .row.g-4 { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 22px 0 0 !important; }
body.tz-rooms .tab-pane > .row.g-4 > [class*="col"] { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; flex: none; }
#room-card { width: auto !important; border-radius: 20px !important; overflow: hidden; border: 1px solid var(--tz-line) !important; transition: transform .2s ease, box-shadow .2s ease; cursor: pointer; }
#room-card:hover { transform: translateY(-3px); box-shadow: var(--tz-shadow-2) !important; border-color: var(--tz-line) !important; }
#room-card .card-body { padding: 0 !important; }
#room-card .card-body > .hstack:first-child {
    position: relative; height: 92px; padding: 14px 16px; align-items: flex-start !important;
    background: var(--tz-chalk); color: #fff;
}
#room-card .room-icon {
    position: absolute; left: 14px; bottom: -24px; width: 50px !important; height: 50px !important;
    border-radius: 15px !important; background: #fff !important; box-shadow: 0 8px 18px rgba(1, 42, 37, .15);
    display: grid; place-items: center;
}
#room-card .room-icon svg { padding: 0 !important; width: 24px; height: 24px; margin: 0 !important; color: var(--tz-g); }
#room-card .card-body > .vstack, #room-card .card-body > div:nth-child(2) { padding: 30px 16px 8px; margin: 0 !important; }
#room-card .card-title { font-size: 1.1rem !important; margin-bottom: 4px !important; }
#room-card .text-muted { font-size: 13px; color: var(--tz-mut) !important; margin: 0 !important; }
#room-card .card-footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px !important; border: 0 !important; }
#room-card .card-footer .btn-brand-outline { order: -1; flex: 1; float: none !important; }
#room-card:has(.badge) .card-footer .btn-brand-outline { background: var(--tz-y) !important; border-color: var(--tz-y) !important; color: var(--tz-ink) !important; }
#room-card .card-footer .btn-icon { border: 1px solid var(--tz-line) !important; width: 42px; height: 42px; padding: 0; display: grid; place-items: center; }
#room-card .card-footer .btn-icon svg { margin: 0 !important; color: var(--tz-g) !important; }
#room-card .badge { border-radius: 999px !important; font-family: var(--tz-font); font-weight: 600; background: rgba(134, 239, 172, .18) !important; color: #bbf7d0 !important; border: 0 !important; }

/* ---------- صفحه‌ی اتاق ---------- */
body.tz-room #root .container > div.wide-white:first-child {
    background: var(--tz-chalk) !important; color: #fff; border-radius: 22px; padding: 6px 26px 24px; margin-top: 26px;
}
body.tz-room div.wide-white:first-child h1 { color: #fff; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
body.tz-room div.wide-white:first-child .text-muted { color: rgba(255, 255, 255, .75) !important; }
body.tz-room div.wide-white:first-child a svg, body.tz-room div.wide-white:first-child .text-brand { color: var(--tz-y) !important; }
body.tz-room div.wide-white:first-child .row.py-5 { padding-top: 14px !important; padding-bottom: 4px !important; row-gap: 14px; }
body.tz-room div.wide-white:first-child .col-4 { flex: 1 1 320px; width: auto; max-width: 100%; }
body.tz-room div.wide-white:first-child .btn-brand-outline,
body.tz-room div.wide-white:first-child .dropdown-toggle {
    background: rgba(255, 255, 255, .1) !important; color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .3) !important;
}
body.tz-room div.wide-white:first-child .btn-brand-outline:hover { background: rgba(255, 255, 255, .18) !important; }
body.tz-room div.wide-white:first-child .badge { border-radius: 999px !important; background: rgba(134, 239, 172, .18) !important; color: #bbf7d0 !important; }
body.tz-room .tab-content > .tab-pane { padding-top: 18px; }

/* ---------- ورود دانشجو به کلاس ---------- */
body.tz-join { background: var(--tz-chalk) !important; background-attachment: fixed !important; }
body.tz-join #footer .container, body.tz-join #footer #footer-container { border: 0 !important; }
body.tz-join .card { border-radius: 26px !important; border: 0 !important; box-shadow: 0 40px 80px rgba(0, 0, 0, .3) !important; overflow: hidden; }
body.tz-join .card .card-body:first-child { background: linear-gradient(180deg, #f6faf9, #fff); }
body.tz-join .card h1, body.tz-join .card h2, body.tz-join .card h3 { font-weight: 800; }
body.tz-join .card .btn-brand { background: var(--tz-y) !important; border-color: var(--tz-y) !important; color: var(--tz-ink) !important; padding: 12px 28px; font-size: 1.05rem; box-shadow: 0 10px 22px rgba(248, 198, 47, .3); }
body.tz-join .card .btn-brand:hover { background: var(--tz-yd) !important; }
body.tz-join .card a { color: var(--tz-g); font-weight: 600; }
body.tz-join #footer { background: rgba(0, 0, 0, .25) !important; }

/* ---------- پنل مدیریت و پروفایل ---------- */
body.tz-admin .card, body.tz-profile .card { box-shadow: var(--tz-shadow) !important; }
body.tz-admin h3, body.tz-profile h3 { font-weight: 700; }

/* ---------- موبایل و تبلت ---------- */
@media (max-width: 991.98px) {
    .tz-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
    .tz-feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.tz-auth #tz-authside { position: relative; width: auto; padding: 22px 20px; gap: 14px; }
    body.tz-auth #tz-authside ul, body.tz-auth .tz-small { display: none; }
    body.tz-auth #tz-authside img { height: 44px; }
    body.tz-auth #root { width: auto; }
    body.tz-auth .vertical-center, body.tz-auth .no-header-height { min-height: 0; padding-block: 24px; }
    /* موبایل/تبلت: منو به نوار پایین صفحه (مثل اپ) تبدیل می‌شود */
    body.tz-app { padding-right: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    body.tz-app #tz-rail {
        top: auto; bottom: 0; left: 0; right: 0; width: auto; height: auto;
        flex-direction: row; align-items: stretch; gap: 0; overflow: hidden;
        padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
        background: var(--tz-gdeep); box-shadow: 0 -8px 24px rgba(1, 42, 37, .2);
    }
    .tz-rlogo, .tz-lbl, .tz-me-t, .tz-me .tz-avatar { display: none !important; }
    .tz-rnav { display: flex; flex: 1; gap: 2px; }
    .tz-rnav a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11px; text-align: center; border-radius: 12px; }
    .tz-rnav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .tz-rnav a.on { box-shadow: none; }
    .tz-me { margin: 0; padding: 0 2px; background: transparent; }
    .tz-out { height: 100%; width: 44px; }
}
@media (max-width: 575.98px) {
    .tz-hlinks { display: none; }
    .tz-hnav { gap: 8px; }
    .tz-hlogo img { height: 44px; }
    .tz-feat-grid { grid-template-columns: 1fr; }
    .tz-joinbox { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- ریزه‌کاری‌ها ---------- */
/* سلام بالای صفحه‌ی اتاق‌ها (متن را greenlight.js در data-tz-hello می‌گذارد) */
body.tz-rooms #root .regular-height[data-tz-hello]::before {
    content: attr(data-tz-hello); display: block; white-space: pre-line; margin-top: 30px;
    font-family: var(--tz-disp); font-weight: 700; font-size: 1.6rem; line-height: 1.6; color: var(--tz-ink);
}
body.tz-rooms .nav-tabs { margin-top: 14px; }
/* پانویس همیشه پایین صفحه */
body.tz-app #root { min-height: 100vh; display: flex; flex-direction: column; }
body.tz-app #root > .regular-height, body.tz-app #root > .container { flex: 1 0 auto; min-height: 0; width: 100%; }
body.tz-app #root > #footer { flex: none; }
/* دکمه‌های سربرگ اتاق کنار هم */
body.tz-room div.wide-white:first-child .col-12 { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
body.tz-room div.wide-white:first-child .col-12 > * { float: none !important; margin: 0 !important; padding-bottom: 0 !important; }
body.tz-auth #root .card { width: min(420px, 100%) !important; max-width: 100% !important; margin-inline: auto !important; }
body.tz-auth #root .card .card-body { padding: 8px 4px !important; }
body.tz-auth #root .btn-brand { width: 100%; padding-block: 11px; font-size: 1rem; }

/* ---------- تنظیمات اتاق: کلید روی متن نیفتد ---------- */
.room-settings-row { align-items: center; gap: 14px; padding-block: 10px !important; border-bottom: 1px solid var(--tz-line); }
.room-settings-row:last-child { border-bottom: 0; }
.room-settings-row .form-check-label { flex: 1 1 auto; min-width: 0; margin: 0 !important; white-space: normal; color: var(--tz-ink); line-height: 1.8; }
[dir="rtl"] .room-settings-row .form-switch { padding: 0 !important; margin: 0 !important; flex: none; }
[dir="rtl"] .room-settings-row .form-switch .form-check-input { float: none !important; margin: 0 !important; width: 2.6em; height: 1.4em; cursor: pointer; }
#room-settings .card, #room-settings > .row > [class*="col"] { min-width: 0; }

/* ---------- جدول‌های پنل مدیریت (کاربران، اتاق‌ها، ضبط‌ها) ---------- */
#root td, #root th, #root .table, #root label, #root .badge, #root .dropdown-item, #root .small, #root small, #root p {
    font-family: var(--tz-font) !important;
}
.table { border-collapse: separate !important; border-spacing: 0; background: #fff; border: 1px solid var(--tz-line) !important; border-radius: 16px; overflow: hidden; }
.table > :not(caption) > * > * { border-width: 0 0 1px 0 !important; border-color: rgba(3, 89, 78, .07) !important; padding: 12px 14px !important; vertical-align: middle; }
.table tr.border, .table tr.border-2 { border: 0 !important; }
.table tbody tr:last-child > * { border-bottom: 0 !important; }
.table tbody tr:hover > * { background: rgba(3, 89, 78, .03) !important; }
.table thead th { background: var(--tz-paper) !important; font-size: 13px; }
.table td { color: var(--tz-ink) !important; }
.table td .text-dark { color: var(--tz-ink) !important; }
.table td .small { color: var(--tz-mut) !important; }
/* ستون ایمیل و نشانی‌ها چپ‌به‌راست ولی در ستون راست‌چین */
.table td { unicode-bidi: plaintext; }
.table [class*="avatar"], .table img.rounded-circle { border-radius: 50% !important; }
.table .dropdown-toggle, .table svg.cursor-pointer { color: var(--tz-mut); }
/* نشان نقش کاربر */
.table td .badge, .role-badge { border-radius: 999px !important; padding: 4px 10px; font-weight: 600; }

/* منوی کناری پنل مدیریت */
#admin-panel .nav-link, .admin-panel .nav-link, .list-group-item { border-radius: 12px !important; }

/* ======================= موبایل و تبلت: همه‌ی صفحه‌ها و پنجره‌ها ======================= */
html, body { max-width: 100%; overflow-x: hidden; }
#root img, #root svg { max-width: 100%; }

@media (max-width: 991.98px) {
    body.tz-app #root .container, body.tz-app #root .container-fluid { padding-inline: 14px !important; }
    /* جدول‌ها: اسکرول افقی داخل خودشان، نه کل صفحه */
    #root .table-responsive, #root .card:has(> .table), #root div:has(> table.table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    #root table.table { min-width: 640px; }
    /* پنل مدیریت: منوی کناری بالای محتوا و افقی */
    body.tz-admin #root .row > [class*="col-"]:has(.nav, .list-group) { flex: 0 0 100%; max-width: 100%; }
    body.tz-admin #root .nav.flex-column, body.tz-admin #root .list-group {
        flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 6px;
    }
    body.tz-admin #root .nav.flex-column .nav-link, body.tz-admin #root .list-group-item { white-space: nowrap; flex: none; }
    /* صفحه‌ی اتاق */
    body.tz-room #root .container > div.wide-white:first-child { padding: 6px 16px 18px; border-radius: 18px; }
    body.tz-room div.wide-white:first-child .col-12 { justify-content: flex-start; }
    body.tz-room div.wide-white:first-child .col-4, body.tz-room div.wide-white:first-child .row.py-5 > .col { flex: 0 0 100%; max-width: 100%; }
    #room-settings .row > [class*="col"] { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 575.98px) {
    h1, .h1 { font-size: 1.6rem !important; }
    h2, .h2 { font-size: 1.35rem !important; }
    h3, .h3 { font-size: 1.2rem !important; }
    /* جستجو و دکمه‌ی «اتاق جدید» زیر هم و تمام‌عرض */
    body.tz-rooms .tab-pane > .hstack, #root .hstack:has(> div > .input-group, > .input-group) { flex-direction: column; align-items: stretch !important; gap: 10px !important; }
    body.tz-rooms .tab-pane > .hstack > *, body.tz-rooms .tab-pane > .hstack .btn { width: 100%; margin: 0 !important; }
    #root .input-group { width: 100% !important; }
    body.tz-rooms .tab-pane > .row.g-4 { grid-template-columns: 1fr; }
    .nav-tabs { width: 100%; }
    .nav-tabs .nav-link { padding: 6px 12px !important; font-size: 14px; }
    /* دکمه‌های سربرگ اتاق تمام‌عرض */
    body.tz-room div.wide-white:first-child .col-12 > * { flex: 1 1 100%; }
    body.tz-room div.wide-white:first-child .btn, body.tz-room div.wide-white:first-child .btn-group { width: 100%; }
    /* کارت‌ها و فرم‌ها */
    #root .card-body { padding: 16px !important; }
    #root .vertical-center .card, #root .no-header-height .card { margin-inline: 0; }
    body.tz-join .card .row > [class*="col"] { flex: 0 0 100%; max-width: 100%; text-align: center; }
    #room-card .card-footer .btn-brand-outline { padding-block: 10px; }
    /* پانویس */
    #footer #footer-container { padding-block: 12px !important; font-size: 12.5px; }
}

/* پنجره‌ها (Modal) روی موبایل: تقریبا تمام‌عرض، اسکرول داخلی، دکمه‌ها تمام‌عرض */
@media (max-width: 575.98px) {
    .modal-dialog { margin: 10px !important; max-width: calc(100vw - 20px) !important; }
    .modal-dialog-centered { min-height: calc(100% - 20px) !important; }
    .modal-content { border-radius: 18px !important; max-height: calc(100vh - 20px); overflow: hidden; display: flex; flex-direction: column; }
    .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px !important; }
    .modal-header, .modal-footer { padding: 12px 16px !important; }
    .modal-footer { flex-wrap: wrap; gap: 8px; }
    .modal-footer > .btn, .modal-body .btn:not(.btn-icon):not(.btn-close) { flex: 1 1 auto; }
    .modal .table { min-width: 0 !important; }
    .modal .form-control, .modal .form-select { font-size: 16px; } /* iOS زوم نکند */
    .dropdown-menu { max-width: calc(100vw - 24px); }
}

/* ======================= پنل مدیریت روی موبایل و تبلت (v3) =======================
   Greenlight به منوی کناری پنل مدیریت حداقل ارتفاع ۶۵۰px می‌دهد؛ وقتی روی موبایل منو افقی
   می‌شود همین ارتفاع یک کادر سفید خالی می‌سازد و جدول‌ها زیر صفحه پنهان می‌مانند. */
@media (max-width: 991.98px) {
    #admin-panel #admin-sidebar {
        min-height: 0 !important; height: auto !important; padding: 10px 10px 0 !important;
        border-right: 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--tz-line);
    }
    #admin-panel .admin-panel-card { min-height: 0 !important; }
    #admin-panel > h3 { padding-block: 22px 14px !important; }
    #admin-panel .admin-table > .p-4 { padding: 14px !important; }
}

/* جدول‌ها روی موبایل: هر ردیف یک کارت (به‌جای اسکرول افقی که ستون‌ها را پنهان می‌کرد) */
@media (max-width: 767.98px) {
    #root table.table { min-width: 0 !important; width: 100% !important; border: 0 !important; background: transparent !important; border-radius: 0; }
    #root div:has(> table.table), #root .table-responsive { overflow: visible !important; }
    #root table.table thead { display: none; }
    #root table.table, #root table.table > tbody { display: block; width: 100%; }
    #root table.table > tbody > tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
        padding: 12px 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--tz-line) !important; border-radius: 14px;
    }
    #root table.table > tbody > tr > td {
        display: block; min-width: 0; padding: 0 !important; border: 0 !important;
        overflow-wrap: anywhere; font-size: 13.5px; background: transparent !important;
        order: 2; flex: 0 1 auto; color: var(--tz-mut) !important;
    }
    /* ستون اول (نام کاربر/اتاق/ضبط) بالای کارت، تمام‌عرض */
    #root table.table > tbody > tr > td:first-child { order: 0; flex: 1 1 0; min-width: 55%; color: var(--tz-ink) !important; }
    /* ستون آخر (منوی سه‌نقطه و دکمه‌ها) کنار نام */
    #root table.table > tbody > tr > td:last-child:not(:first-child) { order: 1; flex: 0 0 auto; margin-inline-start: auto; }
    #root table.table > tbody > tr > td:last-child .float-end { float: none !important; display: flex; gap: 4px; }
    #root table.table > tbody > tr > td:empty { display: none; }
    #root table.table > tbody > tr:hover > td { background: transparent !important; }
    #root table.table .form-select { max-width: 100%; }
}

/* ایمیل، لینک و شماره همیشه چپ‌به‌راست (قبلا «zmaan.ir@0903…» برعکس دیده می‌شد) */
#root input[type="email"], #root input[type="url"], #root input[type="tel"], #root input[type="number"],
#root input[name="email"], #root input[name*="link"], #root .form-control[readonly][value^="http"] {
    direction: ltr; text-align: right; unicode-bidi: plaintext;
}
@media (max-width: 767.98px) {
    /* عکس پروفایل روی موبایل کوچک‌تر */
    body.tz-profile #root .avatar-image, body.tz-profile #root img.rounded-circle, body.tz-profile #root .rounded-circle.placeholder,
    body.tz-profile #root [class*="profile-avatar"], body.tz-profile #root .large-circle { width: 120px !important; height: 120px !important; }
    #root .hstack:has(> .search-bar), #root .hstack:has(> div > .search-bar), #root div:has(> .search-bar) { width: 100%; }
    #root .search-bar { max-width: none !important; width: 100%; }
}
@media (max-width: 991.98px) {
    /* ردیف بوت‌استرپ با حاشیه‌ی منفی از کارت پنل مدیریت بیرون می‌زد */
    #admin-panel > .card > .row, #admin-panel .card > .tab-container > .row, #admin-panel .card .row:has(> .col-sm-9) { margin-inline: 0 !important; }
    #admin-panel .row > .col-sm-3, #admin-panel .row > .col-sm-9 { padding-inline: 0 !important; }
}
@media (max-width: 767.98px) {
    #root table.table { overflow: visible !important; }
    #root table.table > tbody > tr { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    #root table.table > tbody > tr > td { max-width: 100%; }
}

/* تبلت: جدول‌های پرستون (مثل ضبط‌ها) هم کارتی؛ جدول‌های کم‌ستون همان جدول می‌مانند */
@media (min-width: 768px) and (max-width: 1399.98px) {
    #root table.table:has(thead th:nth-child(5)) { min-width: 0 !important; width: 100% !important; border: 0 !important; background: transparent !important; border-radius: 0; }
    #root div:has(> table.table:has(thead th:nth-child(5))), #root .table-responsive { overflow: visible !important; }
    #root table.table:has(thead th:nth-child(5)) thead { display: none; }
    #root table.table:has(thead th:nth-child(5)), #root table.table:has(thead th:nth-child(5)) > tbody { display: block; width: 100%; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
        padding: 12px 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--tz-line) !important; border-radius: 14px;
    }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td {
        display: block; min-width: 0; padding: 0 !important; border: 0 !important;
        overflow-wrap: anywhere; font-size: 13.5px; background: transparent !important;
        order: 2; flex: 0 1 auto; color: var(--tz-mut) !important;
    }
    /* ستون اول (نام کاربر/اتاق/ضبط) بالای کارت، تمام‌عرض */
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td:first-child { order: 0; flex: 1 1 0; min-width: 55%; color: var(--tz-ink) !important; }
    /* ستون آخر (منوی سه‌نقطه و دکمه‌ها) کنار نام */
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td:last-child:not(:first-child) { order: 1; flex: 0 0 auto; margin-inline-start: auto; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td:last-child .float-end { float: none !important; display: flex; gap: 4px; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td:empty { display: none; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr:hover > td { background: transparent !important; }
    #root table.table:has(thead th:nth-child(5)) .form-select { max-width: 100%; }
}
@media (min-width: 768px) and (max-width: 1399.98px) {
    #root table.table:has(thead th:nth-child(5)) { overflow: visible !important; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    #root table.table:has(thead th:nth-child(5)) > tbody > tr > td { max-width: 100%; }
}

/* مانیتور کوچک و بزرگ: منوی پنل مدیریت باریک‌تر، جدول‌های پرستون داخل کادر خودشان اسکرول می‌خورند */
@media (min-width: 992px) {
    #admin-panel .row > .col-sm-3 { flex: 0 0 220px !important; width: 220px !important; max-width: 220px !important; }
    #admin-panel .row > .col-sm-9 { flex: 1 1 0 !important; width: auto !important; max-width: none !important; min-width: 0; }
    #root .table-responsive, #root div:has(> table.table) { overflow-x: auto !important; }
    #root table.table > tbody > tr > td:first-child { min-width: 200px !important; }
}
@media (min-width: 1400px) {
    /* مانیتور بزرگ: محتوا خیلی پهن کش نیاید */
    body.tz-app #root > .container, body.tz-app #root .container:not(.container .container) { max-width: 1320px; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    /* جدول‌های کم‌ستون (کاربران، نقش‌ها) روی تبلت بدون اسکرول افقی */
    #root table.table:not(:has(thead th:nth-child(5))) { min-width: 0 !important; }
}
@media (max-width: 991.98px) {
    /* محتوای پنل مدیریت وقتی منو بالای صفحه است تمام‌عرض */
    #admin-panel .row > .col-sm-3, #admin-panel .row > .col-sm-9 { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
    /* پیکربندی اتاق و تنظیمات: توضیح و انتخاب‌گر زیر هم وقتی جا نیست، نه ستون یک‌کلمه‌ای */
    /* فقط ردیف‌های تنظیمات (توضیح + انتخاب‌گر)، نه ردیف جدول‌ها که آیکون دارند */
    #admin-panel .tab-content .hstack.mb-3:has(> .vstack) { flex-wrap: wrap; gap: 10px !important; }
    #admin-panel .tab-content .hstack.mb-3:has(> .vstack) > .vstack { flex: 1 1 260px; min-width: 0; }
    #admin-panel .tab-content .hstack.mb-3:has(> .vstack) > :not(.vstack):not(svg) { flex: 1 1 200px; max-width: 100%; }
    #admin-panel .tab-content .hstack.mb-3:has(> .vstack) > :not(.vstack) .dropdown-toggle,
    #admin-panel .tab-content .hstack.mb-3:has(> .vstack) > :not(.vstack) .form-select { width: 100% !important; }
}

/* کد دسترسی اتاق: چپ‌چین و چپ‌به‌راست؛ دکمه‌ی کپی سمت راست کادر روی متن نمی‌افتد */
#root .access-code-input input.form-control {
    direction: ltr !important; text-align: left !important; unicode-bidi: plaintext;
    padding-right: 46px !important; padding-left: 14px !important;
    font-family: ui-monospace, Consolas, "Vazirmatn", monospace; letter-spacing: 1px;
}
#root .access-code-input button { right: 6px !important; left: auto !important; }

/* شماره‌ی صفحه‌ها زیر جدول‌های کارتی و دکمه‌های داخل کارت روی موبایل از صفحه بیرون نزنند */
@media (max-width: 1399.98px) {
    #root table.table > tfoot, #root table.table > tfoot > tr { display: block; width: 100%; }
    #root table.table > tfoot > tr > td { display: flex; justify-content: center; width: 100%; padding: 8px 0 !important; border: 0 !important; background: transparent !important; }
    #root .ui.pagination { display: flex !important; flex-wrap: wrap; justify-content: center; max-width: 100%; min-width: 0 !important; }
    #root .ui.pagination .item { min-width: 34px !important; padding: 8px 10px !important; justify-content: center; }
}
@media (max-width: 767.98px) {
    #root table.table td .btn { white-space: normal; max-width: 100%; }
}

/* پیام «به این کلاس دسترسی نداری» */
#tz-denied { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(4, 30, 26, .6); backdrop-filter: blur(3px); }
#tz-denied .tz-denied-box { width: min(440px, 100%); background: #fff; border-radius: 22px; padding: 26px 24px; text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); font-family: Vazirmatn, Tahoma, sans-serif; }
#tz-denied h2 { font-family: Peyda, Vazirmatn, sans-serif; font-size: 1.25rem; margin: 0 0 10px; color: var(--tz-ink, #1F2432); }
#tz-denied p { margin: 0 0 8px; line-height: 2; font-size: 14.5px; color: #5b6670; }
#tz-denied .tz-denied-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
#tz-denied .tz-btn-wl { background: #f1f5f4; color: #1F2432 !important; border: 1px solid #dfe7e6; }

/* منوی پنل مدیریت روی موبایل و تبلت: دکمه‌های گرد (چیپ) با اسکرول افقی بدون نوار اسکرول */
@media (max-width: 991.98px) {
    #admin-panel #admin-sidebar { padding: 12px 12px 4px !important; }
    #admin-panel #admin-sidebar .nav {
        gap: 8px !important; padding: 2px 2px 10px !important; margin: 0 !important;
        scroll-snap-type: x proximity; scrollbar-width: none; scroll-padding-inline: 12px;
    }
    #admin-panel #admin-sidebar .nav::-webkit-scrollbar { display: none; }
    #admin-panel #admin-sidebar .nav-item { flex: none; }
    #admin-panel #admin-sidebar .nav-link {
        display: inline-flex !important; align-items: center; gap: 6px; white-space: nowrap;
        padding: 8px 14px !important; margin: 0 !important; border-radius: 999px !important;
        background: #f3f6f5 !important; border: 1px solid var(--tz-line) !important; box-shadow: none !important;
        color: var(--tz-mut) !important; font-size: 13.5px; font-weight: 600; scroll-snap-align: start;
    }
    #admin-panel #admin-sidebar .nav-link svg { margin: 0 !important; width: 18px; height: 18px; flex: none; }
    #admin-panel #admin-sidebar .nav-link.active, #admin-panel #admin-sidebar .nav-link[aria-selected="true"] {
        background: var(--tz-g) !important; border-color: var(--tz-g) !important; color: #fff !important;
    }
    #admin-panel #admin-sidebar .nav-link::before, #admin-panel #admin-sidebar .nav-link::after { display: none !important; }
}

/* پروفایل: دکمه‌های عکس پروفایل فاصله‌ی کافی از پایین و نوار منو داشته باشند */
body.tz-profile #root .card { margin-bottom: 18px; }
body.tz-profile #root .card .btn + .btn { margin-top: 8px; }
@media (max-width: 991.98px) {
    body.tz-profile #root .card-body { padding-bottom: 22px !important; }
    body.tz-app #root { padding-bottom: 16px; }
}

/* آیکون‌های Greenlight همیشه اندازه‌ی ثابت خودشان را داشته باشند (در چیدمان کارتی کش نیایند) */
#root svg.hi-xs { width: 16px !important; height: 16px; flex: none !important; }
#root svg.hi-s { width: 24px !important; height: 24px; flex: none !important; }
#root svg.hi-m { width: 32px !important; height: 32px; flex: none !important; }
#root svg.hi-l { width: 48px !important; height: 48px; flex: none !important; }
#root svg.hi-xl { width: 72px !important; height: 72px; flex: none !important; }

/* «ساخته شده توسط الی سافت» در پانویس همه‌ی صفحه‌ها */
#footer #footer-container, #footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
#footer .tz-credit, .tz-hfoot .tz-credit { font-size: 12.5px; color: rgba(255, 255, 255, .62); }
#footer .tz-credit a, .tz-hfoot .tz-credit a { color: var(--tz-y) !important; font-weight: 600; text-decoration: none; }
#footer .tz-credit a:hover, .tz-hfoot .tz-credit a:hover { text-decoration: underline; }
@media (max-width: 575.98px) {
    #footer #footer-container, #footer .container { justify-content: center; text-align: center; }
}

/* منوی کناری پنل مدیریت روی دسکتاپ: یک خط، فاصله‌ی یکسان آیکون و متن */
@media (min-width: 992px) {
    #admin-panel .row > .col-sm-3 { flex: 0 0 248px !important; width: 248px !important; max-width: 248px !important; }
    #admin-panel #admin-sidebar { padding: 18px 12px !important; }
    #admin-panel #admin-sidebar .nav { gap: 4px; }
    #admin-panel #admin-sidebar .nav-link {
        display: flex !important; align-items: center; gap: 10px; white-space: nowrap;
        padding: 10px 14px !important; margin: 0 !important; border-radius: 12px !important;
        font-size: 14px; font-weight: 500; line-height: 1.6; color: var(--tz-mut) !important;
    }
    #admin-panel #admin-sidebar .nav-link svg { width: 20px !important; height: 20px; margin: 0 !important; flex: none; }
    #admin-panel #admin-sidebar .nav-link:hover { background: rgba(3, 89, 78, .05) !important; color: var(--tz-ink) !important; }
    #admin-panel #admin-sidebar .nav-link.active { background: var(--tz-gl, #e6f2ef) !important; color: var(--tz-g) !important; font-weight: 700; }
}

/* فرم «افزودن کاربر» */
.tz-adduser-btn { white-space: nowrap; border-radius: 12px !important; font-weight: 700; }
#tz-adduser { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(4, 30, 26, .55); backdrop-filter: blur(3px); }
#tz-adduser .tz-adduser-box { width: min(460px, 100%); background: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 12px; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); font-family: Vazirmatn, Tahoma, sans-serif; }
#tz-adduser .tz-adduser-head { display: flex; align-items: center; justify-content: space-between; }
#tz-adduser h2 { margin: 0; font-family: Peyda, Vazirmatn, sans-serif; font-size: 1.2rem; color: var(--tz-ink); }
#tz-adduser .tz-x { width: 34px; height: 34px; border: 1px solid #dfe7e6; border-radius: 10px; background: #fff; font-size: 20px; line-height: 1; color: #5b6670; }
#tz-adduser .tz-adduser-hint { margin: 0; font-size: 13.5px; line-height: 1.9; color: #5b6670; }
#tz-adduser label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--tz-ink); }
#tz-adduser input, #tz-adduser select { height: 46px; border: 1.5px solid #dfe7e6; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 400; background: #fff; }
#tz-adduser input:focus, #tz-adduser select:focus { outline: none; border-color: var(--tz-g); box-shadow: 0 0 0 3px rgba(3, 89, 78, .12); }
#tz-adduser input[name="mobile"] { text-align: left; letter-spacing: 1px; }
#tz-adduser .tz-adduser-err { background: #fdecec; color: #b42318; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
#tz-adduser .tz-adduser-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#tz-adduser .tz-adduser-actions .btn { flex: 1 1 140px; height: 46px; border-radius: 12px; font-weight: 700; }
