:root {
  --bg: #101c4f;
  --bg-soft: #16245f;
  --panel: #4f5f82;
  --panel-2: #5e6f94;
  --panel-3: #6c7da3;
  --text: #f6f8ff;
  --muted: #d9e1f7;
  --muted-2: #bfc9e8;
  --border: rgba(5, 10, 35, 0.85);
  --border-soft: rgba(255, 255, 255, 0.18);
  --accent: #d8e1ff;
  --accent-strong: #ffd36b;
  --danger: #ffd9d9;
  --danger-strong: #ffb7b7;
  --input-bg: #f2f5ff;
  --input-text: #0f173a;
  --shadow: rgba(0, 0, 0, 0.22);
  --shadow-soft: rgba(0, 0, 0, 0.16);
  --radius: 10px;
  --radius-sm: 7px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  color: var(--text);
}

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
}

.page-header {
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 26px var(--shadow-soft);
}

h1 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: 0.3px;
}

h2 {
  margin: 0;
  font-size: 22px;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

p {
  margin: 0;
  line-height: 1.45;
}

.subtle,
.footer-note {
  color: var(--muted);
  font-size: 14px;
}

.section,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.045) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px var(--shadow-soft);
  padding: 18px;
  margin-bottom: 18px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.controls-grid,
.week-grid,
.meal-type-grid,
.shopping-grid,
.ready-grid {
  display: grid;
  gap: 14px;
}

.controls-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.week-grid {
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.meal-type-grid,
.shopping-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.ready-grid {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label,
.checkbox-label,
.radio-group-title {
  font-weight: 700;
  font-size: 14px;
}
.checkbox-row,
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

input[type="text"],
input[type="number"],
select,
button,
textarea,
[contenteditable="true"] {
  font: inherit;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.75);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--input-text);
  min-height: 42px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus {
  outline: 3px solid rgba(216, 225, 255, 0.35);
  outline-offset: 1px;
}

button {
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #edf1ff 0%, var(--accent) 100%);
  color: #11183d;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
  transition:
    transform 0.08s ease,
    filter 0.12s ease,
    box-shadow 0.12s ease;
}

button:hover {
  filter: brightness(1.04);
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.secondary-btn {
  background: linear-gradient(180deg, #f3f6ff 0%, #e6ecff 100%);
}

.danger-btn,
.remove-btn {
  background: linear-gradient(180deg, #ffe8e8 0%, var(--danger) 100%);
}

.danger-btn:hover,
.remove-btn:hover {
  background: linear-gradient(180deg, #ffe0e0 0%, var(--danger-strong) 100%);
}

.edit-btn {
  background: linear-gradient(180deg, #f7fbff 0%, #e7f0ff 100%);
}

.day-card,
.meal-type-card,
.shopping-type-card,
.ready-week-card {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.day-card h3,
.meal-type-card h3,
.shopping-type-card h3,
.ready-week-card h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 12px;
}

.day-fields {
  display: grid;
  gap: 10px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: stretch;
}

.input-row input {
  flex: 1;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 12px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.105);
  border: 1px solid rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-sm);
  min-width: 0;
}

.list-item.dragging {
  opacity: 0.45;
}

.item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.item-text {
  overflow-wrap: anywhere;
}

.drag-handle {
  cursor: grab;
  user-select: none;
  font-weight: bold;
  padding: 2px 7px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.remove-btn,
.edit-btn {
  min-width: 38px;
  padding: 8px 10px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty-note {
  padding: 11px 13px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.meta-list {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
}

.meta-list.compact {
  list-style: none;
  padding-left: 0;
}

.ready-table-wrap {
  overflow-x: visible;
  border-radius: var(--radius-sm);
}

.ready-week-card table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.ready-week-card th,
.ready-week-card td {
  border: 1px solid rgba(0, 0, 0, 0.42);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.075);
  min-width: 0;
  width: auto;
}

.ready-week-card th {
  background: rgba(255, 255, 255, 0.13);
  font-weight: 800;
}

.ready-week-card th:first-child,
.ready-week-card td:first-child {
  width: 18%;
}

.ready-edit {
  background: rgba(255, 255, 255, 0.16);
  border: 1px dashed rgba(0, 0, 0, 0.62);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  min-height: 34px;
  color: var(--text);
  outline: none;
  overflow-wrap: anywhere;
}

.ready-edit:focus {
  background: rgba(255, 255, 255, 0.24);
}

.shopping-meal-item {
  cursor: pointer;
}

.shopping-meal-item .item-text {
  color: var(--text);
}

.shopping-input-row {
  align-items: stretch;
}

/* Appin sisäiset välilehdet, jos napit ovat inline-tyylien ulkopuolella */
#app-tabs {
  align-items: center;
}

#app-tabs button {
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
}

/* Koti-/workspace-näkymän painikkeet hyötyvät samoista perussäännöistä */
#workspace-home button,
#workspace-topbar button {
  border-radius: var(--radius-sm) !important;
}

/* Parempi tulostusnäkymien napitus ei vaikuta selaimen printti-ikkunaan */
#bottom-print-actions-section {
  margin-top: 2px;
}

@media (max-width: 900px) {
  .ready-week-card th:first-child,
  .ready-week-card td:first-child {
    width: 24%;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 12px;
  }

  .page-header {
    padding: 14px;
  }

  h1 {
    font-size: 28px;
  }

  .input-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .action-row button {
    width: auto;
    flex: 1 1 220px;
  }

  .ready-week-card table {
    font-size: 14px;
  }

  .ready-week-card th:first-child,
  .ready-week-card td:first-child {
    width: 28%;
  }
}

/* =========================================================
   ABUCCO UI PASS 2
   Selkeä, moderni ja hieman merihenkinen työkaluilme.
   Lisää tämä styles.css-tiedoston loppuun.
   ========================================================= */

:root {
  --sea-deep: #0c1746;
  --sea-mid: #182a68;
  --sea-soft: #243978;
  --sea-card: rgba(255, 255, 255, 0.085);
  --sea-card-strong: rgba(255, 255, 255, 0.12);
  --gold-soft: #ffe6a3;
  --gold: #ffd36b;
}

/* Yleinen luettavuus */
body {
  letter-spacing: 0.01em;
}

.app {
  padding-top: 24px;
}

/* Otsake enemmän tuotteen näköiseksi */
.page-header {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, var(--sea-soft), var(--sea-mid));
}

.page-header::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 211, 107, 0.12);
  pointer-events: none;
}

