:root {
    --main-bg-color: black;
    --main-text-color: #ffecca;
}

* {
  text-transform: lowercase !important;
  font-size: .9rem;
  box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: var(--main-text-color);
    font-family: "Jost", sans-serif;
    min-height: 100vh;
    box-sizing: border-box;
}

/* ========================================
   LOGIN SYSTEM - UNVERÄNDERT LASSEN!
   ======================================== */

#login-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-display {
    text-align: center;
    margin-bottom: 30px;
}

.code-dots {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.dot {
    width: 20px;
    height: 20px;
    border: 1px solid var(--main-text-color);
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.2s;
}

.dot.filled {
    background-color: var(--main-text-color);
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 250px;
    margin: 20px auto;
}

.numpad-btn {
    width: 60px;
    height: 60px;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    font-family: "Jost", sans-serif;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.numpad-btn:hover {
    background-color: var(--main-text-color);
    color: var(--main-bg-color);
}

.numpad-btn:active {
    opacity: 0.8;
}

.numpad-btn.action {
    font-size: 1rem;
}

.error {
    color: #ff6b6b;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.error.show {
    opacity: 1;
}

/* ========================================
   TRACKER PAGE
   ======================================== */

#tracker-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 40px;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
    justify-content: center;
}

#training-form {
    width: 100%;
    max-width: 60rem;
}

.hidden {
    display: none !important;
}

/* ========================================
   CONTROLS & BUTTONS
   ======================================== */

#send-activities-button,
#send-hrv-button,
#send-routines-button{
    border-right:none;
}

input, button {
    background-color: black;
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    padding: 10px;
    font-family: "Jost", sans-serif;
    width: 100%;
    border-radius: 0;
}

button {
    cursor: pointer;
}

button:hover {
    background-color: var(--main-text-color);
    color: black;
}

button:active {
    opacity: 0.8;
}

.controls-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 60rem;
    margin-bottom: 40px;
}

.control-button {
    width: auto;
    padding: 8px 16px;
    margin-top: 0;
    margin-bottom: 0;
    cursor: pointer;
}

/* ========================================
   HRV & VITAL DATA
   ======================================== */

.hrv-container,
.sleep-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 40px;
}

.hrv-container {
    margin-bottom: 20px;
    grid-template-columns: repeat(4, 1fr);
}

.stress-container {
    grid-template-columns: repeat(4, 1fr);
}

.sleep-container {
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}

/* ========================================
   ACTIVITIES SYSTEM
   ======================================== */

.activities-container {
    display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
    margin-bottom: 40px;
}

.routines-grid {
    display: flex;
	width: 100%;
    margin-bottom: 40px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 2.5px;
    display: flex;
    align-items: baseline;
    flex-direction: column;
    width: fit-content;
    touch-action: manipulation;
    height: unset;
}

.activity-item label {
    flex: 1;
}

.counter {
    display: flex;
    align-items: baseline;
}

.counter-btn {
    width: 15px;
    height: 15px;
    background-color: black;
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.counter-btn:hover {
    background-color: var(--main-text-color);
    color: black;
}

.count {
    width: 35px;
    text-align: center;
}

/* ========================================
   ROUTINES SYSTEM
   ======================================== */

.section-divider {
    margin: 40px 0 20px 0;
    padding: 15px 0;
    border-top: 2px solid var(--main-text-color);
    text-align: center;
}

.section-divider h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: normal;
    text-transform: lowercase !important;
}

.routines-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.routine-item {
    background: rgba(255, 236, 202, 0.05);
    border: 1px solid rgba(255, 236, 202, 0.2);
    padding: 15px;
    width: auto;
    align-items: center;
}

.routine-item label {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}

.routine-item input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    border-radius: 4px;
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
}

.routine-item input[type="number"]:focus {
    outline: none;
    border-color: #ffecca;
    box-shadow: 0 0 5px rgba(255, 236, 202, 0.3);
}

#send-routines-button:hover {
    color: black;
}

#reset-routines-button {
    background-color: transparent;
    border-color: var(--main-text-color);
    color: var(--main-text-color);
}

#reset-routines-button:hover {
    background-color: var(--main-text-color);
    color: var(--main-bg-color);
}

/* ========================================
   BALANCE SYSTEM
   ======================================== */

.balance-container {
    margin: 20px 0 30px 0;
    padding: 15px;
    border: 1px solid rgba(255, 236, 202, 0.3);
    border-radius: 8px;
    background: rgba(255, 236, 202, 0.05);
}

