/* ============================================
   Mein Trainingstagebuch – UI Refresh
   ============================================ */

/* Nav: Icon-Buttons & Sync-Menü */
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--grad-border);
    background: transparent;
    color: var(--grad-text-light);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.nav-icon-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.35);
    color: var(--grad-text);
}
.nav-sync-btn .nav-sync-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--grad-text-muted);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-sync-wrap {
    position: relative;
}
.nav-sync-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--grad-card);
    border: 1px solid var(--grad-border);
    border-radius: 14px;
    box-shadow: var(--grad-shadow-lg);
    padding: 8px;
    z-index: 1200;
    animation: navPop 0.18s ease;
}
@keyframes navPop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-sync-menu-head {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grad-text-muted);
    padding: 8px 10px 6px;
}
.nav-sync-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--grad-text);
    transition: background 0.15s ease;
}
.nav-sync-item:hover {
    background: rgba(14, 165, 233, 0.08);
}
.nav-sync-item-left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}
.nav-sync-status {
    font-size: 0.72rem;
    font-weight: 600;
}
.nav-sync-status.is-on { color: #059669; }
.nav-sync-status.is-off { color: var(--grad-text-muted); }
.nav-sync-foot {
    margin-top: 4px;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--grad-text-muted);
    border-top: 1px solid var(--grad-border);
}
.nav-sync-foot a {
    color: #0284C7;
    text-decoration: none;
    font-weight: 600;
}
.nav-sync-foot a:hover { text-decoration: underline; }
.nav-sync-action .nav-sync-item-left i {
    color: #0EA5E9;
}

/* ============================================
   Historie – clean
   ============================================ */
