:root {
    --surface: #ffffff;
    --header: #EDF2F7; /* Ljus blågrå */
    --border: #CBD5E0; /* Neutral gråblå */
    --input: #F7FAFC; /* Nästan vit */
    --text: #2D3748; /* Djup gråblå, bra kontrast */
    --subtext: #718096; /* Neutral textgrå */
    --highlight: #3182CE; /* Klar blå (används till knappar/länkar) */
    --danger: #E53E3E; /* Röd */
    --success: #38A169; /* Grön */
    --warn: #DD6B20; /* Orangebrun */
    --bg: #F9FAFB; /* Väldigt ljus bakgrund */
}



  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 0.9rem;
    background: var(--bg);
  }

  th {
    background: var(--header);
    color: var(--text);
    padding: 8px 12px;
    text-align: left;
  }

  td {
    background: var(--surface);
    padding: 8px 12px;
    vertical-align: top;
  }

  h1, h2 {
    color: var(--text);
  }

  .week-nav a {
    color: var(--highlight);
    font-weight: bold;
    text-decoration: none;
    margin: 0 6px;
  }

  .week-nav a:hover {
    text-decoration: underline;
  }

  .meal-input {
    background: var(--input);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px;
    font-size: 0.85rem;
    width: 100%;
  }

  .meal-input.new-entry {
    border-color: var(--warn);
  }

  .meal-input.existing-entry {
    border-color: var(--success);
  }

  .delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
  }

  select.meal-input {
    appearance: none;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 6px;
    width: 100%;
    font-size: 0.9rem;
  }

.save-menu-btn {
    background: var(--highlight);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .save-menu-btn:hover {
        background: #2B6CB0; /* lite mörkare blå */
    }


  .recent-history {
    background: var(--header);
    border-radius: 8px;
    color: var(--text);
    padding: 16px;
    margin-top: 24px;
  }

  .recent-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
  }

  .recent-history th,
  .recent-history td {
    padding: 4px 8px;
    text-align: left;
  }

/* Dag-cell med ikonknapp */
.day-cell {
    min-width: 25px;
    max-width: 20px;
    padding: 8px 12px;
    font-weight: bold;
    vertical-align: top;
}

    .day-cell button {
        margin-right: 6px;
        background: none;
        border: none;
        color: var(--text);
        font-size: 1rem;
        cursor: pointer;
    }

/* Måltidscell och frukost/lunchfält */
.meal-cell {
    padding: 8px 12px;
    vertical-align: top;
}

.meal-entry-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meal-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Extra-rad under varje dag */
.extra-row td {
    padding: 0;
}

.extra-meals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

    .extra-meals label {
        font-size: 0.85rem;
        color: var(--subtext);
        min-width: 60px;
    }

/* Kockcell */
.cook-cell {
    padding: 8px 12px;
    vertical-align: top;
}
