:root {
  --bg: #0b0f17;
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --accent: #7c3aed;
  --good: #22c55e;
  --bad: #ef4444;
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(1200px 700px at 15% 10%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(1000px 600px at 90% 20%, rgba(34, 197, 94, 0.18), transparent 60%),
    var(--bg);
    background-repeat: no-repeat;
  color: var(--text);
  font: 14px/1.35 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  margin-bottom: 18px;
}

.header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin-top: 4px;
  color: var(--muted);
}

.controls {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 12px;
}

input[type="date"],
input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.stats {
  display: flex;
  gap: 14px;
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  min-width: 120px;
}

.stat__label {
  font-size: 11px;
  color: var(--muted);
}

.stat__value {
  font-size: 20px;
  font-weight: 650;
  margin-top: 2px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.11);
}

.btn:active {
  transform: translateY(1px);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
}

.btn--danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.file {
  display: none;
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 14px 0;
}

.card__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.card__body {
  padding: 16px;
}

h2 {
  font-size: 15px;
  letter-spacing: -0.01em;
  margin: 0;
}

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

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th,
.table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 10px;
}

@media (max-width: 820px) {
  .days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .header__top {
    flex-direction: column;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  .days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.day {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
  cursor: pointer;
  min-height: 74px;
  display: grid;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.day:hover {
  background: rgba(0, 0, 0, 0.24);
}

.day__top {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px;
}

.day__num {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 12px;
  color: #fff;
}

.day__focus {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day__meta {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  line-height: 1.2;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.day--done {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

.day--done .badge {
  background: var(--good);
}

.day--rest {
  opacity: 0.85;
}

.dialog {
  width: min(560px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  background: rgba(15, 20, 30, 0.96);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog__form {
  margin: 0;
}

.dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.dialog__title {
  font-weight: 750;
  letter-spacing: -0.01em;
}

.dialog__subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.dialog__body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

 .dialog__section {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
  overflow: hidden;
 }

 .dialog__sectionTitle {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
 }

 .dialog__sectionBody {
  padding: 12px;
  display: grid;
  gap: 8px;
  color: var(--text);
 }

 .lines {
  display: grid;
  gap: 6px;
 }

 .line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
 }

 .line__left {
  min-width: 0;
 }

 .line__name {
  font-weight: 650;
  letter-spacing: -0.01em;
 }

 .line__hint {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
 }

 .line__right {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
 }

.dialog__row {
  display: grid;
  gap: 6px;
}

.dialog__footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.icon-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  user-select: none;
}

.check input {
  width: 18px;
  height: 18px;
}
