:root {
  --ledge-black: #000000;
  --ledge-navy: #ffffff;
  --ledge-dark: #0c0c14;
  --ledge-blue: #00d4ff;
  --ledge-blue-light: #a855f7;
  --ledge-green: #00e5a0;
  --ledge-green-soft: #ff6b35;
  --ledge-accent: #ff006e;
  --ledge-bg: #000000;
  --ledge-surface: rgba(12, 12, 22, 0.88);
  --ledge-surface-solid: #0e0e18;
  --ledge-border: rgba(0, 212, 255, 0.22);
  --ledge-text: #ffffff;
  --ledge-muted: rgba(255, 255, 255, 0.58);
  --ledge-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 212, 255, 0.15);
  --ledge-radius: 12px;
  --ledge-glow: 0 0 24px rgba(0, 212, 255, 0.25);
  --ledge-gradient: linear-gradient(135deg, #00d4ff 0%, #a855f7 45%, #ff006e 75%, #ff6b35 100%);
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--ledge-text);
  background: var(--ledge-bg);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell-main {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  background: var(--ledge-surface);
  border-top: 1px solid var(--ledge-border);
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  text-align: center;
}

.site-footer-brand {
  display: inline-flex;
  line-height: 0;
}

.site-footer-brand:hover {
  text-decoration: none;
  opacity: 0.88;
}

.site-footer-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: min(200px, 55vw);
}

.site-footer-text {
  margin: 0;
  max-width: 42rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ledge-muted);
}

.site-footer-text a {
  color: var(--ledge-navy);
  font-weight: 600;
}

a {
  color: var(--ledge-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--ledge-surface);
  border-bottom: 1px solid var(--ledge-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  height: 42px;
  width: auto;
}

.brand span {
  font-weight: 700;
  color: var(--ledge-navy);
  font-size: 1.05rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  color: var(--ledge-navy);
}

.page-subtitle {
  margin: 0 0 1.5rem;
  color: var(--ledge-muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tile-sortable {
  position: relative;
  min-width: 0;
}

.tile-sortable.tile-dragging {
  opacity: 0.75;
  z-index: 5;
}

.tile-sortable.tile-dragging .tile {
  pointer-events: none;
  cursor: grabbing;
}

body.dashboard-tiles-dragging {
  cursor: grabbing;
  user-select: none;
}

.tile-sortable.tile-drag-over .tile {
  border-color: var(--ledge-blue);
  box-shadow: 0 0 0 2px rgba(26, 92, 224, 0.2);
}

.tile-drag-handle {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ledge-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.tile-drag-handle:hover {
  color: var(--ledge-blue);
  background: #fff;
}

.tile-sortable.tile-dragging .tile-drag-handle {
  cursor: grabbing;
}

.tile-sortable .tile {
  height: 100%;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  box-shadow: var(--ledge-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: inherit;
  text-decoration: none;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: var(--ledge-blue-light);
  box-shadow: 0 8px 32px rgba(26, 92, 224, 0.12);
  text-decoration: none;
}

.tile-icon-wrap {
  position: relative;
  width: fit-content;
}

.tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(26, 92, 224, 0.12), rgba(0, 208, 132, 0.12));
  color: var(--ledge-blue);
}

.tile-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--ledge-surface);
}

.tile-badge.hidden {
  display: none;
}

.tile h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ledge-navy);
}

.tile p {
  margin: 0;
  color: var(--ledge-muted);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-input,
.text-input,
.select-input,
textarea {
  width: 100%;
  max-width: 360px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  background: var(--ledge-surface);
}

textarea {
  max-width: 100%;
  min-height: 90px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--ledge-gradient);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn-secondary {
  background: var(--ledge-surface);
  color: var(--ledge-navy);
  border: 1px solid var(--ledge-border);
}

.btn-danger {
  background: #cf2e2e;
  color: #fff;
}

.btn-link {
  background: transparent;
  color: var(--ledge-blue);
  padding: 0;
}

.card {
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  box-shadow: var(--ledge-shadow);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ledge-border);
  text-align: left;
}

.table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ledge-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table tr:hover td {
  background: rgba(0, 212, 255, 0.05);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(0, 212, 255, 0.08);
}

.clickable-row:focus {
  outline: none;
}

