:root {
    --bg: #f7f8f2;
    --card: #ffffff;
    --ink: #1f2a25;
    --muted: #5a665f;
    --accent: #007f5f;
    --accent-2: #f2c14e;
    --line: #d8ddd5;
    --danger: #b00020;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
      radial-gradient(circle at 20% -10%, #e2f8ef 0, transparent 40%),
      radial-gradient(circle at 90% 10%, #fff3d7 0, transparent 30%),
      var(--bg);
  }
  .app {
    max-width: 1200px;
    margin: 16px auto;
    padding: 0 12px 24px;
  }
  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.04);
  }
  .row { display: flex; gap: 10px; flex-wrap: wrap; }
  .row > * { flex: 1; min-width: 180px; }
  h1 { margin: 0 0 10px; font-size: 24px; }
  h2 { margin: 0 0 10px; font-size: 19px; }
  .muted { color: var(--muted); font-size: 13px; }
  label { display: block; font-size: 12px; margin-bottom: 4px; }
  input, select, textarea, button {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
  }
  textarea { min-height: 90px; }
  button {
    background: var(--accent);
    color: white;
    font-weight: 600;
    border: 0;
    cursor: pointer;
  }
  button.secondary {
    background: #e7ece9;
    color: var(--ink);
  }
  button.warn {
    background: var(--danger);
  }
  .tabs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
  .tab-btn {
    width: auto;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #f0f4ef;
    color: var(--ink);
  }
  .tab-btn.active {
    background: var(--accent-2);
    border-color: #ddb245;
  }
  .tab { display: none; }
  .tab.active { display: block; }
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
  }
  th, td {
    border: 1px solid var(--line);
    text-align: left;
    padding: 8px;
  }
  .calendar {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .cal-head, .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
  }
  .cal-head div {
    font-size: 12px;
    text-align: center;
    background: #f2f5f3;
    padding: 8px;
    border-right: 1px solid var(--line);
  }
  .cal-head div:last-child { border-right: 0; }
  .cal-cell {
    min-height: 66px;
    border-right: 1px solid var(--line);
    border-top: 1px solid var(--line);
    padding: 6px;
    font-size: 12px;
    position: relative;
  }
  .cal-cell:nth-child(7n) { border-right: 0; }
  .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    right: 6px;
    top: 6px;
  }
  .hidden { display: none !important; }
  #toast {
    position: fixed;
    right: 14px;
    bottom: 14px;
    max-width: 360px;
    background: #1f2a25;
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    display: none;
    z-index: 10;
  }
  @media (max-width: 800px) {
    h1 { font-size: 20px; }
    .cal-cell { min-height: 54px; }
  }