.page-header h1 {
  font-size: 38px;
  font-weight: 900;
}

.page-header .subtle {
  font-size: 15px;
  color: #e4ebff;
}

/* Välilehtirivi tuotteistetummaksi */
#app-tabs {
  gap: 10px !important;
  padding: 2px 18px 12px !important;
}

#app-tabs button {
  border-radius: 999px !important;
  border: 1px solid rgba(0, 0, 0, 0.75) !important;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2) !important;
}

#app-tabs button[data-app-tab="menu"] {
  background: linear-gradient(180deg, #ffe9a8 0%, var(--gold) 100%) !important;
}

#app-tabs button:hover {
  transform: translateY(-1px);
}

/* Paneelit ja kortit */
.section,
.panel {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.05));
}

.day-card,
.meal-type-card,
.shopping-type-card,
.ready-week-card {
  background:
    linear-gradient(180deg, var(--sea-card-strong), var(--sea-card));
  border-color: rgba(255, 255, 255, 0.18);
}

.day-card:hover,
.meal-type-card:hover,
.shopping-type-card:hover,
.ready-week-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

/* Korttien otsikot selkeämmiksi */
.day-card h3,
.meal-type-card h3,
.shopping-type-card h3,
.ready-week-card h3 {
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Lomakekentät */
input[type="text"],
input[type="number"],
select,
textarea {
  border-color: rgba(0, 0, 0, 0.65);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.ready-edit:focus {
  outline: 3px solid rgba(255, 211, 107, 0.32);
}

/* Listarivit */
.list-item {
  background: rgba(255, 255, 255, 0.115);
  border-color: rgba(0, 0, 0, 0.38);
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Badge-merkinnät */
.badge {
  background: rgba(255, 211, 107, 0.18);
  border-color: rgba(0, 0, 0, 0.45);
  color: #fff7dc;
}

/* Huomautukset */
.empty-note {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Painikkeet */
button {
  letter-spacing: 0.01em;
}

.secondary-btn {
  background: linear-gradient(180deg, #ffffff 0%, #e3eaff 100%);
}

.danger-btn,
.remove-btn {
  background: linear-gradient(180deg, #ffecec 0%, #ffd2d2 100%);
}

/* Valmis ruokalista -taulukot */
.ready-week-card table {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.ready-week-card th {
  color: #ffffff;
}

.ready-week-card td {
  background: rgba(255, 255, 255, 0.07);
}

/* Muokattavat valmiin listan kentät */
.ready-edit {
  background: rgba(255, 255, 255, 0.13);
}

.ready-edit:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Ostoslistan yleisosio ja muut kortit vähän rauhallisemmaksi */
.shopping-type-card .empty-note {
  margin-top: 4px;
}

/* Mobiilissa vähän tiiviimpi */
@media (max-width: 720px) {
  .page-header h1 {
    font-size: 31px;
  }

  .section,
  .panel {
    padding: 15px;
  }

  .day-card,
  .meal-type-card,
  .shopping-type-card,
  .ready-week-card {
    padding: 13px;
  }
}
/* =========================================================
   ABUCCO UI PASS 3 — MODERN SaaS -KOKEILU
   Lisää tämä styles.css-tiedoston loppuun.
   Ei muuta sovelluksen logiikkaa.
   ========================================================= */

:root {
  --saas-bg: #f4f7fb;
  --saas-surface: #ffffff;
  --saas-surface-2: #f8fafc;
  --saas-text: #172033;
  --saas-muted: #64748b;
  --saas-border: #d7deea;
  --saas-border-strong: #b9c4d6;
  --saas-primary: #2563eb;
  --saas-primary-dark: #1d4ed8;
  --saas-primary-soft: #dbeafe;
  --saas-warning: #fff3c4;
  --saas-warning-border: #f6c64f;
  --saas-danger: #fee2e2;
  --saas-danger-border: #fca5a5;
  --saas-shadow: rgba(15, 23, 42, 0.08);
  --saas-shadow-strong: rgba(15, 23, 42, 0.14);
}

/* Yleisvaikutelma: vaalea, moderni työkalumainen SaaS */
body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--saas-bg) 100%);
  color: var(--saas-text);
}

.app {
  max-width: 1480px;
  padding: 24px;
}

/* Pääotsikko */
.page-header {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(255, 255, 255, 0.95)),
    var(--saas-surface);
  color: var(--saas-text);
  border: 1px solid var(--saas-border);
  border-radius: 18px;
  box-shadow: 0 16px 40px var(--saas-shadow);
}

.page-header h1 {
  color: #0f172a;
  font-size: 38px;
  font-weight: 900;
}

.page-header .subtle,
.subtle,
.footer-note {
  color: var(--saas-muted);
}

/* Paneelit */
.section,
.panel {
  background: rgba(255, 255, 255, 0.94);
  color: var(--saas-text);
  border: 1px solid var(--saas-border);
  border-radius: 18px;
  box-shadow: 0 14px 34px var(--saas-shadow);
}

.section-header {
  border-bottom: 1px solid #edf1f7;
  padding-bottom: 12px;
}

/* Otsikot */
h1,
h2,
h3 {
  color: #0f172a;
}

h2 {
  font-weight: 850;
}

h3 {
  font-weight: 800;
}

/* Kortit */
.day-card,
.meal-type-card,
.shopping-type-card,
.ready-week-card {
  background: var(--saas-surface);
  color: var(--saas-text);
  border: 1px solid var(--saas-border);
  border-radius: 16px;
  box-shadow: 0 10px 24px var(--saas-shadow);
}

.day-card:hover,
.meal-type-card:hover,
.shopping-type-card:hover,
.ready-week-card:hover {
  border-color: var(--saas-border-strong);
  box-shadow: 0 16px 34px var(--saas-shadow-strong);
}

.day-card h3,
.meal-type-card h3,
.shopping-type-card h3,
.ready-week-card h3 {
  color: #0f172a;
  border-bottom: 1px solid #edf1f7;
}

/* Lomakkeet */
label,
.checkbox-label,
.radio-group-title {
  color: #1e293b;
}

input[type="text"],
input[type="number"],
select,
textarea,
[contenteditable="true"] {
  background: #ffffff;
  color: var(--saas-text);
  border: 1px solid var(--saas-border-strong);
  border-radius: 12px;
  box-shadow: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus,
.ready-edit:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--saas-primary);
}

/* Painikkeet */
button {
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  color: #0f172a;
  border: 1px solid var(--saas-border-strong);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.10);
  font-weight: 800;
}

button:hover {
  filter: none;
  background: linear-gradient(180deg, #f8fbff 0%, #e6efff 100%);
  border-color: #94a3b8;
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

.secondary-btn {
  background: linear-gradient(180deg, var(--saas-primary) 0%, var(--saas-primary-dark) 100%);
  color: #ffffff;
  border-color: var(--saas-primary-dark);
}

.secondary-btn:hover {
  background: linear-gradient(180deg, #2f6df0 0%, #1d4ed8 100%);
}

.danger-btn,
.remove-btn {
  background: var(--saas-danger);
  border-color: var(--saas-danger-border);
  color: #7f1d1d;
}

.edit-btn {
  background: var(--saas-primary-soft);
  color: #1e3a8a;
  border-color: #bfdbfe;
}

/* Listarivit */
.list-item {
  background: var(--saas-surface-2);
  color: var(--saas-text);
  border: 1px solid var(--saas-border);
  border-radius: 12px;
}

.list-item:hover {
  background: #ffffff;
  border-color: var(--saas-border-strong);
}

/* Tyhjät huomautukset */
.empty-note {
  background: #f8fafc;
  color: var(--saas-muted);
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

/* Badge */
.badge {
  background: #eef4ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
}

/* Meta-listat */
.meta-list {
  color: var(--saas-muted);
}

/* Valmis ruokalista */
.ready-week-card table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
}

.ready-week-card th,
.ready-week-card td {
  color: var(--saas-text);
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ready-week-card th {
  background: #f1f5f9;
  color: #0f172a;
}

.ready-edit {
  background: #f8fafc;
  color: var(--saas-text);
  border: 1px dashed #94a3b8;
}

.ready-edit:hover {
  background: #ffffff;
}

/* Sovelluksen välilehdet modernimmiksi */
#app-tabs {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--saas-border);
  border-radius: 999px;
  box-shadow: 0 10px 28px var(--saas-shadow);
  padding: 8px !important;
  margin-bottom: 18px !important;
}

#app-tabs button {
  border-radius: 999px !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--saas-muted) !important;
}

#app-tabs button:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* appTabs.js käyttää inline-tyylejä aktiiviseen välilehteen,
   joten pakotetaan aktiivisen näköistä vaikutelmaa focused/hover-tiloihin varovasti. */
#app-tabs button[style*="scale(1.06)"],
#app-tabs button[style*="ffd36b"],
#app-tabs button[style*="cfd8ff"] {
  background: var(--saas-primary) !important;
  color: #ffffff !important;
  border-color: var(--saas-primary-dark) !important;
}

/* Workspace / kotiasema modernimmaksi siltä osin kuin inline-tyylit sallivat */
#workspace-home {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--saas-bg) 100%) !important;
  color: var(--saas-text) !important;
}

