/* Base Design System */
:root {
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #e2e8f0;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --sidebar-width: 280px;
    --topbar-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    min-width: 0;
}

/* Sidebar Header & Nav */
.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    margin: auto;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    font-family: 'Century Gothic', CenturyGothic, 'AppleGothic', sans-serif;
    font-weight: 900;
    font-size: 2.62rem;
    letter-spacing: 0.8px;
    /* Metallischer Verlauf mit stärkerem Kontrast */
    background: linear-gradient(135deg,
            #ffffff 0%,
            #cbd5e1 35%,
            #475569 50%,
            #94a3b8 65%,
            #f1f5f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: baseline;
    line-height: 1;
    /* Visuelle Korrektur: Die Schriftart sitzt nativ etwas zu hoch */
    padding-top: 10px;
    margin-left: -10px;
    /* Subtile Kontur für mehr Dicke */
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.9)) drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.5));
}

.sidebar-brand .brand-c {
    font-family: 'Century Gothic', CenturyGothic, 'AppleGothic', sans-serif;
    background: linear-gradient(135deg,
            #e0e7ff 0%,
            #a5b4fc 35%,
            #4338ca 50%,
            #818cf8 65%,
            #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.62rem;
    font-weight: 900;
    margin-right: -1px;
}

.sidebar-nav {
    padding: 24px 0;
    overflow-y: auto;
    flex: 1;
}

.nav-section-title {
    padding: 0 24px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin: 24px 0 12px;
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 14px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.15);
    color: white;
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    opacity: 0.8;
}

