/* ===== Pasha Hesab design system (on top of Tabler) — all assets local ===== */
@font-face { font-family: 'IRANSans'; font-weight: 400; src: url('../fonts/IRANSans-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IRANSans'; font-weight: 500; src: url('../fonts/IRANSans-Medium.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IRANSans'; font-weight: 700; src: url('../fonts/IRANSans-Bold.woff2') format('woff2'); font-display: swap; }

:root {
  --tblr-font-sans-serif: 'IRANSans', Tahoma, sans-serif;
  --tblr-primary: #4263eb;
  --ph-primary-dark: #3451c9;
  --tblr-primary-rgb: 66, 99, 235;
  --tblr-link-color: #4263eb;
  --tblr-link-color-rgb: 66, 99, 235;
  --tblr-border-radius: .625rem;
  --ph-bg: #f4f6fb;
  --ph-surface: #ffffff;
  --ph-border: #e6e9f2;
  --ph-text-soft: #667085;
  --ph-sidebar-w: 17rem;
  --ph-topbar-h: 4rem;
  --ph-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --ph-grad: linear-gradient(135deg, #4263eb 0%, #7048e8 100%);
}
[data-bs-theme="dark"] {
  --tblr-primary: #748ffc;
  --ph-primary-dark: #5c7cfa;
  --tblr-primary-rgb: 116, 143, 252;
  --tblr-link-color: #91a7ff;
  --ph-bg: #0f1424;
  --ph-surface: #172036;
  --ph-border: #25304d;
  --ph-text-soft: #9aa6c4;
  --ph-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--tblr-font-sans-serif); background: var(--ph-bg); font-size: .9375rem; line-height: 1.8; }
h1, h2, h3, h4, h5 { font-weight: 700; }
.ltr { direction: ltr; text-align: left; unicode-bidi: plaintext; }
.text-soft { color: var(--ph-text-soft) !important; }
.ti { vertical-align: -.125em; }

/* ---- cards / buttons / forms ---- */
.card { border: 1px solid var(--ph-border); border-radius: 1rem; background: var(--ph-surface); box-shadow: var(--ph-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--ph-border); flex-wrap: wrap; gap: .75rem; }
.card-footer { background: transparent; border-top: 1px solid var(--ph-border); }
/* ---- buttons: ONE look everywhere (the "Standard" solid style): a filled theme colour, rounded, white bold text, same font and size ---- */
.btn {
  --tblr-btn-font-size: .875rem; --tblr-btn-font-weight: 600; --tblr-btn-line-height: 1.5; --tblr-btn-border-radius: .5rem;
  font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.5; letter-spacing: 0; border-radius: .5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; box-shadow: none; text-decoration: none;
  --tblr-btn-padding-y: .4rem; box-sizing: border-box; min-height: 2.5rem; min-width: 2.5rem;       /* ONE height for every button, an icon-only one is a square */
}
.btn-sm, .btn-lg { --tblr-btn-font-size: .875rem; font-size: .875rem; min-height: 2.5rem; }          /* sizes differ in side padding only: never in type, never in height */
.btn-sm { --tblr-btn-padding-y: .4rem; --tblr-btn-padding-x: .85rem; }
.btn-lg { --tblr-btn-padding-y: .4rem; --tblr-btn-padding-x: 1.4rem; }
.btn .ti { font-size: 1.1em; }

/* every colour of button is solid: «outline» classes in the views simply render as the filled button of the same colour */
.btn-primary, .btn-outline-primary { --tblr-btn-color: #fff; --tblr-btn-bg: var(--tblr-primary); --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: var(--ph-primary-dark);
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: var(--ph-primary-dark); --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: var(--tblr-primary); --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-secondary, .btn-outline-secondary { --tblr-btn-color: #fff; --tblr-btn-bg: #737373; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #5f5f5f;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #5f5f5f; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #737373; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-success, .btn-outline-success { --tblr-btn-color: #fff; --tblr-btn-bg: #2fb344; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #299b3b;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #299b3b; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #2fb344; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-warning, .btn-outline-warning { --tblr-btn-color: #fff; --tblr-btn-bg: #f59f00; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #d98c00;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #d98c00; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #f59f00; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-danger, .btn-outline-danger { --tblr-btn-color: #fff; --tblr-btn-bg: #d63939; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #bb3030;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #bb3030; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #d63939; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-info, .btn-outline-info { --tblr-btn-color: #fff; --tblr-btn-bg: #4299e1; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #3a86c2;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #3a86c2; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #4299e1; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-dark, .btn-outline-dark { --tblr-btn-color: #fff; --tblr-btn-bg: #222; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #fff; --tblr-btn-hover-bg: #000;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #fff; --tblr-btn-active-bg: #000; --tblr-btn-active-border-color: transparent; --tblr-btn-disabled-bg: #222; --tblr-btn-disabled-color: #fff; --tblr-btn-disabled-border-color: transparent; }
.btn-light, .btn-outline-light { --tblr-btn-color: #222; --tblr-btn-bg: #f8f8f8; --tblr-btn-border-color: transparent; --tblr-btn-hover-color: #222; --tblr-btn-hover-bg: #e9e9e9;
  --tblr-btn-hover-border-color: transparent; --tblr-btn-active-color: #222; --tblr-btn-active-bg: #e9e9e9; --tblr-btn-active-border-color: transparent; }
.btn-primary:hover, .btn-primary:focus { filter: none; }
summary.btn { list-style: none; cursor: pointer; }                                         /* a <summary> used as a button looks the same */
summary.btn::-webkit-details-marker { display: none; }
.form-control, .form-select { border-radius: .625rem; min-height: 2.5rem; background-color: var(--ph-surface); border-color: var(--ph-border); }
.form-control:focus, .form-select:focus { border-color: var(--tblr-primary); box-shadow: 0 0 0 .2rem rgba(var(--tblr-primary-rgb), .15); }
.form-label.required::after { content: ' *'; color: #e03131; }
.input-icon { position: relative; }
.input-icon > .ti { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--ph-text-soft); font-size: 1.2rem; pointer-events: none; }
.input-icon > .form-control { padding-inline-start: 2.75rem; }
.alert { border-radius: .75rem; display: flex; gap: .6rem; align-items: flex-start; }

/* ---- app shell ---- */
.app { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--ph-sidebar-w); z-index: 1040;
  background: var(--ph-surface); border-inline-end: 1px solid var(--ph-border);
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-brand { height: var(--ph-topbar-h); display: flex; align-items: center; gap: .7rem; padding: 0 1.25rem; border-bottom: 1px solid var(--ph-border); }
.brand-mark { width: 2.25rem; height: 2.25rem; border-radius: .7rem; background: var(--ph-grad); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--tblr-body-color); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .25rem; }
.sidebar-nav .nav-heading { font-size: .72rem; color: var(--ph-text-soft); padding: .75rem .75rem .25rem; }
.nav-item-link { display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: .75rem; color: var(--tblr-body-color); text-decoration: none; transition: background .15s, color .15s; }
.nav-item-link .ti { font-size: 1.3rem; color: var(--ph-text-soft); }
.nav-item-link:hover { background: rgba(var(--tblr-primary-rgb), .08); color: var(--tblr-primary); }
.nav-item-link.active { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); font-weight: 700; }
.nav-item-link.active .ti, .nav-item-link:hover .ti { color: var(--tblr-primary); }
.nav-lock { font-size: .8rem; color: var(--ph-text-soft); background: rgba(250, 176, 5, .12); border-radius: .75rem; padding: .75rem; display: flex; gap: .5rem; margin-top: .75rem; }
.nav-lock .ti { color: #f08c00; font-size: 1.1rem; flex: none; }
.sidebar-user { border-top: 1px solid var(--ph-border); padding: .9rem 1rem; display: flex; align-items: center; gap: .7rem; }
.avatar-circle { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(var(--tblr-primary-rgb), .14); color: var(--tblr-primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(10, 15, 30, .5); z-index: 1035; opacity: 0; visibility: hidden; transition: opacity .25s; }

.main { flex: 1; min-width: 0; margin-inline-start: var(--ph-sidebar-w); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; height: var(--ph-topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; background: color-mix(in srgb, var(--ph-surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ph-border); }
.topbar-title { font-weight: 700; font-size: 1.1rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: .7rem; border: 1px solid var(--ph-border); background: var(--ph-surface); color: var(--tblr-body-color); display: inline-grid; place-items: center; font-size: 1.25rem; cursor: pointer; }
.icon-btn:hover { color: var(--tblr-primary); border-color: var(--tblr-primary); }
.menu-toggle { display: none; }
.content { padding: 1.5rem; max-width: 80rem; width: 100%; margin-inline: auto; flex: 1; }
.app-footer { text-align: center; color: var(--ph-text-soft); font-size: .8rem; padding: 1rem; column-gap: 1rem; }
.app-footer strong { color: var(--tblr-body-color); font-weight: 600; }
.footer-validity-ok, .footer-validity-lifetime { color: #2f9e44; }
.footer-validity-last { color: #e8590c; font-weight: 700; }
.footer-validity-expired { color: #e03131; font-weight: 700; }

/* ---- page parts ---- */
.hero-card { background: var(--ph-grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; width: 16rem; height: 16rem; border-radius: 50%; background: rgba(255,255,255,.08); inset-inline-end: -4rem; top: -6rem; pointer-events: none; /* decoration only: it must never swallow the clicks of the buttons it lies over */ }
.hero-card h2 { color: #fff; margin: 0 0 .25rem; }
.hero-card p { color: rgba(255,255,255,.85); margin: 0; }
/* buttons that sit on the gradient: light glass, white text — readable whatever the button's own colour would be */
.hero-card .btn-hero { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.hero-card .btn-hero:hover, .hero-card .btn-hero:focus-visible { background: rgba(255,255,255,.3); color: #fff; border-color: #fff; }
.hero-card .btn-hero .badge-soft { background: rgba(255,255,255,.25); color: #fff; }
.steps { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.step { display: flex; gap: .85rem; padding: 1rem; border: 1px solid var(--ph-border); border-radius: .9rem; align-items: center; background: var(--ph-surface); }
.step .ti { font-size: 1.6rem; color: var(--ph-text-soft); }
.step.done { border-color: rgba(47, 158, 68, .35); background: rgba(47, 158, 68, .06); }
.step.done .ti { color: #2f9e44; }
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.stat { display: flex; align-items: center; gap: 1rem; padding: 1.1rem; }
.stat-icon { width: 3rem; height: 3rem; border-radius: .9rem; display: grid; place-items: center; font-size: 1.5rem; flex: none; background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); }
.stat-label { color: var(--ph-text-soft); font-size: .82rem; }
.stat-value { font-weight: 700; font-size: 1.25rem; }
.form-section { display: flex; align-items: center; gap: .6rem; font-weight: 700; margin: .5rem 0 .25rem; }
.form-section .ti { color: var(--tblr-primary); font-size: 1.3rem; }
.badge-soft { padding: .25rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 500; }
.badge-soft.ok { background: rgba(47, 158, 68, .14); color: #2b8a3e; }
.badge-soft.warn { background: rgba(240, 140, 0, .16); color: #d9730d; }
.badge-soft.bad { background: rgba(214, 57, 57, .14); color: #c92a2a; }
.badge-soft.info { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); }
.table > :not(caption) > * > * { padding: .85rem 1rem; }
.table thead th { font-size: .78rem; color: var(--ph-text-soft); font-weight: 500; background: transparent; }

/* ---- guest / auth ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ph-grad); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::before, .auth-side::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); }
.auth-side::before { width: 22rem; height: 22rem; inset-inline-end: -8rem; top: -8rem; }
.auth-side::after { width: 16rem; height: 16rem; inset-inline-start: -5rem; bottom: -5rem; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand-mark { background: rgba(255,255,255,.2); width: 3.25rem; height: 3.25rem; font-size: 1.8rem; }
.auth-side h1 { color: #fff; font-size: 2rem; margin: 1rem 0 .25rem; }
.auth-feature { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1.1rem; }
.auth-feature .ti { font-size: 1.5rem; background: rgba(255,255,255,.18); border-radius: .7rem; padding: .4rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-box { width: 100%; max-width: 26rem; }
.auth-mobile-brand { display: none; text-align: center; margin-bottom: 1.5rem; }
.otp-input { letter-spacing: .6em; text-align: center; font-size: 1.6rem; direction: ltr; font-weight: 700; }

/* ---- responsive ---- */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(100%); box-shadow: none; }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  body.sidebar-open { overflow: hidden; }
  .main { margin-inline-start: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: block; }
}
@media (max-width: 575.98px) {
  /* a row of tabs (status filter) scrolls sideways instead of widening the page */
  .btn-group:not(:has(.dropdown-menu)) { max-width: 100%; overflow-x: auto; }
  .btn-group:not(:has(.dropdown-menu)) > .btn { flex: 0 0 auto; width: auto; }
  .topbar-user-name { display: none; }
  .card-header { flex-wrap: wrap; }                                  /* the title may take a line of its own; the buttons stay side by side on the next one */
  .table-stack thead { display: none; }
  .table-stack tbody tr { display: block; padding: .75rem 1rem; border-bottom: 1px solid var(--ph-border); }
  .table-stack tbody td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .25rem 0 !important; }
  .table-stack tbody td::before { content: attr(data-label); color: var(--ph-text-soft); font-size: .8rem; }
  .table-stack tbody td.no-label::before { display: none; }
  .table-stack tbody td.no-label { justify-content: stretch; }
  .table-stack tbody td.no-label .btn { width: 100%; }
  /* a line editor (invoice / stock / journal lines): one card per row, two fields per line, the long ones across both */
  .table-lines, .table-lines tbody, .table-lines tfoot { display: block; }
  .table-lines thead { display: none; }
  .table-lines tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--ph-border); }
  .table-lines tbody td { display: block; min-width: 0; border: 0; padding: 0 !important; }
  .table-lines tbody td[data-label]::before { content: attr(data-label); display: block; direction: rtl; text-align: start; font-size: .78rem; color: var(--ph-text-soft); margin-bottom: .2rem; }
  .table-lines tbody td.cell-wide, .table-lines tbody td.cell-act { grid-column: 1 / -1; }
  .table-lines tbody td.cell-act { text-align: end; }
  .table-lines tfoot tr { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .75rem 1rem; border-top: 1px solid var(--ph-border); }
  .table-lines tfoot td { display: block; border: 0; padding: 0 !important; }
  .table-lines tfoot td:empty { display: none; }
  .table-lines tfoot td[colspan] { flex: 1 1 auto; }
  .hero-card .card-body { padding: 1.25rem; }
}
/* touch screens: a field under 16px makes iOS zoom the page when it is focused */
@media (pointer: coarse) {
  .form-control, .form-select, .form-control-sm, .form-select-sm { font-size: 16px; }
}
@media print { .sidebar, .topbar, .app-footer { display: none !important; } .main { margin: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.input-icon > .form-control.ltr { padding-inline-start: .75rem; padding-inline-end: 2.75rem; }

/* ---- grouped sidebar with floating panels ---- */
.nav-group-toggle { width: 100%; border: 0; background: transparent; text-align: start; cursor: pointer; font: inherit; }
.nav-group-toggle span { flex: 1; }
.nav-caret { margin-inline-start: auto; font-size: 1rem !important; transition: transform .2s; }
.nav-group.open > .nav-group-toggle { background: rgba(var(--tblr-primary-rgb), .08); color: var(--tblr-primary); }
.nav-group.open .nav-caret { transform: rotate(-90deg); }
.nav-group.has-active > .nav-group-toggle { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); font-weight: 700; }

.nav-flyout {
  display: none; position: fixed; z-index: 1060; min-width: 15rem; max-width: 20rem;
  background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .18); padding: .5rem;
}
.nav-group.open > .nav-flyout { display: block; animation: ph-pop .12s ease-out; }
.nav-flyout { max-height: calc(100vh - 1rem); overflow-y: auto; overscroll-behavior: contain; }
.nav-section + .nav-section { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid var(--ph-border); }
.nav-section-title { display: flex; align-items: center; gap: .45rem; font-size: .74rem; font-weight: 700; color: var(--ph-text-soft); padding: .3rem .75rem .2rem; letter-spacing: .01em; }
.nav-section-title .ti { font-size: 1rem; }
.nav-section.has-active > .nav-section-title { color: var(--tblr-primary); }
/* a long menu (the administration) is laid out in two columns */
.nav-section .nav-flyout-link { padding: .48rem .75rem; }
.nav-flyout.wide { min-width: 0; max-width: none; }
.nav-flyout.wide-2 { width: min(35rem, calc(100vw - 19rem)); }
.nav-flyout.wide-3 { width: min(52rem, calc(100vw - 19rem)); }
.nav-flyout.wide .nav-sections { column-width: 15rem; column-gap: .9rem; }
.nav-flyout.wide .nav-section { break-inside: avoid; margin: 0 0 .45rem; padding-top: 0; border-top: 0; }
.nav-flyout.wide .nav-section + .nav-section { margin-top: 0; padding-top: 0; border-top: 0; }
.nav-flyout-title { font-size: .72rem; color: var(--ph-text-soft); padding: .35rem .75rem; }
.nav-flyout-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: .7rem; color: var(--tblr-body-color); text-decoration: none; }
.nav-flyout-link .ti { font-size: 1.2rem; color: var(--ph-text-soft); }
.nav-flyout-link:hover { background: rgba(var(--tblr-primary-rgb), .08); color: var(--tblr-primary); }
.nav-flyout-link:hover .ti, .nav-flyout-link.active .ti { color: var(--tblr-primary); }
.nav-flyout-link.active { background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); font-weight: 700; }
@keyframes ph-pop { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
[dir="ltr"] .nav-group.open > .nav-flyout { animation-name: ph-pop-ltr; }
@keyframes ph-pop-ltr { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* mobile / tablet: the panel becomes an in-place accordion inside the drawer */
@media (max-width: 991.98px) {
  .nav-flyout { position: static; min-width: 0; max-width: none; box-shadow: none; border: 0; background: rgba(var(--tblr-primary-rgb), .04); margin: .15rem 0 .35rem; animation: none !important; }
  .nav-flyout-title { display: none; }
  .nav-flyout { max-height: none; overflow: visible; }
  .nav-flyout.wide, .nav-flyout.wide-2, .nav-flyout.wide-3 { min-width: 0; max-width: none; width: auto; }
  .nav-flyout.wide .nav-sections { column-width: auto; column-count: 1; }
  .nav-flyout.wide .nav-section { margin: 0; }
  .nav-flyout.wide .nav-section + .nav-section { margin-top: .3rem; padding-top: .3rem; border-top: 1px solid var(--ph-border); }
}

.legend-dot { display:inline-block; width:.7rem; height:.7rem; border-radius:50%; vertical-align:middle; margin-inline-end:.25rem; }
.statement td, .statement th { padding: .45rem 1rem !important; }
.statement .sec { background: rgba(var(--tblr-primary-rgb), .07); font-weight: 700; }
.statement .sub td { font-weight: 700; border-top: 2px solid var(--ph-border); }
.statement .grand td { font-weight: 700; font-size: 1.05rem; background: rgba(var(--tblr-primary-rgb), .12); }
.statement .indent td:first-child { padding-inline-start: 2.2rem !important; }
@media print { .statement { font-size: .85rem; } }

/* Menus never underline their links, not even on hover/focus (beats the global a:hover rule). */
.sidebar a, .sidebar a:hover, .sidebar a:focus, .sidebar a:active,
.nav-item-link, .nav-item-link:hover, .nav-item-link:focus,
.nav-flyout-link, .nav-flyout-link:hover, .nav-flyout-link:focus { text-decoration: none; }

/* Jalali date picker (public/js/datepicker.js) */
.jdp { position: absolute; z-index: 2000; display: none; width: 17.5rem; background: var(--tblr-bg-surface, #fff); color: var(--tblr-body-color); border: 1px solid var(--ph-border); border-radius: .9rem; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: .6rem; direction: rtl; }
.jdp.jdp-open { display: block; }
.jdp-head { display: flex; align-items: center; gap: .3rem; margin-bottom: .5rem; }
.jdp-nav { width: 2rem; height: 2rem; border: 0; border-radius: .5rem; background: transparent; font-size: 1.25rem; line-height: 1; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.jdp-nav:hover { background: rgba(var(--tblr-primary-rgb), .1); }
.jdp-sel { flex: 1; min-width: 0; border: 1px solid var(--ph-border); border-radius: .5rem; background: transparent; color: inherit; padding: .2rem .3rem; font: inherit; font-size: .85rem; }
.jdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .15rem; text-align: center; }
.jdp-wd { font-size: .75rem; color: var(--ph-text-soft); padding: .2rem 0; }
.jdp-day { aspect-ratio: 1; border: 0; border-radius: .5rem; background: transparent; color: inherit; font: inherit; font-size: .85rem; cursor: pointer; padding: 0; }
.jdp-day:hover { background: rgba(var(--tblr-primary-rgb), .12); }
.jdp-fri { color: #e03131; }
.jdp-today { outline: 1px solid var(--tblr-primary); }
.jdp-selected, .jdp-selected:hover { background: var(--tblr-primary); color: #fff; }
.jdp-foot { display: flex; justify-content: space-between; margin-top: .5rem; padding-top: .4rem; border-top: 1px solid var(--ph-border); }
.jdp-link { border: 0; background: transparent; color: var(--tblr-primary); font: inherit; font-size: .85rem; cursor: pointer; padding: .2rem .4rem; }
@media print { .jdp { display: none !important; } }

/* dashboard shortcuts */
.shortcut-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); }
.shortcut-tile { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border: 1px solid var(--ph-border, #dde2ee); border-radius: .8rem; background: var(--tblr-bg-surface, #fff); color: inherit; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.shortcut-tile:hover { border-color: var(--tblr-primary, #4263eb); box-shadow: 0 4px 14px rgba(66, 99, 235, .15); }
.shortcut-tile .ti { font-size: 1.4rem; color: var(--tblr-primary, #4263eb); flex: none; }
.shortcut-manage > summary { list-style: none; cursor: pointer; display: inline-block; }
.shortcut-manage > summary::-webkit-details-marker { display: none; }

/* ---- pagination (Persian, RTL, responsive) ---- */
.ph-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; width: 100%; }
.ph-pager-info { color: var(--ph-text-soft, #6b7280); font-size: .875rem; }
.ph-pagination { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0; list-style: none; }
.ph-pagination .page-item { margin: 0; }
.ph-pagination .page-link { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 2.5rem; height: 2.5rem; padding: 0 .7rem; border: 1px solid var(--ph-border); border-radius: .5rem; background: var(--ph-surface, #fff); color: inherit; font-size: .875rem; font-weight: 500; line-height: 1; text-decoration: none; }
.ph-pagination a.page-link:hover { border-color: var(--tblr-primary); color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .06); }
.ph-pagination .page-item.active .page-link { background: var(--tblr-primary); border-color: var(--tblr-primary); color: #fff; font-weight: 700; }
.ph-pagination .page-item.disabled .page-link { opacity: .45; cursor: default; background: transparent; }
.ph-pagination .ti { font-size: 1.1rem; }
.ph-pg-status { display: none; }
@media (max-width: 575.98px) {
  .ph-pager { flex-direction: column; align-items: stretch; text-align: center; }
  .ph-pagination { justify-content: center; flex-wrap: nowrap; }
  .ph-pagination .ph-pg-num { display: none; }                       /* phones: «قبلی  صفحه ۲ از ۷  بعدی» instead of the row of numbers */
  .ph-pg-status { display: block; flex: 1; }
  .ph-pg-status .page-link { width: 100%; border-color: transparent; background: transparent; font-weight: 700; }
  .ph-pagination .page-item:not(.ph-pg-status) .page-link { padding: 0 .9rem; }
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .ph-pagination .ph-pg-text { display: none; }                      /* tablets: arrows only, numbers stay */
}

/* ---- placeholders: soft, readable, and right-to-left even in left-to-right boxes ---- */
.form-control::placeholder, .form-select::placeholder, textarea::placeholder { color: var(--ph-text-soft, #8a94a6); opacity: .8; font-weight: 400; font-size: .9em; }
.form-control:focus::placeholder { opacity: .45; }
input.ph-rtl:placeholder-shown, textarea.ph-rtl:placeholder-shown { direction: rtl; text-align: right; unicode-bidi: normal; }     /* a Persian hint in a date / code / number box */

/* print-only blocks (Hoofer-style sheets, headers, sign-off lines) are never shown on screen; print.css turns them on */
.print-only { display: none; }

/* version history page */
.release > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.release > summary::-webkit-details-marker { display: none; }
.release-ver { font-size: 1.15rem; font-weight: 700; }
.release-caret { transition: transform .2s; color: var(--ph-text-soft); }
.release[open] .release-caret { transform: rotate(180deg); }
.release-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.release-items li { display: flex; gap: .75rem; align-items: flex-start; line-height: 1.9; }
.release-kind { flex: none; min-width: 4.5rem; text-align: center; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: rgba(47, 158, 68, .14); color: #2f9e44; }
.release-kind.fix { background: rgba(240, 140, 0, .16); color: #d9730d; }

/* Buttons sit side by side on one row (phones keep the stacked, full-width buttons above): the text next to them shrinks and wraps, never the buttons. */
@media (min-width: 576px) {
  .card-header { flex-wrap: nowrap; align-items: center; }
  .card-header > * { min-width: 0; }
  .card-header > .btn, .card-header > form, .card-header > a.btn, .card-header > .icon-btn { flex: none; white-space: nowrap; }
  .table td:has(.btn), .table td:has(.icon-btn) { white-space: nowrap; }
  .table td:has(.btn) > form, .table td:has(.icon-btn) > form { display: inline-block; margin: 0; vertical-align: middle; }
  .table td .btn, .table td .icon-btn { vertical-align: middle; }
  /* an edit panel under a row (a full-width cell holding a form of its own) keeps its normal layout: its fields wrap and fill the width */
  .table td.bg-body-tertiary { white-space: normal; }
  .table td.bg-body-tertiary > form { display: block; margin: 0; }
}
/* login code countdown */
.otp-timer .otp-clock { font-size: 1.9rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; direction: ltr; }
.otp-track { height: .35rem; border-radius: 999px; background: rgba(var(--tblr-primary-rgb), .12); overflow: hidden; margin: .4rem auto 0; max-width: 14rem; }
.otp-bar { height: 100%; background: var(--tblr-primary); border-radius: 999px; transition: width 1s linear; }
.otp-timer-low .otp-clock { color: #e8590c; }
.otp-timer-low .otp-bar { background: #e8590c; }
.otp-timer-done .otp-clock { color: #e03131; }
.otp-timer-done .otp-bar { width: 0 !important; }

/* Searchable lists (public/js/searchselect.js) */
.ss { position: relative; width: 100%; }
.ss-native { position: absolute !important; inset-inline: 0; bottom: 0; width: 100%; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.ss-btn { display: block; width: 100%; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ss-btn.ss-placeholder { color: var(--ph-text-soft); }
.ss-btn.is-invalid { border-color: #e03131; }
.ss-pop { position: fixed; z-index: 2100; background: var(--tblr-bg-surface, #fff); color: var(--tblr-body-color); border: 1px solid var(--ph-border); border-radius: .75rem; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: .5rem; }
.ss-pop[hidden] { display: none; }
.ss-q { margin-bottom: .4rem; }
.ss-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.ss-opt, .ss-nothing { padding: .4rem .6rem; border-radius: .5rem; }
.ss-opt { cursor: pointer; }
.ss-nothing { color: var(--ph-text-soft); }
.ss-opt.ss-active { background: rgba(var(--tblr-primary-rgb), .12); }
.ss-opt.ss-sel { font-weight: 700; }
.ss-opt.ss-none { color: var(--ph-text-soft); }
.ss-grp { display: block; font-size: .72rem; color: var(--ph-text-soft); font-weight: 400; }
.ss-hint { padding: .35rem .6rem 0; font-size: .75rem; color: var(--ph-text-soft); }

/* Batch printing (public/js/batch-print.js) */
.doc-content { display: contents; }
#batch-root { display: none; }
#batch-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.45); }
.batch-overlay-box { background: var(--tblr-bg-surface, #fff); color: var(--tblr-body-color); border-radius: .9rem; padding: 1.4rem 1.8rem; min-width: 18rem; max-width: 90vw; text-align: center; box-shadow: 0 12px 32px rgba(0,0,0,.25); }

/* Invoice lists: the filters sit on an even grid, the totals are equal tiles */
.list-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; padding: 1rem; border-bottom: 1px solid var(--ph-border); }
.list-filter > div { flex: 1 1 6rem; min-width: 0; }
.list-filter > .f-party { flex: 2 1 8.5rem; }
.list-filter .form-control, .list-filter .form-select, .list-filter .ss-btn { padding-inline: .5rem; font-size: .85rem; }
.list-filter .form-select, .list-filter .ss-btn { background-position: left .4rem center; padding-inline-end: 1.5rem; }
.list-filter > .f-num { flex: 0 1 5.5rem; }
.list-filter .form-label { margin-bottom: .2rem; white-space: nowrap; }
.list-filter > .actions { flex: 0 0 auto; display: flex; gap: .4rem; }
.sum-strip { display: flex; flex-wrap: wrap; gap: .75rem; padding: 1rem; border-bottom: 1px solid var(--ph-border); }
.sum-tile { flex: 1 1 9.25rem; display: flex; flex-direction: column; justify-content: space-between; gap: .35rem; border: 1px solid var(--ph-border); border-radius: .75rem; padding: .6rem .9rem; background: var(--ph-bg); }
.sum-tile.strong { border-color: rgba(var(--tblr-primary-rgb), .35); background: rgba(var(--tblr-primary-rgb), .06); }
.sum-tile .lbl { color: var(--ph-text-soft); font-size: .8rem; line-height: 1.5; }
.sum-tile .val { font-weight: 700; font-size: 1.2rem; }
.nav-badge { margin-inline-start: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .4rem; border-radius: 99px; background: #e03131; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.35rem; text-align: center; flex: none; }
.nav-group-toggle .nav-badge { margin-inline-start: .5rem; }
.badge-soft.muted { background: rgba(134, 142, 150, .16); color: #6c757d; }
/* support desk */
.tk-thread { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.tk-msg { border: 1px solid var(--ph-border); border-radius: .75rem; padding: .75rem 1rem; background: var(--ph-bg); max-width: 100%; }
.tk-msg.staff { border-color: rgba(var(--tblr-primary-rgb), .35); background: rgba(var(--tblr-primary-rgb), .05); }
.tk-msg.internal { border-style: dashed; border-color: rgba(240, 140, 0, .6); background: rgba(240, 140, 0, .08); }
.tk-msg.system { background: transparent; border-style: dotted; color: var(--ph-text-soft); font-size: .9rem; }
.tk-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.tk-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.tk-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.tk-file { display: flex; flex-direction: column; align-items: center; gap: .25rem; max-width: 9rem; padding: .35rem; border: 1px solid var(--ph-border); border-radius: .5rem; text-decoration: none; color: inherit; }
.tk-file img { max-width: 8rem; max-height: 6rem; border-radius: .35rem; object-fit: cover; }
.kb-body p { white-space: pre-line; line-height: 2; }
.sla-ok { color: #2b8a3e; } .sla-risk { color: #d9730d; } .sla-bad { color: #c92a2a; font-weight: 700; }
progress.credit-bar { width: 100%; height: .6rem; border-radius: 99px; overflow: hidden; border: 0; background: rgba(0, 0, 0, .08); accent-color: #2f9e44; }
progress.credit-bar::-webkit-progress-bar { background: rgba(0, 0, 0, .08); }
progress.credit-bar::-webkit-progress-value { background: #2f9e44; border-radius: 99px; }
progress.credit-bar::-moz-progress-bar { background: #2f9e44; border-radius: 99px; }
progress.credit-bar.over { accent-color: #c92a2a; }
progress.credit-bar.over::-webkit-progress-value { background: #c92a2a; }
progress.credit-bar.over::-moz-progress-bar { background: #c92a2a; }
.sum-note { flex: 0 0 100%; color: var(--ph-text-soft); font-size: .8rem; }
@media (max-width: 767.98px) { .list-filter > div, .list-filter > .f-party, .list-filter > .f-num { flex: 1 1 calc(50% - .5rem); } .list-filter > .actions { flex: 1 1 100%; } }
/* cash-flow forecast: a thin bar behind each amount shows its size against the biggest week */
.fc-bar { height: .3rem; border-radius: 99px; margin-bottom: .25rem; min-width: 2px; margin-inline-start: auto; }
.fc-bar.in { background: #2f9e44; }
.fc-bar.out { background: #d63939; }
/* chart of accounts: a tree (group > kol > moein > tafsili) of native <details>; nothing needs a script to open or close */
.chart-tree details > summary { list-style: none; cursor: pointer; }
.chart-tree details > summary::-webkit-details-marker { display: none; }
.chart-sum, .chart-row { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .6rem; padding: .55rem .9rem; }
.chart-sum:hover, .chart-row:hover { background: rgba(var(--tblr-primary-rgb), .05); }
.chart-g > .chart-sum { background: rgba(var(--tblr-primary-rgb), .07); font-size: 1.02rem; border-top: 1px solid var(--ph-border); }
.chart-g:first-child > .chart-sum { border-top: 0; }
.chart-k > .chart-sum { font-size: .97rem; }
.chart-children { margin-inline-start: 1.1rem; padding-inline-start: .6rem; border-inline-start: 1px solid var(--ph-border); }
.chart-caret { transition: transform .15s; color: var(--ph-text-soft); font-size: 1rem; }
.chart-node[open] > .chart-sum > .chart-caret { transform: rotate(-90deg); }
.chart-code { min-width: 3.1rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ph-text-soft); }
.chart-kind { font-size: .7rem; color: var(--ph-text-soft); border: 1px solid var(--ph-border); border-radius: 99px; padding: 0 .5rem; line-height: 1.5; }
.chart-meta { margin-inline-start: auto; font-size: .78rem; color: var(--ph-text-soft); }
.chart-toggle { width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; border: 0; border-radius: .4rem; background: transparent; color: var(--ph-text-soft); padding: 0; }
.chart-toggle.disabled { visibility: hidden; }
.chart-toggle .ti { transition: transform .15s; }
.chart-toggle[aria-expanded="true"] .ti { transform: rotate(-90deg); }
.chart-panel { margin-inline-start: 1.1rem; padding: .35rem .5rem .6rem; border-inline-start: 1px dashed var(--ph-border); }
.chart-add { padding: .35rem .5rem; }
.chart-d .chart-row { padding-block: .35rem; }
@media (max-width: 575.98px) {
  .chart-kind { display: none; }
  .chart-children { margin-inline-start: .5rem; padding-inline-start: .35rem; }
  .chart-sum, .chart-row { padding-inline: .5rem; }
}
/* ---- action buttons stay together: one row, side by side, never dropping to a second line ----
   .btn-row is the explicit group (give it to the buttons of a form / header that sit among other things); the selectors below do the same for every flex row
   that holds nothing but buttons (or forms of one button), and for Tabler's .btn-list. While the row fits, every button keeps its natural width on one line;
   when it does not (a narrow column, a tablet), the buttons shrink and wrap their own label: the row never breaks apart and never widens the page. */
.btn-row, .btn-list, .d-flex:not(:has(> :not(.btn, .icon-btn, form))):has(> .btn ~ .btn, > .btn ~ form, > form ~ .btn, > form ~ form) { flex-wrap: nowrap !important; }      /* !important: it must beat a .flex-wrap utility on the same element */
.btn-row { display: flex; align-items: stretch; gap: .5rem; min-width: 0; max-width: 100%; }      /* min-width:0 — as a flex item of a card it may be narrower than the sum of its buttons: they wrap their labels instead of widening the page (the calendar toolbar did on a tablet) */                              /* equal heights when a label had to wrap */
.btn-row > :not(.btn, form, .icon-btn) { align-self: center; }
.btn-row > .btn, .btn-row > form, .btn-row > .icon-btn { flex: 0 1 auto; min-width: 0; }
.btn-row > .btn, .btn-list > .btn, .btn-row > form > .btn, .btn-list > form > .btn,
.d-flex:not(:has(> :not(.btn, .icon-btn, form))):has(> .btn ~ .btn, > .btn ~ form, > form ~ .btn, > form ~ form) > .btn { white-space: normal; min-width: 0; }
.card-header .btn-row, .card-header .btn-list { margin-inline-start: auto; }
/* a grid column that holds only buttons (the filter / clear pair of a list) is as wide as its buttons and keeps them in one line */
.row > [class*="col"]:not(:has(> :not(.btn))):has(> .btn ~ .btn) { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; flex: 0 0 auto !important; width: auto !important; max-width: 100%; }
.row > [class*="col"]:not(:has(> :not(.btn))):has(> .btn ~ .btn) > .btn { white-space: normal; min-width: 0; }
/* a CHOOSER (which level, which template: ten or more buttons that are choices, not actions) may wrap onto a second line: ten labelled buttons are wider than any page.
   The class is repeated so that it outranks the rule above, which is !important and more specific. */
.pick-row.pick-row.pick-row.pick-row.pick-row { flex-wrap: wrap !important; }
@media (min-width: 992px) {
  :not(:has(> :not(.btn))):has(> .btn ~ .btn) { white-space: nowrap; }                    /* any other block of only buttons stays on one line on a desktop */
}
@media (max-width: 575.98px) {
  /* a phone has no room for four labelled buttons in a line: they may wrap, but evenly, two or three to a row */
  .btn-row, .btn-list, .d-flex:not(:has(> :not(.btn, .icon-btn, form))):has(> .btn ~ .btn, > .btn ~ form, > form ~ .btn, > form ~ form) { flex-wrap: wrap !important; }
  .btn-row > .btn, .btn-list > .btn { flex: 1 1 auto; }
  .row > [class*="col"]:not(:has(> :not(.btn))):has(> .btn ~ .btn) { flex-wrap: wrap; flex: 1 1 100% !important; width: 100% !important; }
}
/* login page: the feature list is compact and the page never scrolls on a desktop screen.
   Wide screens: two columns with a short description; narrower or shorter screens: one column and titles only. */
@media (min-width: 992px) {
  .auth { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .auth-side { padding: clamp(.9rem, 3.2vh, 2.5rem) 2rem; justify-content: center; overflow: hidden; }
  .auth-main { overflow: hidden; }
}
.auth-side .brand-mark { width: 2.6rem; height: 2.6rem; font-size: 1.4rem; }
.auth-side h1 { font-size: 1.55rem; margin: .5rem 0 .1rem; }
.auth-side > p { font-size: .85rem; margin-bottom: .4rem !important; }
.auth-features { display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; }
.auth-feature { margin-top: .6rem; gap: .55rem; line-height: 1.45; }
.auth-feature .ti { flex: none; font-size: 1.1rem; padding: .3rem; border-radius: .55rem; }
.auth-feature strong { font-size: .84rem; }
.auth-feature div > div { font-size: .72rem; }
.auth-trial { margin-top: 1rem; padding: .5rem .85rem; border-radius: .8rem; background: rgba(255,255,255,.16); font-weight: 600; font-size: .85rem; }
@media (min-width: 1200px) { .auth-features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1199.98px), (max-height: 760px) { .auth-feature div > div { display: none; } .auth-feature { margin-top: .45rem; align-items: center; } }
@media (max-height: 620px) { .auth-feature { margin-top: .28rem; } .auth-side h1 { font-size: 1.3rem; } .auth-trial { margin-top: .6rem; padding: .35rem .7rem; } }

/* «remember me» on the sign-in steps: one line on a normal phone / card width */
.remember-check { font-size: .8rem; }
.remember-check .form-check-label { white-space: nowrap; }
@media (max-width: 380px) { .remember-check .form-check-label { white-space: normal; } }

/* CRM board: one column per open stage, side by side, scrolling sideways on a small screen */
.crm-board { display: flex; gap: .75rem; overflow-x: auto; align-items: flex-start; padding-bottom: .5rem; }
.crm-col { flex: 0 0 17rem; max-width: 17rem; }

/* work calendar: the month grid (Saturday first), its day boxes and the little tags of what is on a day */
.cal-grid { width: 100%; table-layout: fixed; border-collapse: collapse; }
.cal-grid th { text-align: center; font-size: .8rem; font-weight: 600; padding: .45rem .2rem; color: var(--ph-text-soft); border-bottom: 1px solid var(--ph-border); }
.cal-cell { vertical-align: top; height: 7.6rem; border: 1px solid var(--ph-border); padding: .25rem .3rem; overflow: hidden; }
.cal-cell.out { opacity: .45; }
.cal-cell.off { background: rgba(224, 49, 49, .07); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--tblr-primary, #4263eb); }
.cal-num { display: flex; justify-content: space-between; font-weight: 600; font-size: .85rem; }
.cal-num a { color: inherit; text-decoration: none; }
.cal-holiday { font-size: .68rem; color: #e03131; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip { display: block; font-size: .72rem; line-height: 1.35; padding: .05rem .3rem; border-radius: .3rem; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: inherit; background: rgba(134, 142, 150, .16); }
.cal-chip.done { text-decoration: line-through; opacity: .6; }
.cal-chip.late { box-shadow: inset -2px 0 0 #e03131; }
.cal-more { font-size: .7rem; color: var(--ph-text-soft); }
.cal-k-meeting { background: rgba(66, 99, 235, .16); } .cal-k-task { background: rgba(240, 140, 0, .18); } .cal-k-reminder { background: rgba(112, 72, 232, .16); }
.cal-k-visit { background: rgba(18, 184, 134, .18); } .cal-k-trip { background: rgba(47, 158, 68, .18); } .cal-k-other { background: rgba(134, 142, 150, .2); }
.cal-tone-in { background: rgba(47, 158, 68, .16); } .cal-tone-out { background: rgba(224, 49, 49, .14); } .cal-tone-neutral { background: rgba(66, 99, 235, .1); }
.hr-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex-shrink: 0; vertical-align: middle; background: rgba(var(--tblr-primary-rgb), .12); color: var(--tblr-primary); font-weight: 700; }
.hr-avatar-sm { width: 1.9rem; height: 1.9rem; font-size: .85rem; }
.hr-avatar-md { width: 3rem; height: 3rem; font-size: 1.2rem; }
.hr-avatar-lg { width: 7rem; height: 7rem; font-size: 2.6rem; }
.org-tree { list-style: none; margin: 0; padding: 0 1.4rem 0 0; border-right: 2px solid var(--ph-border); }
.org-tree .org-tree { margin-top: .35rem; }
.org-node { position: relative; padding: .3rem 0; }
.org-node::before { content: ''; position: absolute; right: -1.4rem; top: 1.15rem; width: 1.1rem; border-top: 2px solid var(--ph-border); }
.org-card { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px solid var(--ph-border); border-radius: .6rem; }
.cal-people-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.cal-people-chips:empty { display: none; }
.cal-person { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .3rem .15rem .65rem; border-radius: 999px; background: rgba(var(--tblr-primary-rgb), .12); font-size: .85rem; }
.cal-person-x { border: 0; background: transparent; color: inherit; padding: 0 .3rem; line-height: 1; font-size: 1.1rem; cursor: pointer; opacity: .65; }
.cal-person-x:hover, .cal-person-x:focus-visible { opacity: 1; }
@media (max-width: 767.98px) { .cal-cell { height: 4.6rem; padding: .15rem; } .cal-chip { font-size: .62rem; padding: 0 .15rem; } .cal-holiday { display: none; } }