#workspace-home section {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--saas-text) !important;
  border: 1px solid var(--saas-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px var(--saas-shadow) !important;
}

#workspace-home h1,
#workspace-home h2,
#workspace-home p {
  color: var(--saas-text) !important;
}

#workspace-home button {
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%) !important;
  color: #0f172a !important;
  border: 1px solid var(--saas-border-strong) !important;
  border-radius: 12px !important;
}

#workspace-topbar {
  background: #ffffff !important;
  color: var(--saas-text) !important;
  border-bottom: 1px solid var(--saas-border) !important;
  box-shadow: 0 8px 24px var(--saas-shadow);
}

#workspace-topbar button {
  background: #eef4ff !important;
  color: #0f172a !important;
  border: 1px solid var(--saas-border-strong) !important;
}

/* Dialogit */
body > div[style*="position: fixed"] label,
body > div[style*="position: fixed"] p,
body > div[style*="position: fixed"] h3,
body > div[style*="position: fixed"] span {
  color: #11183d;
}

/* Keltaiset varoituslaatikot, esim allergeenit ja käyttäjälistan täyttymisvaroitus */
div[style*="background:#fff0bd"],
div[style*="rgba(255, 240, 180"] {
  color: #3b2f09 !important;
}

/* Mobiili */
@media (max-width: 720px) {
  .app {
    padding: 14px;
  }

  .page-header {
    border-radius: 16px;
  }

  .page-header h1 {
    font-size: 31px;
  }

  .section,
  .panel,
  .day-card,
  .meal-type-card,
  .shopping-type-card,
  .ready-week-card {
    border-radius: 14px;
  }

  #app-tabs {
    border-radius: 18px;
  }
}
/* =========================================================
   ABUCCO UI PASS 4 — HARMAAMPI MODERNI TYÖKALUTYYLI
   Lisää tämä nykyisten CSS-lisäysten perään.
   Tavoite: vähemmän kirkas, vähemmän sininen, moderni harmaa.
   ========================================================= */

