@font-face {
  font-family: "Vazir";
  src: url("fonts/Vazirmatn-Regular.cdc140628f11.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --text: #030213;
  --muted: #717182;
  --line: #0000001a;
  --panel: #fff;
  --ink: #030213;
  --inverse: #030213;
  --inverse-text: #fff;
  --field: #fff;
  --field-text: #030213;
  --soft: #f3f3f5;
  --soft-strong: #ececf0;
  --accent: #37b478;
  --danger: #d4183d;
  --danger-soft: #fff2f4;
  --danger-line: #d4183d55;
  --hover: #fafafa;
  --focus: #03021314;
  --shadow-color: #030213;
  --radius: 10px;
  --shadow: 0 18px 45px #0302130d;
  --metric-shadow: 0 12px 32px #0302130a;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --text: #f6f6f7;
  --muted: #a1a1aa;
  --line: #ffffff1f;
  --panel: #111113;
  --ink: #f6f6f7;
  --inverse: #f6f6f7;
  --inverse-text: #030213;
  --field: #16161a;
  --field-text: #f6f6f7;
  --soft: #18181c;
  --soft-strong: #27272f;
  --danger: #ff5d79;
  --danger-soft: #2a1016;
  --danger-line: #ff5d7970;
  --hover: #18181c;
  --focus: #ffffff24;
  --shadow-color: #000;
  --shadow: 0 18px 45px #00000042;
  --metric-shadow: 0 12px 32px #00000030;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazir", Gotham, "Gotham Book", Inter, Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-logo {
  width: 34px;
  height: 38px;
  display: block;
  object-fit: contain;
}

.brand-logo-dark {
  display: none;
}

:root[data-theme="dark"] .brand-logo-light {
  display: none;
}

:root[data-theme="dark"] .brand-logo-dark {
  display: block;
}

.brand-copy {
  display: grid;
  gap: 0;
  line-height: 1.05;
}

.brand-title {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .link-button {
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}
.nav a:hover, .link-button:hover {
  background: var(--soft);
}
.nav form { margin: 0; }
.link-button { background: transparent; border: 0; cursor: pointer; }

.theme-toggle {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--soft);
}

.theme-icon {
  width: 20px;
  height: 20px;
  display: block;
  position: relative;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -6px -5px 0 var(--field);
}

:root[data-theme="dark"] .theme-icon {
  width: 18px;
  height: 18px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

:root[data-theme="dark"] .theme-icon::before,
:root[data-theme="dark"] .theme-icon::after {
  content: "";
  position: absolute;
  inset: -5px 8px;
  border-radius: 999px;
  background: var(--accent);
}

:root[data-theme="dark"] .theme-icon::after {
  transform: rotate(90deg);
}

.shell {
  width: min(1360px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.auth-panel {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 42px;
  align-items: center;
}

.auth-panel h1, .page-head h1 {
  margin: 4px 0 10px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.muted { color: var(--muted); }

.form-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-card label, .form-grid label, .entry-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--field);
  color: var(--field-text);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus);
}

textarea { resize: vertical; }

button, .primary, .secondary, .small-button {
  border-radius: 8px;
  border: 1px solid var(--ink);
  padding: 10px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary, button[type="submit"] {
  background: var(--inverse);
  color: var(--inverse-text);
}

.primary:hover, button[type="submit"]:hover {
  opacity: 0.88;
}

.nav .link-button {
  background: transparent;
  color: var(--ink);
  border: 0;
  min-height: auto;
}

.nav .link-button:hover {
  background: var(--soft);
  opacity: 1;
}

.secondary, .small-button {
  background: var(--field);
  color: var(--ink);
}

.secondary:hover, .small-button:hover {
  background: var(--soft);
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.alert {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0;
}

.field-error {
  display: block;
  color: var(--danger, #b42318);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  margin-top: 5px;
}

.form-error-summary .errorlist {
  margin: 0;
  padding-right: 18px;
}

.message-list {
  margin-bottom: 16px;
}

.message-list .alert {
  margin-top: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.management-head {
  align-items: center;
  padding: 10px 0 4px;
}

.management-head h1 {
  font-size: clamp(34px, 4vw, 58px);
  margin-bottom: 6px;
}

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

.selector input { width: 110px; }
.selector select { width: 150px; }

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions {
  max-width: 640px;
}

.filters-panel {
  margin-bottom: 16px;
  padding: 12px;
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--metric-shadow);
}

.filter-card-head {
  display: flex;
  align-items: center;
  min-height: 28px;
}

.filter-card-head h2 {
  margin: 0;
  font-size: 16px;
}

.report-filters,
.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
}

.report-filters {
  gap: 12px;
}

.filter-group {
  gap: 8px;
}

.filter-group + .filter-group {
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--line);
}

.report-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-filters select,
.report-filters input {
  width: 100%;
}

.period-filter label {
  width: 92px;
}

.main-filter label {
  width: 190px;
}

.main-filter label:last-child {
  width: 140px;
}

.sort-filter label {
  width: 170px;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.filter-actions button {
  min-width: 86px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.admin-summary {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 90px;
  display: grid;
  align-content: center;
  gap: 8px;
  box-shadow: var(--metric-shadow);
}

.metric span { color: var(--muted); font-size: 14px; }
.metric strong { font-size: 26px; line-height: 1.2; }
.metric.primary-metric {
  background: var(--inverse);
  color: var(--inverse-text);
  border-color: var(--inverse);
}
.metric.primary-metric span { color: color-mix(in srgb, var(--inverse-text) 72%, transparent); }
.metric.warning { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.metric.danger { border-color: var(--danger-line); }
.metric.danger strong { color: var(--danger); }
.metric:hover, .panel:hover {
  border-color: color-mix(in srgb, var(--ink) 25%, transparent);
}
.action-metric button { width: 100%; }

.dashboard-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  width: min(100%, 620px);
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--panel) 70%, transparent);
}

.dashboard-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  justify-content: flex-start;
  gap: 11px;
  padding: 9px 12px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: right;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-tab:hover {
  background: color-mix(in srgb, var(--field) 70%, transparent);
  color: var(--ink);
}

.dashboard-tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow-color) 10%, transparent);
}

