:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --accent: #2563eb;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}


* {
    box-sizing: border-box;
}

header {
background-color: #007bff;
color: white;

text-align: center;
font-size: 18px;
font-weight: bold;
}
header a {
color: white;
text-decoration: none;
margin-left: 10px;
margin-right: 10px;
}
header a:hover {
text-decoration: underline;
}


.header-link {
  display: block;
  padding: 1rem;
}


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

.card {
    background: var(--card);
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Große Bildschirme */
@media (min-width: 1300px) {
    main {
        grid-template-columns: 400px minmax(300px, 1fr) minmax(300px, 1fr);
        max-width: 1700px;
        margin: 0 auto;
    }
}

h1 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    text-align: center;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.field {
    margin-bottom: 1.25rem;
}

input,
select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    resize: vertical;
    min-height: 30px;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}


.msg {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
}


.hour {
    height: 30px;
    font-size: 9px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.hours {
  border-right: 1px solid #ddd;
}

.hour.highlight {
  border-bottom: 1px solid #000;
}

.events {
  position: relative;
  flex: 1;
}

.event {
  position: absolute;
  left: 10px;
  right: 10px;
  border-radius: 6px;
  padding: 4px;
  color: #fff;
  font-size: 10px;
}

.desc {
  font-size: 7px;
}

.category-Arbeit { background: #FFD966; }
.category-Foodora { background: #88bd44; }
.category-Pendeln { background: #F2C94C; }
.category-Sport { background: #0f6e37; }
.category-Freizeitaktivität { background: #27AE60; }
.category-Computeraktivität { background: #56CCF2; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event {
  position: absolute;
  left: 4px;
  right: 4px;
}

.calendar.week {
  display: block;
}


/* Header-Zeile */
.calendar-header {
  display: grid;
  grid-template-columns: 25px repeat(7, 1fr);
  border-bottom: 1px solid #ccc;
}



.day-header {
  text-align: center;
  font-weight: bold;
  padding: 6px 0;
  background: #fafafa;
  font-size: 10px;
}

/* Body */
.calendar-body {
  display: grid;
  grid-template-columns: 25px repeat(7, 1fr);
}




.day-column {
  position: relative;
  border-left: 1px solid #eee;
}

.day-column::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 29px,
    #eee 29px,
    #eee 30px
  );
}

.day-column::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(#000, #000),
    linear-gradient(#000, #000),
    linear-gradient(#000, #000);

  background-size:
    100% 1px,
    100% 1px,
    100% 1px;

  background-position:
    0 149px,   /* 11:00 */
    0 329px,   /* 17:00 */
    0 509px;   /* 23:00 */

  background-repeat: no-repeat;
}




/* ========================= */
/*       Grundlayout         */
/* ========================= */

.field {
    margin-bottom: 20px;
}

.field > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ========================= */
/*   Kategorie-Kachelgrid    */
/* ========================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.foodora-manual {
    margin-top: 12px;
    opacity: 0.7;
}


/* Radios verstecken */
.category-grid input[type="radio"] {
    display: none;
}

.foodora-manual input[type="radio"] {
    display: none;
}

/* ========================= */
/*     Kachel-Grundstil      */
/* ========================= */

.category-grid label {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 72px;
    padding: 10px;

    font-size: 15px;
    font-weight: 600;
    text-align: center;

    background: #f4f4f4;
    border: 2px solid #ddd;
    border-radius: 12px;

    cursor: pointer;
    user-select: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.foodora-manual label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 12px;
    border-radius: 8px;

    background: #f4f4f4;
    border: 2px solid #ddd;

    cursor: pointer;
    font-size: 14px;
}



/* Hover */
.category-grid label:hover {
    border-color: #999;
    transform: translateY(-1px);
}

/* ========================= */
/*   Aktive Kategorie-Farben */
/* ========================= */

.foodora-manual input[type="radio"]:checked + label {
    background: #88bd44;
    border-color: #88bd44;
    color: #fff;
    opacity: 1;
    box-shadow: 0 4px 10px rgba(136, 189, 68, 0.4);
}

#cat-arbeit:checked + label {
    background: #FFD966;
    border-color: #FFD966;
    box-shadow: 0 6px 14px rgba(255, 217, 102, 0.45);
}

#cat-pendeln:checked + label {
    background: #F2C94C;
    border-color: #F2C94C;
    box-shadow: 0 6px 14px rgba(242, 201, 76, 0.45);
}

#cat-freizeit:checked + label {
    background: #27AE60;
    border-color: #27AE60;
    color: #fff;
    box-shadow: 0 6px 14px rgba(39, 174, 96, 0.45);
}

#cat-computer:checked + label {
    background: #56CCF2;
    border-color: #56CCF2;
    box-shadow: 0 6px 14px rgba(86, 204, 242, 0.45);
}

/* ========================= */
/*        Responsive         */
/* ========================= */

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



.category-info {
    margin-top: 14px;
    padding: 10px 12px;

    font-size: 13px;
    color: #555;

    background: #f8f9fa;
    border-left: 4px solid #ccc;
    border-radius: 6px;
}

/* kleine Farbbadges */
.category-info .badge {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 12px;

    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* Foodora-Farbe */
.category-info .badge.foodora {
    background: #88bd44;
}

/* Sport-Farbe (Beispiel) */
.category-info .badge.sport {
    background: #0f6e37;
    color: #fff;
}


.tracking-details {
    margin-bottom: 14px;
    font-size: 13px;
}

.tracking-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

.tracking-details p {
    margin: 8px 0 0;
    color: #444;
}


.category-details {
    margin-top: 10px;
    padding-left: 8px;
    border-left: 4px solid #ccc;
    font-size: 13px;
}

.category-details.leisure {
    border-left-color: #27AE60;
}

.category-details.computer {
    border-left-color: #56CCF2;
}

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



.data-status {
  font-size: 0.85rem;
  color: #333;
  background: #f6f6f6;
  padding: 10px 12px;
  margin: 12px 0 18px;
  max-width: 560px;
}

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

.ds-block {
  margin: 8px 0;
  padding: 6px 10px;
  border-left: 4px solid #ccc;
  background: #ffffff;
}

.ds-block strong {
  display: block;
  margin-bottom: 2px;
}

.ds-block ul {
  margin: 0;
  padding-left: 16px;
}

.ds-block li {
  margin: 2px 0;
}

/* Statusfarben */
.ds-block.complete {
  border-left-color: #4caf50;
  background: #f3faf3;
}

.ds-block.partial {
  border-left-color: #ff9800;
  background: #fff8ee;
}

.ds-block.api {
  border-left-color: #2196f3;
  background: #eef5ff;
}