:root {
  --gray-bg: #dfe3e8;
  --gray-bg-2: #eef1f4;
  --gray-surface: #f8f9fb;
  --gray-surface-2: #ffffff;
  --gray-card: #f4f6f8;
  --gray-card-hover: #ffffff;
  --gray-text: #17202e;
  --gray-muted: #5f6b7a;
  --gray-border: #c7ced8;
  --gray-border-strong: #aeb8c5;
  --gray-primary: #3f4f63;
  --gray-primary-dark: #2f3d4e;
  --gray-primary-soft: #e4e8ee;
  --gray-warning: #f3e6b6;
  --gray-danger: #efd3d3;
  --gray-shadow: rgba(25, 35, 50, 0.10);
  --gray-shadow-strong: rgba(25, 35, 50, 0.16);
}

/* Yleistausta harmaammaksi */
body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(180deg, var(--gray-bg-2) 0%, var(--gray-bg) 100%) !important;
  color: var(--gray-text) !important;
}

/* Pääotsake */
.page-header {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 236, 242, 0.92)),
    var(--gray-surface) !important;
  color: var(--gray-text) !important;
  border-color: var(--gray-border) !important;
  box-shadow: 0 14px 34px var(--gray-shadow) !important;
}

.page-header h1 {
  color: #121a26 !important;
}