.clickable-row:focus td {
  background: #e8f0fe;
  box-shadow: inset 0 0 0 2px var(--ledge-blue-light);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-yes {
  background: rgba(0, 208, 132, 0.15);
  color: #047857;
}

.badge-no {
  background: rgba(103, 117, 127, 0.15);
  color: var(--ledge-muted);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(0, 208, 132, 0.12);
  color: #065f46;
  border: 1px solid rgba(0, 208, 132, 0.25);
}

.alert-error {
  background: rgba(207, 46, 46, 0.1);
  color: #991b1b;
  border: 1px solid rgba(207, 46, 46, 0.2);
}

.alert-error-message {
  margin: 0;
}

.user-delete-deps {
  margin-top: 0.75rem;
}

.user-delete-deps-details {
  border: 1px solid rgba(207, 46, 46, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.user-delete-deps-details > summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  color: #991b1b;
  list-style: none;
}

.user-delete-deps-details > summary::-webkit-details-marker {
  display: none;
}

.user-delete-deps-details > summary::before {
  content: "▸ ";
}

.user-delete-deps-details[open] > summary::before {
  content: "▾ ";
}

.user-delete-deps-body {
  padding: 0 0.85rem 0.85rem;
}

.user-delete-deps-card {
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  max-width: 640px;
}

.user-delete-deps-card-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.user-delete-deps-card-intro {
  margin: 0 0 0.75rem;
  color: var(--ledge-muted);
  font-size: 0.92rem;
}

.user-delete-deps-section + .user-delete-deps-section {
  margin-top: 0.85rem;
}

.user-delete-deps-heading {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ledge-muted);
}

.user-delete-deps-list,
.user-delete-deps-links {
  margin: 0;
  padding-left: 1.1rem;
}

.user-delete-deps-item {
  margin-bottom: 0.65rem;
}

.user-delete-deps-item:last-child {
  margin-bottom: 0;
}

.user-delete-deps-count {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.user-delete-deps-item p {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.9rem;
}

.user-delete-deps-links {
  font-size: 0.88rem;
}

.user-delete-deps-item--unlink .user-delete-deps-count {
  background: rgba(207, 46, 46, 0.12);
  color: #991b1b;
}

.login-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(420px, 100%);
  background: var(--ledge-surface);
  border-radius: var(--ledge-radius);
  box-shadow: var(--ledge-shadow);
  padding: 2rem;
}

.login-card .brand {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--ledge-navy);
  font-size: 0.9rem;
}

.form-group .text-input {
  max-width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ledge-muted);
  margin: 1.25rem 0;
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ledge-border);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  background: #fff;
  color: #3c4043;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.15);
}

.btn-google:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: #202124;
}

.btn-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.settings-layout {
  display: grid;
  gap: 1rem;
}

.category-card {
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  overflow: hidden;
}

.category-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(26, 92, 224, 0.08), rgba(0, 208, 132, 0.06));
  border-bottom: 1px solid var(--ledge-border);
}

.category-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ledge-navy);
}

.section-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
}

.section-block:last-child {
  border-bottom: none;
}

.section-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ledge-dark);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
}

.settings-grid .label {
  color: var(--ledge-text);
  font-size: 0.92rem;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--ledge-green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.vat-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
}

.vat-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ledge-navy);
}

.vat-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  align-items: start;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.sticky-footer {
  position: sticky;
  bottom: 0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--ledge-border);
  padding: 1rem 0;
  margin-top: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--ledge-blue);
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.folder-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.folder-card:hover {
  border-color: var(--ledge-blue-light);
  background: #fff;
  text-decoration: none;
}

.folder-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.folder-mgmt-panel {
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
  border-color: rgba(207, 46, 46, 0.25);
}

.folder-mgmt-warning {
  color: #9b2c2c;
  margin: 0 0 1rem;
}

.folder-delete-form {
  margin: 0;
}

.client-meta-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.client-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.client-meta-edit {
  margin-bottom: 1rem;
}

.meta-item-wide {
  grid-column: span 2;
}

.meta-item-editable:focus-within {
  border-color: var(--ledge-blue-light);
  box-shadow: 0 0 0 3px rgba(26, 92, 224, 0.1);
}

.meta-item-static {
  opacity: 0.85;
}

.meta-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0.25rem 0;
}

.client-mail-link {
  color: var(--ledge-blue);
  font-weight: 600;
  text-decoration: none;
}

.client-mail-link:hover {
  text-decoration: underline;
}

.client-mail-link-icon {
  margin-left: 0.2rem;
}

.representative-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.representative-email-row .text-input {
  flex: 1 1 220px;
}

.client-log-time-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 1.25rem 0;
}

.client-log-time-alert p {
  margin: 0;
}

.checklist-time-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.project-card-actions form {
  margin: 0;
}

.meta-input {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--ledge-border);
  border-radius: 6px;
  font: inherit;
  color: var(--ledge-navy);
  background: #fff;
}

.meta-textarea {
  resize: vertical;
  min-height: 2.5rem;
}

.meta-input:focus {
  outline: none;
  border-color: var(--ledge-blue-light);
  box-shadow: 0 0 0 2px rgba(26, 92, 224, 0.12);
}

.meta-item {
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.meta-item small {
  display: block;
  color: var(--ledge-muted);
  margin-bottom: 0.2rem;
}

.client-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
  border-bottom: 1px solid var(--ledge-border);
}

.client-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  color: var(--ledge-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 600;
}

.client-tab:hover {
  color: var(--ledge-blue);
  text-decoration: none;
}

.client-tab.active {
  color: var(--ledge-blue);
  border-bottom-color: var(--ledge-blue);
}

.tab-count {
  background: rgba(26, 92, 224, 0.12);
  color: var(--ledge-blue);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
}

