:root {
  --ink: #18241f;
  --muted: #6d7873;
  --line: #e5e9e6;
  --paper: #f5f7f4;
  --white: #fff;
  --green: #285b48;
  --green-2: #34745c;
  --mint: #dcece4;
  --blue: #e3eaf4;
  --sand: #f1e8d6;
  --red: #b44a4a;
  --shadow: 0 8px 26px rgba(24, 36, 31, .055);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ecf3ef;
  --muted: #98a79f;
  --line: #33423b;
  --paper: #101713;
  --white: #19231e;
  --green: #76b99b;
  --green-2: #8ec8ad;
  --mint: #203b30;
  --blue: #213447;
  --sand: #3b3222;
  --red: #f08b84;
  --shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: Vazirmatn, Tahoma, ui-sans-serif, system-ui, sans-serif; font-size: 15px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -.055em; line-height: 1.1; }
h2 { margin-bottom: 8px; font-size: 1.25rem; letter-spacing: -.025em; }
.muted { color: var(--muted); line-height: 1.65; }
.eyebrow { margin-bottom: 8px; color: var(--green-2); font-size: .69rem; font-weight: 700; letter-spacing: .16em; }

.app-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 18px 18px; border-right: 1px solid var(--line); background: #f9faf8; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; font-size: 1.12rem; font-weight: 700; letter-spacing: -.03em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: .62rem; font-weight: 500; letter-spacing: .02em; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; background: var(--green); color: #fff; font-family: Vazirmatn, Tahoma, sans-serif; font-size: 1.25rem; }
.sidebar nav { margin-top: 48px; }
.workspace-switcher { margin: 0 0 12px; }
.workspace-switcher label { display:block; color:var(--muted); font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.workspace-switcher select { width:100%; margin-top:5px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink); padding:8px 9px; font:inherit; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; margin: 4px 0; padding: 0 12px; border-radius: 10px; color: #53605a; font-size: .87rem; font-weight: 600; }
.sidebar nav a:hover { background: #eef2ef; color: var(--ink); }
.sidebar nav a.active { background: var(--mint); color: var(--green); }
.nav-icon { width: 20px; text-align: center; font-size: 1.08rem; }
.nav-count { display: grid; width: 21px; height: 21px; margin-left: auto; place-items: center; border-radius: 20px; background: var(--green); color: #fff; font-size: .65rem; }
.nav-label { margin: 28px 12px 8px; color: #9ba49f; font-size: .59rem; font-weight: 700; letter-spacing: .18em; }
.sidebar-user { display: grid; grid-template-columns: 36px 1fr auto; gap: 9px; align-items: center; margin-top: auto; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user strong { display: block; overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: var(--muted); font-size: .66rem; text-transform: capitalize; }
.sidebar-profile-link, .sidebar-profile-details { text-decoration:none; }
.sidebar-profile-link { display:block; cursor:pointer; }
.sidebar-profile-link img.avatar { display:block; object-fit:cover; }
.sidebar-profile-details strong { color:var(--ink); }
.sidebar-profile-details:hover strong { color:var(--green); }
.profile-account-actions { display:grid; gap:8px; max-width:1500px; margin:18px 0 0; padding:24px 36px; }
.profile-account-actions h2, .profile-account-actions p { margin:0; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--sand); color: #725d37; font-weight: 700; text-transform: uppercase; }
.profile-card { display:grid; grid-template-columns:auto 1fr 340px; gap:28px; align-items:center; max-width:1500px; margin:0; padding:32px 36px; }
.profile-avatar, .profile-avatar img { display:grid; width:84px; height:84px; place-items:center; border-radius:50%; background:var(--sand); color:#725d37; font-size:1.7rem; font-weight:700; object-fit:cover; }
.profile-card h2 { margin-bottom:6px; font-size:1.15rem; }
.profile-card p { margin:0; color:var(--muted); font-size:.78rem; }
.profile-upload { display:grid; gap:9px; padding-left:28px; border-left:1px solid var(--line); }
.profile-upload label { display:grid; gap:6px; color:var(--muted); font-size:.72rem; font-weight:700; }
.profile-upload input[type=file] { width:100%; font:inherit; font-size:.72rem; }
.profile-upload small { color:var(--muted); font-size:.65rem; }
.workspace-members-form { display:grid; gap:8px; margin-top:12px; }
.workspace-members-form > label { display:flex; align-items:center; gap:10px; padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:var(--paper); cursor:pointer; }
.workspace-members-form > label:hover { border-color:var(--green-2); background:var(--mint); }
.workspace-members-form > label input { width:17px; height:17px; accent-color:var(--green); }
.workspace-members-form > label .avatar { width:29px; height:29px; flex:0 0 29px; font-size:.6rem; }
.workspace-members-form > label > span:last-of-type { display:grid; gap:2px; font-size:.72rem; font-weight:700; }
.workspace-members-form > label small { color:var(--muted); font-size:.62rem; font-weight:500; }
.workspace-members-form .button { margin-top:5px; justify-self:start; }
.workspace-access-card { grid-column: 2; margin-top: 20px; }
.workspace-list { max-height: 280px; overflow-y: auto; }
.workspace-access-select label { display:grid; gap:6px; color:var(--muted); font-size:.72rem; font-weight:700; }
.workspace-access-select select { width:100%; margin-bottom:12px; }
.avatar.small { width: 40px; height: 40px; }
.icon-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.main { min-width: 0; padding: 42px clamp(28px, 5vw, 68px) 70px; }
.page-head { display: flex; justify-content: space-between; align-items: end; margin: 0 auto 28px; max-width: 1500px; }
.page-head > div > p:last-child { margin-bottom: 0; color: var(--muted); }
.today-pill { min-width: 132px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-align: right; }
.today-pill span { display: block; color: var(--muted); font-size: .63rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.today-pill strong { font-family: Vazirmatn, Tahoma, sans-serif; font-size: .83rem; direction: ltr; }
.notice { max-width: 1500px; margin: 0 auto 18px; padding: 12px 15px; border-radius: 10px; font-size: .86rem; }
.notice.success { border: 1px solid #bfdbcb; background: #eaf5ef; color: #286047; }
.notice.error { border: 1px solid #edc6c2; background: #fff0ee; color: #9d3e38; }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--shadow); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, .82fr); gap: 20px; max-width: 1500px; margin: 0 auto; }
.presence-card { padding: 24px; }
.presence-top, .section-head { display: flex; justify-content: space-between; align-items: start; }
.live-badge { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 20px; background: #edf4f0; color: var(--green); font-size: .62rem; font-weight: 700; letter-spacing: .08em; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #4d9c75; box-shadow: 0 0 0 3px #d7eadf; }
.time-line { display: grid; grid-template-columns: 1fr 42px 1fr 1fr; align-items: center; margin: 20px 0 22px; padding: 17px 18px; border-radius: 12px; background: var(--paper); }
.time-line span { width: 26px; height: 1px; background: #cbd2ce; }
.time-line small, .stat small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .59rem; font-weight: 700; letter-spacing: .1em; }
.time-line strong { font-size: 1.08rem; }
.checkin-actions { display: flex; gap: 10px; margin-top: 20px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; font-size: .81rem; cursor: pointer; }
.button.primary { background: var(--green); color: #fff; }
.button.primary:hover { background: #1e4939; }
.button.secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button.dark { background: var(--ink); color: #fff; }
.button.full { width: 100%; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { min-width: 0; padding: 16px; box-shadow: none; }
.stat-icon { display: grid; width: 30px; height: 30px; margin-bottom: 18px; place-items: center; border-radius: 9px; font-size: .8rem; }
.stat-icon.mint { background: var(--mint); color: var(--green); }
.stat-icon.blue { background: var(--blue); color: #42658c; }
.stat-icon.sand { background: var(--sand); color: #806538; }
.stat strong { display: block; font-size: 1.65rem; letter-spacing: -.05em; }
.stat p { margin: 1px 0 0; color: var(--muted); font-size: .66rem; }

.calendar-card { padding: 24px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.calendar-head h2 { margin-bottom: 1px; font-size: 1.35rem; }
.calendar-head h2 span { color: var(--muted); font-weight: 500; }
.fa-month { margin: 0; color: var(--muted); font-family: Vazirmatn, Tahoma, sans-serif; font-size: .71rem; text-align: left; }
.calendar-nav { display: flex; gap: 5px; }
.calendar-nav a { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekdays span { padding-bottom: 9px; color: #949d98; font-size: .59rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.days { overflow: hidden; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; }
.day { position: relative; min-height: 67px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.day:hover { z-index: 1; background: #f4f8f5; box-shadow: inset 0 0 0 1px #9bb9aa; }
.day.blank { background: #fafbfa; }
.day-number { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; font-size: .7rem; font-weight: 600; }
.day.today .day-number { background: var(--green); color: #fff; }
.day.friday { background: #fcfaf6; }
.day.holiday small { display: block; margin-top: 4px; color: #ae7562; font-size: .5rem; line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.day .status-dot { position: absolute; right: 8px; top: 16px; }
.status-dot.office { background: #51906f; }
.status-dot.remote { background: #6584ad; }
.status-dot.leave { background: #c39c5e; }
.calendar-legend { display: flex; gap: 18px; margin-top: 15px; color: var(--muted); font-size: .6rem; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.holiday-mark { width: 7px; height: 7px; border: 1.5px solid #bc7c65; border-radius: 2px; }
.recent-card { padding: 24px; }
.section-head { margin-bottom: 14px; }
.section-head a { color: var(--green); font-size: .72rem; font-weight: 700; }
.request-list { margin: 0 -24px; }
.request-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.request-list.compact .request-row { padding-top: 11px; padding-bottom: 11px; }
.request-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; }
.request-icon.remote { background: var(--blue); color: #44688e; }
.request-icon.leave { background: var(--sand); color: #806538; }
.request-row strong { display: block; font-size: .78rem; }
.request-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.request-row p { margin: 6px 0 0; color: var(--muted); font-size: .75rem; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 20px; font-size: .56rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge.pending { background: #f6eddc; color: #87662c; }
.badge.approved { background: #e3f0e8; color: #337052; }
.badge.rejected, .badge.cancelled { background: #f5e6e4; color: #9d4a44; }
.badge.kind { background: #edf0ee; color: #68736e; }
.badge.done { background: #e3f0e8; color: #337052; }
.badge.blocked { background: #f5e6e4; color: #9d4a44; }
.empty { padding: 22px; color: var(--muted); text-align: center; font-size: .76rem; }
.empty > span { color: #9ca9a2; font-size: 1.5rem; }
.empty a { color: var(--green); font-weight: 700; }

.two-column { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(440px, 1.28fr); gap: 20px; max-width: 1500px; margin: auto; }
.form-card, .two-column > .card, .approval-card { padding: 26px; }
.stack-form { display: grid; gap: 18px; margin-top: 24px; }
label { color: #49564f; font-size: .72rem; font-weight: 700; }
label > small { float: right; color: #9aa39e; font-weight: 500; }
input, textarea, select { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #dbe0dd; border-radius: 9px; outline: none; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { border-color: #6d9b87; box-shadow: 0 0 0 3px #e2eee8; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.jalali-field { position: relative; display: block; clear: both; }
.jalali-field input { padding-right: 43px; }
.jalali-trigger { position: absolute; z-index: 2; top: 14px; right: 7px; display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--green); font-size: 1.08rem; cursor: pointer; }
.jalali-trigger:hover, .jalali-field.picker-open .jalali-trigger { background: var(--mint); }
.jalali-picker { position: absolute; z-index: 50; top: calc(100% + 7px); left: 0; width: min(320px, calc(100vw - 42px)); padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); color: var(--ink); box-shadow: 0 18px 48px rgba(24, 36, 31, .2); font-weight: 500; }
.jalali-picker[hidden] { display: none; }
.jalali-picker-head { display: grid; grid-template-columns: 32px 1fr 32px; gap: 5px; align-items: center; margin-bottom: 10px; }
.jalali-picker-head strong { text-align: center; font-size: .85rem; }
.jalali-picker-head strong span { color: var(--muted); font-weight: 500; }
.jalali-picker-head button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 1rem; cursor: pointer; }
.jalali-picker-head button:hover { background: var(--paper); }
.jalali-weekdays, .jalali-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.jalali-weekdays span { padding: 4px 0 7px; color: var(--muted); font-size: .63rem; font-weight: 700; text-align: center; }
.jalali-days button, .jalali-blank { aspect-ratio: 1; }
.jalali-days button { display: grid; min-width: 0; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: .72rem; cursor: pointer; }
.jalali-days button:hover { background: var(--paper); }
.jalali-days button.friday { color: #b86d5a; }
.jalali-days button.today { box-shadow: inset 0 0 0 1px var(--green); }
.jalali-days button.selected { background: var(--green); color: #fff; box-shadow: none; font-weight: 700; }
.jalali-today { width: 100%; margin-top: 9px; padding: 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--green); font-size: .67rem; font-weight: 700; cursor: pointer; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; padding: 0; border: 0; }
.choice-cards label { position: relative; cursor: pointer; }
.choice-cards input { position: absolute; opacity: 0; }
.choice-cards span { display: grid; grid-template-columns: 32px 1fr; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.choice-cards input:checked + span { border-color: #5c8d77; background: #f2f8f5; box-shadow: inset 0 0 0 1px #5c8d77; }
.choice-cards b { grid-row: span 2; font-size: 1rem; }
.choice-cards strong { font-size: .76rem; }
.choice-cards small { color: var(--muted); font-size: .6rem; font-weight: 500; }
.request-detail { align-items: start; }
.request-end { text-align: right; }
.text-button { margin-top: 7px; border: 0; background: none; color: var(--muted); font-size: .64rem; cursor: pointer; text-decoration: underline; }
.admin-note { padding: 6px 8px; border-radius: 6px; background: var(--paper); color: #46534d !important; }
.users-layout > .card { align-self: start; }
.user-list { margin: 0 -26px -10px; }
.user-row { display: grid; grid-template-columns: 40px 1fr auto 58px; gap: 12px; align-items: center; padding: 14px 26px; border-top: 1px solid var(--line); }
.user-row strong { display: block; font-size: .8rem; }
.user-row small { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.user-row.inactive { background: var(--paper); }
.user-row.inactive .avatar, .user-row.inactive > div:nth-child(2) { opacity: .55; }
.user-badges { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.badge.locked { background: #f5e6e4; color: #9d4a44; }
.account-status-form { text-align: right; }
.account-status-form .text-button, .current-account { font-size: .6rem; font-weight: 700; }
.account-status-form .lock-account { color: var(--red); }
.account-status-form .unlock-account { color: var(--green); }
.account-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.account-manage { position:relative; }
.account-manage > summary { cursor:pointer; list-style:none; font-size:.6rem; font-weight:700; }
.account-manage > summary::-webkit-details-marker { display:none; }
.account-manage[open] > summary { color:var(--green); }
.account-manage > form { position:absolute; z-index:5; right:0; top:calc(100% + 6px); display:grid; gap:8px; width:210px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--white); box-shadow:var(--shadow); }
.account-manage .account-password-form { grid-template-columns:1fr; }
.account-manage label { display:grid; gap:4px; color:var(--muted); font-size:.6rem; font-weight:700; }
.account-manage input { width:100%; box-sizing:border-box; padding:7px 8px; font:inherit; font-size:.68rem; }
.account-manage .account-delete-form { top:calc(100% + 180px); }
.account-manage .delete-account { color:var(--red); }
.current-account { text-align: right; }

.filter-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.filter-tabs a { padding: 7px 11px; border-radius: 7px; color: var(--muted); font-size: .68rem; font-weight: 600; }
.filter-tabs a.active { background: var(--ink); color: #fff; }
.approval-card { max-width: 1500px; margin: auto; }
.approval-row { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.approval-row:last-child { border-bottom: 0; }
.approval-title { display: flex; gap: 7px; align-items: center; }
.approval-main > p { margin: 5px 0; color: var(--muted); font-size: .73rem; }
blockquote { margin: 10px 0; padding-left: 12px; border-left: 2px solid #d8dfdb; color: #53605a; font-size: .78rem; }
.review-form { display: grid; grid-template-columns: 1fr auto auto; gap: 7px; margin-top: 13px; }
.review-form input { margin: 0; }
.button.approve { background: var(--green); color: #fff; }
.button.reject { border-color: #e6c6c3; background: #fff; color: var(--red); }
.empty.roomy { padding: 70px; }
.empty.roomy h3 { margin: 8px 0 5px; color: var(--ink); }

.report-card { display: grid; grid-template-columns: 75px 1fr; gap: 20px; max-width: 850px; margin: auto; padding: 32px; }
.report-illustration { display: grid; width: 66px; height: 66px; place-items: center; border-radius: 18px; background: var(--mint); color: var(--green); font-size: 1.7rem; }
.report-form { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding-top: 20px; border-top: 1px solid var(--line); }
.secondary-report { margin-top: 20px; }
.report-page-head { align-items: center; }
.report-range-filter { display: grid; grid-template-columns: 145px 145px auto; gap: 9px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.report-range-filter input { margin-top: 4px; padding-top: 8px; padding-bottom: 8px; }
.report-range-filter .button { min-height: 39px; }
.accumulated-report { max-width: 1500px; margin: 0 auto 20px; overflow: hidden; }
.accumulated-head { display: flex; justify-content: space-between; align-items: center; padding: 25px 28px 20px; }
.accumulated-head h2 { margin-bottom: 3px; }
.accumulated-head p:last-child { margin: 0; color: var(--muted); font-size: .7rem; }
.accumulated-totals { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 28px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.accumulated-totals > div { display: grid; grid-template-columns: 31px 1fr; column-gap: 8px; align-items: center; min-width: 0; padding: 13px 12px; border-right: 1px solid var(--line); }
.accumulated-totals > div:last-child { border-right: 0; }
.accumulated-totals .stat-icon { grid-row: span 2; margin: 0; }
.accumulated-totals small { overflow: hidden; color: var(--muted); font-size: .53rem; font-weight: 700; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.accumulated-totals strong { font-size: 1.25rem; line-height: 1; }
.blocked-icon { background: #f5e6e4; color: #a34d47; }
.pending-icon { background: #f6eddc; color: #87662c; }
.summary-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.summary-table { width: 100%; border-collapse: collapse; font-size: .73rem; }
.summary-table th { padding: 11px 15px; background: #f8faf8; color: var(--muted); font-size: .56rem; font-weight: 700; letter-spacing: .07em; text-align: center; text-transform: uppercase; white-space: nowrap; }
.summary-table th:first-child, .summary-table td:first-child { padding-left: 28px; text-align: left; }
.summary-table td { padding: 13px 15px; border-top: 1px solid var(--line); text-align: center; }
.summary-person { display: inline-flex; align-items: center; gap: 10px; min-width: 185px; text-align: left; }
.summary-person .avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.summary-person img.avatar { display: block; object-fit: cover; }
.summary-person strong { display: block; font-size: .74rem; }
.summary-person small { display: block; margin-top: 2px; color: var(--muted); font-size: .6rem; }
.metric { display: inline-grid; min-width: 25px; height: 25px; place-items: center; border-radius: 7px; font-weight: 700; }
.metric.done { background: #e3f0e8; color: #337052; }
.metric.blocked { background: #f5e6e4; color: #9d4a44; }
.metric.pending { background: #f6eddc; color: #87662c; }
.report-export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1500px; margin: auto; }
.report-export-grid .report-card { grid-template-columns: 60px 1fr; max-width: none; margin: 0; padding: 25px; }
.report-export-grid .secondary-report { margin-top: 0; }
.report-export-grid .report-illustration { width: 55px; height: 55px; border-radius: 15px; }
.report-export-grid .report-form { grid-template-columns: 1fr 1fr; }
.report-export-grid .report-form .button { grid-column: 1 / -1; }

.board-page-head { position: relative; align-items: center; max-width: 1500px; }
.board-head-actions .button > i { margin-right: 7px; }
.board-head-actions { display: flex; gap: 8px; align-items: center; }
.new-task-panel { position: relative; }
.new-task-panel > summary { list-style: none; user-select: none; }
.new-task-panel > summary::-webkit-details-marker { display: none; }
.new-task-panel[open] > summary { background: var(--ink); }
.new-task-form { position: absolute; z-index: 60; top: calc(100% + 9px); right: 0; display: grid; gap: 14px; width: min(430px, calc(100vw - 40px)); max-height: calc(100vh - 110px); padding: 22px; overflow-y: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 22px 60px rgba(24, 36, 31, .22); }
.new-task-form-head h2 { margin-bottom: 0; }
.tag-manager-panel { position: relative; }
.tag-manager-panel > summary { list-style: none; user-select: none; }
.tag-manager-panel > summary::-webkit-details-marker { display: none; }
.tag-manager { position: absolute; z-index: 61; top: calc(100% + 9px); right: 0; width: min(440px, calc(100vw - 40px)); padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: 0 22px 60px rgba(24, 36, 31, .22); }
.tag-manager h2 { margin-bottom: 3px; }
.tag-manager > div:first-child > p:last-child { color: var(--muted); font-size: .7rem; }
.tag-create-form { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: end; margin-top: 18px; }
.tag-create-form input, .tag-create-form select { margin-top: 5px; padding-top: 9px; padding-bottom: 9px; }
.tag-create-form .button { min-height: 39px; }
.tag-manager-list { display: grid; gap: 6px; max-height: 240px; margin-top: 18px; overflow-y: auto; }
.tag-manager-list > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.tag-manager-list > p { margin: 0; padding: 18px; color: var(--muted); font-size: .7rem; text-align: center; }
.tag-delete { position: relative; color: var(--muted); font-size: .6rem; }
.tag-delete > summary { cursor: pointer; list-style: none; text-decoration: underline; }
.tag-delete > summary::-webkit-details-marker { display: none; }
.tag-delete[open] > summary { visibility: hidden; }
.tag-delete form { position: absolute; right: 0; bottom: -1px; }
.tag-delete .text-button { color: var(--red); font-weight: 700; }
.board-tag { display: inline-flex; align-items: center; max-width: 100%; min-height: 21px; padding: 3px 8px; border-radius: 6px; color: #fff; font-size: .55rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.board-tag.green { background: #3f8966; }
.board-tag.blue { background: #4e7eae; }
.board-tag.red { background: #b65b53; }
.board-tag.amber { background: #a77931; }
.board-tag.purple { background: #7a62a4; }
.board-tag.slate { background: #65736c; }
.card-tag-picker { margin: 0; padding: 0; border: 0; }
.card-tag-picker legend { width: 100%; margin-bottom: 8px; color: #49564f; font-size: .72rem; font-weight: 700; }
.card-tag-picker legend small { float: right; color: #9aa39e; font-weight: 500; }
.card-tag-picker > .tag-options, .card-tag-editor form > div { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tag-picker label, .card-tag-editor label { position: relative; cursor: pointer; }
.card-tag-picker .tag-options input, .card-tag-editor input { position: absolute; opacity: 0; pointer-events: none; }
.card-tag-picker .tag-options input:not(:checked) + .board-tag, .card-tag-editor input:not(:checked) + .board-tag { opacity: .38; filter: saturate(.45); }
.card-tag-picker .tag-options input:focus-visible + .board-tag, .card-tag-editor input:focus-visible + .board-tag { outline: 2px solid var(--ink); outline-offset: 2px; }
.tag-picker-empty { margin: 0; padding: 10px 12px; border: 1px dashed #bdc6c1; border-radius: 9px; background: var(--paper); color: var(--muted); font-size: .66rem; line-height: 1.5; }
.inline-tag-creator { margin-top: 9px; padding: 9px 11px; border: 1px dashed var(--line); border-radius: 9px; background: var(--paper); }
.inline-tag-creator > summary { color: var(--green); font-size: .66rem; font-weight: 700; cursor: pointer; list-style: none; }
.inline-tag-creator > summary::-webkit-details-marker { display: none; }
.inline-tag-fields { display: grid; grid-template-columns: 1fr 105px; gap: 8px; margin-top: 10px; }
.inline-tag-fields input, .inline-tag-fields select { margin-top: 5px; padding-top: 9px; padding-bottom: 9px; background: var(--white); }
.inline-tag-creator > small { display: block; margin-top: 7px; color: var(--muted); font-size: .57rem; }
.assignee-picker, .compact-assignee-picker { margin: 0; padding: 0; border: 0; }
.assignee-picker legend, .compact-assignee-picker legend { width: 100%; margin-bottom: 8px; color: #49564f; font-size: .72rem; font-weight: 700; }
.assignee-picker legend small { float: right; color: #9aa39e; font-weight: 500; }
.assignee-picker > div, .compact-assignee-picker > div { display: flex; flex-wrap: wrap; gap: 6px; }
.assignee-picker label, .compact-assignee-picker label { position: relative; cursor: pointer; }
.assignee-picker input, .compact-assignee-picker input { position: absolute; opacity: 0; pointer-events: none; }
.assignee-picker label > span, .compact-assignee-picker label > span { display: inline-flex; gap: 6px; align-items: center; min-height: 31px; padding: 4px 9px 4px 5px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--muted); font-size: .59rem; font-weight: 700; }
.assignee-picker label > span .avatar, .compact-assignee-picker label > span .avatar { width: 21px; height: 21px; font-size: .5rem; }
.assignee-picker input:checked + span, .compact-assignee-picker input:checked + span { border-color: #5f8f78; background: #edf6f1; color: var(--green-2); box-shadow: inset 0 0 0 1px #5f8f78; }
.assignee-picker input:focus-visible + span, .compact-assignee-picker input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.board-filter-menu { position: relative; }
.board-filter-menu > summary { list-style: none; user-select: none; }
.board-filter-menu > summary::-webkit-details-marker { display: none; }
.board-filter-menu > summary span { display: inline-grid; min-width: 20px; height: 20px; margin-left: 4px; place-items: center; border-radius: 20px; background: var(--green); color: #fff; font-size: .53rem; }
.board-filter-menu[open] > summary { border-color: var(--green); background: var(--mint); color: var(--green-2); }
.board-filter-popover { position: absolute; z-index: 62; top: calc(100% + 9px); right: 0; width: min(330px, calc(100vw - 40px)); padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 22px 60px rgba(24, 36, 31, .22); }
.board-filter-popover > header { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 12px; }
.board-filter-popover h2 { margin: 0; font-size: 1.05rem; }
.board-filter-popover > header a { color: var(--green); font-size: .61rem; font-weight: 700; }
.board-filter-popover ul { margin: 0 0 13px; padding: 0; border: 1px solid var(--line); border-radius: 10px; list-style: none; overflow: hidden; }
.board-filter-popover li { padding: 11px 12px; border-bottom: 1px solid var(--line); }
.board-filter-popover li:last-child { border-bottom: 0; }
.board-filter-popover label > span { display: block; color: var(--muted); font-size: .57rem; }
.board-filter-popover select { min-height: 35px; margin-top: 5px; padding: 7px 29px 7px 9px; border: 0; background-color: var(--paper); font-size: .62rem; }
.board-filter-popover .button { min-height: 37px; font-size: .62rem; }
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; max-width: 1500px; margin: 0 auto; padding-bottom: 18px; }
.kanban-column { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #eef2ef; }
.kanban-column-head { display: flex; justify-content: space-between; align-items: start; min-height: 51px; padding: 4px 5px 12px; }
.kanban-column-head > div { display: grid; grid-template-columns: 9px 1fr; column-gap: 8px; align-items: center; }
.column-dot { width: 8px; height: 8px; border-radius: 50%; background: #87938d; }
.kanban-column.in_progress .column-dot { background: #6689b2; }
.kanban-column.blocked .column-dot { background: #c2655c; }
.kanban-column.done .column-dot { background: #4d9870; }
.kanban-column-head strong { font-size: .79rem; }
.kanban-column-head small { grid-column: 2; margin-top: 2px; color: var(--muted); font-size: .58rem; }
.kanban-column-head > b { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 20px; background: var(--white); color: var(--muted); font-size: .62rem; }
.kanban-cards { display: grid; gap: 9px; min-height: 100px; border-radius: 11px; transition: background .16s ease, box-shadow .16s ease; }
.kanban-cards.drag-over { background: rgba(70, 126, 100, .1); box-shadow: inset 0 0 0 2px #6c9c85; }
.kanban-card { position: relative; padding: 13px 14px; border: 1px solid #dfe4e1; border-radius: 11px; background: var(--white); box-shadow: 0 3px 10px rgba(24, 36, 31, .045); cursor: grab; transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease; }
.kanban-card:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(24, 36, 31, .09); }
.kanban-card.dragging { opacity: .45; transform: rotate(1.5deg); }
.kanban-card.moving { opacity: .35; pointer-events: none; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-topline { display: flex; justify-content: space-between; gap: 8px; align-items: start; min-height: 21px; margin-bottom: 7px; }
.card-signals { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.task-due { display: inline-flex; min-height: 21px; box-sizing: border-box; align-items: center; justify-content: center; padding: 3px 7px; border-radius: 6px; background: var(--sand); color: #786039; font-size: .53rem; font-weight: 700; line-height: 1; text-align: center; }
.todo-progress { padding: 3px 5px; border-radius: 6px; background: var(--mint); color: var(--green-2); font-size: .53rem; font-weight: 800; }
.importance-emoji { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 6px; background: var(--paper); font-size: .66rem; line-height: 1; }
.importance-emoji i { font-size: .68rem; }
.importance-emoji { background: transparent; }
.importance-low { color: #8b8b8b; background: #f1f1f1; }
.importance-normal { color: #4f7cff; background: #e7edff; }
.importance-high { color: #f59e0b; background: #fff3dc; }
.importance-urgent { color: #ef4444; background: #fde8e7; }
.kanban-card h3 { margin: 0 0 6px; font-size: .84rem; line-height: 1.3; }
.kanban-card > p { display: -webkit-box; overflow: hidden; margin: 0 0 10px; color: #64706a; font-size: .68rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.task-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-top: 9px; padding-right: 27px; }
.task-assignees { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; }
.task-assignee { display: flex; min-width: 0; gap: 6px; align-items: center; color: #53605a; font-size: .61rem; font-weight: 700; }
.task-assignee i { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; background: var(--blue); color: #4d6e94; font-size: .59rem; font-style: normal; }
.task-assignee i.avatar { width: 24px; height: 24px; }
.task-assignee img.avatar { display:block; width:24px; height:24px; object-fit:cover; }
.task-assignees { display:flex; align-items:center; gap:4px; }
.task-assignee { display:inline-flex; }
.task-actions .icon-button { width:30px; height:30px; padding:0; border:0; border-radius:9px; background:var(--paper); color:var(--green); font-size:.9rem; }
.task-actions .icon-button:hover { background:var(--mint); }
.task-actions .icon-button.danger { color:#a34d47; }
.task-actions .icon-button > i { font-size:.88rem; line-height:1; }
.task-remove > summary.icon-button { display:grid; place-items:center; cursor:pointer; list-style:none; }
.task-remove > summary.icon-button::-webkit-details-marker { display:none; }
.task-assignee span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-assignee.unassigned { color: var(--muted); font-weight: 500; }
.task-creator { overflow: hidden; color: #9aa39e; font-size: .54rem; text-overflow: ellipsis; white-space: nowrap; }
.card-controls { position: static; }
.card-controls > summary { position: absolute; right: 10px; bottom: 10px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--muted); font-size: .95rem; font-weight: 800; line-height: 1; cursor: pointer; list-style: none; }
.card-controls > summary:hover, .card-controls[open] > summary { background: var(--paper); color: var(--ink); }
.card-controls > summary::-webkit-details-marker { display: none; }
.card-controls > summary i { display: block; font-size: 1.05rem; font-style: normal; line-height: 1; transition: transform .15s ease; }
.card-controls[open] > summary i { transform: rotate(180deg); }
.card-controls-body { display: flex; width: 100%; flex-wrap: wrap; gap: 10px; align-items: flex-start; align-content: flex-start; margin-top: 9px; padding: 11px 0 1px; border-top: 1px solid var(--line); }
.card-tag-editor, .card-detail-editor, .card-todo-editor { position: relative; }
.card-tag-editor > summary, .card-detail-editor > summary, .card-todo-editor > summary { width: max-content; color: var(--muted); font-size: .56rem; font-weight: 700; cursor: pointer; list-style: none; text-decoration: underline; }
.card-tag-editor > summary::-webkit-details-marker, .card-detail-editor > summary::-webkit-details-marker, .card-todo-editor > summary::-webkit-details-marker { display: none; }
.card-todo-editor > summary span { color: var(--green); }
.card-tag-editor form, .card-detail-editor form { position: absolute; z-index: 8; top: calc(100% + 5px); left: -7px; width: 250px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); box-shadow: 0 12px 28px rgba(24, 36, 31, .2); }
.card-tag-editor form .button, .card-detail-editor form .button { min-height: 31px; margin-top: 10px; font-size: .62rem; }
.card-detail-editor form { display: grid; gap: 10px; width: 270px; }
.compact-assignee-picker > div { max-height: 120px; overflow-y: auto; }
.card-detail-editor select { margin-top: 5px; padding-top: 7px; padding-bottom: 7px; }
.card-todo-editor[open] { width: 100%; }
.todo-list { display: grid; gap: 5px; max-height: 154px; margin: 8px 0; overflow-y: auto; }
.todo-item { display: flex; gap: 6px; align-items: center; padding: 5px 6px; border-radius: 7px; background: var(--paper); }
.todo-item > form:first-child { min-width: 0; flex: 1; }
.todo-item label { display: flex; min-width: 0; gap: 6px; align-items: center; color: var(--ink); font-size: .6rem; cursor: pointer; }
.todo-item input { width: 14px; height: 14px; margin: 0; accent-color: var(--green); }
.todo-item label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.completed label span { color: var(--muted); text-decoration: line-through; }
.todo-item .text-button { padding: 0 2px; color: var(--muted); font-size: .9rem; line-height: 1; }
.todo-empty { margin: 8px 0; color: var(--muted); font-size: .58rem; }
.todo-add-form { display: flex; gap: 6px; }
.todo-add-form input { min-width: 0; margin: 0; padding: 7px 8px; font-size: .6rem; }
.todo-add-form .button { min-height: 31px; padding: 5px 9px; font-size: .58rem; }
.task-actions { display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; align-items: center; gap: 9px; padding-right: 31px; }
.task-actions > form:first-child { display: flex; height: 30px; gap: 4px; align-items: center; }
.task-actions select { width: 118px; min-width: 118px; height: 30px; margin: 0; padding: 5px 25px 5px 9px; border: 0; border-radius: 9px; background-color: var(--paper); font-size: .58rem; font-weight: 700; }
.task-actions .text-button { margin: 0; }
.task-move-button { display: none; }
.task-actions form:focus-within .task-move-button { display: inline-block; }
.task-lifecycle-actions { display: flex; height: 30px; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-end; margin-left: auto; }
.task-lifecycle-actions form, .task-remove { height: 30px; }
.task-lifecycle-actions > form { display: flex; }
.archive-task { color: var(--green); font-weight: 700; }
.task-remove { position: relative; color: var(--muted); font-size: .58rem; }
.task-remove > summary { cursor: pointer; list-style: none; text-decoration: underline; }
.task-remove > summary::-webkit-details-marker { display: none; }
.task-remove[open] > summary { display: none; }
.task-remove form { position: static; display: flex; width: max-content; }
.task-remove form .text-button { color: var(--red); font-weight: 700; }
.kanban-empty { display: grid; min-height: 74px; place-items: center; border: 1px dashed #b8c2bd; border-radius: 10px; color: var(--muted); font-size: .62rem; }
.archived-cards-panel { max-width: 1380px; margin: 10px auto 0; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.archived-cards-panel > summary { padding: 14px 17px; color: var(--muted); font-size: .7rem; font-weight: 700; cursor: pointer; list-style: none; }
.archived-cards-panel > summary::-webkit-details-marker { display: none; }
.archived-cards-panel > summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s ease; }
.archived-cards-panel[open] > summary::before { transform: rotate(90deg); }
.archived-cards-panel > summary span { display: inline-grid; min-width: 22px; height: 22px; margin-left: 6px; place-items: center; border-radius: 20px; background: var(--paper); font-size: .58rem; }
.archived-card-list { border-top: 1px solid var(--line); }
.archived-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.archived-card:last-child { border-bottom: 0; }
.archived-card h3 { margin: 4px 0 2px; font-size: .76rem; }
.archived-status { color: var(--muted); font-size: .56rem; font-weight: 700; text-transform: capitalize; }
.archived-card small { color: var(--muted); font-size: .58rem; }
.archived-card .card-tags { margin-bottom: 6px; }
.archived-card-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.archived-card-actions .button { min-height: 34px; padding: 7px 12px; font-size: .61rem; }
.archived-page-card { max-width: 1500px; margin: 0 auto; overflow: hidden; }
.archived-page-card > .section-head { padding: 26px 28px 22px; }
.archived-page-card .archived-card { padding-left:28px; padding-right:28px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.archived-delete { position: relative; }
.archived-delete > summary { color: var(--red); font-size: .6rem; font-weight: 700; cursor: pointer; list-style: none; }
.archived-delete > summary::-webkit-details-marker { display: none; }
.archived-delete[open] > summary { display: none; }
.archived-delete form { position: static; display: flex; width: max-content; }
.archived-delete form .text-button { color: var(--red); font-weight: 700; }

.updates-layout { grid-template-columns: minmax(390px, .8fr) minmax(460px, 1.2fr); }
.update-form-card { align-self: start; }
.update-status-choices { grid-template-columns: repeat(3, 1fr); }
.update-status-choices span { grid-template-columns: 24px 1fr; padding: 11px 9px; }
.update-status-choices b { font-size: .86rem; }
.update-status-choices small { line-height: 1.3; }
.update-status-choices label:nth-child(1) input:checked + span { border-color: #5c8d77; background: #f2f8f5; box-shadow: inset 0 0 0 1px #5c8d77; }
.update-status-choices label:nth-child(2) input:checked + span { border-color: #b66b64; background: #fff5f3; box-shadow: inset 0 0 0 1px #b66b64; }
.update-status-choices label:nth-child(3) input:checked + span { border-color: #b08a4d; background: #fffaf0; box-shadow: inset 0 0 0 1px #b08a4d; }
.update-feed-card { align-self: start; padding: 26px; }
.feed-count { color: var(--muted); font-size: .68rem; }
.update-feed { margin: 0 -26px -12px; }
.update-entry { position: relative; padding: 20px 26px; border-top: 1px solid var(--line); }
.update-author { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; }
.update-author .avatar { width: 38px; height: 38px; }
.update-author img.avatar { display: block; object-fit: cover; }
.update-author strong { display: block; font-size: .79rem; }
.update-author small { display: block; margin-top: 2px; color: var(--muted); font-size: .63rem; }
.update-period { margin: 13px 0 7px; color: var(--green-2); font-size: .68rem; font-weight: 700; }
.update-note { margin: 0; color: #46534d; font-size: .78rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.update-delete { text-align: right; }

.day-page-head { align-items: center; }
.day-view-controls { display: flex; gap: 9px; align-items: end; }
.view-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: var(--shadow); }
.view-switch a { display: grid; min-width: 52px; height: 37px; place-items: center; border-radius: 8px; color: var(--muted); font-size: .69rem; font-weight: 700; }
.view-switch a.active { background: var(--ink); color: var(--white); }
.day-date-form { display: grid; grid-template-columns: 190px auto; gap: 9px; align-items: end; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: var(--shadow); }
.day-date-form input { margin-top: 4px; padding-top: 8px; padding-bottom: 8px; }
.day-date-form .jalali-trigger { top: 10px; }
.day-date-form .button { min-height: 39px; }
.day-layout { display: grid; gap: 20px; max-width: 1500px; margin: 0 auto; }
.day-summary-card { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.15fr); align-items: center; padding: 24px 28px; }
.day-date-nav { display: grid; grid-template-columns: 37px 1fr 37px; gap: 14px; align-items: center; }
.day-date-nav > a { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); font-size: 1.2rem; }
.day-date-nav > a:hover { background: var(--paper); }
.day-date-nav h2 { margin-bottom: 2px; font-size: 1.4rem; }
.day-date-nav div > span { color: var(--muted); font-size: .69rem; }
.day-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); }
.day-stats > div { display: grid; grid-template-columns: 13px 1fr; gap: 9px; align-items: center; padding: 8px 22px; border-right: 1px solid var(--line); }
.day-stats > div:last-child { border-right: 0; }
.day-stats strong { display: block; font-size: 1.5rem; line-height: 1; }
.day-stats small { color: var(--muted); font-size: .65rem; }
.presence-mark { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.presence-mark.present { background: #4d9870; box-shadow: 0 0 0 3px #dcece4; }
.presence-mark.remote { background: #6689b2; box-shadow: 0 0 0 3px #e3eaf4; }
.presence-mark.absent { background: #c2655c; box-shadow: 0 0 0 3px #f3dfdc; }
.roster-card { padding: 25px 28px; }
.roster-card .section-head { align-items: center; margin-bottom: 8px; }
.roster-legend { display: flex; gap: 15px; color: var(--muted); font-size: .62rem; }
.roster-legend span { display: flex; gap: 6px; align-items: center; }
.roster-list { margin: 0 -28px -10px; }
.roster-row { display: grid; grid-template-columns: 42px minmax(150px, .8fr) minmax(200px, 1.2fr) 92px; gap: 14px; align-items: center; min-height: 72px; padding: 13px 28px; border-top: 1px solid var(--line); }
.roster-row:hover { background: #fafcfa; }
.roster-row img.avatar { display: block; object-fit: cover; }
.roster-person strong { display: block; font-size: .82rem; }
.roster-person small, .roster-detail small { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; }
.roster-detail > span { color: #53605a; font-size: .75rem; }
.presence-badge { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-width: 86px; padding: 7px 9px; border-radius: 20px; font-size: .62rem; font-weight: 700; }
.presence-badge.present { background: #e7f2eb; color: #347052; }
.presence-badge.remote { background: #e9eff7; color: #4c6e96; }
.presence-badge.absent { background: #f8e9e7; color: #a34d47; }

.week-layout { display: flex; flex-direction: column; max-width: 1380px; min-height: calc(100vh - 220px); margin: 0 auto; }
.week-calendar { display: flex; flex: 1; flex-direction: column; overflow: hidden; }
.week-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 80px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.week-navigation { display: grid; grid-template-columns: 35px auto 35px; gap: 12px; align-items: center; }
.week-navigation > a { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-size: 1.2rem; }
.week-navigation > a:hover { background: var(--paper); }
.week-navigation h2 { margin: 0; font-size: 1rem; }
.week-navigation .eyebrow { margin-bottom: 3px; font-size: .56rem; }
.week-totals { display: flex; gap: 15px; color: var(--muted); font-size: .62rem; }
.week-totals span { display: flex; gap: 6px; align-items: center; }
.week-totals strong { color: var(--ink); font-size: .78rem; }
.week-grid { display: grid; flex: 1; min-height: 0; grid-template-columns: repeat(7, minmax(190px, 1fr)); overflow-x: auto; background: var(--line); gap: 1px; scrollbar-width: thin; }
.week-day-column { min-width: 190px; min-height: 480px; background: var(--white); }
.week-day-column.friday { background: #fcfaf6; }
.week-day-column.today { box-shadow: inset 0 3px 0 var(--green); }
.week-day-head { display: block; min-height: 92px; padding: 13px 12px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.week-day-head:hover { background: var(--paper); }
.week-day-head > span { display: block; color: var(--muted); font-size: .56rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.week-day-head > strong { display: block; margin-top: 7px; font-size: .82rem; }
.week-day-head > small { display: block; overflow: hidden; margin-top: 3px; color: #929c97; font-size: .53rem; text-overflow: ellipsis; white-space: nowrap; }
.week-day-column.today .week-day-head > strong { color: var(--green); }
.week-day-counts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 9px; border-radius: 8px; background: var(--paper); text-align: center; }
.week-day-counts span { padding: 5px 2px; font-size: .58rem; font-weight: 700; }
.week-day-counts .present { color: #347052; }
.week-day-counts .remote { color: #4c6e96; }
.week-day-counts .absent { color: #a34d47; }
.week-records { display: grid; gap: 6px; padding: 0 8px 12px; }
.week-record { position: relative; overflow: hidden; padding: 9px; border: 1px solid transparent; border-radius: 8px; }
.week-record.present { border-color: #b9d9c7; background: #e9f4ed; }
.week-record.remote { border-color: #c1d2e6; background: #eaf1f8; }
.week-record.absent { border-color: #e5c1bd; background: #f9eae8; }
.week-record-person { display: grid; grid-template-columns: 27px 1fr; gap: 7px; align-items: center; min-width: 0; }
.week-record-person .avatar { width: 27px; height: 27px; font-size: .59rem; }
.week-record-person img.avatar { display: block; object-fit: cover; }
.week-record-person strong { display: block; overflow: hidden; color: #25322c; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.week-record-person small { display: block; overflow: hidden; margin-top: 2px; color: #69756f; font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
.week-record-status { display: flex; gap: 5px; align-items: center; margin: 7px 0 0 34px; color: #5d6963; font-size: .51rem; font-weight: 700; text-transform: uppercase; }
.week-record-status .presence-mark { width: 6px; height: 6px; box-shadow: none; }

.login-page { display: grid; grid-template-columns: 1.06fr .94fr; min-height: 100vh; }
.login-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 46px clamp(38px, 6vw, 85px); background: var(--green); color: #fff; }
.login-story::before { position: absolute; right: -150px; bottom: -170px; width: 580px; height: 580px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018); content: ""; }
.brand.light { position: relative; padding: 0; }
.brand.light .brand-mark { background: #fff; color: var(--green); }
.brand.light small { color: #b7cec4; }
.story-copy { position: relative; max-width: 580px; margin: auto 0 12vh; }
.story-copy .eyebrow { color: #9fc4b4; }
.story-copy h1 { margin-bottom: 24px; font-size: clamp(3rem, 5.5vw, 5rem); letter-spacing: -.06em; line-height: .98; }
.story-copy > p:last-child { max-width: 520px; color: #c7d9d1; font-size: 1.05rem; line-height: 1.7; }
.story-calendar { position: absolute; right: 9%; bottom: 7%; display: flex; gap: 65px; align-items: end; min-width: 270px; padding: 20px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.08); backdrop-filter: blur(6px); transform: rotate(-2deg); }
.story-calendar small, .story-calendar span { display: block; color: #afc9be; font-family: Vazirmatn, Tahoma, sans-serif; font-size: .66rem; }
.story-calendar strong { display: block; margin: 2px 0; font-family: Vazirmatn, Tahoma, sans-serif; font-size: 1.3rem; }
.people-dots { display: flex; align-items: center; }
.people-dots i, .people-dots b { display: grid; width: 28px; height: 28px; margin-left: -7px; place-items: center; border: 2px solid var(--green); border-radius: 50%; background: #d4a88b; }
.people-dots i:nth-child(2) { background: #9dc2ae; }
.people-dots i:nth-child(3) { background: #b6a6cf; }
.people-dots b { background: #fff; color: var(--green); font-size: .55rem; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; background: #fbfcfa; }
.login-card { width: min(100%, 395px); }
.login-card h2 { margin-bottom: 5px; font-size: 1.75rem; letter-spacing: -.045em; }
.login-card label { display: block; margin-top: 18px; }
.login-card .button.primary { margin-top: 22px; }
.separator { display: flex; align-items: center; gap: 12px; margin: 23px 0 14px; color: #9aa29e; font-size: .64rem; }
.separator::before, .separator::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.oauth-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.login-hint { margin-top: 25px; color: var(--muted); font-size: .68rem; text-align: center; }
.login-hint code { padding: 2px 4px; border-radius: 4px; background: #edf0ee; }
.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: .75rem; text-align: center; }
.auth-switch a { color: var(--green); font-weight: 700; }
.register-wrap { padding-top: 25px; padding-bottom: 25px; }
.register-card { width: min(100%, 500px); }
.register-card .form-row { margin-top: 17px; }
.register-card .form-row label { margin-top: 0; }
.register-card > label { display: block; margin-top: 17px; }
.register-card .button.primary { margin-top: 20px; }
.field-help { margin: 6px 0 0; color: #929b96; font-size: .64rem; }
.mobile-brand { display: none; }

.sidebar-theme { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 10px 9px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.sidebar-user { margin-top: 0; }
.theme-toggle { position: relative; display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.theme-toggle span { position: absolute; transition: opacity .18s ease, transform .22s ease; }
.theme-sun { opacity: 0; transform: translateY(18px) rotate(30deg); }
.theme-moon { opacity: 1; transform: translateY(0); }
html[data-theme="dark"] .theme-sun { opacity: 1; transform: translateY(0) rotate(0); }
html[data-theme="dark"] .theme-moon { opacity: 0; transform: translateY(-18px); }
.auth-theme { position: fixed; z-index: 10; top: 24px; right: 24px; }

html[data-theme="dark"] .sidebar { background: #141d18; }
html[data-theme="dark"] .sidebar nav a:hover { background: #202c26; }
html[data-theme="dark"] .day,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .calendar-nav a,
html[data-theme="dark"] .today-pill,
html[data-theme="dark"] .filter-tabs { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .day.blank { background: #131b17; }
html[data-theme="dark"] .day.friday { background: #201f19; }
html[data-theme="dark"] .login-form-wrap { background: var(--paper); }
html[data-theme="dark"] .login-story { background: #173a2d; }
html[data-theme="dark"] .time-line,
html[data-theme="dark"] .admin-note { background: #121a16; }
html[data-theme="dark"] .login-hint code { background: #26322c; }
html[data-theme="dark"] .jalali-picker { box-shadow: 0 18px 52px rgba(0, 0, 0, .48); }
html[data-theme="dark"] .jalali-picker-head button { background: var(--white); color: var(--ink); }
html[data-theme="dark"] .jalali-days button:hover,
html[data-theme="dark"] .jalali-picker-head button:hover { background: #26342d; }
html[data-theme="dark"] .day:hover,
html[data-theme="dark"] .roster-row:hover { background: #202c26; }
html[data-theme="dark"] .roster-detail > span { color: #b4c0ba; }
html[data-theme="dark"] .presence-mark.present { box-shadow: 0 0 0 3px #274535; }
html[data-theme="dark"] .presence-mark.remote { box-shadow: 0 0 0 3px #293b50; }
html[data-theme="dark"] .presence-mark.absent { box-shadow: 0 0 0 3px #4a2c2a; }
html[data-theme="dark"] .presence-badge.present { background: #1d3b2c; color: #8fd0ae; }
html[data-theme="dark"] .presence-badge.remote { background: #26394d; color: #9ab8dc; }
html[data-theme="dark"] .presence-badge.absent { background: #432725; color: #efa09a; }
html[data-theme="dark"] .week-day-column { background: var(--white); }
html[data-theme="dark"] .week-day-column.friday { background: #201f19; }
html[data-theme="dark"] .week-record.present { border-color: #315c47; background: #1b3528; }
html[data-theme="dark"] .week-record.remote { border-color: #36516d; background: #24394e; }
html[data-theme="dark"] .week-record.absent { border-color: #67403d; background: #3a2422; }
html[data-theme="dark"] .week-record-person strong { color: #edf4f0; }
html[data-theme="dark"] .week-record-person small,
html[data-theme="dark"] .week-record-status { color: #aab7b0; }
html[data-theme="dark"] .notice.success { border-color: #315c47; background: #183426; color: #91d1af; }
html[data-theme="dark"] .notice.error { border-color: #67403d; background: #35201f; color: #f1a09a; }
html[data-theme="dark"] .badge.pending { background: #453820; color: #e3bd72; }
html[data-theme="dark"] .badge.approved { background: #1d3b2c; color: #8fd0ae; }
html[data-theme="dark"] .badge.rejected,
html[data-theme="dark"] .badge.cancelled { background: #432725; color: #efa09a; }
html[data-theme="dark"] .badge.kind { background: #28332e; color: #b2bdb7; }
html[data-theme="dark"] .badge.done { background: #1d3b2c; color: #8fd0ae; }
html[data-theme="dark"] .badge.blocked { background: #432725; color: #efa09a; }
html[data-theme="dark"] .update-note { color: #bdc8c2; }
html[data-theme="dark"] .update-status-choices label:nth-child(1) input:checked + span { border-color: #5c9b7b; background: #1b3027; }
html[data-theme="dark"] .update-status-choices label:nth-child(2) input:checked + span { border-color: #b66b64; background: #372321; }
html[data-theme="dark"] .update-status-choices label:nth-child(3) input:checked + span { border-color: #a88951; background: #352f21; }
html[data-theme="dark"] .summary-table th { background: #141d18; }
html[data-theme="dark"] .metric.done { background: #1d3b2c; color: #8fd0ae; }
html[data-theme="dark"] .metric.blocked,
html[data-theme="dark"] .blocked-icon { background: #432725; color: #efa09a; }
html[data-theme="dark"] .metric.pending,
html[data-theme="dark"] .pending-icon { background: #453820; color: #e3bd72; }
html[data-theme="dark"] .new-task-form { box-shadow: 0 22px 65px rgba(0, 0, 0, .52); }
html[data-theme="dark"] .tag-manager,
html[data-theme="dark"] .board-filter-popover,
html[data-theme="dark"] .card-tag-editor form,
html[data-theme="dark"] .card-detail-editor form { box-shadow: 0 22px 65px rgba(0, 0, 0, .52); }
html[data-theme="dark"] .assignee-picker input:checked + span,
html[data-theme="dark"] .compact-assignee-picker input:checked + span { border-color: #5c9b7b; background: #1b3027; color: #9ed4b9; }
html[data-theme="dark"] .kanban-column { background: #141d18; }
html[data-theme="dark"] .kanban-card { border-color: #35443d; box-shadow: 0 4px 13px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .kanban-card > p { color: #aab6b0; }
html[data-theme="dark"] .task-assignee { color: #bdc8c2; }
html[data-theme="dark"] .task-due { background: #3b3222; color: #dec18b; }
html[data-theme="dark"] .todo-progress { background: #1d3b2c; color: #8fd0ae; }
html[data-theme="dark"] .kanban-cards.drag-over { background: rgba(107, 172, 142, .1); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 94px 1fr; }
  .sidebar { padding: 25px 11px 16px; }
  .brand > span:last-child, .sidebar nav a:not(.active) { font-size: 0; }
  .brand { justify-content: center; padding: 0 8px; }
  .workspace-switcher { display: none; }
  .sidebar nav a { justify-content: center; padding: 0; }
  .nav-icon { font-size: 1.05rem; }
  .nav-label, .sidebar-profile-details { display: none; }
  .sidebar-user { display: flex; justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar-theme { justify-content: center; padding-left: 0; padding-right: 0; }
  .sidebar-theme span { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-row: 2; }
  .login-page { grid-template-columns: 1fr 1fr; }
  .story-calendar { display: none; }
  .two-column { grid-template-columns: 1fr; }
  .workspace-access-card { margin-top: 0; }
  .profile-card { grid-template-columns: auto 1fr; }
  .profile-upload { grid-column: 1 / -1; padding-top:18px; padding-left:0; border-top:1px solid var(--line); border-left:0; }
  .updates-layout { grid-template-columns: 1fr; }
  .day-summary-card { grid-template-columns: 1fr; gap: 20px; }
  .day-stats { padding-top: 18px; border-top: 1px solid var(--line); border-left: 0; }
  .day-page-head { display: block; }
  .day-view-controls { margin-top: 18px; }
  .week-grid { grid-template-columns: repeat(7, 210px); }
  .report-page-head { display: block; }
  .report-range-filter { width: max-content; max-width: 100%; margin-top: 18px; }
  .accumulated-totals { grid-template-columns: repeat(3, 1fr); }
  .accumulated-totals > div:nth-child(3) { border-right: 0; }
  .accumulated-totals > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .report-export-grid { grid-template-columns: 1fr; }
  .kanban-board { grid-template-columns: repeat(4, 285px); margin-right: calc(-1 * clamp(28px, 5vw, 68px)); padding-right: clamp(28px, 5vw, 68px); }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; top: auto; right: 0; bottom: 0; left: 0; width: auto; height: 64px; padding: 7px; border-top: 1px solid var(--line); border-right: 0; }
  .sidebar .brand, .sidebar-user, .nav-label { display: none; }
  .sidebar-theme { position: fixed; z-index: 22; top: 15px; right: 15px; margin: 0; padding: 0; }
  .sidebar nav { display: flex; justify-content: center; margin: 0; }
  .sidebar nav a, .sidebar nav a:not(.active) { display: flex; width: 58px; margin: 0 3px; font-size: 0; }
  .nav-count { position: absolute; width: 16px; height: 16px; margin: -20px 0 0 17px; }
  .main { padding: 26px 15px 90px; }
  .page-head { align-items: start; }
  .day-page-head { display: block; }
  .day-view-controls { display: grid; grid-template-columns: auto 1fr; align-items: stretch; }
  .view-switch { align-self: start; }
  .day-date-form { grid-template-columns: 1fr auto; margin-top: 20px; }
  .day-view-controls .day-date-form { margin-top: 0; }
  .today-pill { display: none; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stat { padding: 12px; }
  .stat-icon { margin-bottom: 12px; }
  .time-line { grid-template-columns: 1fr 25px 1fr; }
  .time-line > div:last-child { display: none; }
  .checkin-actions { flex-direction: column; }
  .checkin-actions form, .checkin-actions button { width: 100%; }
  .calendar-card { padding: 16px; }
  .day { min-height: 49px; padding: 5px; }
  .day .status-dot { right: 5px; top: 10px; }
  .day.holiday small { display: none; }
  .calendar-legend { flex-wrap: wrap; }
  .login-page { display: block; }
  .login-story { display: none; }
  .login-form-wrap { min-height: 100vh; padding: 28px; }
  .mobile-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 70px; font-size: 1.1rem; font-weight: 700; }
  .form-row, .choice-cards { grid-template-columns: 1fr; }
  .review-form, .report-form { grid-template-columns: 1fr; }
  .report-card { grid-template-columns: 1fr; }
  .report-form { grid-column: auto; }
  .report-range-filter { grid-template-columns: 1fr 1fr; width: 100%; }
  .report-range-filter .button { grid-column: 1 / -1; }
  .accumulated-head { display: block; padding: 20px 18px; }
  .accumulated-head .button { margin-top: 14px; }
  .accumulated-totals { grid-template-columns: repeat(2, 1fr); margin: 0 18px 20px; }
  .accumulated-totals > div:nth-child(3) { border-right: 1px solid var(--line); }
  .accumulated-totals > div:nth-child(even) { border-right: 0; }
  .accumulated-totals > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .summary-table th:first-child, .summary-table td:first-child { padding-left: 18px; }
  .report-export-grid .report-card { grid-template-columns: 1fr; }
  .board-page-head { align-items: center; }
  .new-task-form { position: fixed; top: 76px; right: 15px; left: 15px; width: auto; max-height: calc(100vh - 100px); overflow-y: auto; }
  .board-head-actions { align-items: stretch; }
  .board-head-actions .button { min-width: 0; padding-right: 12px; padding-left: 12px; }
  .tag-manager { position: fixed; top: 76px; right: 15px; left: 15px; width: auto; max-height: calc(100vh - 100px); overflow-y: auto; }
  .tag-create-form { grid-template-columns: 1fr 1fr; }
  .tag-create-form .button { grid-column: 1 / -1; }
  .board-filter-popover { position: fixed; top: 76px; right: 15px; left: 15px; width: auto; max-height: calc(100vh - 100px); overflow-y: auto; }
  .kanban-board { grid-template-columns: repeat(4, 82vw); margin-right: -15px; padding-right: 0; padding-left: 15px; scroll-snap-type: x mandatory; }
  .kanban-column { scroll-snap-align: start; }
  .archived-card { align-items: flex-start; flex-direction: column; gap: 11px; }
  .archived-card-actions { width: 100%; justify-content: flex-end; }
  .filter-tabs { display: none; }
  .day-summary-card, .roster-card { padding: 18px; }
  .week-toolbar { display: block; padding: 14px; }
  .week-totals { margin-top: 13px; }
  .week-grid { grid-template-columns: repeat(7, 82vw); scroll-snap-type: x mandatory; }
  .week-day-column { min-width: 82vw; min-height: 400px; scroll-snap-align: start; }
  .day-date-nav { grid-template-columns: 33px 1fr 33px; gap: 9px; }
  .day-date-nav > a { width: 33px; height: 33px; }
  .day-stats > div { padding: 7px 10px; }
  .roster-card .section-head { display: block; }
  .roster-legend { margin-top: 12px; }
  .roster-list { margin-right: -18px; margin-left: -18px; }
  .roster-row { grid-template-columns: 38px 1fr auto; gap: 10px; padding: 13px 18px; }
  .roster-row .avatar { width: 38px; height: 38px; }
  .roster-detail { grid-column: 2 / -1; grid-row: 2; margin-top: -9px; }
  .presence-badge { grid-column: 3; grid-row: 1; min-width: 76px; }
}