.page-header .subtle,
.subtle,
.footer-note {
  color: var(--gray-muted) !important;
}

/* Paneelit ja osiot */
.section,
.panel {
  background: rgba(248, 249, 251, 0.96) !important;
  color: var(--gray-text) !important;
  border-color: var(--gray-border) !important;
  box-shadow: 0 12px 30px var(--gray-shadow) !important;
}

.section-header {
  border-bottom-color: #e4e8ee !important;
}

/* Otsikot */
h1,
h2,
h3 {
  color: #121a26 !important;
}

/* Kortit */
.day-card,
.meal-type-card,
.shopping-type-card,
.ready-week-card {
  background: var(--gray-card) !important;
  color: var(--gray-text) !important;
  border-color: var(--gray-border) !important;
  box-shadow: 0 8px 22px var(--gray-shadow) !important;
}

.day-card:hover,
.meal-type-card:hover,
.shopping-type-card:hover,
.ready-week-card:hover {
  background: var(--gray-card-hover) !important;
  border-color: var(--gray-border-strong) !important;
  box-shadow: 0 12px 28px var(--gray-shadow-strong) !important;
}

.day-card h3,
.meal-type-card h3,
.shopping-type-card h3,
.ready-week-card h3 {
  color: #121a26 !important;
  border-bottom-color: #dde3ea !important;
}

/* Lomakekentät */
label,
.checkbox-label,
.radio-group-title {
  color: #1f2937 !important;
}