.balance-title h4 {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    font-weight: normal;
    text-align: center;
    color: var(--main-text-color);
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.balance-item {
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    border: 1px solid rgba(255, 236, 202, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.balance-item .routine-emoji {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 4px;
}

.balance-item .routine-score {
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.balance-item .routine-name {
    font-size: 0.7rem;
    opacity: 0.8;
}



/* Neue Balance Score Styles - Führender-basiert */
.balance-score.leader { 
    border-left: 3px solid #1A510B;
    color: #fff;
    background: #1A510B;
    border-color: #1A510B;
    font-weight: bold;
}

.balance-score.eng { 
    border-left: 3px solid #4EAC43;
    color: #fff;
    background: #4EAC43;
    border-color: #4EAC43;
}

.balance-score.close { 
    border-left: 3px solid #ffecca;
    color: #000;
    background: #ffecca;
    border-color: #ffecca;
}

.balance-score.behind { 
    border-left: 3px solid #FFD700;
    color: #000;
    background: #FFD700;
    border-color: #FFD700;
}

.balance-score.far-behind { 
    border-left: 3px solid #FF8F00;
    color: #000;
    background: #FF8F00;
    border-color: #FF8F00;
}

.balance-score.very-far-behind { 
    border-left: 3px solid #F41616;
    color: #fff;
    background: #F41616;
    border-color: #F41616;
}

.balance-score.neutral { 
    border-left: 3px solid #ffecca;
    color: #000;
    background: #ffecca;
    border-color: #ffecca;
}

.balance-loading {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.7;
    font-size: 0.8rem;
}

.balance-score {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    margin-left: 6px;
    border-radius: 10px;
    display: inline-block;
    min-width: 30px;
    text-align: center;
    border: 1px solid rgba(255, 236, 202, 0.3);
    transition: all 0.3s ease;
}

.balance-score.updating {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* ========================================
   CLAUDE SCORE & TRENDS
   ======================================== */

.claude-score-container {
    margin-bottom: 40px;
}

.score-input-container {
    margin-bottom: 20px;
}

.trend-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2.5px;
    flex-wrap: nowrap;
    justify-content: center;
}

.eingreifen {
    grid-template-columns: repeat(3, 1fr);
    display: grid;
    gap: 10px;
}

.eingreifen > .score-input-container {
    margin-bottom: 0;
}

.trend-btn {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 8px 5px;
    margin: 0;
    height: auto;
    font-size: 0.8rem;
}

.trend-btn.selected {
    background-color: var(--main-text-color);
    color: black;
    font-weight: bold;
}

#hrv-trend-value, 
#rhr-trend-value,
#sleep-trend-value {
    font-size: 0.85rem;
    margin-top: 5px;
    color: var(--main-text-color);
    display: none;
}

#rhr-base-score,
#hrv-base-score {
    margin-top: 2.5px;
}

.score-result {
    display: flex;
    margin-top: 2.5px;
    justify-content: space-between;
    align-items: center;
    height: 44px;
    font-size: 1.1rem;
    padding: 10px;
    border: 1px solid var(--main-text-color);
}

#final-claude-score {
    font-weight: bold;
    color: var(--main-text-color);
}

/* ========================================
   NOTES & INPUTS
   ======================================== */

.notes-container, 
#notes-container {
    display: grid;
    gap: 10px;
    margin-bottom: 40px;
}

.note-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.note-input {
    flex: 1;
}

.delete-note-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    cursor: pointer;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.delete-note-btn:hover {
    background-color: var(--main-text-color);
    color: black;
}

#additional-notes {
    width: 100%;
    margin: 10px 0;
}

input::placeholder {
    color: var(--main-text-color);
    opacity: 0.7;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 1px solid var(--main-text-color);
    background-color: black;
    cursor: pointer;
    margin: 0;
    position: relative;
}

input[type="checkbox"]:checked {
    background-color: var(--main-text-color);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: black;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input, button, .activity-item {
    touch-action: manipulation;
    height: 44px;
}

.activity-item {
    height: unset;
}

input[type="date"] {
    width: fit-content;
}

input[type="time"] {
    width: 100%;
    min-width: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}



/* ========================================
   STATISTIK STYLES
   ======================================== */

.statistics-section {
    width: 100%;
    max-width: 60rem;
    margin: 40px auto 0 auto;
}

.statistics-header {
    margin-bottom: 30px;
}

.statistics-header h2 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    text-align: center;
}

.statistics-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

/* ========================================
   CUSTOM STYLED DROPDOWNS
   ======================================== */

