/* ===================================
   BRAND TOKENS (Schmidhome Design System)
   =================================== */
@import url("../brand/tokens/colors.css");
@import url("../brand/tokens/typography.css");

/* ===================================
   CSS VARIABLES & RESET
   =================================== */
:root {
    --primary-color: var(--brand-primary);
    --primary-dark: var(--color-blue-700);
    --primary-light: var(--brand-primary-on-dark);
    --secondary-color: var(--text-primary);
    --text-color: var(--color-ink-700);
    --text-light: #64748b;
    --text-dark: var(--text-primary);
    --bg-color: #ffffff;
    --bg-alt: var(--surface-canvas);
    --bg-dark: var(--surface-dark);
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

/* Dark Theme Support – neutrale Schwarz/Grau-Skala ohne Blaustich,
   Blau bleibt ausschließlich Akzentfarbe (Buttons, Links, Fokus) */
[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --bg-alt: #171717;
    --text-color: #f2f2f2;
    --text-light: #a3a3a3;
    --white: #1c1c1c;
    --primary-color: var(--brand-primary-on-dark);
    --primary-light: var(--brand-primary-on-dark);
}

/* ===================================
   BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Erzwingt display:none für [hidden], da Klassen wie .btn (display: inline-block)
   oder .user-info (display: flex) das UA-Default sonst überschreiben würden */
[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: var(--font-brand);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   LAYOUT UTILITIES
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background-color: rgba(10, 10, 10, 0.92);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.navbar-full .container {
    max-width: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    display: block;
    height: 26px;
    width: auto;
}

.logo-img-dark {
    display: none;
}

[data-theme="dark"] .logo-img-light {
    display: none;
}

[data-theme="dark"] .logo-img-dark {
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a {
    color: var(--text-color);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .nav-links a {
    color: var(--text-color);
}

[data-theme="dark"] .nav-links a:hover {
    color: var(--primary-light);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Bewusst als letztes Element in .nav-right (nach Login-Bereich und
       Menü-Button) und mit zusätzlichem Abstand, damit es beim Klicken auf
       Login/Logout/Intern nicht im Weg ist */
    margin-left: 0.75rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.theme-toggle svg {
    display: inline-block;
}

.theme-toggle [data-theme-icon="sun"] {
    display: block;
}

.theme-toggle [data-theme-icon="moon"] {
    display: none;
}

[data-theme="dark"] .theme-toggle [data-theme-icon="sun"] {
    display: none;
}

[data-theme="dark"] .theme-toggle [data-theme-icon="moon"] {
    display: block;
}

.auth-area {
    display: flex;
    align-items: center;
}

.auth-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(15, 23, 42, 0.05) 100%);
    padding-top: 80px;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, rgba(76, 148, 236, 0.08) 0%, rgba(10, 10, 10, 0) 60%);
}

.hero .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: var(--font-brand);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===================================
   INTERNER BEREICH
   =================================== */
.intern-main {
    padding-top: 140px;
}

.intern-content {
    max-width: 800px;
    margin: 0 auto;
}

.intern-placeholder-text {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.intern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.intern-card {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

[data-theme="dark"] .intern-card {
    background-color: var(--bg-color);
    border-color: rgba(255, 255, 255, 0.12);
}

.intern-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

[data-theme="dark"] .intern-card h3 {
    color: var(--text-color);
}

.intern-card p {
    color: var(--text-light);
    line-height: 1.7;
}

.dashboard-grid {
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.widget-card {
    margin-bottom: 2rem;
}

.dashboard-grid .widget-card {
    margin-bottom: 0;
}

.widget-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

[data-theme="dark"] .widget-card h3 {
    color: var(--text-color);
}

.widget-desc {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.widget-frame {
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.25);
    height: 520px;
    background: var(--bg-color);
}

[data-theme="dark"] .widget-frame {
    background: var(--bg-color);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Dashboard nutzt die gesamte Seitenfläche; bei mehr Inhalt (z.B. schmalen
   Viewports) wächst die Sektion und die Seite scrollt */
.dashboard-page {
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.dashboard-page .container {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 24px 0;
}

.dashboard-page .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

    .dashboard-page .dashboard-grid {
        width: 100%;
        max-width: none;
        margin: 0;
        flex: 1;
        min-height: 0;
    display: grid;
    /* Linke Spalte per --dash-left steuerbar (Drag-Handle,
       js/dashboard-resize.js) – Default 380px */
    grid-template-columns: var(--dash-left, 380px) minmax(0, 1fr);
    position: relative;
    grid-template-rows: auto auto auto minmax(280px, 1fr);
    grid-template-areas:
        "dwhelper vorlesen"
        "kleinanzeigen vorlesen"
        "wetter vorlesen"
        "todos vorlesen";
    gap: 1.5rem;
    align-items: stretch;
}

/* Ziehbare Trennkante zwischen linker Spalte und Nachrichtenbereich */
.dash-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    /* Mitte des 1.5rem-Grid-Gaps */
    left: calc(var(--dash-left, 380px) + 0.75rem);
    width: 16px;
    transform: translateX(-50%);
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
}

.dash-resize-handle::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 14%, transparent);
    transition: background 0.15s ease;
}

.dash-resize-handle:hover::before,
.dash-resize-handle:focus-visible::before,
.dash-resize-handle.dragging::before {
    background: var(--primary-color);
}

.dash-resize-handle:focus-visible {
    outline: none;
}

body.dash-resizing {
    cursor: col-resize;
    user-select: none;
}

.dashboard-page .widget-dwhelper {
    grid-area: dwhelper;
}

.dashboard-page .widget-card.widget-kleinanzeigen {
    grid-area: kleinanzeigen;
    align-items: flex-start;
}

.dashboard-page .widget-dwhelper .widget-frame {
    min-height: 360px;
}

.dashboard-page .widget-vorlesen {
    grid-area: vorlesen;
    /* Nicht über die volle Spaltenhöhe stretchen – aber auch nicht kappen:
       Die Karte soll Platz für eine volle Seite à 25 Nachrichten haben und
       wächst entsprechend mit dem Inhalt. */
    align-self: start;
}

.dashboard-page .widget-todos {
    grid-area: todos;
}

.dashboard-page .widget-wetter {
    grid-area: wetter;
}

/* Todo-Karte füllt den restlichen Platz der linken Spalte */
.dashboard-page .widget-todos .widget-frame {
    height: auto;
    flex: 1;
    min-height: 0;
}

.dashboard-page .widget-card {
    background-color: var(--bg-alt);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.dashboard-page .widget-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(148, 163, 184, 0.4);
}

[data-theme="dark"] .dashboard-page .widget-card {
    background-color: var(--bg-color);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dashboard-page .widget-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.dashboard-page .widget-desc {
    margin-bottom: 0.75rem;
}

.dashboard-page .widget-frame {
    height: auto;
    flex: 1;
    min-height: 0;
}

.dashboard-page .widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.dashboard-page .widget-header h3 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
}

/* Icon-Badge vor dem Kartentitel – visueller Anker je Widget */
.widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

[data-theme="dark"] .widget-icon {
    background: color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.dashboard-page .widget-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Kompakte Buttons in den Karten-Köpfen (Platz für die Widgets) */
.dashboard-page .widget-header-actions .btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Quadratischer Icon-Button (↻ Neu laden) */
.btn-icon {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* ===================================
   DASHBOARD-WIDGETS (inline statt iframe)
   Seit 14.08.2026 werden die Widgets direkt auf der Seite gerendert
   (js/dashboard-widgets.js). Sie nutzen die CSS-Variablen der Seite,
   damit Hintergrund/Text automatisch zum Theme passen – kein fester
   iframe-Hintergrund mehr, kein Theme-Sync nötig.
   =================================== */
.widget-inner {
    height: 100%;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
}

.widget-inner .btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* --- dwhelper --- */
.dwh-status {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dwh-files {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.dwh-files li {
    padding: 0.5rem 0.25rem;
    font-size: 0.9rem;
    color: var(--text-color);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    word-break: break-all;
}

.dwh-files li:last-child {
    border-bottom: none;
}

.dwh-status-error {
    color: #dc2626;
}

[data-theme="dark"] .dwh-status-error {
    color: #f87171;
}

/* --- Vikunja Todos --- */
.td-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-gutter: stable;
}

/* Sortier-Button hängt rechts in der Filter-Chip-Zeile */
.td-sort {
    margin-left: auto;
}

/* --- Quick-Add: neues Todo direkt aus dem Dashboard --- */
.td-add-wrap {
    margin-bottom: 0.6rem;
}

.td-add {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.td-add-input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.td-add-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.td-add-input::placeholder {
    color: var(--text-light);
}

.td-add-project {
    max-width: 40%;
    padding: 0.45rem 0.4rem;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    cursor: pointer;
}

.td-add-btn {
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
}

.td-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    margin: 2px 0;
    font-size: 0.9rem;
    color: var(--text-color);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.td-item:hover {
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
}

[data-theme="dark"] .td-item:hover {
    background: color-mix(in srgb, var(--primary-color) 14%, transparent);
}

.td-check {
    width: 17px;
    height: 17px;
    margin: 0;
    border-radius: 5px;
    flex-shrink: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.td-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.td-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Meta-Zeile: Projekt- und Fälligkeits-Badges als dezente Pills */
.td-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.td-project,
.td-due,
.td-prio {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.08rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-light);
}

/* Prioritäts-Stufen (Vikunja-Skala) */
.td-prio-low {
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-light);
}

.td-prio-med {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

[data-theme="dark"] .td-prio-med {
    background: color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.td-prio-high {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

[data-theme="dark"] .td-prio-high {
    color: #fbbf24;
}

.td-prio-urgent {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

[data-theme="dark"] .td-prio-urgent {
    color: #f87171;
}

/* DO NOW invertiert – soll sofort ins Auge fallen */
.td-prio-now {
    background: #dc2626;
    color: #ffffff;
}

[data-theme="dark"] .td-prio-now {
    background: #ef4444;
}

.td-project {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

[data-theme="dark"] .td-project {
    background: color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.td-due-soon {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
}

[data-theme="dark"] .td-due-soon {
    color: #fbbf24;
}

.td-due-overdue {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    font-weight: 600;
}

[data-theme="dark"] .td-due-overdue {
    color: #f87171;
}

/* --- Wetter (Open-Meteo) --- */
.widget-wetter .widget-frame {
    flex: 0 0 auto;
    height: auto;
}

.wt-current {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.25rem 0.15rem 0.85rem;
}

.wt-icon {
    font-size: 2.6rem;
    line-height: 1;
}

.wt-main {
    min-width: 0;
}

.wt-temp {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--secondary-color);
}

[data-theme="dark"] .wt-temp {
    color: var(--text-color);
}

.wt-desc {
    color: var(--text-color);
    font-weight: 600;
}

.wt-meta {
    color: var(--text-light);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.wt-trend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding-top: 0.75rem;
}

[data-theme="dark"] .wt-trend {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.wt-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
    min-width: 0;
}

.wt-day-name {
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: capitalize;
}

.wt-day-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.wt-day-temp {
    font-size: 0.9rem;
    color: var(--text-light);
}

.wt-day-temp b {
    color: var(--text-color);
}

.wt-setup-hint {
    color: var(--text-light);
    margin-bottom: 0.6rem;
}

.wt-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wt-results {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wt-result {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    border-radius: 12px;
    max-width: 100%;
}

.wt-result small {
    display: block;
    font-weight: 400;
    opacity: 0.75;
    font-size: 0.72rem;
    white-space: normal;
}

.wt-no-results {
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* --- Gotify Vorlesen --- */
.vw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.vw-chip {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--text-color);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.vw-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.vw-chip-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.vw-chip-active:hover {
    color: var(--white);
}

.vw-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    min-width: 0;
    scrollbar-gutter: stable;
    transition: padding 0.2s ease;
}

/* Floating-Player offen: Listenende freihalten */
.vw-list.vw-player-open {
    padding-bottom: 7.5rem;
}

/* Duenne Theme-Scrollbars fuer die Widget-Listen */
.vw-list::-webkit-scrollbar,
.dwh-files::-webkit-scrollbar,
.td-list::-webkit-scrollbar {
    width: 8px;
}

.vw-list::-webkit-scrollbar-thumb,
.dwh-files::-webkit-scrollbar-thumb,
.td-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 4px;
}

.vw-list::-webkit-scrollbar-thumb:hover,
.dwh-files::-webkit-scrollbar-thumb:hover,
.td-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

.vw-list,
.dwh-files,
.td-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.vw-card {
    position: relative;
    padding: 0.6rem 0.4rem;
    min-width: 0;
    overflow-wrap: anywhere;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.vw-card:hover {
    background: rgba(148, 163, 184, 0.07);
}

.vw-card + .vw-card {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.vw-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vw-card-title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ungelesen: farbiger Punkt vor dem Titel */
.vw-card:not(.vw-read) .vw-card-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    margin-right: 0.45rem;
    vertical-align: middle;
}

.vw-card-age {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-light);
    white-space: nowrap;
}

.vw-toggle {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.8rem;
    line-height: 1;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.vw-toggle:hover {
    background: rgba(148, 163, 184, 0.15);
}

.vw-card-preview {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.15rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.vw-card audio,
#vw-player {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.vw-card-full {
    display: none;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-top: 0.4rem;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
}

.vw-card-full.vw-open {
    display: block;
}

.vw-card-full p {
    margin: 0.25rem 0;
}

.vw-card-full ul {
    margin: 0.25rem 0;
    padding-left: 1.25rem;
}

.vw-card-full li {
    margin: 0.1rem 0;
}

.vw-card-full blockquote {
    margin: 0.25rem 0;
    padding: 0.1rem 0 0.1rem 0.5rem;
    border-left: 2px solid var(--primary-color);
    color: var(--text-light);
}

.vw-card-full hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    margin: 0.4rem 0;
}

.vw-card-full a {
    color: var(--primary-color);
}

.vw-card-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.vw-play {
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--text-color);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.vw-play:hover {
    filter: brightness(1.15);
    border-color: var(--primary-color);
}

.vw-play.vw-playing {
    background: #ef4444;
    border-color: #ef4444;
    animation: vw-pulse 1s infinite;
}

/* Gelesen-Toggle an einer Karte */
.vw-read-toggle {
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: transparent;
    color: var(--text-light);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.vw-read-toggle:hover {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-color);
}

.vw-read-toggle.vw-is-read {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

@keyframes vw-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Sichtbare Fokus-Ringe fuer Tastaturnavigation */
.vw-chip:focus-visible,
.vw-toggle:focus-visible,
.vw-play:focus-visible,
.vw-read-toggle:focus-visible,
.vp-btn:focus-visible,
.vp-seek:focus-visible,
.vp-speed:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Weniger Bewegung, wenn das System es verlangt */
@media (prefers-reduced-motion: reduce) {
    .vw-play.vw-playing {
        animation: none;
    }
    .vw-chip,
    .vw-toggle,
    .vw-play,
    .vw-read-toggle,
    .vp-btn,
    .vw-card,
    .vw-list,
    .toast {
        transition: none;
    }
}

/* Groessere Touch-Targets auf Mobilgeraeten */
@media (max-width: 480px) {
    .vw-toggle,
    .vw-read-toggle,
    .vw-play {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.vw-empty,
.vw-error {
    color: var(--text-light);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.875rem;
}

/* gelesene Vorlesen-Nachrichten dezent ausgrauen */
.vw-card.vw-read .vw-card-title {
    color: var(--text-light);
}

.vw-card.vw-read .vw-card-preview {
    opacity: 0.6;
}

/* Statuszeile der Kleinanzeigen-Karte auf dem Dashboard */
.ka-dash-status {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0.25rem 0 0.75rem;
}

.ka-dash-status strong {
    color: var(--text-color);
    font-weight: 600;
}

.vw-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Seiten-Pager: ‹ Zurück | Seite X | Weiter › */
.vw-pager {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.vw-page {
    color: var(--text-light);
    font-size: 0.85rem;
    white-space: nowrap;
}

#vw-player {
    display: none;
}

/* --- vorlesen: floating player bar --- */
.vw-player-bar {
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(680px, calc(100vw - 2rem));
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem 0.9rem;
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: var(--shadow-xl);
}

.vp-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.vp-close {
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 0.2rem 0.45rem;
}

.vp-close:hover {
    background: rgba(148, 163, 184, 0.25);
}

.vp-title {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vp-main {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.vp-btn {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background 0.15s;
    white-space: nowrap;
    font-weight: 500;
}

.vp-btn:hover {
    background: rgba(148, 163, 184, 0.2);
}

.vp-play-pause {
    font-size: 1rem;
    padding: 0.2rem 0.5rem;
}

.vp-seek {
    flex: 1;
    min-width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background:
        linear-gradient(to right, var(--primary-color, #6366f1) 0%, var(--primary-color, #6366f1) var(--vp-fill, 0%), rgba(148, 163, 184, 0.25) var(--vp-fill, 0%))
        no-repeat,
        rgba(148, 163, 184, 0.25);
    background-color: rgba(148, 163, 184, 0.25);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.vp-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color, #6366f1);
    cursor: pointer;
}

.vp-seek::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color, #6366f1);
    border: none;
    cursor: pointer;
}

.vp-time {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vp-speed {
    flex-shrink: 0;
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 4px;
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
    cursor: pointer;
}

@media (max-width: 480px) {
    .vp-main {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    .vp-seek {
        order: 10;
        flex-basis: 100%;
        min-width: 0;
    }
}

/* --- vorlesen: loading bar --- */
.widget-vorlesen .widget-inner {
    position: relative;
}

.vw-loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    background-size: 200% 100%;
    animation: vw-loading-slide 1.2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vw-loading-bar-active {
    opacity: 1;
}

@keyframes vw-loading-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.vw-loading-spinner {
    display: none;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: vw-spin 0.7s linear infinite;
    z-index: 2;
}

.vw-loading-spinner-active {
    display: block;
}

@keyframes vw-spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    opacity: 0.6;
    pointer-events: none;
}


/* ===================================
   TOAST
   =================================== */
.toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    max-width: 24rem;
    padding: 0.875rem 1.25rem;
    background-color: var(--bg-alt);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    z-index: 1000;
    opacity: 0;
    transform: translate(-50%, -1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast.toast-error {
    border-color: #dc2626;
    border-left-color: #dc2626;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===================================
   SECTION HEADERS
   =================================== */
.section-title {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.portfolio-section-title {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

[data-theme="dark"] .about-text h3 {
    color: var(--white);
}

.about-title {
    color: var(--text-color);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: none;
}

[data-theme="dark"] .about-text h3,
[data-theme="dark"] .about-title {
    color: #ffffff !important;
    text-shadow: none !important;
}

.about-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-credits {
    margin-top: 2.5rem;
    padding: 2rem;
    background-color: var(--bg-alt);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
}

[data-theme="dark"] .about-credits {
    background-color: var(--bg-color);
    border-left: 4px solid var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.credits-text {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.6;
}

[data-theme="dark"] .credits-text {
    color: var(--text-light);
}

/* ===================================
   PORTFOLIO SECTION
   =================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.portfolio-card {
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    background-color: var(--bg-color);
}

[data-theme="dark"] .portfolio-card {
    background-color: var(--bg-color);
    border-color: rgba(255, 255, 255, 0.12);
}

.portfolio-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.portfolio-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

[data-theme="dark"] .portfolio-card h3 {
    color: var(--text-color);
}

.portfolio-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-intro {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: var(--bg-alt);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-color);
}

.contact-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .contact-link {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 2px solid rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .contact-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-light);
}

.contact-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-illustration {
    position: relative;
    width: 200px;
    height: 200px;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.bubble:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    bottom: 30px;
    right: 30px;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    width: 50px;
    height: 50px;
    bottom: 10px;
    left: 50px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo-img {
    height: 24px;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-light);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

[data-theme="dark"] .footer-links a {
    color: var(--text-light);
}

[data-theme="dark"] .footer-links a:hover {
    color: var(--primary-light);
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(37, 99, 235, 0.1);
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    transition: var(--transition);
    color: var(--text-color);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    color: var(--white);
}

[data-theme="dark"] .footer-social a {
    background-color: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

[data-theme="dark"] .footer-social a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* ===================================
   CONTACT FORM PAGE
   =================================== */
.contact-page {
    padding-top: 140px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-family: var(--font-brand);
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    resize: vertical;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    border-color: rgba(255, 255, 255, 0.16);
}

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

.form-group textarea {
    min-height: 150px;
}

.contact-form .btn {
    align-self: flex-start;
}

.form-success {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--bg-alt);
    border-radius: var(--border-radius);
}

.form-success p {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .contact-form .btn {
        width: 100%;
        text-align: center;
    }
}

/* Honeypot field - hidden from humans, visible to bots */
.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

.honeypot-field label {
    display: none;
}

.honeypot-field input {
    tab-index: -1;
    autocomplete: off;
}

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

/* --- Hamburger icon animation --- */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 992px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .about-image::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.1) 100%);
        border-radius: var(--border-radius);
        z-index: -1;
    }

    [data-theme="dark"] .about-image::before {
        background: linear-gradient(135deg, rgba(76, 148, 236, 0.12) 0%, rgba(10, 10, 10, 0) 60%);
    }

    .dashboard-page .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "dwhelper"
            "vorlesen"
            "kleinanzeigen"
            "wetter"
            "todos";
    }

    /* Kein Spalten-Drag im einspaltigen Layout */
    .dash-resize-handle {
        display: none;
    }
}

@media (max-width: 768px) {
    /* --- Mobile Nav --- */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 999;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .nav-links.active {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .navbar .container {
        padding: 0.75rem 16px;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .theme-toggle {
        padding: 0.4rem 0.6rem;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .auth-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .user-name {
        display: none;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    /* --- Sections --- */
    .section {
        padding: 60px 0;
    }

    .hero {
        min-height: 85vh;
        padding-top: 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .about-title {
        font-size: 1.5rem;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-intro {
        font-size: 1.1rem;
    }

    /* --- Contact --- */
    .contact-page {
        padding-top: 120px;
    }

    .contact-link {
        padding: 0.875rem 1rem;
        min-height: 48px;
    }

    /* --- Intern --- */
    .intern-main {
        padding-top: 120px;
    }

    .intern-grid {
        grid-template-columns: 1fr;
    }

    /* --- Dashboard --- */
    .dashboard-page {
        height: auto;
        min-height: 100svh;
        min-height: 100vh;
    }

    .dashboard-page .container {
        padding: 12px 16px;
    }

    .dashboard-page .widget-frame {
        min-height: 350px;
    }

    .dashboard-page .widget-card {
        padding: 1rem;
    }

    .dashboard-page .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dashboard-page .widget-header-actions {
        width: 100%;
    }

    .dashboard-page .widget-header-actions .btn {
        flex: 1;
        min-height: 44px;
    }

    /* Icon-Button bleibt quadratisch statt sich mitzustrecken */
    .dashboard-page .widget-header-actions .btn-icon {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
    }

    /* Größere Touch-Targets für die Todo-Checkboxen */
    .dashboard-page .td-check {
        width: 22px;
        height: 22px;
    }

    /* --- Footer --- */
    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 48px 0;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contact-form .btn {
        width: 100%;
        text-align: center;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contact-link {
        justify-content: center;
        min-height: 48px;
    }

    .about-image {
        max-width: 300px;
    }

    .intern-main {
        padding-top: 100px;
    }

    .contact-page {
        padding-top: 100px;
    }

    .contact-form {
        padding: 0 0.25rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 1s ease-out;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}