.comments-section .section-hint {
  margin: 0.35rem 0 0;
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.comment-composer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
}

.comment-compose-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-compose-form textarea,
.comment-reply-form textarea,
.comment-edit-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 80px;
}

.comments-feed {
  padding: 1rem 1.25rem 1.25rem;
}

.comments-empty {
  color: var(--ledge-muted);
  margin: 0;
}

.comment {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comment-reply {
  margin-top: 0.75rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ledge-blue), var(--ledge-green));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.comment-body-wrap {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.comment-author {
  color: var(--ledge-navy);
}

.comment-time {
  color: var(--ledge-muted);
  font-size: 0.85rem;
}

.comment-edited {
  color: var(--ledge-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.comment-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  margin-bottom: 0.35rem;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

.comment-delete-form {
  margin: 0;
  display: inline;
}

.comment-action {
  font-size: 0.85rem;
  padding: 0;
}

.comment-action-danger {
  color: #cf2e2e;
}

.comment-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.comment-reply-form,
.comment-edit-form {
  margin-top: 0.75rem;
}

.comment-replies {
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid rgba(26, 92, 224, 0.2);
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.hidden {
  display: none !important;
}

.settings-section {
  margin-top: 0;
}

.client-tab-panel.hidden {
  display: none;
}

.data-empty {
  padding: 2rem 1.25rem;
  color: var(--ledge-muted);
  text-align: center;
}

.data-empty p {
  margin: 0.5rem 0;
}

.client-tab-link {
  font-weight: 600;
}

.data-form {
  padding: 1rem 1.25rem 1.25rem;
}

.data-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ledge-border);
}

.data-category:last-of-type {
  border-bottom: none;
}

.data-category h3 {
  margin: 0 0 0.75rem;
  color: var(--ledge-navy);
  font-size: 1.05rem;
}

.data-section h4 {
  margin: 0 0 0.65rem;
  color: var(--ledge-dark);
  font-size: 0.92rem;
  font-weight: 600;
}

.data-field {
  margin-bottom: 1rem;
}

.data-field label {
  display: block;
  font-weight: 600;
  color: var(--ledge-navy);
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.data-field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.03);
}

.data-field textarea:focus {
  outline: none;
  border-color: var(--ledge-blue-light);
  box-shadow: 0 0 0 3px rgba(26, 92, 224, 0.12);
}

.field-meta {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--ledge-muted);
}

.data-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ledge-border);
}

.data-stats {
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.user-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-avatar--sm {
  width: 32px;
  height: 32px;
}

.user-avatar--md {
  width: 40px;
  height: 40px;
}

.user-avatar--lg {
  width: 96px;
  height: 96px;
}

.user-avatar--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ledge-blue), var(--ledge-green));
  color: #fff;
  font-weight: 700;
}

.user-avatar--sm.user-avatar--initials {
  font-size: 0.7rem;
}

.user-avatar--md.user-avatar--initials {
  font-size: 0.8rem;
}

.user-avatar--lg.user-avatar--initials {
  font-size: 1.5rem;
}

.header-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ledge-navy);
  text-decoration: none;
}

.header-profile:hover {
  color: var(--ledge-blue);
  text-decoration: none;
}

.profile-card {
  padding: 1.25rem;
  max-width: 640px;
}

.profile-photo-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ledge-border);
}

.profile-section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ledge-navy);
}

.profile-photo-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.profile-photo-form {
  margin: 0;
}

.profile-photo-label {
  cursor: pointer;
  margin: 0;
}

.profile-photo-input {
  display: none;
}

.profile-photo-hint {
  margin: 0;
  color: var(--ledge-muted);
  font-size: 0.85rem;
}

.staff-chat-page .staff-chat-panel {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  min-height: 60vh;
}

.staff-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  max-height: min(60vh, 640px);
  border-bottom: 1px solid var(--ledge-border);
}

.staff-chat-message {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.staff-chat-message--mine .staff-chat-message-body {
  background: rgba(26, 92, 224, 0.06);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}

.staff-chat-message-body {
  flex: 1;
  min-width: 0;
}

.staff-chat-composer {
  padding: 1rem 1.25rem 1.25rem;
}

.staff-chat-composer .comment-composer {
  margin: 0;
}

.chat-compose-actions {
  align-items: center;
  justify-content: space-between;
}

.chat-presence {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
  background: rgba(15, 23, 42, 0.02);
}

.chat-presence--widget {
  padding: 0.55rem 1rem;
}

.chat-presence-label {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ledge-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.2rem;
}

.chat-presence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-presence-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--ledge-muted);
  font-size: 0.82rem;
}

.chat-presence-user--online {
  background: rgba(46, 125, 50, 0.1);
  color: var(--ledge-navy);
}

.chat-presence-user--me {
  font-weight: 700;
}

.chat-presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9aa3b2;
}