.history-page {
    max-width: 1100px;
    margin: 0 auto;
}
.history-page > h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
    color: var(--grad-text);
}
.history-lead {
    color: var(--grad-text-muted);
    margin: 0 0 22px;
    font-size: 0.92rem;
}
.history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--grad-border);
}
.history-filters .form-group {
    margin: 0;
}
.history-filters label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grad-text-muted);
    margin-bottom: 6px;
}
.history-filters input,
.history-filters select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--grad-border);
    background: var(--grad-card);
    color: var(--grad-text);
    font-size: 0.9rem;
    box-sizing: border-box;
}
.history-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.history-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--grad-text-muted);
}
.history-meta a {
    color: #0284C7;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.history-meta a:hover { text-decoration: underline; }

.history-table {
    width: 100%;
    border-collapse: collapse;
}
.history-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grad-text-muted);
    border-bottom: 1px solid var(--grad-border);
}
.history-table td {
    padding: 14px 8px;
    border-bottom: 1px solid var(--grad-border);
    vertical-align: middle;
    color: var(--grad-text);
    font-size: 0.92rem;
}
.history-table tbody tr {
    transition: background 0.12s ease;
}
.history-table tbody tr:hover td {
    background: rgba(14, 165, 233, 0.04);
}
.history-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #64748B;
}
.history-dot.t1 { background: #10B981; }
.history-dot.t2 { background: #3B82F6; }
.history-dot.t3 { background: #8B5CF6; }
.history-dot.t4 { background: #F59E0B; }
.history-dot.t5 { background: #06B6D4; }
.history-dot.t6 { background: #EF4444; }
.history-dot.t7 { background: #64748B; }
.history-dot.t8 { background: #14B8A6; }
.history-dot.t9 { background: #F97316; }

.history-details {
    color: var(--grad-text-light);
    font-size: 0.88rem;
}
.history-note {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--grad-text-muted);
    font-style: italic;
}

.history-actions {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}
.history-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--grad-text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.history-action:hover {
    background: rgba(14, 165, 233, 0.1);
    color: #0284C7;
    border-color: rgba(14, 165, 233, 0.2);
}
.history-action.is-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #DC2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.history-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 22px;
}
.history-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--grad-border);
    color: var(--grad-text-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    background: transparent;
}
.history-page-link:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: #0284C7;
}
.history-page-link.is-active {
    background: #0EA5E9;
    border-color: #0EA5E9;
    color: #fff;
}

@media (max-width: 768px) {
    .history-table thead { display: none; }
    .history-table tbody tr {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--grad-border);
    }
    .history-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border: none;
        padding: 6px 0;
        text-align: right;
    }
    .history-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--grad-text-muted);
        text-align: left;
    }
    .history-actions { margin-left: auto; }
}
.nav-cta-new {
    box-shadow: none !important;
}
.gradient-nav-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--grad-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.gradient-nav-logout { display: none; } /* Abmelden liegt im Profil */

@media (max-width: 900px) {
    .nav-sync-btn .nav-sync-meta,
    .nav-user-name { display: none; }
    .nav-sync-menu { right: auto; left: 0; }
}

/* Theme transition */
html {
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ============================================
   Dashboard: Tagesstart + Ziele
   ============================================ */
.dash-daystart {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 22px;
    animation: fadeUp 0.35s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.dash-daystart-panel,
.dash-goals-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--grad-border);
}
.dash-daystart-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grad-text-muted);
    margin-bottom: 6px;
}
.dash-daystart-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--grad-text);
    margin: 0 0 10px;
}
.dash-daystart-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    color: var(--grad-text-light);
    font-size: 0.92rem;
}
.dash-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #0EA5E9;
}
.dash-today-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dash-today-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--grad-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
}
.dash-today-list a:hover { color: #0284C7; }
.dash-today-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-goals-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.goal-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.goal-ring svg {
    width: 72px;
    height: 72px;
    transform: rotate(-90deg);
}
.goal-ring-track {
    fill: none;
    stroke: var(--grad-border);
    stroke-width: 6;
}
.goal-ring-fill {
    fill: none;
    stroke: #0EA5E9;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}
.goal-ring-fill.is-done { stroke: #10B981; }
.goal-ring-label {
    font-size: 0.78rem;
    color: var(--grad-text-muted);
    font-weight: 600;
}
.goal-ring-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--grad-text);
    margin-top: -4px;
}

.dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.dash-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}
.dash-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-header-nav a {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--grad-text-light);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.dash-header-nav a:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.25);
}
.dash-header-kpis {
    color: var(--grad-text-muted);
    font-size: 0.9rem;
}
.dash-header-kpis strong { color: var(--grad-text); font-weight: 700; }
.dash-header-kpis .sep { margin: 0 4px; opacity: 0.5; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 36px 20px;
    color: var(--grad-text-muted);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.1);
    color: #0EA5E9;
    font-size: 1.5rem;
}
.empty-state h3 {
    margin: 0 0 6px;
    color: var(--grad-text);
    font-size: 1.1rem;
}
.empty-state p {
    margin: 0 0 16px;
    font-size: 0.92rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Kalender Hover */
.gradient-calendar-day.has-training {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gradient-calendar-day.has-training:hover {
    transform: translateY(-2px);
    box-shadow: var(--grad-shadow);
}

@media (max-width: 800px) {
    .dash-daystart { grid-template-columns: 1fr; }
    .dash-goals-grid { grid-template-columns: repeat(3, 1fr); }
    .goal-ring svg { width: 58px; height: 58px; }
}

/* ============================================
   Settings: eine Spalte, Abschnitte
   ============================================ */
.settings-page {
    max-width: 720px;
    margin: 0 auto;
}
.settings-page > h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
}
.settings-lead {
    color: var(--grad-text-muted);
    margin: 0 0 28px;
    font-size: 0.95rem;
}
.settings-section {
    padding: 22px 0;
    border-bottom: 1px solid var(--grad-border);
}
.settings-section:first-of-type { padding-top: 0; }
.settings-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--grad-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section h2 i { color: #0EA5E9; font-size: 0.95rem; }
.settings-section-desc {
    color: var(--grad-text-muted);
    font-size: 0.85rem;
    margin: 0 0 16px;
}
.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 24px;
}
.settings-goals-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.settings-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.settings-danger {
    color: #DC2626 !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
}

/* ============================================
   Landing Hero (Marken-first)
   ============================================ */
.landing-hero-brand {
    display: block;
    margin-bottom: 18px;
    text-decoration: none;
    color: var(--grad-text);
}
.landing-hero-brand img {
    width: min(480px, 100%);
    height: auto;
    max-height: 180px;
    object-fit: contain;
}
.landing-hero-brand span {
    display: none;
}
body.landing-page .landing-hero-split {
    padding: 48px 0 64px;
    min-height: min(72vh, 640px);
    display: flex;
    align-items: center;
}
body.landing-page .landing-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    max-width: none;
}
body.landing-page .landing-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
body.landing-page .landing-hero-logo {
    width: min(100%, 420px);
    height: auto;
    max-height: min(52vh, 420px);
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}
body.landing-page .landing-preview { display: none; }
body.landing-page .landing-hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0 0 14px;
}
@media (max-width: 860px) {
    body.landing-page .landing-hero-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
    body.landing-page .landing-hero-visual {
        order: -1;
    }
    body.landing-page .landing-hero-logo {
        width: min(100%, 420px);
    }
}
body.landing-page .landing-features-section {
    background: transparent;
}
body.landing-page .landing-feature-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0;
    border-radius: 0;
}
body.landing-page .landing-feature-card:hover {
    transform: none;
    box-shadow: none;
}
body.landing-page .landing-feature-icon {
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
    box-shadow: none;
}