input[type="text"],
input[type="number"],
select,
textarea,
[contenteditable="true"] {
  background: #ffffff !important;
  color: var(--gray-text) !important;
  border-color: var(--gray-border-strong) !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
[contenteditable="true"]:focus,
.ready-edit:focus {
  outline: 3px solid rgba(63, 79, 99, 0.22) !important;
  border-color: var(--gray-primary) !important;
}

/* Napit hillitymmiksi */
button {
  background: linear-gradient(180deg, #ffffff 0%, #e8edf3 100%) !important;
  color: #17202e !important;
  border-color: var(--gray-border-strong) !important;
  box-shadow: 0 3px 8px rgba(25, 35, 50, 0.12) !important;
}

button:hover {
  background: linear-gradient(180deg, #ffffff 0%, #dde4ec 100%) !important;
  border-color: #98a4b3 !important;
}

.secondary-btn {
  background: linear-gradient(180deg, #56677c 0%, var(--gray-primary-dark) 100%) !important;
  color: #ffffff !important;
  border-color: var(--gray-primary-dark) !important;
}

.secondary-btn:hover {
  background: linear-gradient(180deg, #61748b 0%, #34475a 100%) !important;
}

/* Poisto- ja vaarapainikkeet edelleen tunnistettaviksi, mutta rauhallisemmaksi */
.danger-btn,
.remove-btn {
  background: linear-gradient(180deg, #f5dddd 0%, var(--gray-danger) 100%) !important;
  color: #6f1d1d !important;
  border-color: #d7aaaa !important;
}

.edit-btn {
  background: var(--gray-primary-soft) !important;
  color: #243449 !important;
  border-color: #c9d1dc !important;
}

/* Listarivit */
.list-item {
  background: #ffffff !important;
  color: var(--gray-text) !important;
  border-color: #d4dae3 !important;
}

.list-item:hover {
  background: #f8fafc !important;
  border-color: var(--gray-border-strong) !important;
}

/* Tyhjät huomautukset */
.empty-note {
  background: #edf0f4 !important;
  color: var(--gray-muted) !important;
  border-color: #c9d1dc !important;
}

/* Badge */
.badge {
  background: #e5e9ef !important;
  color: #2f3d4e !important;
  border-color: #c4ccd7 !important;
}

/* Taulukot */
.ready-week-card th,
.ready-week-card td {
  color: var(--gray-text) !important;
  border-color: #d6dde6 !important;
  background: #ffffff !important;
}

.ready-week-card th {
  background: #e9edf2 !important;
  color: #17202e !important;
}

.ready-edit {
  background: #f8fafc !important;
  color: var(--gray-text) !important;
  border-color: #aeb8c5 !important;
}

.ready-edit:hover {
  background: #ffffff !important;
}

/* Välilehtipalkki harmaammaksi */
#app-tabs {
  background: rgba(248, 249, 251, 0.88) !important;
  border-color: var(--gray-border) !important;
  box-shadow: 0 10px 26px var(--gray-shadow) !important;
}

#app-tabs button {
  background: transparent !important;
  color: var(--gray-muted) !important;
}

#app-tabs button:hover {
  background: #e9edf2 !important;
  color: #17202e !important;
}

/* Aktiivinen välilehti: ei sininen, vaan tumma harmaa */
#app-tabs button[style*="scale(1.06)"],
#app-tabs button[style*="ffd36b"],
#app-tabs button[style*="cfd8ff"] {
  background: var(--gray-primary) !important;
  color: #ffffff !important;
  border-color: var(--gray-primary-dark) !important;
}

/* Kotiasema samaan harmaaseen linjaan */
#workspace-home {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 32%),
    linear-gradient(180deg, var(--gray-bg-2) 0%, var(--gray-bg) 100%) !important;
  color: var(--gray-text) !important;
}

#workspace-home section {
  background: rgba(248, 249, 251, 0.96) !important;
  color: var(--gray-text) !important;
  border-color: var(--gray-border) !important;
  box-shadow: 0 12px 30px var(--gray-shadow) !important;
}

#workspace-home h1,
#workspace-home h2,
#workspace-home h3,
#workspace-home p,
#workspace-home span {
  color: var(--gray-text) !important;
}

#workspace-home button {
  background: linear-gradient(180deg, #ffffff 0%, #e8edf3 100%) !important;
  color: #17202e !important;
  border-color: var(--gray-border-strong) !important;
}

#workspace-topbar {
  background: #f8f9fb !important;
  color: var(--gray-text) !important;
  border-bottom-color: var(--gray-border) !important;
  box-shadow: 0 8px 22px var(--gray-shadow) !important;
}

#workspace-topbar button {
  background: #e8edf3 !important;
  color: #17202e !important;
  border-color: var(--gray-border-strong) !important;
}