.chat-presence-user--online .chat-presence-dot {
  background: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

.chat-presence-empty {
  font-size: 0.82rem;
  color: var(--ledge-muted);
}

.chat-mention {
  color: var(--ledge-blue);
  font-weight: 700;
  background: rgba(26, 92, 224, 0.08);
  border-radius: 4px;
  padding: 0 0.15rem;
}

.chat-compose-wrap {
  position: relative;
}

.chat-mention-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.35rem);
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--ledge-border);
  border-radius: 10px;
  background: var(--ledge-surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
  z-index: 5;
}

.chat-mention-menu.hidden {
  display: none;
}

.chat-mention-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.chat-mention-option strong {
  color: var(--ledge-navy);
  font-size: 0.9rem;
}

.chat-mention-option span {
  color: var(--ledge-muted);
  font-size: 0.78rem;
}

.chat-mention-option:hover,
.chat-mention-option.is-active {
  background: rgba(26, 92, 224, 0.08);
}

.emoji-picker-wrap {
  position: relative;
}

.emoji-picker {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.15rem;
  width: min(320px, 80vw);
  padding: 0.5rem;
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: 10px;
  box-shadow: var(--ledge-shadow);
}

.emoji-picker.hidden {
  display: none;
}

.emoji-btn {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.emoji-btn:hover {
  background: rgba(26, 92, 224, 0.1);
}

.chat-widget {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 2147482000;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.chat-widget--hidden {
  display: none !important;
}

.chat-fab {
  position: relative;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ledge-blue), var(--ledge-green));
  color: #fff;
  box-shadow: 0 10px 30px rgba(26, 92, 224, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}

.chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(26, 92, 224, 0.4);
}

.chat-fab-icon {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none;
}

.chat-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.chat-fab-badge.hidden {
  display: none;
}

.chat-widget-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.85rem);
  width: min(360px, calc(100vw - 2rem));
  height: min(520px, calc(100vh - 6rem));
  display: flex;
  flex-direction: column;
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.chat-widget-panel.hidden {
  display: none;
}

.chat-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ledge-border);
  background: linear-gradient(180deg, rgba(26, 92, 224, 0.05), transparent);
}

.chat-widget-title {
  margin: 0;
  font-size: 1rem;
  color: var(--ledge-navy);
}

.chat-widget-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--ledge-muted);
}

.chat-widget-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.chat-widget-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ledge-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.chat-widget-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ledge-navy);
}

.chat-widget-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem;
}

.staff-chat-message--compact {
  margin-bottom: 0.75rem;
}

.staff-chat-message--compact .comment-header {
  margin-bottom: 0.2rem;
}

.staff-chat-message--compact .comment-author,
.staff-chat-message--compact .comment-time {
  font-size: 0.8rem;
}

.staff-chat-message--compact .comment-text {
  font-size: 0.92rem;
}

.chat-attachments {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chat-attachment-image-link {
  display: inline-block;
  max-width: 100%;
}

.chat-attachment-image {
  display: block;
  max-width: min(320px, 100%);
  max-height: 240px;
  border-radius: 10px;
  border: 1px solid var(--ledge-border);
  object-fit: contain;
  background: #fff;
}

.chat-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 10px;
  background: var(--ledge-bg);
  text-decoration: none;
  color: inherit;
}

.chat-attachment-file:hover {
  text-decoration: none;
  border-color: var(--ledge-blue);
}

.chat-attachment-file-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.chat-attachment-file-meta strong {
  word-break: break-word;
}

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

.chat-file-label {
  cursor: pointer;
  margin: 0;
}

.chat-file-preview {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ledge-muted);
}

.chat-widget-error {
  margin: 0 1rem 0.5rem;
}

.chat-widget-composer {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--ledge-border);
}

.chat-widget-composer textarea {
  width: 100%;
  max-width: 100%;
  min-height: 64px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.chat-widget .emoji-picker {
  grid-template-columns: repeat(8, 1fr);
  width: min(280px, 70vw);
}

@media (max-width: 480px) {
  .chat-widget {
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  }

  .chat-widget-panel {
    width: min(calc(100vw - 1.5rem), 360px);
    height: min(70vh, 520px);
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 5rem);
  }
}

.task-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.task-alert-danger {
  background: #cf2e2e;
  color: #fff;
}

.task-alert-warning {
  background: #f59e0b;
  color: #1a1a1a;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.visibility-setting {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--ledge-border);
}

.visibility-setting-copy {
  grid-column: 1 / -1;
}

.visibility-setting-copy strong {
  color: var(--ledge-navy);
}

.visibility-setting-copy .section-hint {
  margin: 0.35rem 0 0;
}

.visibility-setting-label {
  margin: 0;
  color: var(--ledge-muted);
  font-size: 0.92rem;
  grid-column: 1 / -1;
}

.task-add-form,
.project-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
}

.task-add-form .text-input,
.project-add-form .text-input,
.task-add-form .select-input {
  flex: 1;
  min-width: 160px;
  max-width: 100%;
}

.project-add-form textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1.25rem 1.25rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--ledge-border);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item.completed .checklist-title {
  text-decoration: line-through;
  color: var(--ledge-muted);
}

