:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #676767;
  --line: #dedbd6;
  --panel: #ffffff;
  --soft: #f6f4ef;
  --green: #17a56b;
  --teal: #0f8fa3;
  --red: #c2413b;
  --amber: #b7791f;
  --shadow: 0 18px 60px rgba(21, 21, 21, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
}

.brand-pane {
  background: #050505;
  color: white;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-pane img {
  width: min(280px, 80%);
  filter: invert(1) brightness(2.3);
}

.brand-pane h1 {
  font-size: clamp(38px, 5vw, 76px);
  line-height: 0.96;
  margin: 48px 0 16px;
  letter-spacing: 0;
}

.brand-pane p {
  max-width: 420px;
  color: #d7d7d7;
  margin: 0;
}

.login-card {
  align-self: center;
  justify-self: center;
  width: min(460px, calc(100% - 36px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-card h2,
.panel h2,
.panel h3 {
  margin: 0;
}

.login-card > .btn,
.login-card > .text-button {
  width: 100%;
}

.text-button {
  margin-top: 12px;
  padding: 8px;
  background: transparent;
  color: var(--teal);
  text-decoration: underline;
}

.status-message {
  min-height: 22px;
  color: var(--green);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.check-row input {
  width: auto;
  margin: 0;
}

.hint {
  color: var(--muted);
  margin: 8px 0 22px;
}

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #111;
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.sidebar-head {
  display: grid;
  gap: 18px;
}

.sidebar-head img {
  width: 160px;
  filter: invert(1) brightness(2.5);
}

.sidebar-menu {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 22px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #2b2b2b;
  place-items: center;
  gap: 5px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  min-height: 42px;
  border-radius: 8px;
  text-align: left;
  padding: 0 14px;
  color: #e9e9e9;
  background: transparent;
}

.nav button.active,
.nav button:hover {
  background: #2b2b2b;
  color: white;
}

.user-box {
  margin-top: auto;
  border-top: 1px solid #333;
  padding-top: 18px;
  color: #d4d4d4;
  display: grid;
  gap: 14px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 0;
  color: #fff;
  background: transparent;
  text-align: left;
}

.sidebar-profile:hover strong,
.sidebar-profile:focus-visible strong {
  text-decoration: underline;
}

.sidebar-language {
  display: grid;
  gap: 6px;
  color: #d4d4d4;
  font-size: 13px;
}

.sidebar-language select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 0 10px;
  background: #1f1f1f;
  color: #fff;
}

.sidebar-help-link {
  min-height: 38px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #1f1f1f;
  text-decoration: none;
}

.sidebar-help-link:hover,
.sidebar-help-link:focus-visible {
  background: #2b2b2b;
  outline: none;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #2b2b2b;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border: 1px solid #444;
}

.content {
  padding: 28px;
  max-width: 1480px;
  width: 100%;
  min-width: 0;
}

.content.chat-content {
  max-width: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h1 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 30px;
  margin: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(21, 21, 21, 0.05);
  min-width: 0;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.metric {
  display: grid;
  gap: 6px;
}

.metric strong {
  font-size: 28px;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 126px);
  min-height: 560px;
}

.chat-contacts,
.chat-thread {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-panel-head,
.chat-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-panel-head h2,
.chat-thread-head h2 {
  margin: 0;
}

.chat-panel-head .hint,
.chat-thread-head .hint {
  margin: 3px 0 0;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-add-group {
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
}

.chat-contact-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.chat-search {
  position: relative;
  display: block;
  margin-top: 12px;
}

.chat-search > span {
  width: 13px;
  height: 13px;
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.chat-search > span::after {
  content: "";
  width: 6px;
  height: 2px;
  position: absolute;
  right: -5px;
  bottom: -3px;
  border-radius: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.chat-search input {
  width: 100%;
  height: 40px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.chat-contact {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.chat-contact:hover,
.chat-contact.active {
  background: #f0eee8;
}

.chat-contact span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-contact small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-contact em {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 13px;
}

.chat-group-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dce9e3;
  color: #245642;
  font-weight: 800;
}

.chat-member-picker {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-member-picker legend {
  padding: 0 6px;
  font-weight: 700;
}

.chat-member-picker .check-row {
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px;
  border-radius: 6px;
}

.chat-member-picker .check-row:hover {
  background: #f5f3ee;
}

.chat-member-picker .check-row > span:last-child {
  display: grid;
}

.chat-member-picker small {
  color: var(--muted);
}

.chat-member-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.chat-thread-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-mobile-back {
  display: none;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 4px 20px 0;
}

.chat-bubble {
  width: min(640px, 82%);
  align-self: flex-start;
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px 14px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.chat-bubble.has-reaction-dock {
  margin-bottom: 16px;
}

.chat-bubble.mine {
  align-self: flex-end;
  border-color: rgba(23, 165, 107, 0.26);
  background: #eef8f3;
}

.chat-bubble.deleted {
  border-style: dashed;
  color: var(--muted);
  background: #f7f5f0;
}

.chat-bubble.focused {
  outline: 3px solid rgba(15, 143, 163, 0.25);
}

.chat-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
}

.chat-bubble p a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.chat-bubble p a:hover {
  color: var(--accent);
}

.chat-deleted-placeholder {
  font-style: italic;
  color: #8b857c;
}

.chat-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chat-bubble-meta .chat-delete-message {
  margin-left: auto;
}

.chat-bubble-footer {
  min-height: 0;
  position: absolute;
  right: 14px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.chat-bubble-time {
  white-space: nowrap;
}

.chat-message-status {
  --tick-color: #8b857c;
  width: 24px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: 0.9;
}

.chat-message-status.read {
  --tick-color: #0a8fdd;
}

.chat-message-status.sending {
  --tick-color: #9b948b;
  width: 14px;
}

.chat-message-status i {
  width: 8px;
  height: 4px;
  display: block;
  border-left: 2px solid var(--tick-color);
  border-bottom: 2px solid var(--tick-color);
  border-radius: 1px;
  transform: rotate(-45deg);
}

.chat-message-status i + i {
  margin-left: -4px;
}

.chat-message-status.sending i + i {
  display: none;
}

.chat-delete-message {
  width: 28px;
  height: 28px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f6f3ee;
  color: #8b857c;
  opacity: 1;
  transform: none;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.chat-delete-message span,
.chat-delete-message span::before,
.chat-delete-message span::after {
  display: block;
}

.chat-delete-message span::before,
.chat-delete-message span::after {
  content: "";
  width: 12px;
  height: 2px;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
}

.chat-delete-message span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.chat-delete-message span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.chat-bubble:hover .chat-delete-message,
.chat-delete-message:hover,
.chat-delete-message:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.chat-delete-message:hover,
.chat-delete-message:focus-visible {
  background: #f9e6e3;
  color: var(--red);
}

@media (hover: none) {
  .chat-delete-message {
    opacity: 1;
    transform: none;
  }
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-image-attachment {
  width: min(420px, 100%);
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.chat-image-attachment button {
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #111;
}

.chat-image-attachment img {
  width: 100%;
  max-height: min(360px, 46vh);
  display: block;
  object-fit: contain;
  transition: transform 0.18s ease;
}

.chat-image-attachment button:hover img,
.chat-image-attachment button:focus-visible img {
  transform: scale(1.03);
}

.chat-image-attachment figcaption {
  width: 100%;
  min-width: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 10px 9px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

.chat-image-attachment figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.chat-image-attachment figcaption a {
  width: 30px;
  height: 30px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green);
  pointer-events: auto;
}

.chat-image-attachment figcaption a span {
  width: 12px;
  height: 14px;
  position: relative;
  display: block;
  border-bottom: 2px solid currentColor;
}

.chat-image-attachment figcaption a span::before,
.chat-image-attachment figcaption a span::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.chat-image-attachment figcaption a span::before {
  width: 2px;
  height: 11px;
  top: 0;
  border-radius: 999px;
  background: currentColor;
}

.chat-image-attachment figcaption a span::after {
  width: 8px;
  height: 8px;
  top: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.chat-attachment {
  max-width: 260px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.chat-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment small {
  color: var(--muted);
}

.chat-reactions,
.chat-reaction-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-reactions button,
.chat-reaction-bar button {
  min-width: 32px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.chat-reactions button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-reactions button.active {
  border-color: rgba(23, 165, 107, 0.35);
  background: #ddf6e9;
}

.chat-reactions {
  position: static;
  z-index: 2;
}

.chat-bubble.mine .chat-reactions {
  position: static;
}

.chat-reactions button {
  border-color: rgba(23, 165, 107, 0.28);
  background: #eaf8f1;
  box-shadow: 0 6px 14px rgba(17, 17, 17, 0.08);
}

.chat-reaction-dock {
  position: absolute;
  left: 14px;
  bottom: -16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-reaction-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  z-index: 3;
}

.chat-reaction-toggle {
  width: 28px;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 0;
  border: 1px solid #c9c5bd;
  border-radius: 50%;
  background: #f5f3ef;
  color: #8d8982;
  font-size: 20px;
  line-height: 1;
  filter: grayscale(1);
}

.chat-reaction-toggle small {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.chat-reaction-toggle.active {
  width: auto;
  min-width: 44px;
  padding: 0 9px;
  gap: 4px;
  border-color: rgba(23, 165, 107, 0.35);
  background: #ddf6e9;
  color: var(--ink);
  filter: none;
}

.chat-reaction-toggle:hover,
.chat-reaction-toggle:focus-visible,
.chat-reaction-control.open .chat-reaction-toggle {
  border-color: #9f9a91;
  background: #fff;
  color: #5f5b55;
}

.chat-reaction-toggle.active:hover,
.chat-reaction-toggle.active:focus-visible,
.chat-reaction-control.open .chat-reaction-toggle.active {
  border-color: rgba(23, 165, 107, 0.48);
  background: #ddf6e9;
  color: var(--ink);
}

.chat-reaction-bar {
  display: none;
  position: absolute;
  left: 0;
  right: auto;
  bottom: 34px;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f5f1;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.16);
}

.chat-reaction-control.open .chat-reaction-bar {
  display: flex;
}

.chat-reaction-bar button:hover,
.chat-reaction-bar button:focus-visible,
.chat-reactions button:hover,
.chat-reactions button:focus-visible {
  border-color: #b9b3aa;
  background: #fff;
  transform: translateY(-1px);
}

.chat-compose {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.chat-compose-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 46px;
  gap: 8px;
  align-items: end;
}

.chat-compose-row textarea {
  min-height: 46px;
  height: 46px;
  padding: 12px 16px;
  resize: none;
  border-radius: 24px;
  background: #fff;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  line-height: 1.4;
}

.chat-typing-status {
  margin: 0;
  padding-left: 50px;
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.chat-send-button {
  width: 46px;
  height: 46px;
  position: relative;
  display: inline-grid;
  place-items: center;
  align-self: end;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px rgba(23, 165, 107, 0.22);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-send-button:hover,
.chat-send-button:focus-visible {
  background: #12935e;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(23, 165, 107, 0.28);
}

.chat-send-button span {
  width: 21px;
  height: 18px;
  position: relative;
  display: block;
  transform: translateX(1px);
}

.chat-send-button span::before,
.chat-send-button span::after {
  content: "";
  position: absolute;
  display: block;
}

.chat-send-button span::before {
  width: 0;
  height: 0;
  left: 1px;
  top: 1px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 18px solid currentColor;
}

.chat-send-button span::after {
  width: 9px;
  height: 3px;
  left: 4px;
  top: 7px;
  border-radius: 999px;
  background: var(--green);
}

.chat-compose-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 50px;
}

.chat-compose .error {
  min-height: 0;
  margin: 0;
}

.chat-compose .error:empty {
  display: none;
}

.chat-file-trigger {
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f1efea;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.chat-file-trigger:hover {
  background: #e2ded6;
  transform: translateY(-1px);
}

.chat-file-trigger span {
  width: 18px;
  height: 18px;
  position: relative;
  display: block;
}

.chat-file-trigger span::before,
.chat-file-trigger span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.chat-file-trigger span::before {
  width: 18px;
  height: 3px;
}

.chat-file-trigger span::after {
  width: 3px;
  height: 18px;
}

.chat-file-trigger input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-file-list {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-file-chip {
  max-width: 280px;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chat-file-chip.image {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.chat-file-chip.image img {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}

.chat-file-chip.image span,
.chat-file-chip.image small {
  grid-column: 2;
}

.chat-file-chip.image button {
  grid-column: 3;
}

.chat-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.chat-file-chip small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.chat-file-chip button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1efea;
  color: var(--ink);
}

.chat-file-chip button:hover {
  background: #e2ded6;
}

.chat-delete-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 8px;
}

.chat-image-backdrop {
  padding: clamp(14px, 3vw, 36px);
  background: rgba(9, 9, 9, 0.76);
  backdrop-filter: blur(8px);
}

.chat-image-modal {
  width: min(1120px, 100%);
  max-height: calc(100svh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.chat-image-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f7f5f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-image-header div:first-child {
  min-width: 0;
}

.chat-image-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-image-header h2 {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.chat-image-download,
.chat-image-close {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
}

.chat-image-download {
  gap: 8px;
  padding: 0 13px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.chat-image-download span {
  width: 13px;
  height: 15px;
  position: relative;
  display: block;
  border-bottom: 3px solid currentColor;
}

.chat-image-download span::before,
.chat-image-download span::after {
  content: "";
  position: absolute;
  left: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.chat-image-download span::before {
  width: 3px;
  height: 12px;
  top: 0;
  border-radius: 999px;
}

.chat-image-download span::after {
  width: 9px;
  height: 9px;
  top: 5px;
  background: transparent;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.chat-image-close {
  width: 38px;
  position: relative;
  background: #ebe7df;
  color: var(--ink);
}

.chat-image-close span::before,
.chat-image-close span::after {
  content: "";
  width: 14px;
  height: 2px;
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: currentColor;
}

.chat-image-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.chat-image-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.chat-image-download:hover,
.chat-image-download:focus-visible {
  background: #12935e;
}

.chat-image-close:hover,
.chat-image-close:focus-visible {
  background: #f1d8d5;
  color: var(--red);
}

.chat-image-viewer {
  min-height: min(76svh, 760px);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(12px, 2vw, 22px);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.035) 25%, transparent 25%),
    #101010;
  background-size: 22px 22px;
}

.chat-image-viewer img {
  max-width: 100%;
  max-height: min(76svh, 760px);
  display: block;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.chat-empty {
  margin: auto;
  text-align: center;
}

.today-status-card {
  display: grid;
  align-items: stretch;
  gap: 0;
  border-left: 8px solid var(--red);
  padding: 0;
  overflow: hidden;
}

.today-status-card.has-one-action {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.today-status-card.has-two-actions {
  grid-template-columns: minmax(320px, 1fr) repeat(2, minmax(220px, 280px));
}

.today-status-card.has-three-actions {
  grid-template-columns: minmax(340px, 1fr) repeat(3, minmax(190px, 250px));
}

.today-status-card.status-present {
  border-left-color: var(--green);
}

.today-status-card.status-finished {
  border-left-color: var(--teal);
}

.today-status-content {
  min-width: 0;
  padding: 24px;
}

.dashboard-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.today-status-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

.today-booking-message {
  margin: 10px 0 0;
  color: var(--muted);
}

.today-booking-message.has-open-time {
  color: var(--amber);
  font-weight: 800;
}

.dashboard-action-panel {
  min-width: 0;
  padding: 22px;
}

.dashboard-action-panel .attendance-cta {
  min-width: 0;
  padding: 18px 16px;
  font-size: clamp(18px, 1.45vw, 24px);
  white-space: normal;
  overflow-wrap: anywhere;
}

.today-status-card .work-action-panel {
  background: #f2fbf7;
}

.today-status-card .pause-action-panel {
  background: #faf7f2;
}

.today-status-card.status-present .attendance-end-panel {
  background: #fff5f4;
}

.today-status-card:not(.status-present) .attendance-end-panel {
  background: #f2fbf7;
}

.today-metric {
  border-top: 4px solid var(--teal);
}

.today-metric.attention {
  border-top-color: var(--amber);
  background: #fffaf0;
}

.today-metric.complete {
  border-top-color: var(--green);
}

.dashboard-section-title {
  margin-top: 10px;
}

.dashboard-section-title h2 {
  margin: 0;
}

.next-vacation {
  font-size: 20px !important;
  line-height: 1.25;
}

.metric-link {
  justify-self: start;
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.metric-link:hover {
  color: var(--green);
}

.break-compliance-alert,
.break-adjustment-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid #efb4af;
  border-left: 6px solid var(--red);
  border-radius: 8px;
  background: #fff5f4;
  color: #70201c;
}

.break-compliance-alert h2,
.break-adjustment-notice h2 {
  margin: 2px 0 6px;
}

.break-compliance-alert p,
.break-adjustment-notice p {
  margin: 0;
}

.break-compliance-cta {
  flex: 0 0 auto;
  background: var(--red);
}

.break-compliance-panel {
  border-left: 6px solid var(--red);
  background: #fffaf9;
}

.break-compliance-head,
.break-compliance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.break-compliance-head .hint {
  margin-bottom: 0;
}

.break-compliance-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.break-compliance-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.break-compliance-item.is-focused {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(194, 65, 59, 0.12);
}

.break-compliance-item > div,
.break-compliance-task {
  display: grid;
  gap: 3px;
}

.break-compliance-item > div:first-child {
  min-width: 210px;
}

.break-compliance-task {
  flex: 1;
  color: var(--muted);
}

.break-compliance-task strong {
  color: var(--red);
}

.break-modal-guidance {
  margin-bottom: 0;
}

tr.is-break-focus td {
  background: #fff1ef;
}

.auto-close-notification-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 22px;
}

.attendance-booking-modal {
  width: min(460px, 100%);
}

.status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: stretch;
  gap: 24px;
  border-left: 8px solid var(--red);
  padding: 0;
  overflow: hidden;
}

.status-card.is-present {
  border-left-color: var(--green);
}

.status-card.has-break-action {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) minmax(220px, 300px);
  gap: 0;
}

.status-content {
  padding: 22px 20px;
}

.attendance-action-panel {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  background: #faf7f2;
  border-left: 1px solid var(--line);
}

.status-card.is-present .attendance-action-panel {
  background: #fff5f4;
}

.status-card.is-present .pause-action-panel {
  background: #faf7f2;
}

.pause-action-panel .attendance-cta.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.action-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-card h2 {
  margin: 0;
}

.dashboard-clock-card.is-present .attendance-action-panel {
  background: #f2fbf7;
}

.dashboard-clock-card.is-present .pause-action-panel {
  background: #faf7f2;
}

.attendance-cta {
  min-height: 122px;
  width: 100%;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 24px;
  line-height: 1.1;
  box-shadow: 0 20px 38px rgba(21, 21, 21, 0.24);
}

.time-toolbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  margin-bottom: 4px;
}

.range-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.summary-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}

.summary-strip span {
  display: grid;
  min-width: 150px;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.summary-strip strong {
  font-size: 20px;
}

.summary-strip small {
  color: var(--muted);
}

.summary-strip span.positive strong {
  color: var(--green);
}

.summary-strip span.negative strong {
  color: var(--red);
}

.bar-meter {
  width: 130px;
  max-width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #ece9e2;
  overflow: hidden;
  display: inline-flex;
  vertical-align: middle;
  margin-right: 8px;
}

.bar-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.tabbar {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f2ec;
}

.tabbar button {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.tabbar button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
}

.admin-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  margin-bottom: 16px;
  padding: 4px;
  background: #ece9e2;
}

.admin-tabs button {
  position: relative;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.admin-tabs button:hover {
  color: var(--ink);
}

.admin-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(21, 21, 21, 0.08), inset 0 -3px 0 var(--green);
}

.management-overview {
  display: grid;
  gap: 18px;
}

.management-overview-intro {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f1f8f4 100%);
  box-shadow: 0 8px 24px rgba(21, 21, 21, 0.05);
}

.management-overview-intro h2 {
  margin: 4px 0 4px;
  font-size: 26px;
}

.management-overview-intro .hint {
  margin: 0;
}

.birthday-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #f0c36d;
  border-radius: 10px;
  background: #fff8e7;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(21, 21, 21, 0.05);
}

.birthday-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font-weight: 800;
}

.birthday-notice p {
  margin: 2px 0 0;
  color: var(--muted);
}

.management-group {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(21, 21, 21, 0.05);
}

.management-group-head {
  margin-bottom: 14px;
}

.management-group-head h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.management-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.management-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.management-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 86px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f6;
  color: var(--ink);
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.management-card:hover {
  transform: translateY(-2px);
  border-color: #a9cdbd;
  background: #fff;
  box-shadow: 0 10px 22px rgba(21, 21, 21, 0.09);
}

.management-card-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e4f3ec;
  color: #0f6b48;
  font-size: 18px;
  font-weight: 800;
}

.management-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.management-card strong {
  font-size: 16px;
}

.management-card small {
  color: var(--muted);
  font-size: 12px;
}

.management-card-arrow {
  color: var(--green);
  font-size: 20px;
}

.management-content {
  min-width: 0;
}

.management-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.management-back-link {
  padding: 4px 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-grid {
  align-items: start;
}

.admin-panel-head,
.admin-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-panel-head .hint {
  margin-bottom: 0;
}

.admin-table-tools {
  justify-content: flex-start;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.admin-table-tools .field {
  min-width: 180px;
}

.admin-table-tools .admin-search {
  flex: 1 1 320px;
}

.admin-result-count {
  margin: 12px 0 4px;
}

.project-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-page-size,
.project-page-navigation,
.project-page-buttons {
  display: flex;
  align-items: center;
}

.project-page-size {
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.project-page-size select {
  width: 82px;
  min-height: 38px;
  padding: 0 30px 0 11px;
  background-color: #faf9f6;
}

.project-page-navigation {
  gap: 14px;
}

.project-page-indicator {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.project-page-indicator strong {
  color: var(--ink);
}

.project-page-buttons {
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f6;
}

.project-page-buttons button {
  width: 36px;
  height: 34px;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.project-page-buttons button:hover:not(:disabled) {
  background: #e8f5ee;
  color: var(--green);
}

.project-page-buttons button:disabled {
  color: #bbb7ae;
  cursor: default;
  opacity: 0.65;
}

.admin-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.project-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.project-name i {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
}

.project-notes {
  max-width: 560px;
  color: var(--muted);
}

.project-display {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: 100%;
}

.project-note-preview {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  max-width: 380px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.empty-table {
  padding: 24px 8px;
  color: var(--muted);
  text-align: center;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
}

.vacation-proration-option .notice {
  margin: 2px 0 0;
}

.employee-modal {
  width: min(900px, 100%);
  padding: 18px 20px;
}

.employee-modal .modal-header {
  margin-bottom: 12px;
}

.employee-modal .modal-header .hint {
  margin: 3px 0 0;
}

.employee-modal .form-grid {
  gap: 9px 12px;
}

.employee-modal input,
.employee-modal select {
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.employee-modal .weekly-targets {
  gap: 7px;
  padding: 7px 9px 8px;
}

.vacation-date-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.employee-modal .vacation-proration-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.employee-modal .vacation-proration-option .notice {
  min-width: 210px;
  padding: 9px 11px;
  white-space: nowrap;
}

.password-change {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.password-change summary {
  padding: 9px 11px;
  color: var(--teal);
  cursor: pointer;
  font-weight: 700;
}

.password-change[open] {
  padding: 0 11px 11px;
}

.password-change[open] summary {
  margin: 0 -11px 8px;
}

.employee-modal .modal-actions {
  margin-top: 10px;
}

.status-metrics {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.status-metrics span {
  display: grid;
  gap: 2px;
}

.status-metrics strong {
  font-size: 22px;
}

.status-metrics small {
  color: var(--muted);
}

.text-link {
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  padding: 0;
  min-height: auto;
  white-space: nowrap;
}

.quiet-panel {
  box-shadow: none;
}

.needs-project {
  background: #fffaf0;
}

.needs-project td:first-child {
  border-left: 4px solid var(--amber);
}

.vacation-row {
  background: #f2f8f6;
}

.vacation-row td:first-child {
  border-left: 4px solid var(--teal);
}

.vacation-pill {
  background: #e4f4f0;
  color: var(--teal);
}

.pill.sick {
  background: #e8f0ff;
  color: #2458a6;
}

.sick-row {
  background: #f6f9ff;
}

.pill.muted {
  background: #ece9e2;
  color: var(--muted);
}

.compact-select {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.compact-select span {
  color: var(--muted);
  font-size: 13px;
}

.project-booking {
  display: grid;
  gap: 14px;
}

.attendance-booking-summary {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf7;
  padding: 14px;
}

.attendance-booking-summary .summary-strip {
  margin: 0;
}

.booking-detail-table .booking-break-row {
  background: #f6f9ff;
}

.booking-detail-table .booking-break-row td {
  font-weight: 700;
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.form-head .hint {
  margin-bottom: 0;
}

.compact-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.6fr) minmax(260px, 1.4fr);
}

.project-time-form {
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(140px, 0.7fr));
  align-items: start;
}

.disabled-panel {
  opacity: 0.64;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.date-range-control {
  position: relative;
}

.date-range-control input {
  cursor: pointer;
  padding-right: 42px;
}

.date-range-open {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.date-range-open:hover {
  background: #ece9e2;
  color: var(--ink);
}

.date-range-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 292px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.date-range-popover:empty {
  display: none;
}

.date-range-picker {
  padding: 10px;
}

.date-range-picker-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.date-range-picker-head strong {
  text-align: center;
}

.date-range-picker-head button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 6px;
  background: #ece9e2;
  color: var(--ink);
  padding: 0;
}

.date-range-weekdays,
.date-range-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-range-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 0;
}

.date-range-day {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.date-range-day.muted {
  color: #b8b4ad;
}

.date-range-day.in-range {
  background: #e5f3ee;
}

.date-range-day.selected {
  background: var(--green);
  color: white;
}

.date-range-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.project-combobox {
  position: relative;
}

.project-combobox input {
  padding-right: 42px;
}

.project-combobox-toggle {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.project-combobox-toggle:hover {
  background: #ece9e2;
  color: var(--ink);
}

.project-combobox-options {
  position: absolute;
  z-index: 19;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, 100%);
  max-height: 240px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
}

.project-combobox-options:empty {
  display: none;
}

.project-combobox-option {
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 8px 10px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.project-combobox-option-name {
  display: block;
  width: 100%;
}

.project-combobox-option:hover,
.project-combobox-option.active {
  background: #ece9e2;
}

.project-combobox-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  text-overflow: clip;
  max-width: 100%;
}

.project-combobox-empty {
  color: var(--muted);
  padding: 8px 10px;
}

.field.guided-focus {
  border: 1px solid var(--teal);
  border-radius: 8px;
  padding: 8px;
  background: #f2f8f6;
}

.field.full {
  grid-column: 1 / -1;
}

.weekly-targets-field {
  container-type: inline-size;
}

.duration-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.weekly-targets {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.weekly-targets legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.weekly-targets label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.weekly-targets span {
  font-weight: 700;
  color: var(--ink);
}

.weekly-targets input {
  min-height: 38px;
  padding: 7px 8px;
}

@container (max-width: 540px) {
  .weekly-targets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container (max-width: 300px) {
  .weekly-targets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

label {
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.vacation-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.vacation-table-wrap {
  overflow-x: visible;
}

.vacation-table {
  min-width: 0;
  table-layout: fixed;
}

.vacation-table th,
.vacation-table td {
  padding-right: 5px;
  padding-left: 5px;
}

.vacation-table th:nth-child(1) { width: 17%; }
.vacation-table th:nth-child(2) { width: 12%; }
.vacation-table th:nth-child(3) { width: 21%; }
.vacation-table th:nth-child(4) { width: 8%; }
.vacation-table th:nth-child(5) { width: 16%; }
.vacation-table th:nth-child(6) { width: 26%; }

.vacation-table .vacation-actions {
  gap: 6px;
  flex-wrap: wrap;
  white-space: normal;
}

.vacation-table .vacation-actions .btn {
  padding: 8px 10px;
}

.vacation-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.vacation-filters.has-user-filter {
  grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(160px, 1fr));
}

.vacation-create-modal {
  width: min(720px, 100%);
}

.vacation-create-modal .modal-header .hint,
.vacation-create-hint {
  margin-bottom: 0;
}

.vacation-create-modal .date-range-field {
  width: 100%;
}

.vacation-multi-select {
  position: relative;
  min-width: 0;
}

.vacation-multi-select summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.vacation-multi-select summary::-webkit-details-marker {
  display: none;
}

.vacation-multi-select summary::after {
  content: "▾";
  color: var(--muted);
}

.vacation-multi-select[open] summary {
  border-color: var(--teal);
}

.vacation-multi-options {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 240px);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.vacation-multi-options label,
.vacation-multi-options button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--ink);
  cursor: pointer;
}

.vacation-multi-options label:hover,
.vacation-multi-options button:hover {
  background: #ece9e2;
}

.vacation-multi-options button {
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.vacation-multi-options input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.vacation-filter-result {
  margin: 10px 0;
}

.has-vacation-details td {
  border-bottom: 0;
  padding-bottom: 6px;
}

.vacation-table tr.vacation-focus td {
  background: #eaf7f1;
  box-shadow: inset 0 2px 0 #8bc7ab, inset 0 -2px 0 #8bc7ab;
}

.vacation-table tr.vacation-focus td:first-child {
  box-shadow: inset 3px 0 0 var(--green), inset 0 2px 0 #8bc7ab, inset 0 -2px 0 #8bc7ab;
}

.vacation-details-row td {
  padding-top: 0;
}

.vacation-details {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #faf9f6;
  color: var(--muted);
}

.vacation-note,
.vacation-holiday-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.vacation-note strong,
.vacation-holiday-note strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.vacation-holiday-note {
  color: #0f6b48;
}

.vacation-holiday-note strong {
  color: #0f6b48;
}

.vacation-note-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vacation-note-text.collapsible:not(.expanded) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.vacation-note-toggle {
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 700;
  white-space: nowrap;
}

.holiday-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.holiday-toolbar input[type="number"] {
  width: 110px;
}

.holiday-panel-head .hint {
  margin-bottom: 0;
}

.holiday-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.btn {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  white-space: nowrap;
  overflow-wrap: normal;
}

.btn.secondary {
  background: #ece9e2;
  color: var(--ink);
}

.btn.green {
  background: var(--green);
}

.btn.red {
  background: var(--red);
}

.btn[data-delete-attendance] {
  background: var(--red);
  color: white;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ece9e2;
  color: var(--ink);
  font-weight: 800;
}

.icon-btn-symbol {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  background: #edf7f2;
  color: #0f6b48;
  white-space: nowrap;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: fit-content;
  min-height: 30px;
  max-width: min(100%, 34ch);
  padding: 4px 12px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 999px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: bottom;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.date-cell {
  white-space: nowrap;
  overflow-wrap: normal;
}

.clock-box {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 14px;
}

.pill.pending {
  background: #fff4d8;
  color: var(--amber);
}

.pill.rejected {
  background: #fde8e7;
  color: var(--red);
}

.pill.cancelled {
  background: #ece9e2;
  color: #514d47;
}

.pill.manual {
  background: #e4f4f0;
  color: var(--teal);
}

.pill.auto-closed {
  background: #fff4d8;
  color: var(--amber);
}

.pill.status-booked,
.pill.hint-ok {
  background: #edf7f2;
  color: #0f6b48;
}

.pill.status-missing,
.pill.hint-warning {
  background: #fff4d8;
  color: var(--amber);
}

.pill.status-open {
  background: #fde8e7;
  color: var(--red);
}

.pill.hint-ok,
.pill.hint-warning {
  justify-content: center;
  min-width: 28px;
}

.notice {
  border-left: 4px solid var(--teal);
  background: #edf9fb;
  padding: 12px;
  border-radius: 8px;
  color: #14515b;
}

.warning-notice {
  border-left-color: var(--amber);
  background: #fff7df;
  color: #7a4b00;
}

.time-context-warning {
  margin: 0;
  font-weight: 700;
}

.error {
  color: var(--red);
  min-height: 22px;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 17, 17, 0.52);
}

.modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

.profile-modal {
  width: min(720px, 100%);
}

.profile-picture-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.profile-avatar-large {
  width: 104px;
  height: 104px;
  flex-basis: 104px;
  font-size: 28px;
}

.profile-picture-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.profile-file-label {
  cursor: pointer;
}

.profile-file-name {
  flex-basis: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-account-data {
  margin-bottom: 22px;
}

.profile-account-data input[readonly] {
  color: var(--muted);
  background: #f4f2ed;
}

.profile-modal h3 {
  margin: 4px 0 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.correction-history-list {
  display: grid;
  gap: 14px;
}

.correction-history-modal {
  width: min(980px, calc(100vw - 48px));
}

.correction-history-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #faf9f6;
}

.correction-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.correction-history-meta span {
  color: var(--muted);
}

.correction-history-item p {
  margin: 6px 0;
}

.correction-history-table {
  margin-top: 10px;
  table-layout: fixed;
  width: 100%;
}

.correction-history-table th,
.correction-history-table td {
  padding: 8px;
  overflow-wrap: anywhere;
}

.correction-history-table tbody tr.changed {
  background: #fff4d8;
}

.correction-history-table tbody tr.changed th {
  color: var(--amber);
}

.correction-history-table tbody tr.changed td:last-child {
  font-weight: 800;
}

@media (min-width: 901px) and (max-width: 1450px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .sidebar {
    padding: 22px 14px;
  }

  .sidebar-head img {
    width: 138px;
  }

  .content {
    padding: 22px;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .chat-layout {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 12px;
    height: calc(100vh - 104px);
    min-height: 0;
  }

  .chat-contacts,
  .chat-thread {
    padding: 14px;
  }

  .chat-panel-head,
  .chat-thread-head {
    padding-bottom: 10px;
  }

  .chat-contact {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 8px;
  }

  .chat-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .chat-messages {
    gap: 8px;
    padding: 14px 2px 16px 0;
  }

.chat-bubble {
    width: min(620px, 88%);
    padding: 10px 12px 28px;
  }

  .chat-compose {
    padding-top: 8px;
  }

  .chat-compose-row textarea {
    height: 44px;
    min-height: 44px;
  }

  .chat-file-trigger {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .vacation-form-panel,
  .vacation-list-panel {
    grid-column: span 12;
  }

  .today-status-card.has-two-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-status-card.has-three-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .today-status-card.has-two-actions .today-status-content,
  .today-status-card.has-three-actions .today-status-content {
    grid-column: 1 / -1;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .chat-layout {
    height: calc(100vh - 92px);
  }

  .chat-thread-head,
  .chat-panel-head {
    flex-shrink: 0;
  }

  .chat-compose-row textarea {
    min-height: 58px;
  }
}

@media (max-width: 900px) {
  .chat-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chat-contacts,
  .chat-thread {
    padding: 14px;
  }

  .chat-layout.mobile-list-open .chat-thread {
    display: none;
  }

  .chat-layout.mobile-thread-open .chat-contacts {
    display: none;
  }

  .chat-layout.mobile-list-open .chat-contacts,
  .chat-layout.mobile-thread-open .chat-thread {
    display: flex;
  }

  .chat-mobile-back {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f2f0eb;
    color: var(--ink);
    font-weight: 700;
  }

  .chat-mobile-back span {
    font-size: 25px;
    line-height: 0.7;
  }

  .chat-thread-head {
    flex-wrap: wrap;
  }

  .chat-thread-title {
    flex: 1 1 180px;
  }

  .chat-contact-list {
    max-height: calc(100svh - 300px);
  }

  .chat-messages {
    max-height: 54vh;
    padding-right: 0;
  }

  .chat-bubble {
    width: min(620px, 92%);
  }

  .chat-compose-row {
    grid-template-columns: 1fr;
  }

  .chat-compose-row textarea {
    min-height: 68px;
  }

  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .brand-pane {
    min-height: 280px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    max-height: none;
    z-index: 3;
    padding: 12px 18px;
    overflow: visible;
  }

  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .sidebar-head img {
    width: 128px;
  }

  .menu-toggle {
    display: grid;
  }

  .sidebar-menu {
    display: none;
    padding-top: 16px;
  }

  .sidebar.is-open .sidebar-menu {
    display: flex;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .user-box {
    margin-top: 0;
  }

  .management-card-grid {
    grid-template-columns: 1fr;
  }

  .profile-picture-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .span-4,
  .span-5,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 12;
  }

  .content {
    padding: 18px;
  }

  .today-status-card.has-one-action,
  .today-status-card.has-two-actions,
  .today-status-card.has-three-actions {
    grid-template-columns: 1fr;
  }

  .status-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .status-card.has-break-action {
    grid-template-columns: 1fr;
  }

  .attendance-action-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .attendance-cta {
    width: 100%;
  }

  .break-compliance-alert,
  .break-adjustment-notice,
  .break-compliance-head,
  .break-compliance-item {
    align-items: stretch;
    flex-direction: column;
  }

  .break-compliance-alert .btn,
  .break-adjustment-notice .btn,
  .break-compliance-item .btn {
    width: 100%;
  }

  .compact-form {
    grid-template-columns: 1fr;
  }

  .form-head {
    align-items: stretch;
    flex-direction: column;
  }

  .form-head .btn {
    width: 100%;
  }

  .responsive-table {
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
    background: #fff;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    gap: 12px;
    align-items: center;
    border-bottom: 0;
    padding: 8px 4px;
  }

  .responsive-table td.date-cell {
    display: grid;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .vacation-table .vacation-details-row {
    margin-top: -13px;
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }

  .vacation-table .vacation-details-row td {
    display: block;
    padding-top: 0;
  }

  .vacation-table .vacation-details-row td::before {
    display: none;
  }
}

@media (max-width: 1100px), (max-height: 760px) {
  .login-shell {
    min-height: 100svh;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .brand-pane {
    min-height: 0;
    padding: clamp(18px, 4vw, 32px);
    flex-direction: row;
    align-items: center;
    gap: 22px;
  }

  .brand-pane img {
    width: clamp(132px, 24vw, 220px);
  }

  .brand-pane h1 {
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1;
    margin: 0 0 8px;
  }

  .brand-pane p {
    max-width: 520px;
    font-size: 14px;
  }

  .login-card {
    align-self: start;
    margin: clamp(18px, 5vh, 48px) auto;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .brand-pane {
    padding: 16px 24px;
  }

  .brand-pane h1,
  .brand-pane p {
    display: none;
  }

  .brand-pane img {
    width: 150px;
  }

  .login-card {
    margin: 18px auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .content {
    padding: 12px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .chat-layout {
    gap: 10px;
  }

  .chat-contacts,
  .chat-thread {
    padding: 12px;
  }

  .chat-panel-head,
  .chat-thread-head {
    align-items: flex-start;
    gap: 10px;
  }

  .chat-panel-head h2,
  .chat-thread-head h2 {
    font-size: 20px;
  }

  .chat-thread-title {
    gap: 9px;
  }

  .chat-thread-head .btn {
    min-height: 38px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .chat-contact-list {
    max-height: calc(100svh - 285px);
  }

  .chat-contact {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 8px;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 12px;
  }

  .chat-messages {
    max-height: 52svh;
    gap: 8px;
    padding-top: 12px;
  }

  .chat-bubble {
    width: 96%;
    padding: 10px 11px 28px;
  }

  .chat-bubble p {
    font-size: 15px;
  }

  .chat-bubble-footer {
    gap: 5px;
    font-size: 11px;
  }

  .chat-reactions {
    left: 46px;
    bottom: -14px;
  }

  .chat-bubble.mine .chat-reactions {
    left: 46px;
    right: auto;
  }

  .chat-reactions button,
  .chat-reaction-bar button {
    min-width: 30px;
    height: 28px;
  }

  .chat-compose {
    gap: 6px;
    padding-top: 8px;
  }

  .chat-typing-status {
    padding-left: 48px;
  }

  .chat-compose-row {
    grid-template-columns: 40px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .chat-compose-row textarea {
    height: 44px;
    min-height: 44px;
  }

  .chat-typing-status {
    padding-left: 0;
  }

  .chat-send-button {
    width: 44px;
    height: 44px;
  }

  .chat-compose-tools {
    align-items: stretch;
    padding-left: 48px;
  }

  .chat-file-trigger {
    width: 40px;
    height: 40px;
  }

  .chat-file-list {
    width: 100%;
  }

  .chat-image-attachment {
    width: min(320px, 100%);
  }

  .chat-image-attachment img {
    max-height: 300px;
  }

  .chat-image-backdrop {
    padding: 8px;
  }

  .chat-image-modal {
    max-height: calc(100svh - 16px);
  }

  .chat-image-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .chat-image-header h2 {
    max-width: calc(100vw - 40px);
    font-size: 16px;
  }

  .chat-image-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .chat-image-viewer {
    min-height: 58svh;
    padding: 10px;
  }

  .chat-image-viewer img {
    max-height: 58svh;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .vacation-date-fields,
  .employee-modal .vacation-proration-option {
    grid-template-columns: 1fr;
  }

  .employee-modal .vacation-proration-option .notice {
    min-width: 0;
    white-space: normal;
  }

  .admin-tabs,
  .admin-panel-head,
  .admin-table-tools {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-panel-head .btn,
  .admin-table-tools .field {
    width: 100%;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-table-tools .field,
  .admin-table-tools .admin-search {
    flex: none;
    min-height: 0;
  }

  .admin-table-tools input,
  .admin-table-tools select {
    height: 44px;
    min-height: 44px;
  }

  .project-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .project-page-navigation {
    justify-content: space-between;
  }

  .vacation-filters {
    grid-template-columns: 1fr;
  }

  .vacation-filters.has-user-filter {
    grid-template-columns: 1fr;
  }

  .vacation-note,
  .vacation-holiday-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .today-status-card .attendance-cta {
    min-height: 88px;
    font-size: 20px;
  }

  .holiday-toolbar,
  .holiday-toolbar .actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .holiday-toolbar input[type="number"],
  .holiday-toolbar .btn {
    width: 100%;
  }

  .responsive-table td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .responsive-table .btn {
    width: 100%;
  }

  .project-pill {
    max-width: min(100%, 30ch);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
