:root {
  color-scheme: light;
  --ink: #16211d;
  --muted: #69756f;
  --line: #e2e8e4;
  --surface: #fff;
  --background: #f4f7f5;
  --green-900: #092f25;
  --green-800: #0b3b2e;
  --green-700: #115541;
  --green-100: #dcefe7;
  --vacation: #e59a36;
  --trip: #3477d4;
  --sick: #d95858;
  --birthday: #9a63c8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.mobile-tabbar, .mobile-more-dialog { display: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #195d48 0, transparent 32%), linear-gradient(145deg, #07271f, #0d4435); }
.auth-card { width: min(440px, 100%); padding: 34px; border-radius: 20px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font: 700 20px Georgia, serif; }
.auth-brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.auth-card h1 { margin-bottom: 9px; }
.auth-copy { margin: 0 0 23px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: #435049; font-size: 12px; font-weight: 750; }
.auth-form input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.auth-form input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(17,85,65,.1); }
.auth-form .primary-button { margin-top: 4px; }
.optional { float: right; color: #8b9691; font-weight: 500; }
.link-button { border: 0; color: var(--green-700); background: transparent; font-weight: 700; }
.auth-error { min-height: 18px; margin: 16px 0 0; color: #bd3f3f; font-size: 13px; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px; display: flex; flex-direction: column; color: white; background: var(--green-900); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; padding: 0 10px 28px; }
.brand-mark { width: 40px; height: 40px; display: block; flex: 0 0 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; object-fit: cover; object-position: 50% 72%; background: #e7f4ed; }
.brand strong, .brand small, .profile strong, .profile small { display: block; }
.brand strong { font: 700 20px Georgia, serif; letter-spacing: .01em; }
.brand small, .profile small { margin-top: 3px; color: #a9c0b6; font-size: 12px; }
.nav-label { padding: 0 12px; color: #769187; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.main-nav { display: grid; gap: 5px; }
.nav-group { display: grid; }
.nav-parent { width: 100%; border: 0; text-align: left; background: transparent; }
.nav-parent .nav-chevron { margin-left: auto; font-size: 12px; transition: transform .2s; }
.nav-group:not(.open) .nav-chevron { transform: rotate(-90deg); }
.nav-children { display: grid; gap: 3px; padding: 2px 0 6px 43px; }
.nav-group:not(.open) .nav-children { display: none; }
.nav-child { padding: 8px 10px; border-radius: 8px; color: #9fb5ac; text-decoration: none; font-size: 12px; }
.nav-child:hover, .nav-child.active { color: white; background: rgba(255,255,255,.08); }
.nav-child.muted { opacity: .42; cursor: default; }
.nav-item { display: flex; gap: 12px; align-items: center; padding: 12px 13px; border-radius: 10px; color: #d9e6e0; text-decoration: none; font-size: 14px; }
.nav-item span { width: 18px; text-align: center; }
.nav-item.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 #8ed3b4; }
.nav-item.muted { opacity: .45; cursor: default; }
.profile-area { position: relative; margin-top: auto; padding-top: 8px; }
.profile { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 0; color: white; text-align: left; border-radius: 12px; background: transparent; }
.profile:hover { background: rgba(255,255,255,.06); }
.profile-menu { position: absolute; z-index: 25; left: 0; right: 0; bottom: calc(100% - 2px); display: grid; gap: 4px; padding: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: #104536; box-shadow: 0 -14px 35px rgba(0,0,0,.24); visibility: hidden; opacity: 0; transform: translateY(7px); pointer-events: none; transition: opacity .16s, transform .16s, visibility .16s; }
.profile-area:hover .profile-menu, .profile-area:focus-within .profile-menu { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
.profile-menu-item { display: flex; gap: 9px; align-items: center; padding: 10px; border-radius: 8px; color: #dcebe5; text-decoration: none; font-size: 12px; line-height: 1.3; }
.profile-menu-item:hover, .profile-menu-item:focus-visible, .profile-menu-item.active { color: white; background: rgba(255,255,255,.1); outline: none; }
.profile-menu-item span { flex: 0 0 16px; text-align: center; }
.profile-chevron { transition: transform .16s; }
.profile-area:hover .profile-chevron, .profile-area:focus-within .profile-chevron { transform: rotate(180deg); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--green-900); background: #b9dfce; font-size: 12px; font-weight: 800; }

main { min-width: 0; }
.topbar { height: 96px; display: flex; justify-content: space-between; align-items: center; padding: 0 clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(12px); }
.eyebrow { margin: 0 0 4px; color: var(--green-700); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; }
h1 { font-size: 31px; }
.topbar-actions, .month-controls, .date-row, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .today-button, .secondary-button, .primary-button { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.icon-button { position: relative; width: 40px; height: 40px; color: #435049; font-size: 20px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #db5656; }
.notification-area { position: relative; }
.notification-panel { position: absolute; z-index: 40; top: 50px; right: 0; width: min(390px, calc(100vw - 28px)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 55px rgba(10,35,27,.2); }
.notification-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.notification-heading h2 { font-size: 19px; }
.notification-heading .link-button { font-size: 11px; }
.notification-list { max-height: 420px; overflow-y: auto; }
.notification-item { padding: 14px 16px; border-bottom: 1px solid #edf1ef; }
.notification-item.unread { background: #f0f8f4; }
.notification-item strong, .notification-item span { display: block; }
.notification-item strong { font-size: 12px; }
.notification-item span { margin-top: 5px; color: var(--muted); line-height: 1.4; font-size: 11px; }
.notification-item time { display: block; margin-top: 7px; color: #929c97; font-size: 10px; }
.primary-button { padding: 11px 16px; border-color: var(--green-800); color: white; background: var(--green-800); font-weight: 700; }
.primary-button:hover { background: var(--green-700); }
.secondary-button, .today-button { padding: 10px 14px; color: #34433c; font-weight: 650; }

.content { max-width: 1540px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 56px) 56px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.summary-card { min-height: 92px; display: flex; gap: 15px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 18px rgba(20,45,35,.035); }
.summary-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #f2f4f3; font-weight: 800; }
.summary-card.vacation .summary-icon { color: var(--vacation); background: #fff1dd; }
.summary-card.trip .summary-icon { color: var(--trip); background: #e7f0fd; }
.summary-card.sick .summary-icon { color: var(--sick); background: #fce8e8; }
.summary-card.birthday .summary-icon { color: var(--birthday); background: #f3eafa; }
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { font-family: Georgia, serif; font-size: 26px; }
.summary-card div span { margin-top: 3px; color: var(--muted); font-size: 13px; }

.calendar-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 30px rgba(20,45,35,.045); }
.calendar-toolbar { min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.month-controls h2 { margin-left: 8px; min-width: 210px; font-size: 23px; text-transform: capitalize; }
.view-switcher { display: flex; padding: 3px; border-radius: 10px; background: #edf1ee; }
.view-switcher button { padding: 8px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.view-switcher button.active { color: var(--green-800); background: white; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.filters { display: flex; gap: 10px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.search-field { min-width: 260px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.search-field input { width: 100%; padding: 9px 0; border: 0; outline: 0; background: transparent; }
.select-field { display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.select-field .label { color: var(--muted); font-size: 12px; }
.select-field select { padding: 9px 28px 9px 4px; border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 650; }
.event-filters { display: flex; gap: 6px; margin-left: auto; }
.filter-chip { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: white; font-size: 12px; font-weight: 650; }
.filter-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip-color); }
.filter-chip.active { color: var(--ink); border-color: color-mix(in srgb, var(--chip-color) 45%, white); background: color-mix(in srgb, var(--chip-color) 8%, white); }

.weekdays, .calendar-grid { min-width: 760px; display: grid; grid-template-columns: repeat(7, minmax(108px, 1fr)); }
.calendar-grid.view-day { grid-template-columns: minmax(320px, 1fr); }
.calendar-grid.view-week { grid-template-columns: repeat(7, minmax(108px, 1fr)); }
.calendar-grid.view-year { min-width: 0; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; padding: 16px; }
.year-month { min-height: 110px; display: grid; align-content: center; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; text-align: left; color: var(--ink); background: #fbfcfb; text-transform: capitalize; }
.year-month span { color: var(--muted); font-size: 12px; }
.weekdays { border-bottom: 1px solid var(--line); background: #fbfcfb; }
.weekdays span { padding: 10px 12px; color: #7c8782; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 800; }
.calendar-day { min-height: 126px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: #fafbfa; }
.calendar-day.outside .day-number { color: #b6bdb9; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--green-700); }
.day-number { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 50%; color: #45524c; font-size: 12px; font-weight: 750; }
.today .day-number { color: white; background: var(--green-800); }
.events { display: grid; gap: 4px; }
.event { width: 100%; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 5px 7px; border: 0; border-left: 3px solid var(--event-color); border-radius: 5px; color: #26332d; text-align: left; background: color-mix(in srgb, var(--event-color) 10%, white); white-space: nowrap; font-size: 11px; }
.event > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.event:hover { filter: saturate(1.15); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--event-color) 28%, white); }
.event-delete { flex: 0 0 auto; color: #78837e; font-size: 15px; opacity: 0; }
.event:hover .event-delete, .event:focus-visible .event-delete { opacity: 1; }
.event strong { font-weight: 750; }
.event small { color: #68746e; }
.my-work-event { cursor: pointer; }
.work-preview { position: fixed; z-index: 30; width: min(280px, calc(100vw - 24px)); display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #d6dfda; border-radius: 10px; color: var(--ink); background: white; box-shadow: 0 12px 35px rgba(10,35,27,.18); pointer-events: none; }
.work-preview[hidden] { display: none; }
.work-preview strong { font-size: 13px; }
.work-preview span { color: var(--green-700); font-size: 11px; font-weight: 750; }
.work-preview small { color: var(--muted); }
.work-details { display: grid; gap: 18px; padding: 24px; }
#work-details-dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; }
#work-details-dialog .work-details { max-height: calc(100dvh - 28px); overflow-y: auto; overscroll-behavior: contain; }
#work-details-dialog .dialog-actions { position: sticky; z-index: 2; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px 20px; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 20px rgba(20,45,35,.06); flex-wrap: wrap; }
.work-details h2 { max-width: 410px; overflow-wrap: anywhere; }
.work-details-description { margin: 0; color: #4f5e57; line-height: 1.55; white-space: pre-wrap; }
.work-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.work-details-grid div { padding: 12px; border-radius: 10px; background: #f3f6f4; }
.work-details-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.work-details-grid dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.work-comments { display: grid; gap: 10px; }
.work-comments h3 { margin: 0; font-size: 14px; }
.work-comment { padding: 9px 11px; border-radius: 9px; background: #f3f6f4; font-size: 11px; }
.work-comment strong, .work-comment small { display: block; }
.work-comment small { margin-top: 4px; color: var(--muted); }
#work-comment-form { display: flex; gap: 8px; }
#work-comment-form textarea { flex: 1; padding: 9px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.danger-text { color: #b84545; }
.empty-state { grid-column: 1 / -1; padding: 64px 20px; text-align: center; color: var(--muted); }
.account-layout { max-width: 900px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-card, .data-panel { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 6px 22px rgba(20,45,35,.04); }
.account-identity { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.account-avatar { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green-700); font: 700 22px Georgia, serif; }
.account-identity p:last-child, .account-help p { color: var(--muted); line-height: 1.55; }
.account-fields { display: grid; gap: 2px; margin: 16px 0 0; }
.account-fields div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid #edf1ef; }
.account-fields dt { color: var(--muted); }
.account-fields dd { margin: 0; text-align: right; font-weight: 700; }
.account-help .secondary-button { margin-top: 12px; }
.workspace-switch { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
.admin-summary { grid-template-columns: repeat(2, minmax(180px, 280px)); }
.data-panel { padding: 0; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.module-placeholder { padding: 48px 22px; text-align: center; }
.module-placeholder p { max-width: 560px; margin: 8px auto 0; color: var(--muted); line-height: 1.5; }
.sync-badge { padding: 6px 9px; border-radius: 999px; color: #176044; background: #e0f1e9; font-size: 11px; font-weight: 750; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 18px; border-bottom: 1px solid #edf1ef; text-align: left; font-size: 12px; }
th { color: var(--muted); background: #fafbfa; text-transform: uppercase; letter-spacing: .05em; font-size: 10px; }
.access-ok { color: #176044; font-weight: 750; }
.edit-user-button { width: 32px; height: 32px; display: grid; place-items: center; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; color: var(--green-700); background: white; font-size: 15px; }
.edit-user-button:hover { border-color: #a8c4b8; background: #eff7f3; }
#user-edit-form { display: grid; gap: 15px; padding: 24px; }
#user-edit-form label { display: grid; gap: 6px; color: #435049; font-size: 12px; font-weight: 700; }
#user-edit-form input, #user-edit-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: white; }
.project-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.project-filters { flex: 1; padding: 0; border: 0; background: transparent; }
.project-summary { grid-template-columns: repeat(3, minmax(180px, 280px)); }
.project-list { display: grid; }
.project-row { display: grid; grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(120px, 1fr)) auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.project-row:hover { background: #fafcfb; }
.project-row h3 { margin: 0 0 5px; font-size: 14px; }
.project-row p, .project-cell small { margin: 0; color: var(--muted); font-size: 11px; }
.project-cell strong, .project-cell small { display: block; }
.project-cell strong { font-size: 12px; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #31574a; background: #e5f1ec; font-size: 10px; font-weight: 800; }
.project-actions { display: flex; gap: 6px; }
.project-actions button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 11px; }
.project-actions .danger { color: #b84545; }
#project-form { display: grid; gap: 14px; padding: 24px; }
#project-form label { display: grid; gap: 6px; color: #435049; font-size: 12px; font-weight: 700; }
#project-form input, #project-form select, #project-form textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }

dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(5,22,17,.55); backdrop-filter: blur(3px); }
#event-form { display: grid; gap: 15px; padding: 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; }
#event-form label { display: grid; gap: 6px; color: #435049; font-size: 12px; font-weight: 700; }
.check-line { display: flex !important; align-items: center; gap: 8px !important; }
.check-line input { width: auto !important; }
#event-form input, #event-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: white; }
#task-form input, #task-form select, #task-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: white; resize: vertical; }
#task-form { display: grid; gap: 15px; padding: 24px; }
#task-form label { display: grid; gap: 6px; color: #435049; font-size: 12px; font-weight: 700; }
#event-form input:focus, #event-form select:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(17,85,65,.1); }
.date-row > * { flex: 1; }
.form-hint { margin: -5px 0 2px; color: var(--muted); font-size: 12px; }
.optional-label { color: var(--muted); font-weight: 500; }
.dialog-actions { justify-content: flex-end; padding-top: 4px; }
.task-summary { display: grid; grid-template-columns: 150px 150px minmax(260px, 1fr); gap: 14px; align-items: stretch; margin-bottom: 20px; }
.my-summary { grid-template-columns: repeat(2, minmax(180px, 260px)); }
.task-summary > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.task-summary strong, .task-summary span { display: block; }
.task-summary strong { font: 700 25px Georgia, serif; }
.task-summary span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.task-summary .search-field { justify-self: end; align-self: center; width: min(380px, 100%); }
.task-column { min-height: 520px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #eef3f0; }
.task-column.completed { background: #f1f2f1; }
.task-column > header { display: flex; justify-content: space-between; align-items: center; padding: 2px 3px 14px; }
.task-column > header h2 { font-size: 19px; }
.task-column > header span { min-width: 28px; padding: 4px 8px; border-radius: 999px; text-align: center; color: var(--muted); background: white; font-size: 11px; font-weight: 800; }
.task-list { display: grid; gap: 10px; }
.task-card { padding: 15px; border: 1px solid #dce4df; border-radius: 12px; background: white; box-shadow: 0 4px 14px rgba(20,45,35,.04); }
.task-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.task-card h3 { margin: 0; font-size: 14px; }
.priority { display: inline-flex; margin-top: 10px; padding: 4px 7px; border-radius: 6px; color: #58645e; background: #edf1ef; font-size: 10px; font-weight: 800; }
.priority.high { color: #9d5e14; background: #fff0d8; }
.priority.urgent { color: #b33c3c; background: #fde6e6; }
.priority.low { color: #557068; background: #e8f0ed; }
.task-description { margin: 10px 0; color: var(--muted); line-height: 1.45; font-size: 12px; }
.task-meta { display: flex; justify-content: space-between; gap: 10px; color: #66736d; font-size: 11px; }
.assignee-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.assignee-pill { padding: 4px 7px; border-radius: 999px; color: #4e5b55; background: #f0f3f1; font-size: 10px; }
.assignee-pill.done { color: #176044; background: #e0f1e9; }
.task-actions { display: flex; gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #edf0ee; }
.task-actions button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; color: #405049; background: white; font-size: 11px; font-weight: 750; }
.task-actions .complete-action { color: white; border-color: var(--green-700); background: var(--green-700); }
.task-actions .delete-action { margin-left: auto; color: #b84545; }
.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 14px; padding: 18px; overflow-x: auto; background: #f7f9f8; }
.kanban-board[hidden] { display: none; }
.kanban-column { min-width: 260px; min-height: 520px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #edf2ef; }
.kanban-column > header { display: flex; align-items: center; justify-content: space-between; padding: 4px 3px 13px; }
.kanban-column > header h2 { margin: 0; font-size: 15px; }
.kanban-column > header span { min-width: 27px; padding: 4px 7px; border-radius: 999px; text-align: center; background: white; color: var(--muted); font-size: 11px; font-weight: 800; }
.kanban-cards { display: grid; align-content: start; gap: 9px; }
.kanban-card { cursor: grab; padding: 14px; border: 1px solid #d9e2dd; border-left: 4px solid #e59a36; border-radius: 11px; background: white; box-shadow: 0 4px 13px rgba(20,45,35,.05); }
.kanban-card.task { border-left-color: #3477d4; }
.people-kanban { min-width: 1040px; grid-template-columns: repeat(4, minmax(240px, 1fr)); }
.people-kanban .kanban-column { min-width: 240px; }
.people-kanban .kanban-column > header { border-bottom: 3px solid var(--event-color); }
.people-kanban-card { width: 100%; display: grid; gap: 5px; padding: 13px; border: 1px solid #d9e2dd; border-left: 4px solid var(--event-color); border-radius: 10px; color: var(--ink); text-align: left; background: white; }
.people-kanban-card:hover { box-shadow: 0 4px 14px rgba(20,45,35,.1); }
.people-kanban-card strong, .people-kanban-card span, .people-kanban-card small { display: block; }
.people-kanban-card span, .people-kanban-card small { color: var(--muted); font-size: 11px; }
.department-task-board { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
.leopard-task {
  color: white !important;
  background-color: #17100c !important;
  background-image: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), url("assets/task-1057657358-leopard.jpg") !important;
  background-position: center !important;
  background-size: cover !important;
}
.leopard-task > * { position: relative; z-index: 1; }
.leopard-task :is(h3, p, small, strong, .kanban-card-heading) { color: white !important; }
.leopard-task .priority { color: white; background: rgba(0,0,0,.48); }
.kanban-card:active { cursor: grabbing; }
.kanban-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.kanban-card .priority { margin: 0; }
.kanban-card h3 { margin: 10px 0 6px; font-size: 14px; }
.kanban-card p { display: -webkit-box; overflow: hidden; margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kanban-card small { display: block; color: #6d7973; }
.kanban-next { display: none; width: 100%; margin-top: 12px; padding: 8px; border: 1px solid #b8cbc2; border-radius: 8px; color: var(--green-800); background: #f1f8f5; font-size: 11px; font-weight: 750; }
.trip-report-board { grid-template-columns: repeat(6, minmax(270px, 1fr)); border: 1px solid var(--line); border-radius: 16px; }
.kanban-card.report { border-left-color: var(--green-700); }
.module-filters { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; }
.acquaintance-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 18px; }
.module-form { display: grid; gap: 16px; padding: 22px; }
.module-form label { display: grid; gap: 7px; color: #435049; font-size: 12px; font-weight: 700; }
.module-form input, .module-form select, .module-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.included-people { padding: 14px; border-radius: 10px; background: #f2f6f4; }
.included-people p { margin: 5px 0 0; color: var(--muted); }
.template-version { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.template-version span strong, .template-version span small { display: block; }
.template-version span small { margin-top: 3px; color: var(--muted); }
.document-preview { padding: 22px; border: 1px solid var(--line); background: #fff; }
.document-preview h3 { margin-top: 0; }
.document-preview ol { margin: 20px 0; padding-left: 24px; }
.document-preview li { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; border-bottom: 1px solid #edf1ef; }
.document-preview li strong { color: var(--muted); font-size: 11px; }
.preview-warning { padding: 12px; border-radius: 9px; color: #8a5517; background: #fff2dc; }
.empty-tasks { padding: 36px 12px; text-align: center; color: #87918c; font-size: 12px; }
.assignee-field { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.assignee-field legend { padding: 0 5px; color: #435049; font-size: 12px; font-weight: 750; }
.assignee-field > div { max-height: 180px; display: grid; gap: 8px; overflow-y: auto; }
.assignee-field label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; padding: 7px 8px; border-radius: 7px; background: #f7f9f8; }
.assignee-field input { width: auto !important; }
.assignee-department { display: grid; gap: 6px; }
.assignee-department + .assignee-department { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.assignee-department header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.assignee-department header strong { font-size: 11px; }
.assignee-department header button { padding: 4px 7px; border: 1px solid #b8cbc2; border-radius: 6px; color: var(--green-700); background: white; font-size: 10px; font-weight: 750; }
.focus-weeks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 20px; }
.focus-week { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf9; }
.focus-week > header { margin-bottom: 18px; }
.focus-week h3, .focus-direction h4 { margin: 0; }
.focus-direction + .focus-direction { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.focus-direction h4 { margin-bottom: 10px; color: #34453d; font-size: 13px; line-height: 1.45; }
.focus-projects { display: grid; gap: 9px; }
.focus-project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px, .55fr); align-items: center; gap: 8px 12px; padding: 12px; border: 1px solid #e1e8e4; border-radius: 10px; background: white; }
.focus-project-main { min-width: 0; }
.focus-project-main strong, .focus-project-main span { display: block; }
.focus-project-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.focus-project-main span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.focus-project select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.focus-progress { height: 5px; overflow: hidden; border-radius: 9px; background: #e5ebe8; }
.focus-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green-700); }
.focus-finished { color: var(--green-700); font-size: 11px; font-weight: 750; text-align: right; }
.focus-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > span:last-child, .nav-label, .nav-item:not(.active), .nav-item.active:not(:hover) { font-size: 0; }
  .nav-item { justify-content: center; }
  .nav-item span { font-size: 18px; }
  .profile span:not(.avatar) { display: none; }
  .nav-children { padding-left: 4px; }
  .nav-child { text-align: center; font-size: 10px; }
  .nav-parent .nav-chevron { display: none; }
  .profile { display: flex; justify-content: center; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { flex-wrap: wrap; }
  .event-filters { width: 100%; margin-left: 0; overflow-x: auto; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .account-layout { grid-template-columns: 1fr; }
  .account-identity { grid-column: auto; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  button { touch-action: manipulation; }
  input, select, textarea { font-size: 16px !important; }
  .topbar { position: sticky; z-index: 18; top: 0; height: 72px; padding: 0 14px; }
  .topbar h1 { max-width: 48vw; overflow: hidden; font-size: 24px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .primary-button { width: 44px; min-width: 44px; padding: 0; font-size: 0; }
  .topbar-actions .primary-button span { font-size: 22px; }
  .icon-button, .today-button, .secondary-button, .primary-button { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  .content { padding: 16px 12px calc(92px + env(safe-area-inset-bottom)); }
  .summary-grid { margin: 0 -12px 18px; padding: 0 12px 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .summary-grid::-webkit-scrollbar { display: none; }
  .summary-card { min-width: 168px; min-height: 84px; padding: 14px; scroll-snap-align: start; }
  .summary-card strong { font-size: 23px; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; padding: 14px; }
  .month-controls { width: 100%; }
  .month-controls h2 { flex: 1; min-width: 0; margin: 0; text-align: center; font-size: 18px; }
  .month-controls .icon-button { flex: 0 0 44px; }
  .today-button { flex: 0 0 auto; padding-inline: 11px; }
  .view-switcher { width: 100%; }
  .view-switcher button { min-height: 40px; flex: 1; font-size: 13px; }
  #people-calendar-view button[data-view="week"], #people-calendar-view button[data-view="year"], #people-calendar-view button[data-view="kanban"] { display: none; }
  .filters { padding: 11px 14px; }
  .search-field { min-width: 100%; }
  .event-filters { padding-bottom: 3px; }
  .filter-chip { min-height: 40px; flex: 0 0 auto; }
  .calendar-scroll { overflow: visible; }
  .weekdays { display: none; }
  .calendar-grid, .calendar-grid.view-day, .calendar-grid.view-month { min-width: 0; grid-template-columns: 1fr; }
  .calendar-day { min-height: 132px; border-right: 0; padding: 12px; }
  .calendar-grid.view-month .calendar-day.outside { display: none; }
  .calendar-grid.view-month .calendar-day { min-height: 104px; }
  .event { min-height: 38px; padding: 8px 9px; font-size: 12px; white-space: normal; }
  .event-delete { opacity: 1; }
  .date-row { align-items: stretch; flex-direction: column; }
  .task-summary { grid-template-columns: repeat(2, 1fr); }
  .task-summary .search-field { grid-column: 1 / -1; width: 100%; }
  .task-column { min-height: 280px; }
  .kanban-board { grid-template-columns: repeat(4, minmax(82vw, 1fr)); scroll-snap-type: x mandatory; }
  .kanban-column { min-height: 360px; scroll-snap-align: start; }
  .kanban-card { cursor: default; }
  .kanban-next { display: block; }
  dialog:not(.mobile-more-dialog) { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  dialog:not(.mobile-more-dialog) > form, dialog:not(.mobile-more-dialog) > article { min-height: 100%; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  dialog form, .work-details, #user-edit-form, #project-form { padding: 18px; }
  .dialog-heading { position: sticky; z-index: 2; top: -18px; margin: -18px -18px 12px; padding: 16px 18px 12px; background: rgba(255,255,255,.97); }
  .dialog-actions { position: sticky; z-index: 2; bottom: -18px; margin: 6px -18px -18px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); flex-wrap: wrap; }
  .dialog-actions button { flex: 1 1 132px; }
  #work-details-dialog { width: 100vw; max-height: 100dvh; }
  #work-details-dialog .work-details { max-height: 100dvh; padding: 18px; }
  #work-details-dialog .dialog-actions { bottom: -18px; margin: 0 -18px -18px; padding: 12px 18px 16px; }
  #work-details-dialog .dialog-actions button { flex: 1 1 145px; }
  .work-details-grid { grid-template-columns: 1fr; }
  #work-comment-form { align-items: stretch; flex-direction: column; }
  .acquaintance-layout { grid-template-columns: 1fr; }
  .focus-weeks { grid-template-columns: 1fr; padding: 12px; }
  .focus-project { grid-template-columns: 1fr; }
  .focus-finished { text-align: left; }
  .project-toolbar { align-items: stretch; flex-direction: column; }
  .project-toolbar .primary-button { width: 100%; }
  .project-row { grid-template-columns: 1fr; gap: 12px; padding: 18px 16px; }
  .project-row h3 { font-size: 16px; }
  .project-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-actions button { min-height: 44px; }
  .panel-heading { align-items: flex-start; gap: 10px; padding: 16px; }
  .panel-heading .sync-badge { white-space: nowrap; }
  .table-scroll { margin: 0; overscroll-behavior-inline: contain; }
  th, td { padding: 12px 14px; white-space: nowrap; }
  .account-card { padding: 18px; }
  .account-identity { align-items: flex-start; }
  .account-fields div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .account-fields dd { text-align: left; overflow-wrap: anywhere; }
  .notification-panel { position: fixed; top: 72px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 160px); }
  .notification-list { max-height: calc(100dvh - 226px); }

  .mobile-tabbar { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 -8px 28px rgba(10,35,27,.12); backdrop-filter: blur(16px); }
  .mobile-tabbar button { position: relative; min-width: 0; min-height: 54px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 10px; color: #66736d; background: transparent; }
  .mobile-tabbar button > span { font-size: 19px; line-height: 1; }
  .mobile-tabbar button small { font-size: 12px; font-weight: 750; }
  .mobile-tabbar button.active { color: var(--green-800); background: #eaf4ef; }
  .mobile-more-dialog[open] { width: 100%; max-width: none; max-height: 86dvh; margin: auto 0 0; display: block; border: 0; border-radius: 20px 20px 0 0; background: white; box-shadow: 0 -20px 70px rgba(0,0,0,.22); }
  .mobile-more-dialog::backdrop { background: rgba(7,25,19,.48); backdrop-filter: blur(2px); }
  .mobile-sheet { max-height: 86dvh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .mobile-sheet header { position: sticky; z-index: 1; top: -18px; display: flex; justify-content: space-between; align-items: center; margin: -18px -16px 8px; padding: 18px 16px 12px; background: rgba(255,255,255,.97); }
  .mobile-sheet nav { display: grid; gap: 4px; }
  .mobile-sheet nav button { min-height: 58px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 10px; border: 0; border-radius: 12px; color: var(--ink); text-align: left; background: transparent; }
  .mobile-sheet nav button:active, .mobile-sheet nav button.active { background: #eaf4ef; }
  .mobile-sheet nav button > span:first-child { color: var(--green-700); text-align: center; font-size: 20px; }
  .mobile-sheet nav strong, .mobile-sheet nav small { display: block; }
  .mobile-sheet nav strong { font-size: 14px; }
  .mobile-sheet nav small { margin-top: 3px; color: var(--muted); font-size: 12px; }
  .auth-screen { min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
  .auth-brand { margin-bottom: 26px; }
  .auth-card h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