.checklist-toggle-form {
  margin: 0;
}

.checklist-check {
  width: 28px;
  height: 28px;
  border: 2px solid var(--ledge-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ledge-green);
  display: grid;
  place-items: center;
  padding: 0;
}

.checklist-item.completed .checklist-check {
  background: rgba(0, 208, 132, 0.15);
  border-color: var(--ledge-green);
}

.checklist-body {
  flex: 1;
  min-width: 0;
}

.checklist-title {
  display: block;
  font-weight: 600;
  color: var(--ledge-navy);
}

.checklist-body small {
  color: var(--ledge-muted);
  font-size: 0.82rem;
}

.checklist-empty {
  color: var(--ledge-muted);
  padding: 0.5rem 0;
}

.progress-wrap {
  padding: 0.75rem 1.25rem;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ledge-blue), var(--ledge-green));
  border-radius: 999px;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--ledge-muted);
}

.projects-list {
  display: grid;
  gap: 1rem;
}

.time-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 1rem;
  align-items: start;
}

.time-form-card,
.time-list-card {
  padding: 1.25rem;
}

.time-section-title {
  margin: 0 0 1rem;
  color: var(--ledge-navy);
  font-size: 1.1rem;
}

.time-entry-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 96px;
}

.time-desc-cell {
  max-width: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-actions-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.table-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.table-actions form {
  margin: 0;
  flex-shrink: 0;
}

.table-actions--wide {
  min-width: 17rem;
}

.table-cell-truncate {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.doc-delete-form {
  margin: 0;
}

.time-entry-delete-form {
  margin: 0;
  white-space: nowrap;
}

.time-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.time-entry-row-active {
  background: rgba(37, 99, 235, 0.06);
}

.doc-preview-page .doc-preview-card {
  padding: 1rem;
  overflow: auto;
}

.doc-preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.doc-preview-frame {
  width: 100%;
  min-height: 70vh;
  border: none;
  border-radius: 8px;
  background: #f4f6fa;
}

.doc-preview-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  max-height: 70vh;
  overflow: auto;
}

.doc-preview-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ledge-muted);
}

.time-admin-employee-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
  background: var(--ledge-surface-solid);
}

.time-admin-employee-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ledge-navy);
}

.time-admin-total {
  font-weight: 600;
  color: var(--ledge-blue);
}

.time-admin-day {
  border-bottom: 1px solid var(--ledge-border);
}

.time-admin-day:last-child {
  border-bottom: none;
}

.time-admin-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
}

.time-admin-day-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ledge-navy);
}

.time-admin-day-header span {
  color: var(--ledge-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.time-admin-summary {
  color: var(--ledge-navy);
}

.time-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.time-summary-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--ledge-muted);
  font-weight: 400;
}

