@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #15233b;
  --muted: #728098;
  --line: #e4e9f1;
  --page: #f4f7fb;
  --surface: #fff;
  --primary: #3777e8;
  --primary-dark: #2764cf;
  --danger: #d9435c;
  --meetings: #3577e8;
  --support: #24a477;
  --additional: #f09832;
  --roadmap: #8858cf;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(21, 35, 59, 0.07);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font:
    15px/1.45 Manrope,
    Arial,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
.header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(140deg, #4f91ff, #315fcc);
  box-shadow: 0 5px 13px rgba(55, 119, 232, 0.25);
}
.header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.4px;
}
.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.week-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}
.week-label {
  min-width: 164px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.timezone {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #42516a;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  transition:
    transform 0.16s,
    background 0.16s,
    border-color 0.16s;
}
.btn:hover {
  border-color: #c9d4e4;
  background: #f8fafc;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-nav {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.btn-sm {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
}
.btn-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 12px rgba(55, 119, 232, 0.18);
}
.btn-primary:hover {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-outline {
  background: transparent;
}
.btn-danger {
  color: var(--danger);
  border-color: #f3c7cf;
}
.btn-danger:hover {
  background: #fff3f5;
}
.summary {
  position: relative;
  overflow: hidden;
  margin: 18px 0 14px;
  padding: 24px 26px;
  color: #fff;
  background: linear-gradient(115deg, #1b3153, #294a79);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(31, 59, 99, 0.17);
}
.summary:before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -62px;
  top: -170px;
  border: 36px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}
.summary-total {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.summary-label {
  color: rgba(255, 255, 255, 0.67);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
}
.summary-value {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1.4px;
}
.summary-categories {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.summary-cat {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #e8f1ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.summary-cat.cat-meetings {
  border-left: 3px solid #75b2ff;
}
.summary-cat.cat-support {
  border-left: 3px solid #71e3b8;
}
.summary-cat.cat-additional {
  border-left: 3px solid #ffc36c;
}
.summary-cat.cat-roadmap {
  border-left: 3px solid #c5a1ff;
}
.summary-sub {
  padding: 0 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.entries {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.entries-header {
  display: flex;
  align-items: center;
  min-height: 63px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.entries-header h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.25px;
}
.entries-empty {
  padding: 52px 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.entry-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}
.entry-table-header {
  display: table-row;
  background: #f9fbfd;
}
.entry-table-body {
  display: table-row-group;
}
.entry-table-row {
  display: table-row;
  transition: background 0.15s;
}
.entry-table-body .entry-table-row:hover {
  background: #f8fbff;
}
.entry-table-cell {
  display: table-cell;
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13px;
}
.entry-table-body .entry-table-row:last-child .entry-table-cell {
  border-bottom: 0;
}
.entry-table-header .entry-table-cell {
  padding-top: 11px;
  padding-bottom: 11px;
  color: #8a96aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.cell-date {
  width: 116px;
  color: #42516a;
  font-weight: 700;
}
.cell-cat {
  width: 120px;
}
.cell-activity {
  width: 185px;
  font-weight: 600;
}
.cell-duration {
  width: 80px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.cell-desc {
  color: #65748a;
}
.cell-actions {
  width: 100px;
  text-align: right;
  white-space: nowrap;
}
.entry-category {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.entry-category.cat-meetings {
  background: var(--meetings);
}
.entry-category.cat-support {
  background: var(--support);
}
.entry-category.cat-additional {
  background: var(--additional);
}
.entry-category.cat-roadmap {
  background: var(--roadmap);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 27, 50, 0.48);
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden,
.hidden {
  display: none !important;
}
.modal {
  width: min(100%, 550px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(11, 27, 50, 0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 17px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
}
.modal-body {
  padding: 22px 24px;
}
.btn-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: #f5f7fa;
  font-size: 22px;
  line-height: 1;
}
.btn-close:hover {
  color: var(--ink);
  background: #edf1f6;
}
#entryForm {
  padding: 22px 24px 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}
.modal-body + .modal-footer {
  margin-top: 0;
}
.form-group {
  margin-bottom: 17px;
}
.form-group > label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-group.half {
  flex: 1;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d9e1eb;
  border-radius: 9px;
  color: var(--ink);
  outline: 0;
  background: #fff;
  font-size: 14px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #82aaf1;
  box-shadow: 0 0 0 3px rgba(55, 119, 232, 0.12);
}
.form-textarea {
  min-height: 82px;
  resize: vertical;
}
.category-select,
.activity-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.activity-toggle {
  margin-bottom: 9px;
}
.category-option,
.toggle-option {
  cursor: pointer;
}
.category-option input,
.toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.category-option .cat-badge,
.toggle-option span {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #617086;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.category-option input:checked + .cat-badge,
.toggle-option input:checked + span {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}
.category-option input:checked + .cat-support {
  border-color: var(--support);
  background: var(--support);
}
.category-option input:checked + .cat-additional {
  border-color: var(--additional);
  background: var(--additional);
}
.category-option input:checked + .cat-roadmap {
  border-color: var(--roadmap);
  background: var(--roadmap);
}
.duration-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.duration-select {
  flex: 1;
}
.duration-sep {
  color: var(--muted);
  font-size: 12px;
}
.activity-add-row {
  display: flex;
  gap: 8px;
}
.activity-add-row .form-input {
  flex: 1;
}
.activity-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.activity-list-item:last-child {
  border-bottom: 0;
}
.activity-list-name {
  font-size: 13px;
  font-weight: 600;
}
.activity-list-actions {
  display: flex;
  gap: 5px;
}
.js-status {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  padding: 10px 14px;
  color: #fff;
  background: var(--danger);
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.js-status:not(:empty) {
  display: block;
}
@media (max-width: 820px) {
  .container {
    width: min(100% - 24px, 680px);
    padding-top: 12px;
  }
  .header {
    gap: 13px;
    padding: 14px;
  }
  .brand {
    margin-right: 0;
  }
  .timezone {
    display: none;
  }
  .week-nav {
    margin-left: auto;
  }
  .week-label {
    min-width: 135px;
    font-size: 12px;
  }
  .summary {
    padding: 21px 19px;
  }
  .entry-table,
  .entry-table-body {
    display: block;
  }
  .entry-table-header {
    display: none;
  }
  .entry-table-row {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding: 14px 15px;
    border-bottom: 1px solid var(--line);
  }
  .entry-table-body .entry-table-row:last-child {
    border-bottom: 0;
  }
  .entry-table-cell {
    display: block;
    padding: 0;
    border: 0;
  }
  .cell-date {
    width: auto;
    margin-right: 8px;
    font-size: 12px;
  }
  .cell-cat {
    width: auto;
  }
  .cell-activity {
    width: calc(100% - 78px);
    margin-top: 10px;
  }
  .cell-duration {
    position: absolute;
    top: 14px;
    right: 15px;
    width: auto;
  }
  .cell-desc {
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
  }
  .cell-actions {
    width: 100%;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #edf0f5;
    text-align: right;
  }
  .form-row {
    display: block;
  }
  .form-group.half {
    margin-bottom: 17px;
  }
}
@media (max-width: 560px) {
  .header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .week-nav {
    width: 100%;
    justify-content: space-between;
    order: 3;
  }
  .week-label {
    min-width: 0;
    flex: 1;
  }
  .summary-value {
    font-size: 28px;
  }
  .summary-total {
    display: block;
  }
  .summary-label {
    display: block;
    margin-bottom: 3px;
  }
  .actions .btn {
    flex: 1;
  }
  .actions .btn-primary {
    flex-basis: 100%;
  }
  .modal-overlay {
    padding: 10px;
  }
  .modal-header,
  #entryForm,
  .modal-body {
    padding-left: 17px;
    padding-right: 17px;
  }
  .modal-footer {
    padding-left: 17px;
    padding-right: 17px;
  }
  .category-option .cat-badge {
    padding: 6px 9px;
  }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .header {
    gap: 12px;
    padding: 15px;
  }
  .timezone {
    display: none;
  }
  .week-nav {
    margin-left: auto;
  }
  .brand-mark {
    width: 35px;
    height: 35px;
  }
  .brand p {
    font-size: 10px;
  }
}
.report-modal {
  width: min(100%, 680px);
}
.modal-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.report-body {
  padding: 20px 24px 0;
}
.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.report-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
  color: #617086;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}
.report-filter:hover {
  border-color: #bcd0ee;
}
.report-filter.is-active {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
}
.report-timers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.report-timer {
  padding: 11px 12px;
  background: linear-gradient(135deg, #eef4ff, #f9fbff);
  border: 1px solid #dce8fb;
  border-radius: 10px;
}
.report-timer-label {
  display: block;
  color: #617086;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}
.report-timer-value {
  display: block;
  margin-top: 2px;
  color: #234b8f;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.report-blocks {
  display: grid;
  gap: 9px;
  max-height: 360px;
  overflow: auto;
}
.report-block {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfd;
}
.report-block-title {
  margin: 0 0 7px;
  color: #273b59;
  font-size: 13px;
  font-weight: 800;
}
.report-block-item {
  margin: 3px 0;
  color: #5f6f86;
  font-size: 13px;
  line-height: 1.5;
}
.report-copy-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cat-badge.cat-vacation {
  color: #d95b89;
}
.category-option input:checked + .cat-vacation {
  border-color: #d95b89;
  background: #d95b89;
}
.entry-category.cat-vacation {
  background: #d95b89;
}
.summary-cat.cat-vacation {
  border-left: 3px solid #f4a6c0;
}
.summary-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary-cat {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  cursor: default;
}
.summary-cat.is-expandable {
  cursor: pointer;
}
.summary-cat.is-expandable::after {
  content: "⌄";
  margin-left: 6px;
  font-size: 12px;
}
.summary-details {
  display: grid;
  gap: 3px;
  padding: 2px 4px;
}
.summary-sub {
  display: block;
}
.workspace-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 14px 0;
}
.workspace-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #607087;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.workspace-tab:hover {
  border-color: #bcd0ee;
}
.workspace-tab.is-active {
  border-color: #244e92;
  color: #fff;
  background: #244e92;
}
.workspace-tab.is-leader {
  color: #5d4d88;
}
.workspace-tab.is-leader.is-active {
  background: #604a9e;
  border-color: #604a9e;
  color: #fff;
}
.team-dashboard {
  padding: 23px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.team-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.team-dashboard h2 {
  margin: 0;
  font-size: 20px;
}
.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.team-total {
  color: #244e92;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.team-category-timers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.team-table-wrap {
  overflow: auto;
}
.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.team-table th,
.team-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.team-table th:first-child,
.team-table td:first-child {
  text-align: left;
}
.team-table th {
  color: #8995a8;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.team-table td {
  font-weight: 700;
}
.team-table tbody tr:last-child td {
  border-bottom: 0;
}
.employee-list {
  display: grid;
  gap: 8px;
}
.employee-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.employee-list-item:last-child {
  border-bottom: 0;
}
.employee-list-name {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
}
.employee-list-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.employee-list-item.is-inactive {
  opacity: 0.55;
}
@media (max-width: 560px) {
  .team-dashboard {
    padding: 17px;
  }
  .team-dashboard-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .team-total {
    font-size: 26px;
  }
  .team-table th,
  .team-table td {
    padding: 10px 8px;
  }
  .workspace-tabs {
    margin-top: 10px;
  }
}
.dialog-modal {
  max-width: 430px;
}
.dialog-body {
  padding: 22px 24px;
}
.dialog-message {
  margin: 0 0 14px;
  color: #617086;
  font-size: 13px;
}
.dialog-modal.is-danger #dialogConfirm {
  border-color: var(--danger);
  background: var(--danger);
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 5px 13px rgba(55, 119, 232, 0.18);
}
.report-timer-count {
  display: block;
  margin-top: 2px;
  color: #6f7f95;
  font-size: 11px;
  font-weight: 700;
}
.report-timer-value + .report-timer-count {
  margin-top: 1px;
}
.report-block-item {
  display: grid;
  grid-template-columns: 22px auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
  color: #344762;
  font-size: 13px;
  line-height: 1.4;
}
.report-item-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #5b82c7;
  font-size: 10px;
  font-weight: 800;
}
.report-item-duration {
  padding: 3px 6px;
  border-radius: 5px;
  color: #315eaa;
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-item-description {
  min-width: 0;
  color: #50627c;
  font-weight: 600;
}

.auth-actions,
.manager-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(145deg, #eaf1fb, #d9e6f8);
}
.login-screen.hidden { display: none; }
.login-card {
  width: min(100%, 390px);
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(21,35,59,.2);
}
.login-logo { display:block; width:64px; height:64px; object-fit:contain; margin:0 auto 14px; }
.login-card h2,.login-card p { text-align:center; }
.login-card h2 { margin:0; font-size:23px; }
.login-card p { margin:6px 0 24px; color:var(--muted); font-size:13px; }
.login-error { min-height:20px; margin-top:-8px; margin-bottom:8px; color:var(--danger); font-size:12px; font-weight:700; }
.login-submit { width:100%; margin-top:4px; }