.custom-select {
    position: relative;
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 35px 10px 10px;
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    border: 1px solid var(--main-text-color);
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--main-text-color);
    pointer-events: none;
    font-size: 0.8rem;
}

.custom-select select:hover {
    background-color: rgba(255, 236, 202, 0.1);
}

.custom-select select:focus {
    outline: none;
    border-color: var(--main-text-color);
    box-shadow: 0 0 5px rgba(255, 236, 202, 0.3);
}

/* ========================================
   INFO CARDS
   ======================================== */

.statistics-info {
    margin-bottom: 30px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.info-card {
    text-align: center;
    padding: 15px;
    border: 1px solid var(--main-text-color);
    background: rgba(255, 236, 202, 0.05);
}

.info-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--main-text-color);
    margin-bottom: 5px;
}

.info-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ========================================
   CHART CONTAINER
   ======================================== */

.chart-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    max-height: 400px; /* Verhindert endlose Seite */
    border: 1px solid var(--main-text-color);
    background: rgba(255, 236, 202, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Verhindert Überlauf */
}

#statistics-chart {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.chart-loading {
    position: absolute;
    color: var(--main-text-color);
    font-size: 1rem;
}

.chart-error {
    position: absolute;
    color: #ff6b6b;
    font-size: 1rem;
    text-align: center;
}

/* ========================================
   CHART TOOLTIP
   ======================================== */

.chart-tooltip {
    position: fixed; /* Fixed statt absolute verhindert Seitenerweiterung */
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--main-text-color);
    padding: 8px 12px;
    border: 1px solid var(--main-text-color);
    font-size: 0.8rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000; /* Hoher Z-Index */
    max-width: 150px; /* Verhindert zu breite Tooltips */
    word-wrap: break-word;
    border-radius: 4px;
}

.chart-tooltip {
    opacity: 0;
    transition: opacity 0.2s;
}

.chart-tooltip.visible {
    opacity: 1 !important;
}

.tooltip-date {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: 0.75rem;
}

.tooltip-value {
    font-size: 0.7rem;
}

/* ========================================
   KALENDER CONTAINER
   ======================================== */

.calendar-container {
    border: 1px solid var(--main-text-color);
    background: rgba(255, 236, 202, 0.02);
    padding: 30px;
    margin-top: 20px;
}

/* 2 Wochen pro Zeile (14 Spalten) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 30px;
    max-width: 100%;
}

/* Kalendertag - kompakt und gleichmäßig */
.calendar-day {
    aspect-ratio: 1;
    min-height: 26px;
    max-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 236, 202, 0.2);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background-color: var(--main-bg-color);
    font-weight: 500;
}

.calendar-day:hover {
    transform: scale(1.15);
    z-index: 10;
    border-color: var(--main-text-color);
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(255, 236, 202, 0.4);
    font-weight: bold;
}

/* NUR ROT UND GRÜN - keine anderen Zustände */
.calendar-day.success {
    background-color: #4EAC43;
    color: white;
    font-weight: bold;
}

.calendar-day.success:hover {
    background-color: #3d8936;
    border-color: #2d6b28;
}

.calendar-day.failed {
    background-color: #DA1114;
    color: white;
    font-weight: bold;
}

.calendar-day.failed:hover {
    background-color: #e55555;
    border-color: #cc4444;
}

/* Heute-Markierung (falls doch mal angezeigt) */
.calendar-day.today {
    border: 3px solid #FFD700;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.calendar-day.today.success {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6), inset 0 0 0 1px #FFD700;
}

.calendar-day.today.failed {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6), inset 0 0 0 1px #FFD700;
}

/* ========================================
   KALENDER LEGENDE
   ======================================== */

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    opacity: 0.9;
}

.legend-box {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 236, 202, 0.3);
    flex-shrink: 0;
}

.legend-box.success {
    background-color: #4EAC43;
}

.legend-box.failed {
    background-color: #ff6b6b;
}

.legend-box.no-data {
    background-color: rgba(255, 236, 202, 0.08);
}

/* ========================================
   ANIMATIONEN
   ======================================== */

.calendar-day.updating {
    animation: dataUpdate 0.5s ease-in-out;
}