.time-user-day {
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.time-user-day .time-admin-day-header h3 {
  font-size: 0.95rem;
}

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

.form-group-wide {
  grid-column: 1 / -1;
}

.representatives-section {
  padding: 0 1.25rem 1.25rem;
}

.representative-form .text-input,
.representative-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.representative-form .text-input:focus,
.representative-form textarea:focus {
  outline: none;
  border-color: var(--ledge-blue-light);
  box-shadow: 0 0 0 3px rgba(26, 92, 224, 0.12);
}

.representatives-section h3 {
  margin: 0 0 0.25rem;
  color: var(--ledge-navy);
}

.representatives-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.representative-card {
  position: relative;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.representative-card-new {
  background: var(--ledge-surface);
}

.representative-card-new h4 {
  margin: 0 0 0.75rem;
  color: var(--ledge-navy);
}

.representative-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.representative-delete-form {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.representatives-empty {
  color: var(--ledge-muted);
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .meta-item-wide {
    grid-column: span 1;
  }

  .time-layout {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .vat-row {
    grid-template-columns: 1fr;
  }

  .header-actions span {
    display: none;
  }
}

.page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header-row .page-subtitle {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.docs-page {
  max-width: 920px;
}

.docs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ledge-border);
}

.docs-nav-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ledge-muted);
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  text-decoration: none;
}

.docs-nav-link:hover {
  color: var(--ledge-blue);
  border-color: var(--ledge-blue);
  text-decoration: none;
}

.docs-nav-link.is-active {
  color: #fff;
  background: var(--ledge-blue);
  border-color: var(--ledge-blue);
}

.docs-nav-link-muted {
  margin-left: auto;
}

.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.docs-card {
  display: block;
  padding: 1.25rem;
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  box-shadow: var(--ledge-shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.docs-card:hover {
  border-color: var(--ledge-blue);
  box-shadow: 0 6px 28px rgba(26, 92, 224, 0.12);
  text-decoration: none;
}

.docs-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--ledge-navy);
}

.docs-card p {
  margin: 0 0 0.75rem;
  color: var(--ledge-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.docs-card-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ledge-blue);
}

.docs-card-admin {
  border-color: rgba(26, 92, 224, 0.25);
}

.docs-card-disabled {
  opacity: 0.65;
  cursor: default;
}

.docs-meta {
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.docs-toc {
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.docs-toc ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.docs-toc li {
  margin: 0.35rem 0;
}

.docs-content {
  background: var(--ledge-surface);
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  padding: 1.25rem 1.5rem;
}

.docs-section {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
}

.docs-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.docs-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  color: var(--ledge-navy);
}

.docs-section p {
  margin: 0 0 0.65rem;
  line-height: 1.6;
  color: var(--ledge-text);
}

.docs-section ul {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.docs-section li {
  margin: 0.35rem 0;
}

.docs-note {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #92400e;
}

.docs-figures {
  display: grid;
  gap: 1.25rem;
  margin: 1.25rem 0 0;
}

.docs-figure {
  margin: 0;
  border: 1px solid var(--ledge-border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
}

.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.docs-figure figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: var(--ledge-muted);
  border-top: 1px solid var(--ledge-border);
}

@media (max-width: 640px) {
  .docs-nav-link-muted {
    margin-left: 0;
  }
}

/* --- Mobile & touch (iOS / Android) --- */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

body:has(.chat-widget) main.container {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

.col-hide-sm {
  display: table-cell;
}

.col-show-sm {
  display: none;
}

.table-mobile-meta {
  margin-top: 0.2rem;
  color: var(--ledge-muted);
  font-size: 0.82rem;
  font-weight: 400;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .page-title {
    font-size: 1.45rem;
  }

  .page-subtitle {
    margin-bottom: 1rem;
  }

  .app-header {
    padding: 0.6rem 1rem;
    padding-top: max(0.6rem, env(safe-area-inset-top, 0px));
  }

  .brand img {
    height: 36px;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions span {
    display: none;
  }

  .header-actions .btn,
  .btn-sm {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .toolbar {
    gap: 0.5rem;
  }

  .toolbar .btn {
    min-height: 44px;
  }

  .toolbar form {
    flex: 1 1 100%;
    min-width: 0;
  }

  .search-input,
  .text-input,
  .select-input,
  textarea,
  .meta-input {
    max-width: 100%;
    font-size: 16px;
  }

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

  .tile {
    padding: 1.15rem;
  }

  .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-row .btn {
    width: 100%;
  }

  .client-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .client-tabs::-webkit-scrollbar {
    display: none;
  }

  .client-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.6rem 0.85rem;
  }

  .comment-composer {
    flex-direction: column;
  }

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

  .folder-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .folder-section-header .btn {
    width: 100%;
  }

  .representative-delete-form {
    position: static;
    margin-top: 0.5rem;
  }

  .representative-actions {
    flex-wrap: wrap;
  }

  .representative-actions .btn {
    flex: 1 1 auto;
  }

  .time-admin-employee-header,
  .time-admin-day-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .time-desc-cell {
    max-width: none;
  }

  .time-entry-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .time-entry-actions .btn {
    flex: 1 1 auto;
    min-width: 88px;
  }

  .doc-preview-frame {
    min-height: 50vh;
  }

  .staff-chat-page .staff-chat-panel {
    min-height: calc(100vh - 12rem);
  }

  .staff-chat-messages {
    max-height: none;
  }

  .login-page {
    padding: max(12vh, calc(1rem + env(safe-area-inset-top, 0px))) 1rem max(1rem, env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }

  .login-card {
    padding: 1.5rem;
  }

  .visibility-setting {
    grid-template-columns: 1fr;
  }

  .col-hide-sm {
    display: none;
  }

  .col-show-sm {
    display: block;
  }

  .table th,
  .table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.92rem;
  }

  .table--stack-sm thead {
    display: none;
  }

  .table--stack-sm tbody tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--ledge-border);
    border-radius: 10px;
    background: var(--ledge-surface-solid);
    overflow: hidden;
  }

  .table--stack-sm tbody tr:last-child {
    margin-bottom: 0;
  }

  .table--stack-sm td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--ledge-border);
    text-align: right;
  }

  .table--stack-sm td:last-child {
    border-bottom: none;
  }

  .table--stack-sm td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--ledge-muted);
    text-align: left;
    flex: 0 0 38%;
  }

  .table--stack-sm td[data-label=""]::before,
  .table--stack-sm td:not([data-label])::before {
    display: none;
  }

  .table--stack-sm td.time-entry-actions-cell,
  .table--stack-sm td:has(.doc-actions) {
    display: block;
    text-align: left;
  }

  .table--stack-sm .time-desc-cell {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .table--stack-sm .time-desc-cell::before {
    margin-bottom: 0.25rem;
  }

  .mail-table td:nth-child(3) {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .brand span {
    display: none;
  }

  .container {
    padding: 0.85rem;
  }

  .card {
    border-radius: 10px;
  }

  .time-form-card,
  .time-list-card {
    padding: 1rem;
  }

  .time-summary-grid {
    grid-template-columns: 1fr;
  }

  .docs-content,
  .docs-toc {
    padding: 1rem;
  }

  .chat-widget-panel {
    width: calc(100vw - 1rem);
    right: 0;
    left: 0;
    margin: 0 auto;
  }
}

/* Gmail module */
.mail-account-bar {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mail-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.mail-sidebar {
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.mail-sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ledge-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.mail-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mail-sidebar-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--ledge-text);
  text-decoration: none;
}

.mail-sidebar-link:hover {
  background: var(--ledge-surface-muted, rgba(0, 0, 0, 0.04));
}

.mail-sidebar-link.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--ledge-primary, #2563eb);
  font-weight: 600;
}