.dashboard-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
}

.dashboard-tab:focus-visible {
  z-index: 1;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.dashboard-tab-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--muted);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.dashboard-tab-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-tab[aria-selected="true"] .dashboard-tab-icon {
  border-color: var(--ink);
  background: var(--inverse);
  color: var(--inverse-text);
}

.dashboard-tab-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 1px;
  line-height: 1.45;
}

.dashboard-tab-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tab-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-count {
  flex: 0 0 auto;
  display: grid;
  min-width: 26px;
  height: 26px;
  margin-inline-start: auto;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-tab[aria-selected="true"] .tab-count {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
}

.dashboard-tab-panel[hidden] {
  display: none;
}

.dashboard-tab-panel:not([hidden]) {
  animation: dashboard-panel-enter 180ms ease-out;
}

@keyframes dashboard-panel-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-tab { transition: none; }
  .dashboard-tab-panel:not([hidden]) { animation: none; }
}

.receipt-panel {
  margin-bottom: 18px;
}

.receipt-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.receipt-upload-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.receipt-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
}

.receipt-card > a {
  display: block;
  background: var(--soft);
}

.receipt-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.receipt-card-body {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.receipt-card-body > a {
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-card-body form {
  margin: 0;
}

.receipt-delete,
.receipt-delete[type="submit"] {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
}

.receipt-empty {
  grid-column: 1 / -1;
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.management-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
}

.wide { min-width: 0; }

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

.project-form-panel {
  width: 100%;
}

.project-form-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) minmax(120px, auto);
  align-items: end;
}

.project-list-panel {
  width: 100%;
}

.panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title h2 { margin: 0; font-size: 20px; }
.panel-title span { color: var(--muted); font-size: 14px; }
.stacked { display: block; }
.compact-title {
  margin-bottom: 12px;
}
.compact-title h2 {
  font-size: 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

.month-table {
  table-layout: fixed;
}

.month-table .day-name-cell { width: 120px; }
.month-table .date-cell { width: 168px; }
.month-table .remote-cell { width: 88px; }
.month-table .time-cell { width: 72px; }
.month-table .duration-cell { width: 112px; }
.month-table .count-cell { width: 92px; }
.month-table .day-action-cell {
  width: 148px;
  min-width: 148px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
  text-align: center;
  box-shadow: 1px 0 0 var(--line);
}

.month-table thead .day-action-cell {
  z-index: 2;
  background: var(--soft);
}

.holiday-row .day-action-cell {
  background: var(--danger-soft);
}

.month-table .small-button {
  min-width: 118px;
}

.project-table {
  min-width: 980px;
}

.project-table th:first-child,
.project-table td:first-child {
  min-width: 240px;
  white-space: normal;
}

.project-table .row-actions {
  min-width: 230px;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  border-bottom-color: var(--line);
}

.data-table tbody tr:hover td {
  background: var(--hover);
}

tr:last-child td { border-bottom: 0; }

.holiday-row td {
  background: var(--danger-soft);
  color: var(--danger);
}

.holiday-row .small-button {
  border-color: var(--danger);
  color: var(--danger);
}

.holiday-title {
  color: var(--danger);
}

.holiday-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 8px;
  border: 1px solid var(--danger);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--danger);
  background: var(--panel);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.project-row:last-child { border-bottom: 0; padding-bottom: 0; }
.project-row span { overflow-wrap: anywhere; }

.pie-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.compact-pie {
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.pie-chart {
  width: min(220px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: var(--metric-shadow);
  justify-self: center;
  position: relative;
}

.pie-chart::after {
  content: "";
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
}

.pie-legend {
  display: grid;
  gap: 10px;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.pie-legend-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.pie-legend-row span:nth-child(2) {
  overflow-wrap: anywhere;
}

.pie-legend-row strong {
  white-space: nowrap;
}

.project-total-title {
  margin-top: 22px;
}

.chart-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-list.compact {
  margin-bottom: 0;
}

.chart-row {
  display: grid;
  gap: 8px;
}

.chart-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.chart-label span {
  overflow-wrap: anywhere;
}

.chart-label strong {
  white-space: nowrap;
}

.bar-track {
  height: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
  direction: rtl;
}

.bar-fill {
  min-width: 2px;
  height: 100%;
  background: var(--ink);
  margin-inline-start: auto;
}

.report-section {
  margin-top: 18px;
}

.report-grid {
  margin-top: 18px;
}

.project-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inline-filter {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-filter label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  font-weight: 700;
}

.compact-sort {
  justify-content: flex-end;
}

.compact-sort label {
  min-width: 150px;
}

.project-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.month-bars {
  min-height: 250px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px 14px;
  background: var(--soft);
}

.month-bar {
  height: 210px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.month-bar-fill {
  width: 100%;
  min-height: 2px;
  background: var(--ink);
  border-radius: 5px 5px 0 0;
  align-self: end;
}

.month-bar span,
.month-bar strong {
  overflow-wrap: anywhere;
}

.month-bar strong {
  color: var(--ink);
  font-size: 12px;
}

.table-progress {
  min-width: 130px;
  display: grid;
  gap: 6px;
}

.table-progress span {
  color: var(--muted);
  font-size: 12px;
}

.project-progress-large {
  display: grid;
  gap: 10px;
}

.project-progress-large .bar-track {
  height: 16px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.table-link {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
  text-underline-offset: 4px;
}

.table-link:hover {
  text-decoration-color: var(--ink);
}

.wrap-cell {
  white-space: normal;
  min-width: 260px;
}

.daily-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
  gap: 6px;
  min-height: 210px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px 12px;
  background: var(--soft);
}

.daily-bar {
  height: 165px;
  display: grid;
  grid-template-rows: 1fr 24px;
  gap: 6px;
  align-items: end;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.daily-bar-fill {
  width: 100%;
  min-height: 0;
  background: var(--ink);
  border-radius: 5px 5px 0 0;
  align-self: end;
}

.holiday-bar .daily-bar-fill {
  background: var(--danger);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--field);
}

.user-admin-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-admin-tag a:first-child {
  font-weight: 800;
}

.user-admin-tag a:not(:first-child),
.tag-delete-button {
  color: var(--muted);
  font-size: 12px;
}

.tag-delete-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tag-delete-button:hover {
  color: var(--danger);
}

.status-pill {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft);
}

.user-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--field);
}

.avatar.placeholder {
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

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

.row-actions form {
  margin: 0;
}

.form-panel { max-width: 1080px; margin: 0 auto; }

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

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

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

.time-input-hint {
  margin: 0 0 18px;
  font-size: 13px;
}

.entry-list {
  display: grid;
  gap: 12px;
}

.entry-tools {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

.add-entry-row:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.entry-card {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1.3fr) minmax(170px, 1fr) minmax(170px, 1fr);
  grid-template-areas:
    "number project start end"
    "number work duration description";
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--panel);
}

.entry-card label { margin: 0; }

.entry-project { grid-area: project; }
.entry-start { grid-area: start; }
.entry-end { grid-area: end; }
.entry-work-location { grid-area: work; }
.entry-duration { grid-area: duration; }
.entry-description { grid-area: description; }

.entry-card select,
.entry-card textarea,
.entry-card input {
  min-width: 0;
}

.duration-display {
  color: var(--muted);
  background: var(--soft);
  cursor: default;
}

.entry-number {
  grid-area: number;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--inverse);
  color: var(--inverse-text);
  border-radius: 50%;
  margin-top: 31px;
}

