:root {
  --ink: #173f37;
  --ink-2: #31574f;
  --paper: #f7f4ec;
  --surface: #fffef9;
  --line: #dedbd1;
  --copper: #b97342;
  --danger: #b6493f;
  --shadow: 0 12px 40px rgba(23, 63, 55, 0.09);
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b97342;
  outline-offset: 3px;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  padding: 12px;
}
.dialog .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dialog .checkbox-label input {
  width: 20px;
  margin: 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.attachments {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }
  .topbar .secondary-btn {
    padding: 10px;
  }
  .item-main {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .item-actions button {
    min-height: 44px;
  }
  .tabs {
    max-width: 100%;
  }
  .brand strong {
    font-size: 17px;
  }
  .dialog {
    max-height: 90dvh;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0, #dce9df 0, transparent 28rem), var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 63, 55, 0.12);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(23, 63, 55, 0.2);
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 20px;
}
.brand small {
  font-size: 11px;
  color: #687b76;
  margin-top: -2px;
}
.icon-btn,
.close-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 48px 28px 100px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  margin: 0 0 10px;
}
.hero > div > p:last-child {
  margin: 0;
  color: #63746f;
}
.primary-btn,
.secondary-btn,
.done-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}
.primary-btn {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 63, 55, 0.18);
}
.primary-btn:hover {
  background: #0f302a;
}
.secondary-btn {
  border: 1px solid var(--line);
  background: #fff;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}
.stat {
  text-align: right;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 249, 0.82);
  cursor: pointer;
  transition: 0.2s;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat span,
.stat small {
  display: block;
}
.stat span {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}
.stat small {
  margin-top: 7px;
  font-weight: 700;
  color: #62736e;
}
.stat.danger span {
  color: var(--danger);
}
.stat.today span {
  color: var(--copper);
}
.stat.upcoming span {
  color: #567199;
}
.toolbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
}
.tab {
  white-space: nowrap;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  color: #687b76;
  cursor: pointer;
}
.tab.active {
  background: var(--ink);
  color: #fff;
}
.search {
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}
.items {
  display: grid;
  gap: 11px;
}
.item-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 3px 14px rgba(23, 63, 55, 0.035);
}
.item-card.overdue {
  border-right: 4px solid var(--danger);
}
.item-card.done {
  opacity: 0.68;
}
.type-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, white);
  color: var(--accent);
  font-size: 24px;
  font-weight: 900;
}
.item-meta {
  display: flex;
  gap: 10px;
  color: #7b8985;
  font-size: 11px;
}
.category-dot:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
}
.item-main h3 {
  margin: 3px 0;
  font-size: 17px;
}
.due-date {
  margin: 0;
  color: #657570;
  font-size: 13px;
}
.due-date strong {
  margin-right: 8px;
  color: var(--copper);
}
.overdue .due-date strong {
  color: var(--danger);
}
.notes {
  margin: 6px 0 0;
  color: #7b8985;
  font-size: 12px;
}
.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.done-btn {
  background: #e4efe9;
  color: var(--ink);
  padding: 9px 16px;
}
.more-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 2px;
}
.done-stamp {
  font-size: 12px;
  font-weight: 800;
  color: #3b7b65;
}
.empty {
  text-align: center;
  padding: 70px 20px;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  background: #dce9df;
  font-size: 28px;
}
.empty h2 {
  margin-bottom: 4px;
}
.empty p,
.muted {
  color: #788782;
}
.floating-add {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  border: 0;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  font-size: 30px;
  box-shadow: 0 14px 30px rgba(23, 63, 55, 0.3);
}
.dialog {
  width: min(580px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}
.dialog::backdrop {
  background: rgba(15, 36, 31, 0.55);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 22px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin: 14px 0;
}
.dialog input,
.dialog select,
.dialog textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 11px;
  margin-top: 6px;
  outline: 0;
}
.dialog input:focus,
.dialog select:focus,
.dialog textarea:focus {
  border-color: var(--copper);
}
.input-row {
  display: flex;
  gap: 8px;
  align-items: end;
}
.input-row > * {
  flex: 1;
}
.input-row button {
  flex: 0 0 auto;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.setting-card h3,
.setting-card p {
  margin: 0;
}
.setting-card h3 {
  font-size: 15px;
}
.setting-card p {
  font-size: 11px;
  color: #788782;
  margin-top: 4px;
}
.small-dialog {
  width: min(480px, calc(100% - 28px));
}
.category-list > div,
.history-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.category-list strong {
  flex: 1;
}
.category-list button {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.history-list span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e4efe9;
}
.history-list p,
.history-list small {
  display: block;
  margin: 0;
}
.history-list small {
  color: #788782;
}
.toast {
  position: fixed;
  bottom: 28px;
  right: 50%;
  transform: translate(50%, 30px);
  background: #102d27;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 10;
}
.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}
@media (max-width: 720px) {
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .brand small {
    display: none;
  }
  main {
    padding: 30px 16px 100px;
  }
  .hero {
    align-items: start;
  }
  .hero .primary-btn {
    display: none;
  }
  .summary {
    gap: 8px;
  }
  .stat {
    padding: 15px;
  }
  .stat span {
    font-size: 28px;
  }
  .toolbar {
    display: block;
  }
  .tabs {
    margin-bottom: 12px;
  }
  .search {
    min-width: 0;
  }
  .item-card {
    grid-template-columns: 42px 1fr;
    padding: 15px 12px;
    gap: 10px;
  }
  .type-icon {
    width: 40px;
    height: 40px;
  }
  .item-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
  .floating-add {
    display: block;
  }
  .dialog {
    padding: 20px;
  }
  .setting-card {
    align-items: flex-start;
  }
  .input-row {
    flex-wrap: wrap;
  }
}
[hidden] {
  display: none !important;
}