/* Dialogien tekstit varmistetaan luettaviksi */
body > div[style*="position: fixed"] label,
body > div[style*="position: fixed"] p,
body > div[style*="position: fixed"] h3,
body > div[style*="position: fixed"] span {
  color: #11183d !important;
}

/* Keltaiset huomautukset */
div[style*="background:#fff0bd"],
div[style*="rgba(255, 240, 180"] {
  background: var(--gray-warning) !important;
  color: #3b2f09 !important;
}

/* Allergeenimuistutus ostoslistassa */
.shopping-type-card[style*="rgba(255, 240, 180"] {
  background: var(--gray-warning) !important;
  color: #3b2f09 !important;
}
/* =========================================================
   ABUCCO UI PASS 5 — VASEMMALTA OIKEALLE HARMAAGRADIENTTI
   Tavoite: tausta muuttuu rauhallisesti vaaleammasta/tummemmasta
   harmaasta toiseen ilman sinistä yleisilmettä.
   ========================================================= */

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(90deg, #cfd4da 0%, #e3e7eb 46%, #f1f3f5 100%) !important;
}

/* Sama taustalinja kotiasemaan */
#workspace-home {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(90deg, #cfd4da 0%, #e3e7eb 46%, #f1f3f5 100%) !important;
}

/* Paneelit erottuvat paremmin harmaagradientista */
.section,
.panel,
#workspace-home section {
  background: rgba(248, 249, 251, 0.94) !important;
}

/* Pieni lisäsyvyys kortteihin, ettei kokonaisuus näytä liian litteältä */
.day-card,
.meal-type-card,
.shopping-type-card,
.ready-week-card {
  background: rgba(255, 255, 255, 0.82) !important;
}
/* =========================================================
   ABUCCO UI PASS 6 — KOTIASEMAN BRÄNDIALUE SIISTIMMIN
   Tekee kotiaseman Abucco-otsikosta lähempänä itse ohjelman otsaketta.
   ========================================================= */

#workspace-home h1 {
  font-size: 38px !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
  color: #121a26 !important;
  margin-bottom: 8px !important;
}

#workspace-home h1 + p,
#workspace-home .brand-line,
#workspace-home p:first-of-type {
  color: #5f6b7a !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

#workspace-home section:first-of-type {
  position: relative !important;
  overflow: hidden !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 236, 242, 0.94)) !important;
  border: 1px solid #c7ced8 !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(25, 35, 50, 0.10) !important;
}

#workspace-home section:first-of-type::after {
  content: "" !important;
  position: absolute !important;
  right: -70px !important;
  top: -85px !important;
  width: 210px !important;
  height: 210px !important;
  border-radius: 50% !important;
  background: rgba(63, 79, 99, 0.08) !important;
  pointer-events: none !important;
}

#workspace-home section:first-of-type > * {
  position: relative !important;
  z-index: 1 !important;
}
/* =========================================================
   OSTOSLISTAN ATERIANIMET NÄKYVIIN HARMAASSA TEEMASSA
   ========================================================= */

.shopping-meal-item .item-text,
.shopping-type-card .item-text,
.shopping-type-card .meta-list,
.shopping-type-card .meta-list li,
.shopping-type-card li {
  color: var(--gray-text) !important;
}

.shopping-type-card .item-main,
.shopping-type-card .item-main span {
  color: var(--gray-text) !important;
}

/* Jos ateria on yliviivattu, se saa silti olla himmeä mutta näkyvä */
.shopping-meal-item .item-text[style*="line-through"] {
  color: var(--gray-muted) !important;
}
/* =========================================================
   AAMUPALAPOHJA — TUOTENIMEN INPUT LYHYEMMÄKSI
   ========================================================= */

#breakfast-tab-section #breakfast-name-input {
  flex: 0 1 420px !important;
  max-width: 420px !important;
}

#breakfast-tab-section .input-row {
  justify-content: flex-start !important;
}

@media (max-width: 720px) {
  #breakfast-tab-section #breakfast-name-input {
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
}
/* =========================================================
   KOTIASEMAN NAPIT — TEKSTIT PYSYVÄT NAPIN SISÄLLÄ
   ========================================================= */