.delete-row {
  grid-column: 2 / -1;
  align-self: center;
  font-weight: 400 !important;
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 0 !important;
}

.delete-row input { width: auto; }

.check-label {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.check-label input {
  width: auto;
}

.user-form .helptext {
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  display: grid;
  gap: 4px;
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-item small {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.reject-panel {
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
}

.reject-panel label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
.logo{
  width: 200px;
}

@media (max-width: 980px) {
  .auth-panel, .content-grid, .summary-grid, .admin-summary, .management-grid, .project-summary, .project-analytics-grid { grid-template-columns: 1fr; }
  .project-form-grid { grid-template-columns: 1fr; }
  .filters-panel { width: 100%; }
  .report-filters,
  .filter-group {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-group + .filter-group {
    padding-inline-start: 0;
    padding-top: 10px;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
  .period-filter label,
  .main-filter label,
  .main-filter label:last-child,
  .sort-filter label {
    width: auto;
  }
  .filter-actions button {
    width: 100%;
  }
  .pie-grid { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; flex-direction: column; }
  .management-head { align-items: stretch; }
  .head-actions { justify-content: stretch; }
  .head-actions > * { flex: 1 1 auto; }
  .admin-actions { max-width: none; }
  .selector { flex-wrap: wrap; }
  .receipt-upload-form { grid-template-columns: 1fr; }
  .entry-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "number"
      "project"
      "start"
      "end"
      "work"
      "duration"
      "description";
  }
  .delete-row { grid-column: auto; }
  .entry-number, .delete-row { margin-top: 0 !important; }
}

@media (max-width: 640px) {
  .topbar { height: auto; min-height: 64px; padding: 12px 16px; align-items: center; flex-wrap: wrap; gap: 12px; }
  .brand-logo { width: 30px; height: 34px; }
  .brand-title { font-size: 13px; }
  .nav { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .nav a, .link-button { padding: 6px 9px; font-size: 13px; }
  .shell { width: min(100% - 20px, 1360px); margin-top: 18px; }
  .auth-panel h1, .page-head h1 { font-size: 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .dashboard-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .dashboard-tab {
    min-height: 58px;
    gap: 8px;
    padding: 8px;
  }
  .dashboard-tab-icon {
    width: 34px;
    height: 34px;
  }
  .dashboard-tab-copy small { display: none; }
  .dashboard-tab-copy strong { font-size: 12px; }
  .tab-count {
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    font-size: 11px;
  }
  th, td { padding: 9px; }
}