.mail-search {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.mail-search .text-input {
  flex: 1;
  min-width: 220px;
}

.mail-list-card {
  overflow: hidden;
}

.mail-row.is-unread {
  font-weight: 600;
}

.mail-col-star {
  width: 2rem;
  text-align: center;
  color: #eab308;
}

.mail-snippet {
  color: var(--ledge-muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.mail-date {
  white-space: nowrap;
}

.mail-subject-link {
  color: inherit;
  text-decoration: none;
}

.mail-subject-link:hover {
  color: var(--ledge-primary, #2563eb);
}

.mail-row-actions {
  white-space: nowrap;
}

.mail-inline-form {
  display: inline;
}

.mail-inline-form button {
  vertical-align: baseline;
}

.mail-action-danger {
  color: #b91c1c !important;
}

.mail-empty {
  padding: 1.25rem;
  margin: 0;
  color: var(--ledge-muted);
}

.mail-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.mail-message-card {
  padding: 1.25rem;
}

.mail-message-toolbar {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ledge-border);
}

.mail-toolbar-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mail-message-subject {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.mail-message-meta {
  color: var(--ledge-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.mail-body {
  border-top: 1px solid var(--ledge-border);
  padding-top: 1rem;
}

.mail-body-text {
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 0;
  font-family: inherit;
}

.mail-body-html {
  line-height: 1.6;
  overflow-x: auto;
}

.mail-signature-option {
  margin-bottom: 1rem;
}

.mail-signature-preview {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--ledge-border);
  border-radius: 8px;
  background: var(--ledge-surface-muted, rgba(0, 0, 0, 0.02));
}

.mail-signature-preview-label {
  font-size: 0.8rem;
  color: var(--ledge-muted);
  margin-bottom: 0.35rem;
}

.mail-signature-preview-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
}

.signature-image-preview-wrap {
  margin-top: 0.5rem;
}

.signature-image-preview,
.mail-signature-preview-image {
  display: block;
  max-width: 520px;
  width: 100%;
  height: auto;
  border: 1px solid var(--ledge-border);
  border-radius: 8px;
  background: #fff;
}

.mail-signature-preview-intro {
  margin-bottom: 0.75rem;
  color: #2563eb;
  font-weight: 500;
}

.mail-signature-preview-footer {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--ledge-muted);
  font-style: italic;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 768px) {
  .mail-layout {
    grid-template-columns: 1fr;
  }

  .mail-sidebar {
    position: static;
  }

  .mail-sidebar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .mail-row-actions form {
    display: block;
    margin-top: 0.35rem;
  }
}

/* ── Ledge dark theme ── */
body.app-shell {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(255, 0, 110, 0.08) 0%, transparent 50%),
    var(--ledge-bg);
}

.app-header {
  background: rgba(8, 8, 16, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ledge-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.brand img {
  height: 48px;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
}

.brand-text small {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ledge-muted);
}

.site-footer {
  background: rgba(8, 8, 16, 0.9);
  border-top: 1px solid var(--ledge-border);
}

.site-footer-text a {
  color: var(--ledge-blue);
}

.login-page {
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 0, 110, 0.1) 0%, transparent 40%),
    #000;
  min-height: 100vh;
}

.login-card {
  background: rgba(10, 10, 20, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--ledge-border);
  box-shadow: var(--ledge-shadow), var(--ledge-glow);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.login-brand img {
  width: min(220px, 70vw);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(0, 212, 255, 0.4));
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.login-brand-text strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #fff;
}

.login-brand-text span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ledge-muted);
}

.login-brand-text small {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.btn-primary {
  background: var(--ledge-gradient);
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px rgba(255, 0, 110, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--ledge-border);
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--ledge-blue);
}

.search-input,
.text-input,
.select-input,
textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--ledge-border);
  color: #fff;
}

.search-input:focus,
.text-input:focus,
.select-input:focus,
textarea:focus {
  border-color: var(--ledge-blue);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  outline: none;
}

.search-input::placeholder,
.text-input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.card,
.tile {
  background: var(--ledge-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--ledge-border);
}

.tile:hover {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: var(--ledge-shadow), 0 0 20px rgba(0, 212, 255, 0.12);
}

.tile-icon {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 0, 110, 0.12));
  color: var(--ledge-blue);
}

.tile-drag-handle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ledge-muted);
  box-shadow: none;
}

