:root {
  --bg: #fff;
  --panel: #f5f7fa;
  --ink: #172a45;
  --muted: #778292;
  --line: #e2e7ed;
  --blue: #2264d8;
  --sel: #eaf1ff;
  --green: #15816d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px "Segoe UI",
    "Malgun Gothic",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
body.dark {
  --bg: #202327;
  --panel: #292d32;
  --ink: #edf0f5;
  --muted: #a2acb8;
  --line: #3c424a;
  --sel: #2e4566;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
button:hover {
  background: var(--sel);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.primary:hover {
  background: #1754bf;
}
.danger {
  color: #c64545;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.yellow {
  color: #e9ad14;
  fill: #ffd35a;
}
input,
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px;
}
input:focus,
textarea:focus {
  outline: 2px solid #96b9f5;
}
textarea {
  resize: vertical;
}
h1 {
  font-size: 27px;
  margin: 0;
}
h2 {
  font-size: 19px;
}
small,
.muted {
  color: var(--muted);
}
.shell {
  display: flex;
  height: 100vh;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
}
.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
}
.nav {
  overflow-y: auto;
  flex: 1;
  padding: 0 12px;
}
.nav button {
  border: 0;
  width: 100%;
  justify-content: flex-start;
  padding: 12px;
  margin: 2px 0;
  background: transparent;
}
.nav button.active {
  background: var(--sel);
  color: var(--blue);
  font-weight: 600;
}
.nav label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 22px 12px 8px;
}
.account {
  border-top: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  gap: 5px;
}
.account button {
  border: 0;
  padding: 10px;
}
.sidebar.collapsed {
  width: 68px;
}
.collapsed .nav,
.collapsed .account,
.collapsed .brand strong,
.collapsed .mark {
  display: none;
}
.collapsed .brand {
  padding: 14px;
}
.main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.top {
  padding: 30px 36px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.content {
  padding: 24px 36px;
}
.status {
  font-size: 12px;
  color: var(--green);
  margin-top: 8px;
}
.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.crumbs button {
  border: 0;
  padding: 6px;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.table td,
.table th {
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
}
.table tr:hover td {
  background: var(--panel);
}
.filename {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.table .filename svg {
  width: 26px;
  height: 29px;
}
.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
.editor {
  max-width: 920px;
  margin: 0 auto;
}
.title-input {
  font-size: 28px;
  border: 0;
  width: 100%;
  margin: 20px 0;
}
.editor textarea {
  width: 100%;
  min-height: 48vh;
  border: 0;
  line-height: 1.9;
}
.toolbar {
  display: flex;
  gap: 5px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}
.list button {
  display: flex;
  width: 100%;
  margin-bottom: 8px;
  justify-content: flex-start;
}
.timer {
  text-align: center;
  margin: 35px auto;
  max-width: 650px;
}
.clock {
  font-size: 72px;
  font-variant-numeric: tabular-nums;
  margin: 45px 0 15px;
}
.timer .actions {
  justify-content: center;
}
.stat {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 45px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.day {
  min-height: 108px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
  cursor: pointer;
}
.day:hover {
  background: var(--panel);
}
.day.today {
  box-shadow: inset 0 0 0 2px var(--blue);
}
.event {
  font-size: 11px;
  background: var(--sel);
  padding: 4px;
  margin-top: 5px;
  overflow: hidden;
}
.week {
  padding: 10px;
  text-align: center;
  background: var(--panel);
}
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--panel);
}
.authbox {
  width: 410px;
  padding: 35px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.authbox h1 {
  margin: 18px 0 8px;
}
.authbox input {
  width: 100%;
  margin: 6px 0 13px;
}
.authbox button {
  width: 100%;
  margin: 5px 0;
}
.authbox .switch {
  border: 0;
  color: var(--blue);
}
dialog {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  width: 440px;
  max-width: 90vw;
}
dialog::backdrop {
  background: #17233466;
}
dialog input,
dialog select {
  width: 100%;
  margin: 9px 0 16px;
}
dialog .actions {
  justify-content: flex-end;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  background: #172a45;
  color: white;
  border-radius: 7px;
  display: none;
  z-index: 99;
}
.word {
  font-size: 48px;
  margin: 50px 0 18px;
}
.flash {
  text-align: center;
  padding: 15px;
}
.task {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.task span {
  flex: 1;
}
.task input {
  width: 19px;
  height: 19px;
}
.file-preview {
  width: 100%;
  height: 70vh;
  border: 0;
}
.settings {
  max-width: 650px;
}
.settings input {
  width: 100%;
  margin: 10px 0 20px;
}
.settings button {
  margin: 5px;
}
.badge {
  font-size: 11px;
  padding: 3px 7px;
  background: var(--panel);
  border-radius: 4px;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 190px;
  }
  .top,
  .content {
    padding: 20px;
  }
  .table .size {
    display: none;
  }
  .split {
    grid-template-columns: 210px 1fr;
  }
}
