/* ============================= */
/*        GLOBAL STYLES          */
/* ============================= */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --header-bg: #007bff;
  --bg-light: #f3f4f6;
  --box-bg: #ffffff;
  --shadow: 0 4px 18px rgba(0,0,0,0.1);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg-light);
  margin: 0;
  padding: 0;
}

/* ============================= */
/*             HEADER            */
/* ============================= */

header {
  background-color: var(--header-bg);
  color: white;
  padding: 15px 20px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}

header a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}

header a:hover {
  text-decoration: underline;
}

/* ============================= */
/*            LAYOUT             */
/* ============================= */

main {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: start;
}

.form-container {
  max-width: 900px;
  margin: 40px auto;
  background: var(--box-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* rechte Spalte: Stapel von drei Containern */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1; /* nimmt den restlichen Platz */
}

/* Breiten der Container innerhalb der rechten Spalte */
.exclude-container{
  max-width: 400px; /* schmaler */
  width: 100%;
  
  margin: 40px auto;
  background: var(--box-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}


.statistics-container {
  max-width: 800px; /* schmaler */
  width: 100%;
  
  margin: 40px auto;
  background: var(--box-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table-container {
  width: 100%; /* breit, füllt die rechte Spalte */
  max-width: 900px; /* optional */
  
  margin: 40px auto;
  background: var(--box-bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1,
h2 {
  text-align: center;
  margin-top: 0;
}

/* Info Box */
.info-box {
  background: #eef2ff;
  padding: 10px 15px;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* ============================= */
/*             TABLES            */
/* ============================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th,
td {
  border: 1px solid #ccc;
  text-align: left;

  padding: 4px 6px;     /* weniger Höhe */
  line-height: 1.2;    /* kompakter Text */
}

th {
  background: #f2f2f2;
}

.table-container th {
  background: #e5e7eb;
  font-weight: bold;
}

.table-container td {
  background: #fafafa;
}

.table-container tr:nth-child(even) td {
  background: #f0f0f0;
}

.table-container table {
  font-size: 10px;   /* z. B. 11–13px */
}

.table-container th,
.table-container td {
  padding: 4px 6px;     /* weniger Höhe */
  line-height: 1.2;    /* kompakter Text */
}



/* ============================= */
/*          FORM ELEMENTS        */
/* ============================= */

input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Submit Button */
.submit-btn {
  margin-top: 20px;
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

/* ============================= */
/*            DASHBOARD          */
/* ============================= */

.dashboard {
  display: flex;
  flex-wrap: wrap; /* Zeilen umbrechen, wenn Platz nicht reicht */
  padding: 20px;
  border-radius: var(--radius);
  background: #f7f7f7;
  gap: 30px;
  align-items: center;
}

.dashboard ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  font-size: 12px;          /* 👈 kleiner Text */
  line-height: 1.3;
  color: #666;
  text-align: right;      /* 👈 rechtsbündig */
}

.dashboard ul li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.micro-item ul {
  font-size: 11px;
  color: #777;
}

.price-tile ul {
  font-size: 12px;
  margin-top: 8px;
  color: #555;
}





/* Macros */
.macros {
  flex: 1;
}

.macro-calories {
  font-size: 26px;
  margin-bottom: 15px;
}

.macro-calories strong {
  font-size: 40px;
  display: block;
}

.macro-bars {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.macro-item {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  background: white;
  text-align: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.macro-item .label {
  font-size: 14px;
  color: #444;
}

.macro-item .value {
  font-size: 22px;
  margin-top: 4px;
  font-weight: bold;
}

/* Micro Nutrients */
.micro-row {
  display: flex;
  gap: 20px;
  margin-top: 5px;
}

.micro-item {
  flex: 1;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 0 4px rgba(0,0,0,0.07);
}

/* Price Tile */
.price-tile {
  width: 160px;
  height: 120px;
  background: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: 0 0 8px rgba(0,0,0,0.12);
}

.price-value {
  font-size: 34px;
  font-weight: bold;
}

.price-label {
  margin-top: 4px;
  font-size: 14px;
  color: #777;
}

/* ============================= */
/*         RESPONSIVE            */
/* ============================= */

@media (max-width: 700px) {
  main {
    flex-direction: column;
    gap: 0;
  }

  .form-container,
  .table-container {
    width: 100%;
    margin: 20px 0;
  }

  table th,
  table td {
    padding: 4px;
    font-size: 12px;
  }

  .table-td {
    text-align: center;
    font-size: 0.9em;
  }
}



.tracker-cards {
    display: flex;
    flex-wrap: wrap;       /* Karten umbrechen bei schmalem Bildschirm */
    gap: 20px;             /* Abstand zwischen den Karten */
    justify-content: flex-start;
    margin: 20px 0;
}

.tracker-cards .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    width: 150px;          /* Breite der Kachel */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.tracker-cards .card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.tracker-cards .card span {
    font-weight: 500;
}

.tracker-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
    background-color: #fff;
}



details summary {
    cursor: pointer;
    font-weight: 600;
}

.excluded-days {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}



.data-status {
  font-size: 0.85rem;
  color: #444;
  background: #f6f6f6;
  border-left: 4px solid #4caf50; /* grün */
  padding: 8px 12px;
  margin: 10px 0 16px;
  max-width: 520px;
}

.data-status strong {
  display: block;
  margin-bottom: 4px;
}

.data-status ul {
  margin: 0;
  padding-left: 16px;
}

.data-status li {
  margin: 2px 0;
}