.tile-drag-handle:hover {
  background: rgba(0, 212, 255, 0.15);
  color: var(--ledge-blue);
}

.btn-google {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ledge-border);
  color: #fff;
  box-shadow: none;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--ledge-blue);
}

.alert-success {
  background: rgba(0, 229, 160, 0.12);
  border-color: rgba(0, 229, 160, 0.35);
  color: #7bdcb5;
}

.alert-error {
  background: rgba(255, 0, 110, 0.1);
  border-color: rgba(255, 0, 110, 0.35);
  color: #ff8fab;
}

table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ledge-muted);
}

table td {
  border-color: var(--ledge-border);
}

.header-profile {
  color: var(--ledge-text);
}

.header-profile:hover {
  color: var(--ledge-blue);
}

a {
  color: var(--ledge-blue);
}

a:hover {
  color: var(--ledge-blue-light);
}

.page-title,
.form-group label,
.card h2,
.card h3 {
  color: #fff;
}

.badge,
.status-badge {
  border: 1px solid var(--ledge-border);
}

.chat-widget-toggle {
  background: var(--ledge-gradient);
  box-shadow: var(--ledge-glow);
}

.chat-panel {
  background: var(--ledge-surface-solid);
  border: 1px solid var(--ledge-border);
}

.docs-sidebar,
.mail-sidebar,
.client-tabs-nav {
  background: var(--ledge-surface);
  border-color: var(--ledge-border);
}

.docs-content pre,
.docs-content code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ledge-border);
  color: var(--ledge-blue);
}

@media (max-width: 768px) {
  .brand-text small {
    display: none;
  }
}

/* Language switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--ledge-border);
  background: rgba(255, 255, 255, 0.04);
}

.lang-switcher-link {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ledge-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-switcher-link:hover {
  color: #fff;
  text-decoration: none;
}

.lang-switcher-link.is-active {
  color: #fff;
  background: var(--ledge-gradient);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
}

.login-lang-switcher {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.license-locked-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: #fff;
  text-align: center;
}

.license-locked-text,
.license-locked-meta,
.license-locked-support {
  color: var(--ledge-muted);
  text-align: center;
  line-height: 1.55;
}

.license-locked-support {
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.license-status-badge {
  display: inline-block;
  margin: 0 auto 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--ledge-border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.license-status-active,
.license-status-grace {
  color: var(--ledge-green);
  border-color: rgba(0, 229, 160, 0.35);
}

.license-status-pending_payment,
.license-status-provisioned {
  color: var(--ledge-blue);
}

.license-status-suspended,
.license-status-terminated {
  color: #ff8fab;
  border-color: rgba(255, 0, 110, 0.35);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.license-overview-card {
  padding: 1.5rem;
}

.license-overview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.license-offline-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 165, 0, 0.35);
  color: #ffb86b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.license-details {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.license-detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.license-detail-row dt {
  margin: 0;
  color: var(--ledge-muted);
  font-size: 0.9rem;
}

.license-detail-row dd {
  margin: 0;
  color: #fff;
}

.license-features {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ledge-border);
}

.license-features h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #fff;
}

.license-feature-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ledge-muted);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .license-detail-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.header-notifications {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0.5rem;
}

.calendar-summary {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.calendar-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.calendar-add-form .text-input,
.calendar-add-form .select-input {
  flex: 1 1 140px;
  min-width: 120px;
}

.inline-status-form {
  margin: 0;
}

.select-input-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  max-width: 160px;
}

.row-overdue td {
  background: rgba(220, 53, 69, 0.08);
}

.task-overdue .checklist-title {
  color: var(--ledge-danger, #dc3545);
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ledge-border);
  background: var(--ledge-card-bg);
}

.notification-item:first-child {
  border-top-left-radius: var(--ledge-radius);
  border-top-right-radius: var(--ledge-radius);
}

.notification-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.notification-empty {
  padding: 2rem;
  text-align: center;
  color: var(--ledge-muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-danger {
  background: #dc3545;
  color: #fff;
}

.badge-warning {
  background: #ffc107;
  color: #212529;
}

.badge-neutral {
  background: var(--ledge-border);
  color: var(--ledge-text);
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ops-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  background: var(--ledge-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.ops-summary-card:hover {
  border-color: var(--ledge-accent);
}

.ops-summary-card--danger {
  border-color: #dc3545;
}

.ops-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.ops-summary-label {
  font-size: 0.8125rem;
  color: var(--ledge-muted);
}

.ops-view-tabs {
  margin-bottom: 0.75rem;
}

.task-edit-details {
  margin-left: 0.5rem;
}

.task-edit-details summary {
  cursor: pointer;
  list-style: none;
}

.task-edit-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--ledge-border);
  border-radius: var(--ledge-radius);
  background: var(--ledge-bg);
}

.tile-icon-wrap {
  position: relative;
  display: inline-block;
}

.tile-icon-wrap .tile-badge {
  position: absolute;
  top: -6px;
  right: -10px;
}