[data-theme="dark"] .landing-hero-split::before {
    background: linear-gradient(
        90deg,
        rgba(11, 18, 32, 0.96) 0%,
        rgba(11, 18, 32, 0.75) 40%,
        rgba(11, 18, 32, 0.2) 75%,
        rgba(11, 18, 32, 0.08) 100%
    );
}
[data-theme="dark"] .nav-sync-status.is-on { color: #34D399; }
[data-theme="dark"] .settings-danger {
    color: #FCA5A5 !important;
}

/* ============================================
   Sync-Seiten (Wahoo / Strava)
   ============================================ */
.sync-page {
    max-width: 1100px;
    margin: 0 auto;
}
.sync-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--grad-border);
}
.sync-page-head h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
    color: var(--grad-text);
}
.sync-page-sub {
    margin: 0;
    color: var(--grad-text-muted);
    font-size: 0.92rem;
}
.sync-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #059669;
}
.sync-status-pill.is-off { color: var(--grad-text-muted); }
.sync-status-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.sync-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.sync-note {
    padding: 14px 0 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--grad-border);
    font-size: 0.9rem;
    color: var(--grad-text-light);
    line-height: 1.5;
}
.sync-note strong { color: var(--grad-text); }
.sync-note a { color: #0284C7; }
.sync-note ol {
    margin: 8px 0 0;
    padding-left: 1.2rem;
}
.sync-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 22px;
}
.sync-kpi {
    padding: 12px 0;
    border-bottom: 2px solid var(--grad-border);
}
.sync-kpi-val {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--grad-text);
}
.sync-kpi-lbl {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grad-text-muted);
    margin-top: 2px;
}
.sync-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.sync-filter label {
    font-size: 0.85rem;
    color: var(--grad-text-muted);
    font-weight: 600;
}
.sync-filter select {
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--grad-border);
    background: var(--grad-card);
    color: var(--grad-text);
}
.sync-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.sync-chart {
    padding: 4px 0 16px;
    border-bottom: 1px solid var(--grad-border);
}
.sync-chart h3 {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--grad-text-muted);
}
.sync-list-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grad-text);
    margin: 0 0 12px;
}
.sync-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sync-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 0;
    border-bottom: 1px solid var(--grad-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}
.sync-row:hover { background: rgba(14, 165, 233, 0.04); }
.sync-row-main { min-width: 160px; flex: 1; }
.sync-row-date {
    font-size: 0.78rem;
    color: var(--grad-text-muted);
}
.sync-row-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--grad-text);
    margin: 2px 0;
}
.sync-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
}
.sync-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sync-pill {
    text-align: center;
    min-width: 56px;
}
.sync-pill-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--grad-text);
}
.sync-pill-lbl {
    font-size: 0.65rem;
    color: var(--grad-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sync-row-arrow {
    color: var(--grad-text-muted);
    margin-left: auto;
}
.sync-empty {
    text-align: center;
    padding: 48px 16px;
}
.sync-empty h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--grad-text);
}
.sync-empty p {
    color: var(--grad-text-muted);
    margin: 0 0 20px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.sync-table {
    width: 100%;
    border-collapse: collapse;
}
.sync-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grad-text-muted);
    border-bottom: 1px solid var(--grad-border);
}
.sync-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--grad-border);
    font-size: 0.9rem;
    color: var(--grad-text);
}
.sync-table tr:hover td {
    background: rgba(14, 165, 233, 0.04);
}
@media (max-width: 800px) {
    .sync-kpis { grid-template-columns: repeat(2, 1fr); }
    .sync-charts { grid-template-columns: 1fr; }
}
