:root {
  font-family: "PT Sans", "Source Sans Pro", "Open Sans", sans-serif;
  color: #2d3748;
  background-color: #f7f5f0;
  --navy: #1a365d;
  --amber: #d97706;
  --rust: #9a3412;
  --cream: #f7f5f0;
  --warm-gray: #d4d0c8;
  --charcoal: #2d3748;
  --teal: #d97706;
  --teal-soft: #efe1cf;
  --text-muted: #6f7782;
  --border: #d4d0c8;
  --card: #ffffff;
  --sidebar: #f3ede5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  height: 100vh;
  overflow: hidden;
}

.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
}

.sidebar {
  background: var(--sidebar);
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--warm-gray);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 18px;
}

.sidebar-search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
}

.search-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-section {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 16px 0 4px;
}

.nav-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--charcoal);
  cursor: pointer;
}

.nav-item.is-active {
  background: #f6e6d3;
  color: var(--amber);
  font-weight: 600;
}

.category-nav {
  display: grid;
  gap: 0;
}

.category-sidebar {
  display: grid;
  gap: 2px;
}

.category-nav .nav-item,
.category-add {
  padding: 6px 6px 6px 10px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-radius: 12px;
  line-height: 1.1;
  width: 100%;
}

.category-nav .nav-item:hover {
  background: #f1e9df;
}

.category-nav .nav-item.is-selected {
  background: #f6e6d3;
  color: var(--amber);
}

.category-add {
  justify-content: flex-start;
  gap: 6px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  padding: 6px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: 100%;
}

.category-label {
  white-space: nowrap;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  flex: 1;
}

.category-left-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #4c5a66;
  flex-shrink: 0;
}

.category-left-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.category-nav .nav-item span {
  text-align: left;
  display: block;
  font-weight: 500;
}

.category-menu-wrapper {
  position: relative;
  margin-left: auto;
}

.category-menu {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  padding: 2px 2px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 2px;
}

.category-menu:hover {
  background: #efe1cf;
}

.category-nav .nav-item {
  position: relative;
}

.category-menu-panel {
  position: absolute;
  left: 0;
  top: 28px;
  background: #ffffff;
  border: 1px solid var(--warm-gray);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(36, 44, 56, 0.12);
  display: none;
  min-width: 170px;
  z-index: 10;
}

.category-menu-panel.is-open {
  display: grid;
}

.category-menu-panel button {
  border: none;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.category-menu-panel svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.category-menu-panel button:hover {
  background: #f1e9df;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 43, 53, 0.12);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: min(520px, 90vw);
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 50px rgba(36, 44, 56, 0.2);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--warm-gray);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 20px;
}

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

.main {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  margin-top: auto;
  padding: 8px 4px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.02;
  color: var(--navy);
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.brand-block:hover .brand-name {
  color: var(--amber);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.ghost,
.primary {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.ghost {
  background: #efe8de;
  color: var(--navy);
}

.primary {
  background: var(--amber);
  color: #fff;
}

.card {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--warm-gray);
  padding: 18px;
}

.category-editor {
  display: flex;
  gap: 6px;
  padding: 2px 10px 4px;
  align-items: center;
}

.category-editor.is-hidden {
  display: none;
}

.category-editor input {
  flex: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  background: #f3ede5;
}

.category-editor input:focus {
  outline: 2px solid #e6d4bf;
}

.category-editor .primary {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 10px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 12px;
}

.panel.is-hidden {
  display: none;
}

.panel {
  flex: 1;
  overflow: hidden;
}

.panel > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.workblocks-card {
  padding: 24px;
}

.workblocks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.workblocks-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.workblocks-header h2 {
  margin: 0;
  font-size: 22px;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.workblocks-summary {
  font-size: 13px;
  color: var(--text-muted);
  background: #efe8de;
  padding: 6px 12px;
  border-radius: 999px;
}

.workblock-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.quick-buttons button {
  border: 1px solid var(--warm-gray);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--charcoal);
}

.quick-buttons button:hover {
  background: #f1e9df;
}

.workblock-timeline {
  display: grid;
  gap: 12px;
  position: relative;
}

.workblock-timeline.has-line::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--warm-gray);
}

.workblock-inputs {
  display: grid;
  gap: 0;
  margin-bottom: 20px;
}

.workblock-inputs .workblock-row {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 12px;
  align-items: center;
}

.workblock-inputs .labels-row {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.workblock-inputs .labels-row label:last-child {
  text-align: right;
}

.workblock-inputs .inputs-row input {
  border-radius: 12px;
  border: 1px solid var(--warm-gray);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 2px;
}

.workblock-inputs .inputs-row input:last-of-type {
  width: 90px;
}

.workblock-inputs .inputs-row .primary {
  width: 100%;
}

.workblock-inputs .quick-row {
  grid-template-columns: 1fr;
}

.workblock-inputs .primary {
  width: 100%;
  align-self: start;
}

.workblock-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 1px;
  border-radius: 16px;
  background: transparent;
}

.workblock-timeline-node {
  position: relative;
  display: flex;
  justify-content: center;
}

.workblock-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #efe8de;
  border: none;
  box-shadow: none;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.workblock-icon.is-medium {
  height: 58px;
}

.workblock-icon.is-large {
  height: 72px;
}

.workblock-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.workblock-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 46px;
}

.workblock-title {
  font-weight: 600;
  font-size: 16px;
  cursor: text;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.workblock-title-input {
  border: 1px solid var(--warm-gray);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 2px;
}

.workblock-duration {
  font-size: 12px;
  color: var(--text-muted);
}

.workblock-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.workblock-actions .ghost {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.workblock-actions .ghost:hover {
  color: var(--navy);
}

.workblock-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.category-header {
  align-items: center;
}

.muted {
  color: var(--text-muted);
  font-weight: 500;
}

.table {
  border-top: 1px solid var(--warm-gray);
}

.table-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--warm-gray);
  align-items: start;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.activity-header-date {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.activity-header-summary {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.activity-day-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--warm-gray);
  margin-bottom: 14px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--warm-gray);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
}

.filter-pill.is-search {
  color: var(--amber);
  border-color: var(--warm-gray);
}

.filter-pill button {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.category-pill {
  border: none;
  background: #efe8de;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.category-pill.is-active {
  background: #ffffff;
  color: var(--amber);
  box-shadow: inset 0 0 0 1px var(--warm-gray);
}

.day-chip {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
}

.day-chip strong {
  font-size: 15px;
  color: var(--text);
}

.day-chip.is-active {
  background: #f6e6d3;
  color: var(--amber);
  font-weight: 600;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6ded4;
}

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

.favicon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #efe8de;
  display: grid;
  place-items: center;
  font-size: 16px;
  overflow: hidden;
}

.favicon img {
  width: 22px;
  height: 22px;
  object-fit: cover;
}

.activity-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  min-width: 0;
}

.title {
  font-size: 14px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "PT Serif", "Georgia", "Merriweather", serif;
}

.time {
  font-size: 12px;
  color: var(--text-muted);
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.add-category-inline {
  color: var(--amber);
  font-weight: 400;
  cursor: pointer;
}

.subtitle .site-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.activity-actions .ghost {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.activity-actions .ghost:hover {
  color: var(--navy);
}

.table-label {
  font-weight: 600;
  font-size: 14px;
}

.table-field select,
.table-field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--warm-gray);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--charcoal);
}

.toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.notification-test {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-inline {
  color: var(--text-muted);
  font-size: 13px;
}

.helper-text {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.status {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

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

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