:root {
  --bg: #101114;
  --panel: #171922;
  --panel2: #1e2130;
  --text: #e8e9ee;
  --muted: #a9adbb;
  --accent: #3aa675;
  --danger: #d84b4b;
  --warn: #f2b84b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --btn: #2a2f44;
  --btn2: #22263a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  border-bottom: 1px solid var(--border);
}

.title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--btn2);
  color: var(--muted);
  border-radius: 12px;
  cursor: pointer;
}

.tab.active {
  background: var(--btn);
  color: var(--text);
  border-color: rgba(58, 166, 117, 0.4);
}

.content {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

.section {
  margin-bottom: 16px;
}

.section-title {
  font-weight: 700;
  color: var(--muted);
  margin: 12px 2px 8px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
}

.row-left {
  min-width: 0;
}

.row-title {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.2;
}

.row-num {
  color: var(--muted);
  min-width: 18px;
  text-align: right;
  flex: none;
}

.row-icon {
  flex: none;
  opacity: 0.9;
}

.row-text {
  word-break: break-word;
  white-space: pre-wrap;
}

.row-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.hint {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--btn2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.icon-btn.green {
  background: rgba(58, 166, 117, 0.18);
  border-color: rgba(58, 166, 117, 0.4);
}

.icon-btn.red {
  background: rgba(216, 75, 75, 0.14);
  border-color: rgba(216, 75, 75, 0.35);
}

.icon-btn.yellow {
  background: rgba(242, 184, 75, 0.14);
  border-color: rgba(242, 184, 75, 0.35);
}

.bottombar {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.primary-btn {
  flex: 1;
  border: 1px solid rgba(58, 166, 117, 0.45);
  background: rgba(58, 166, 117, 0.18);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 18px;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-weight: 700;
}

.modal-body {
  padding: 12px;
}

.modal-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

textarea,
input[type="text"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 10px 10px;
  background: #0f1016;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  outline: none;
}

.btn {
  border: 1px solid var(--border);
  background: var(--btn);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.btn.green {
  border-color: rgba(58, 166, 117, 0.5);
  background: rgba(58, 166, 117, 0.18);
}

.btn.red {
  border-color: rgba(216, 75, 75, 0.45);
  background: rgba(216, 75, 75, 0.14);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 72px;
  background: rgba(23, 25, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.7);
}

.toast.hidden {
  display: none;
}