#workspace-home button,
#workspace-topbar button {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.25 !important;
  min-height: 44px !important;
  text-align: center !important;
}

#workspace-home .action-row button,
#workspace-home section button {
  max-width: 100% !important;
}
/* =========================================================
   KOTIASEMAN NAPIT — EI SANOJEN KATKOMISTA KESKELTÄ
   ========================================================= */

#workspace-home .action-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

#workspace-home button,
#workspace-topbar button {
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  line-height: 1.25 !important;
  min-height: 56px !important;
  padding: 12px 16px !important;
  text-align: center !important;
}

#workspace-home .action-row button {
  width: 100% !important;
  min-width: 0 !important;
  font-size: 15px !important;
}
/* =========================================================
   WORKSPACE LISTS — käyttäjä- ja projektilistat siistiksi
   ========================================================= */

/* Ulkorivit: pois mustat terävät 90-luvun laatikot */
.workspace-user-row,
.workspace-project-row {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 10px !important;
}

/* Rivin sisäinen alue pehmeämmäksi */
.workspace-user-row > div,
.workspace-project-row > div {
  border: 1px solid #c7ced8 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #f6f7f9 0%, #eceff3 100%) !important;
  box-shadow: 0 6px 16px rgba(25, 35, 50, 0.08) !important;
  padding: 10px !important;
}

/* Iso nappi: nimi vasempaan reunaan */
.workspace-main-button {
  text-align: left !important;
  justify-content: flex-start !important;
  padding-left: 18px !important;
  font-weight: 800 !important;
  min-height: 50px !important;
  border-radius: 14px !important;
}

/* Tyhjät paikat samaan tyyliin */
.workspace-empty-button {
  text-align: left !important;
  justify-content: flex-start !important;
  padding-left: 18px !important;
  min-height: 50px !important;
  border-radius: 14px !important;
  color: #3e4a5c !important;
}

/* Pienet kynä- ja poistopainikkeet */
.workspace-icon-button {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
}

/* Käyttäjä- ja projektilistan isot napit siistimmiksi */
.workspace-main-button,
.workspace-empty-button {
  background: linear-gradient(180deg, #ffffff 0%, #edf1f5 100%) !important;
  border: 1px solid #bfc8d3 !important;
  color: #17202e !important;
  box-shadow: 0 4px 10px rgba(25, 35, 50, 0.06) !important;
}

.workspace-main-button:hover,
.workspace-empty-button:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e4e9ef 100%) !important;
  border-color: #98a4b3 !important;
  box-shadow:
    0 8px 18px rgba(25, 35, 50, 0.12),
    0 0 0 3px rgba(63, 79, 99, 0.08) !important;
}

/* Pienten nappien hover siistimmäksi */
.workspace-icon-button:hover {
  box-shadow:
    0 6px 14px rgba(25, 35, 50, 0.14),
    0 0 0 3px rgba(63, 79, 99, 0.08) !important;
}

/* Vakiostuertti-merkki vähän nätimmäksi */
.workspace-user-row .badge,
.workspace-user-row [class*="permanent"],
.workspace-user-row [class*="default"] {
  border-radius: 10px !important;
}
/* =========================================================
   RUOKALISTASOVELLUKSEN VAIHEOHJEET OTSIKON VIEREEN
   ========================================================= */

.section-title-with-hint {
  display: flex !important;
  align-items: baseline !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

.section-title-hint {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #5f6b7a !important;
  line-height: 1.35 !important;
  max-width: 780px !important;
}

@media (max-width: 720px) {
  .section-title-with-hint {
    align-items: flex-start !important;
  }

  .section-title-hint {
    display: block !important;
    width: 100% !important;
    font-size: 13px !important;
  }
}
/* =========================================================
   ABUCCO LOGO — ohjelma + kotiasema + tulosteet
   ========================================================= */

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-logo {
  width: 64px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.workspace-brand .brand-logo {
  width: 76px;
}

.print-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.print-brand img {
  width: 42px;
  height: auto;
  display: block;
}

.print-brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
}

.print-brand-subtitle {
  font-size: 12px;
  color: #555;
  margin-top: 3px;
}

@media (max-width: 720px) {
  .brand-logo {
    width: 52px;
  }

  .workspace-brand .brand-logo {
    width: 60px;
  }
}