@keyframes dataUpdate {
    0% { 
        opacity: 0.5; 
        transform: scale(0.9);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

.calendar-day.new-success {
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0% { 
        background-color: #4EAC43;
        box-shadow: 0 0 0 0 rgba(78, 172, 67, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(78, 172, 67, 0);
    }
    100% { 
        background-color: #4EAC43;
        box-shadow: 0 0 0 0 rgba(78, 172, 67, 0);
    }
}




/* ========================================
   Tagesbewertung
   ======================================== */


.calendar-day.rating-minus2 {
    background-color: #8B0000; /* Dunkelrot */
    color: white;
    font-weight: bold;
}

.calendar-day.rating-minus1 {
    background-color: #ff6b6b; /* Rot */
    color: white;
    font-weight: bold;
}

.calendar-day.rating-plus0 {
    background-color: #ffecca; /* Neutral grau */
    color: black;
    font-weight: bold;
}

.calendar-day.rating-plus1 {
    background-color: #4EAC43; /* Grün */
    color: white;
    font-weight: bold;
}

.calendar-day.rating-plus2 {
    background-color: #8342D0; /* Dunkelgrün */
    color: white;
    font-weight: bold;
}

.calendar-day.rating-minus2:hover { background-color: #660000; }
.calendar-day.rating-minus1:hover { background-color: #e55555; }
.calendar-day.rating-0:hover { background-color: #EBDABD; }
.calendar-day.rating-plus1:hover { background-color: #3d8936; }
.calendar-day.rating-plus2:hover { background-color: #7439BB; }




/* ========================================
   VITALDATEN KALENDER FARBEN
   ======================================== */

.calendar-day.vitaldaten-excellent {
    background-color: #1A510B; /* Dunkelgrün */
    color: white;
    font-weight: bold;
}

.calendar-day.vitaldaten-good {
    background-color: #4EAC43; /* Grün */
    color: white;
    font-weight: bold;
}

.calendar-day.vitaldaten-medium {
    background-color: #FFD700; /* Gelb */
    color: black;
    font-weight: bold;
}

.calendar-day.vitaldaten-poor {
    background-color: #ff6b6b; /* Rot */
    color: white;
    font-weight: bold;
}

/* Hover-Effekte für Vitaldaten */
.calendar-day.vitaldaten-excellent:hover { background-color: #0f3505; }
.calendar-day.vitaldaten-good:hover { background-color: #3d8936; }
.calendar-day.vitaldaten-medium:hover { background-color: #e6c200; }
.calendar-day.vitaldaten-poor:hover { background-color: #e55555; }





/* ========================================
   MISC & UTILITIES
   ======================================== */

.preview-container {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid var(--main-text-color);
    white-space: pre-wrap;
    width: 100%;
    word-break: break-word;
}

.preview-container.visible {
    display: block;
}

.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--main-text-color);
    color: black;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 100;
    animation: fadeOut 2s forwards;
}

.loading-notification, 
.save-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--main-text-color);
    color: black;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 100;
}

submit {
    margin-bottom: 40px;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

#tracker-page {
    align-items: center;
}

.button-container {
    display: flex;
    padding-bottom: 40px;
    margin-bottom: 80px;
    text-align: center;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.action-btn.danger {
    background: #ea4335;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}








/* ========================================
   LUCA NEUES ZEUG
   ======================================== */


.has-value {
	background: rgba(78, 172, 67, 0.5);
}

.normal {
	display: grid;
	width: 60%;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.gewichtet {
	display: grid;
	width: 40%;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin-right: 40px;
}




















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

@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="date"],
    input[type="time"] {
        font-size: .85rem;
    }
    
    .activities-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trend-btn {
        font-size: 0.75rem;
        padding: 6px 3px;
        min-width: unset;
    }
    
    .controls-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
	
	 .statistics-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .chart-container {
        min-height: auto;
        max-height: auto;
    }
    
    .calendar-container {
        padding: 15px;
    }
    
    /* Auf Mobile: 1 Woche pro Zeile (7 Spalten) */
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 10px;
    }
    
    .calendar-day {
        min-height: 24px;
        max-height: 28px;
        font-size: 0.65rem;
    }
    
    .calendar-day:hover {
        transform: scale(1.05); /* Weniger aggressiv auf Mobile */
    }
    
    .legend-item {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .legend-box {
        width: 12px;
        height: 12px;
    }
	
	
	
	
	
	
	
	
	.routines-grid {
		flex-direction: column;
	}
	
	.gewichtet {
		margin-right: 0px;
		width: 100%;
		margin-bottom: 40px;
	}
	
	.normal {
		grid-template-columns: repeat(2, 1fr);
		width: 100%;
	}
	
    .routines-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .routine-item {
        padding: 12px;
    }
    
    .routine-item label {
        font-size: 0.8rem;
    }
    
    .balance-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .balance-item {
        padding: 6px 3px;
    }
    
    .balance-item .routine-emoji {
        font-size: 1rem;
    }
    
    .routines-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}