/* Header & Top Bar */
.topbar {
    background: white;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.user-info {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-email {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.user-sep {
    color: var(--border);
    font-weight: 300;
    margin: 0 4px;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fff5f5;
}

.logout-link:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

/* Page Header */
.page-header {
    background: white;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f1f5f9;
    color: var(--primary);
}

.stat-card:nth-child(2) .stat-icon {
    background: #ecfdf5;
    color: var(--success);
}

/* Sidebar Stats & Mini Cards */
.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card-mini {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card-mini:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.stat-icon-mini {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.search-results-dropdown table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.search-results-dropdown th {
    font-size: 0.65rem;
    padding: 12px 16px;
    background: #f8fafc;
}

.search-results-dropdown td {
    padding: 12px 16px;
    font-size: 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-row:hover td {
    background: #f1f5f9;
}

.search-result-row:last-child td {
    border-bottom: none;
}

.search-result-row .pnummer {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
}

.search-result-row .visit-date {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-card:nth-child(3) .stat-icon {
    background: #fffbeb;
    color: var(--warning);
}

.stat-card:nth-child(4) .stat-icon {
    background: #fef2f2;
    color: var(--danger);
}

.stat-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-data .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-data .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr minmax(250px, 380px);
    gap: 32px;
    padding-bottom: 40px;
}

.quick-access {
    min-width: 0;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* overflow: hidden; -- entfernt für Dropdown-Sichtbarkeit */
    margin-top: 32px;
}

.dashboard-home .card {
    margin-top: 0;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-active {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-planned {
    background: #fef9c3;
    color: #854d0e;
}

.badge-recruiting {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #ffedd5;
}

.badge-finished,
.badge-completed {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-done {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-screening {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.badge-baseline {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-follow-up {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Progress Circles */
.progress-circles-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.progress-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.progress-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dark);
}

.progress-circle::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.progress-circle .value {
    position: relative;
    z-index: 2;
    font-weight: normal;
}

.progress-circle-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.bg-danger {
    background: var(--danger) !important;
}

.bg-success {
    background: var(--success) !important;
}

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

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--secondary);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Professional Radio Buttons */
.radio-group {
    display: flex;
    gap: 24px;
    padding: 8px 0;
}

/* Clickable Table Rows */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.clickable-row:hover {
    background-color: #f1f5f9;
}


.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: color 0.2s;
}

.radio-label:hover {
    color: var(--primary);
}

.radio-label input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin: 0;
    display: grid;
    place-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    cursor: pointer;
}

.radio-label input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.2s transform cubic-bezier(0.4, 0, 0.2, 1);
    background-color: white;
    box-shadow: inset 1em 1em white;
}

.radio-label input[type="radio"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.radio-label input[type="radio"]:checked::before {
    transform: scale(1);
}

.radio-label input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Professional File Upload */
.file-upload-card {
    background: #ffffff;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.file-upload-card:hover {
    border-color: var(--primary-light);
    background: #f8fafc;
}

.file-upload-card.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

.file-upload-card i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 16px;
    display: block;
}

.file-upload-card .upload-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: block;
}

.file-upload-card .upload-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.template-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 6px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.template-link:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.validation-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.validation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.validation-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.validation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-bottom: 1px solid #f1f5f9;
}

.validation-item:last-child {
    border-bottom: none;
}

.validation-item i {
    margin-top: 3px;
}

.validation-item.success { color: #059669; }
.validation-item.error { color: #dc2626; }

/* Quick Search Box */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .form-control {
    padding-left: 40px;
}

/* Footer */
.app-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Participant View Specific */
.participant-hero {
    display: flex;
    align-items: center;
    gap: 32px;
    background: white;
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.participant-avatar-large {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}

/* Visit Badges & Calendar */
.visit-badge {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
}

.calendar-visual {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-top: 15px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.calendar-day.in-window {
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
}

.calendar-day.target {
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.calendar-day.today {
    border: 2px solid var(--secondary);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

/* Toast System */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 6px solid #e2e8f0;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-access {
        order: -1;
        /* Statistiken zwischen Suche und Listen rendern */
    }

    .sidebar-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-stats .stat-card-mini {
        flex: 1;
        min-width: 200px;
    }
}

/* Footer & Copyright Styles (Minimalist Style) */
.app-footer {
    padding: 60px 0 40px;
    margin-top: auto;
    width: 100%;
}

.footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
    margin: 0 40px;
}

.footer-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
}

.copyright {
    text-align: center;
    padding-top: 8px;
}

.copyright-text {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

#scroll-to-top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

#scroll-to-top-button:hover {
    transform: translateY(-4px);
    background: var(--primary-dark);
}

#scroll-to-top-button i {
    color: white;
    font-size: 1.2rem;
}

/* Collapsible Elements */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    user-select: none;
}

.collapsible-header:hover {
    background-color: #f8fafc;
}

.chevron-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.is-expanded .chevron-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    opacity: 0;
}

.collapsible-content.show {
    max-height: 2000px;
    opacity: 1;
}

.interaction-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.8;
}

/* Admin Button States */
.btn-admin.disabled {
    opacity: 0.4 !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* Print Utilities */
@media print {

    .sidebar,
    .topbar,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .content-container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
    }
}

/* UI Components for Study Management */
.method-card {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
}

.method-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.method-card.selected {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2563eb;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2563eb;
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.is-expanded .interaction-hint {
    display: none;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 30px 40px;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid var(--border);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.cookie-text {
    text-align: left;
}

.cookie-text h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.cookie-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 900px;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
}

.cookie-btn {
    flex: 1;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.cookie-btn-primary {
    background: var(--primary);
    color: white;
}

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

.cookie-btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.cookie-btn-outline:hover {
    background: #f8fafc;
}

.cookie-link {
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* Data Privacy Notice Sidebar */
.data-privacy-notice-container {
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

.data-privacy-toggle-button {
    width: 100%;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.data-privacy-toggle-button:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.data-privacy-toggle-button i {
    transition: transform 0.3s;
}

.data-privacy-toggle-button.collapsed i {
    transform: rotate(180deg);
}

.data-privacy-content {
    padding: 0 24px 24px;
    max-height: 500px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
}

.data-privacy-content.collapsed {
    max-height: 0;
    padding-bottom: 0;
    opacity: 0;
}

.data-privacy-icon {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 16px;
    opacity: 0.8;
}

.data-privacy-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-privacy-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
    margin-bottom: 16px;
}

.data-privacy-text strong {
    color: white;
    font-weight: 700;
}

.data-privacy-highlight {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #bbf7d0;
    margin-bottom: 20px;
    line-height: 1.4;
}

.data-privacy-link-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: color 0.2s;
}

.data-privacy-link-button:hover {
    color: white;
}

/* Welcome Modal */
.welcome-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.welcome-modal {
    background: white;
    width: 100%;
    max-width: 700px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.welcome-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 40px;
    text-align: center;
    color: white;
}

.welcome-logo {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.welcome-modal-header h2 {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.02em;
}

.sidebar-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    padding: 8px;
    border: solid 1px #3b82f6;
    border-radius: 50%;
    box-shadow: inset 0 0 8px 1px rgba(59, 130, 246, 0.5);
    background: white;
    transition: transform 0.2s;
}

.welcome-modal-body {
    padding: 40px;
    color: #475569;
    line-height: 1.7;
    font-size: 1.05rem;
    text-align: left;
}

.welcome-modal-footer {
    padding: 24px 40px 40px;
    display: flex;
    justify-content: flex-end;
}

.btn-welcome-start {
    background: var(--primary);
    color: white;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-welcome-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}