* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-light: #9CAF88;
    --green-dark: #7A9B6E;
    --cream: #FEFCF9;
    --beige: #F5E6D3;
    --beige-dark: #E6D5C3;
    --text-dark: #333;
    --text-muted: #555;
    --text-light: #666;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
    --radius-lg: 20px;
    --radius-md: 15px;
    --radius-sm: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green-dark) 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login */
.login-screen {
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.auth-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--shadow);
}

.auth-card-wide {
    max-width: 520px;
}

.back-to-site {
    display: inline-block;
    margin-bottom: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
}

.auth-header h1 {
    font-size: 2.5em;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.auth-sub {
    font-size: 0.92em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.auth-header .tagline {
    font-size: 1.1em;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    padding: 14px 16px;
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-sm);
    font-size: 1em;
    font-family: inherit;
    background: white;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-dark);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 3px;
    accent-color: var(--green-dark);
}

.checkbox-terms {
    line-height: 1.5;
}

.auth-link {
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: none;
}

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

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 1em;
    margin-top: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 0.9em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--beige-dark);
}

.demo-hints {
    text-align: center;
}

.demo-label {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 12px;
}

.demo-buttons {
    display: flex;
    gap: 10px;
}

.btn-demo {
    flex: 1;
    padding: 12px 10px;
    font-size: 0.85em;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.95em;
}

.role-select {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-option {
    cursor: pointer;
}

.role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--beige);
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.role-option input:checked + .role-option-card {
    border-color: var(--green-dark);
    background: white;
    box-shadow: 0 4px 12px rgba(122, 155, 110, 0.15);
}

.role-option-card:hover {
    border-color: var(--green-dark);
}

.role-option-icon {
    font-size: 1.6em;
}

.role-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.role-option-text strong {
    color: var(--text-dark);
    font-size: 0.95em;
}

.role-option-text small {
    color: var(--text-light);
    font-size: 0.8em;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-light) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.role-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 30px;
    background: var(--beige);
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.role-btn:hover {
    border-color: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(122, 155, 110, 0.25);
}

.role-btn .icon {
    font-size: 2.2em;
    width: 60px;
    text-align: center;
}

.role-btn h3 {
    color: var(--text-dark);
    font-size: 1.2em;
    margin-bottom: 4px;
}

.role-btn p {
    color: var(--text-light);
    font-size: 0.95em;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 260px;
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 24px;
}

.sidebar-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-logo {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 2px;
    padding: 0;
}

.sidebar-role {
    font-size: 0.78em;
    color: var(--text-light);
    padding: 0;
    margin-bottom: 0;
    line-height: 1.3;
    max-width: 150px;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--beige);
    color: var(--green-dark);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-light) 100%);
    color: white;
}

.nav-item .nav-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--beige-dark);
    margin-top: 20px;
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--green-dark);
    border-radius: 25px;
    color: var(--green-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--green-dark);
    color: white;
}

.main-content {
    flex: 1;
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

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

.page-header h2 {
    font-size: 2em;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.05em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--beige) 0%, var(--beige-dark) 100%);
    padding: 24px;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--green-dark);
}

.stat-card .stat-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.95em;
}

/* Feature boxes */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.feature-box {
    background: linear-gradient(135deg, var(--beige) 0%, var(--beige-dark) 100%);
    padding: 28px;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--green-dark);
}

.feature-box h3 {
    color: var(--green-dark);
    font-size: 1.2em;
    margin-bottom: 16px;
}

.feature-box ul {
    list-style: none;
}

.feature-box li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95em;
    border-bottom: 1px solid rgba(230, 213, 195, 0.5);
}

.feature-box li:last-child {
    border-bottom: none;
}

.feature-box li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    background: var(--green-dark);
    border-radius: 50%;
}

/* AI Banner */
.ai-banner {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-light) 100%);
    padding: 28px;
    border-radius: var(--radius-md);
    color: white;
    margin-top: 24px;
}

.ai-banner h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.ai-banner p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Tables / Lists */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--beige);
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.9em;
    border-radius: var(--radius-sm);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--beige-dark);
    color: var(--text-muted);
    font-size: 0.95em;
}

.data-table tr {
    cursor: pointer;
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--beige);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-active { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
.status-done { background: var(--beige); color: var(--green-dark); }

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.calendar-day {
    background: var(--beige);
    border-radius: var(--radius-sm);
    padding: 16px;
    min-height: 120px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.calendar-day.today {
    border-color: var(--green-dark);
}

.calendar-day .day-label {
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.appointment {
    background: white;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.8em;
    border-left: 3px solid var(--green-dark);
    cursor: pointer;
    transition: transform 0.2s;
}

.appointment:hover {
    transform: translateX(3px);
}

/* Material Cards */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.material-card {
    background: var(--beige);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 2px solid var(--beige-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.material-card:hover {
    border-color: var(--green-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(122, 155, 110, 0.2);
}

.material-card .material-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.material-card h4 {
    color: var(--text-dark);
    margin-bottom: 8px;
}

.material-card p {
    color: var(--text-light);
    font-size: 0.85em;
}

.material-card .ai-tag {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75em;
    background: var(--green-dark);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
}

/* Patient Detail */
.patient-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    padding: 24px;
    background: var(--beige);
    border-radius: var(--radius-md);
}

.patient-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: white;
    font-weight: 700;
}

.patient-info h3 {
    font-size: 1.5em;
    margin-bottom: 4px;
}

.patient-info p {
    color: var(--text-muted);
}

.progress-bar-container {
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.progress-bar {
    height: 12px;
    background: var(--beige-dark);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-dark), var(--green-light));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.ai-suggestion {
    background: white;
    border: 2px solid var(--green-dark);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 16px;
}

.ai-suggestion h4 {
    color: var(--green-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-light) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 155, 110, 0.4);
}

.btn-secondary {
    background: var(--cream);
    border: 2px solid var(--green-dark);
    color: var(--green-dark);
}

.btn-secondary:hover {
    background: var(--green-dark);
    color: white;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Patientenportal */
.pp-screen {
    background: #F3F1EC;
    animation: none;
}

.pp-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.pp-sidebar {
    width: 268px;
    flex-shrink: 0;
    background: #fff;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #E8E4DC;
}

.pp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 28px;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.pp-brand:hover strong {
    color: var(--green-dark);
}

.pp-logo-mark {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.pp-brand strong {
    display: block;
    font-size: 1.15em;
    color: #2C3228;
}

.pp-brand span {
    display: block;
    font-size: 0.78em;
    color: #8A8A82;
    margin-top: 1px;
}

.pp-nav {
    list-style: none;
    flex: 1;
}

.pp-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    color: #5C5C56;
    font-weight: 500;
    font-size: 0.95em;
    margin-bottom: 4px;
    transition: background 0.15s, color 0.15s;
}

.pp-nav-item:hover {
    background: #F4F6F1;
    color: var(--green-dark);
}

.pp-nav-item.active {
    background: #E7EFE3;
    color: #4F6F46;
    font-weight: 600;
}

.pp-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pp-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.pp-help {
    background: #F4F6F1;
    border-radius: 16px;
    padding: 16px;
}

.pp-help h4 {
    font-size: 0.95em;
    color: #2C3228;
    margin-bottom: 4px;
}

.pp-help p {
    font-size: 0.82em;
    color: #7A7A72;
    margin-bottom: 12px;
}

.pp-help-btn {
    width: 100%;
    padding: 9px 12px;
    background: #fff;
    border: 1.5px solid var(--green-dark);
    border-radius: 10px;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    font-family: inherit;
}

.pp-help-btn:hover {
    background: var(--green-dark);
    color: #fff;
}

.pp-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-radius: 12px;
    cursor: pointer;
}

.pp-user:hover {
    background: #F4F6F1;
}

.pp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #D7E4D0;
    color: #4F6F46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    flex-shrink: 0;
}

.pp-avatar-lg {
    width: 88px;
    height: 88px;
    font-size: 1.6em;
    margin: 0 auto 12px;
}

.pp-user strong {
    display: block;
    font-size: 0.92em;
    color: #2C3228;
}

.pp-user span:not(.pp-user-arrow) {
    font-size: 0.78em;
    color: #8A8A82;
}

.pp-user-arrow {
    margin-left: auto;
    color: #A8A8A0;
    font-size: 1.2em;
}

.pp-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #7A7A72;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 6px;
    font-family: inherit;
    font-size: 0.9em;
}

.pp-logout:hover {
    color: #4F6F46;
}

.pp-logout svg {
    width: 18px;
    height: 18px;
}

.pp-main {
    flex: 1;
    padding: 36px 40px 48px;
    overflow-y: auto;
    max-height: 100vh;
}

.pp-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    background: #fff;
    border-radius: 24px;
    padding: 28px 8px 0 40px;
    box-shadow: 0 8px 28px rgba(80, 70, 50, 0.06);
    overflow: hidden;
}

.pp-hero-copy {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    padding: 4px 0 28px;
}

.pp-hero-copy h1 {
    font-size: 2.35em;
    color: #2C3228;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pp-hero-copy p {
    color: #5C5C56;
    font-size: 1.08em;
    max-width: 420px;
    line-height: 1.6;
}

.pp-hero-art {
    width: min(846px, 48%);
    flex-shrink: 0;
    pointer-events: none;
    line-height: 0;
}

.pp-hero-art img {
    width: 100%;
    height: auto;
    display: block;
}

.pp-hero-art svg,
.pp-banner-art svg {
    width: 100%;
    height: auto;
    display: block;
}

.pp-page-head {
    margin-bottom: 24px;
}

.pp-page-head h1 {
    font-size: 1.9em;
    color: #2C3228;
    margin-bottom: 8px;
}

.pp-page-head p {
    color: #6B6B64;
    font-size: 1.05em;
}

.pp-dash {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 22px;
    margin-bottom: 22px;
    align-items: stretch;
}

.pp-dash-main,
.pp-dash-side {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.pp-dash-main > .tera-progress-section,
.pp-dash-side > .pp-msg-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pp-dash-side .pp-text-link {
    display: inline-block;
    margin-top: 14px;
}

.pp-dash-side .pp-card-head .pp-text-link {
    margin-top: 0;
}

.pp-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 26px;
    box-shadow: 0 8px 28px rgba(80, 70, 50, 0.06);
}

.pp-card h2 {
    font-size: 1.15em;
    color: #2C3228;
    margin-bottom: 16px;
}

.pp-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pp-card-head h2 {
    margin-bottom: 0;
}

.pp-card-intro {
    color: #6B6B64;
    font-size: 0.98em;
    line-height: 1.5;
    margin-bottom: 12px;
}

.pp-task-group + .pp-task-group {
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid #F0EDE6;
}

.pp-card .pp-task-group-title {
    font-size: 1.02em;
    font-weight: 700;
    color: #2C3228;
    margin-bottom: 4px;
}

.pp-task-group-hint {
    color: #7A7A72;
    font-size: 0.9em;
    margin-bottom: 8px;
    line-height: 1.45;
}

.pp-task-icon-lips {
    background: #F8D9C8;
}

.pp-text-link {
    background: none;
    border: none;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.88em;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

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

.pp-back {
    display: inline-block;
    margin-bottom: 18px;
}

.pp-task-list {
    list-style: none;
}

.pp-exercise-list .pp-task {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 8.4rem;
    align-items: center;
    column-gap: 16px;
    min-height: 96px;
    padding: 14px 0;
}

.pp-exercise-list .pp-task:last-child {
    padding-bottom: 14px;
}

.pp-exercise-list .pp-task-body h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pp-exercise-list .pp-task-body p,
.pp-exercise-list .pp-task-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pp-exercise-list .pp-task .pp-btn-start,
.pp-exercise-list .pp-task .pp-chip {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 8px 12px;
}

.pp-task {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #F0EDE6;
}

.pp-task:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.pp-task-next {
    margin-bottom: 2em;
}

.pp-termine-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pp-termine-stack > .pp-card:first-child .pp-task {
    border-bottom: none;
    padding-top: 0;
    padding-bottom: 0;
}

.pp-task-done {
    opacity: 0.72;
}

.pp-task-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pp-task-icon svg {
    width: 36px;
    height: 36px;
}

.pp-task-icon-exercise { background: #E7EFE3; }
.pp-task-icon-bee { background: #F7E7B0; }
.pp-task-icon-breath { background: #F8D9C8; }
.pp-task-icon-cards { background: #DCE8F5; }
.pp-task-icon-speech { background: #E8F0E3; }
.pp-task-icon-next { background: #F3E6D4; }
.pp-task-icon-planned { background: #DCE8F5; }
.pp-task-icon-cancelled { background: #F4E4E1; }
.pp-task-icon-done {
    background: #E7EFE3;
    color: #4F6F46;
    font-size: 1.3em;
    font-weight: 700;
}

.pp-task-body {
    flex: 1;
    min-width: 0;
}

.pp-task-body h3 {
    font-size: 0.98em;
    color: #2C3228;
    margin-bottom: 2px;
}

.pp-task-body p {
    font-size: 0.85em;
    color: #7A7A72;
    margin-bottom: 4px;
}

.pp-task-meta {
    font-size: 0.78em;
    color: #9A9A92;
}

.pp-btn {
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pp-btn-start {
    background: #6B8F63;
    color: #fff;
    padding: 10px 16px;
    font-size: 0.88em;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(107, 143, 99, 0.25);
}

.pp-btn-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(107, 143, 99, 0.35);
}

.pp-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 600;
    white-space: nowrap;
}

.pp-chip-progress {
    background: #EEECE7;
    color: #6B6B64;
}

.pp-chip-next {
    background: #F3E6D4;
    color: #8A6A42;
}

.pp-chip-planned {
    background: #DCE8F5;
    color: #4A6A8A;
}

.pp-chip-cancelled {
    background: #F4E4E1;
    color: #8B4E45;
}

.pp-task-cancelled {
    opacity: 0.8;
}

.pp-task-cancelled .pp-task-body h3 {
    text-decoration: line-through;
    text-decoration-color: #C4A8A4;
}

.pp-chip-open {
    background: #F3E6D4;
    color: #8A6A42;
}

.pp-chip-done {
    background: #E7EFE3;
    color: #4F6F46;
}

.pp-progress-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.pp-progress-row p {
    color: #5C5C56;
    line-height: 1.5;
    font-size: 0.95em;
}

.pp-ring {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.pp-ring-lg {
    width: 130px;
    height: 130px;
}

.pp-ring svg {
    width: 100%;
    height: 100%;
}

.pp-ring span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.35em;
    color: #2C3228;
}

.pp-week-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #7A7A72;
    margin-bottom: 8px;
}

.pp-week-label strong {
    color: #2C3228;
}

.pp-week-bar {
    height: 8px;
    background: #EDEAE3;
    border-radius: 6px;
    overflow: hidden;
}

.pp-week-bar span {
    display: block;
    height: 100%;
    background: #6B8F63;
    border-radius: 6px;
}

.pp-msg-card {
    position: relative;
}

.pp-msg-card .pp-msg-preview {
    flex: 1;
    align-items: flex-start;
}

.pp-msg-card .pp-msg-preview > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.pp-msg-card .pp-msg-preview .pp-text-link {
    margin-top: auto;
}

.pp-msg-badge {
    position: absolute;
    top: -10px;
    right: 18px;
    z-index: 2;
    background: #C17B72;
    color: #fff;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(193, 123, 114, 0.35);
}

.pp-msg-preview {
    display: flex;
    gap: 14px;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.pp-msg-preview img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 30%;
    flex-shrink: 0;
    background: #E8E4DC;
}

.pp-msg-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.pp-msg-meta strong {
    color: #2C3228;
    font-size: 0.92em;
}

.pp-msg-meta span {
    color: #9A9A92;
    font-size: 0.78em;
}

.pp-msg-preview p {
    color: #6B6B64;
    font-size: 0.88em;
    line-height: 1.45;
    margin-bottom: 8px;
}

.pp-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    border-radius: 20px;
    padding: 22px 28px;
    box-shadow: 0 8px 28px rgba(80, 70, 50, 0.06);
    overflow: hidden;
}

.pp-banner-copy h2 {
    font-size: 1.2em;
    color: #2C3228;
    margin-bottom: 6px;
}

.pp-banner-copy p {
    color: #6B6B64;
    margin-bottom: 16px;
    font-size: 0.95em;
}

.pp-banner-art {
    width: 280px;
    flex-shrink: 0;
}

.tera-progress-section {
    width: 100%;
    padding: 0;
    container-type: inline-size;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

.tera-progress-content {
    position: relative;
    min-height: 205px;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #f1f4eb;
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 32px 36px;
    box-sizing: border-box;
}

.tera-progress-text {
    position: relative;
    z-index: 2;
    width: 52%;
}

.tera-progress-text h2 {
    margin: 0 0 12px 0;
    color: #202a26;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.tera-progress-text h2 span,
.tera-progress-leaf {
    display: inline-flex;
    align-items: center;
    color: #829579;
    margin-left: 4px;
    vertical-align: middle;
}

.tera-progress-leaf svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tera-progress-text p {
    margin: 0 0 20px 0;
    color: #46514c;
    font-size: 15px;
    line-height: 1.6;
}

a.tera-progress-button {
    display: inline-flex;
    align-items: center;
    padding: 11px 19px;
    background: #758b70;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

a.tera-progress-button:hover {
    background: #657b61;
    color: #fff;
    transform: translateY(-1px);
}

.tera-mountains {
    position: absolute;
    right: -5px;
    bottom: 0;
    width: 62%;
    height: 100%;
    pointer-events: none;
}

.tera-mountains img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right bottom;
    display: block;
}

@container (max-width: 800px) {
    .tera-progress-content {
        min-height: 230px;
        padding: 28px;
    }

    .tera-progress-text {
        width: 60%;
    }

    .tera-mountains {
        width: 55%;
        opacity: 0.8;
    }
}

@container (max-width: 440px) {
    .tera-progress-content {
        min-height: 390px;
        display: block;
        padding: 26px 24px;
    }

    .tera-progress-text {
        width: 100%;
    }

    .tera-progress-text h2 {
        font-size: 20px;
    }

    .tera-progress-text p {
        font-size: 14px;
    }

    .tera-mountains {
        width: 115%;
        height: 190px;
        right: -60px;
        bottom: 0;
        opacity: 0.9;
    }
}

.pp-progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.pp-days {
    display: flex;
    gap: 8px;
}

.pp-day {
    flex: 1;
    aspect-ratio: 1;
    border-radius: 12px;
    background: #F4F2EE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
    color: #9A9A92;
}

.pp-day.done {
    background: #E7EFE3;
    color: #4F6F46;
}

.pp-day.today {
    background: #6B8F63;
    color: #fff;
}

.pp-hint {
    margin-top: 16px;
    color: #6B6B64;
    font-size: 0.9em;
}

.pp-history {
    list-style: none;
}

.pp-history li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #F0EDE6;
    color: #5C5C56;
    font-size: 0.95em;
}

.pp-history li:last-child {
    border-bottom: none;
}

.pp-history strong {
    color: #4F6F46;
    font-size: 0.88em;
    white-space: nowrap;
}

.pp-thread-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0EDE6;
}

.pp-thread-head img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 30%;
}

.pp-thread-head strong {
    display: block;
    color: #2C3228;
}

.pp-thread-head span {
    font-size: 0.85em;
    color: #8A8A82;
}

.pp-bubble {
    max-width: 72%;
    padding: 14px 18px;
    border-radius: 16px;
    margin-bottom: 14px;
}

.pp-bubble p {
    line-height: 1.5;
    color: #2C3228;
    font-size: 0.95em;
}

.pp-bubble time {
    display: block;
    margin-top: 6px;
    font-size: 0.75em;
    color: #9A9A92;
}

.pp-bubble-in {
    background: #F4F6F1;
    border-bottom-left-radius: 6px;
}

.pp-bubble-out {
    background: #E7EFE3;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.pp-compose {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.pp-compose textarea,
.pp-note {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E8E4DC;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    background: #FBFBF8;
    color: #2C3228;
}

.pp-compose textarea:focus,
.pp-note:focus {
    outline: none;
    border-color: var(--green-dark);
}

.pp-compose .pp-btn {
    align-self: flex-end;
}

.pp-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
}

.pp-profile-hero {
    text-align: center;
}

.pp-profile-hero h2 {
    margin-bottom: 12px;
}

.pp-profile-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 22px;
}

.pp-extra-lead {
    font-size: 1.02em;
    font-weight: 600;
    color: #2C3228;
    margin-bottom: 6px;
}

.pp-extra-meta {
    color: #7A7A72;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.pp-profile-extras .pp-text-link {
    display: inline-block;
    margin-top: 14px;
}

.pp-therapist-intro {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pp-therapist-intro + .pp-info-list {
    margin-top: 12px;
}

.pp-therapist-intro img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 30%;
    flex-shrink: 0;
    background: #E8E4DC;
}

.pp-therapist-intro .pp-extra-lead {
    margin-bottom: 2px;
}

.pp-therapist-intro .pp-extra-meta {
    margin-bottom: 0;
}

.pp-profile-contact {
    grid-column: 1 / -1;
}

.pp-profile-contact-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.pp-profile-contact-cols > :last-child {
    padding-left: 32px;
    border-left: 1px solid #F0EDE6;
}

.pp-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pp-fields label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82em;
    font-weight: 600;
    color: #6B6B64;
}

.pp-fields input {
    padding: 12px 14px;
    border: 1.5px solid #E8E4DC;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95em;
    color: #2C3228;
    background: #FBFBF8;
}

.pp-info-list {
    list-style: none;
}

.pp-info-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0EDE6;
    font-size: 0.95em;
}

.pp-info-list li:last-child {
    border-bottom: none;
}

.pp-info-list span {
    color: #7A7A72;
}

.pp-info-list strong {
    color: #2C3228;
    text-align: right;
    word-break: break-word;
}

.pp-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #5C5C56;
    cursor: pointer;
    font-size: 0.95em;
}

.pp-toggle input {
    accent-color: var(--green-dark);
    width: 16px;
    height: 16px;
}

.pp-exercise {
    max-width: 640px;
}

.pp-exercise h1 {
    font-size: 1.6em;
    color: #2C3228;
    margin: 16px 0 8px;
}

.pp-exercise-meta {
    color: #7A7A72;
    margin-bottom: 22px;
}

.pp-exercise-steps {
    background: #F4F6F1;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 22px;
}

.pp-exercise-steps p {
    color: #5C5C56;
    line-height: 1.55;
    margin-bottom: 14px;
}

.pp-exercise-steps ol {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
    color: #2C3228;
}

.pp-exercise-steps li {
    margin: 0;
    min-height: 48px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-weight: 600;
}

.pp-moods {
    display: flex;
    gap: 12px;
    margin: 20px 0 24px;
}

.pp-mood {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #F4F6F1;
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.8em;
    color: #2C3228;
}

.pp-mood span {
    font-size: 0.45em;
    font-weight: 600;
}

.pp-mood:hover,
.pp-mood.selected {
    border-color: var(--green-dark);
    background: #E7EFE3;
}

.pp-note {
    min-height: 90px;
    margin-bottom: 18px;
}

/* Billing */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.billing-card {
    background: var(--beige);
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
}

.billing-card .amount {
    font-size: 2em;
    font-weight: 700;
    color: var(--green-dark);
}

.billing-card .label {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-top: 4px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green-dark);
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 20px;
    transition: gap 0.2s;
}

.back-link:hover {
    gap: 12px;
}

/* Click hint */
.click-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--green-dark);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 1100px) {
    .pp-dash,
    .pp-progress-grid,
    .pp-profile-grid,
    .pp-profile-extras {
        grid-template-columns: 1fr;
    }

    .pp-dash-main > .tera-progress-section,
    .pp-dash-side > .pp-msg-card {
        flex: none;
    }

    .pp-banner-art {
        display: none;
    }

    .pp-hero {
        padding: 24px 8px 0 28px;
    }

    .pp-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .pp-hero-art {
        width: min(846px, 42%);
    }
}

@media (max-width: 768px) {
    .pp-profile-contact-cols {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .pp-profile-contact-cols > :last-child {
        padding-left: 0;
        border-left: none;
        padding-top: 22px;
        border-top: 1px solid #F0EDE6;
    }

    .app-layout {
        flex-direction: column;
        padding: 10px;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
    }

    .nav-item {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .sidebar-logo, .sidebar-role, .sidebar-footer {
        display: none;
    }

    .sidebar-brand {
        padding: 0;
        margin-bottom: 0;
    }

    .main-content {
        padding: 24px;
    }

    .two-column,
    .stats-grid,
    .materials-grid,
    .billing-summary,
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .demo-buttons {
        flex-direction: column;
    }

    .pp-sidebar {
        width: 220px;
        padding: 20px 14px 16px;
    }

    .pp-help {
        display: none;
    }

    .pp-main {
        padding: 24px 16px 40px;
        max-height: none;
    }

    .pp-hero {
        padding: 20px 8px 0 20px;
    }

    .pp-hero-copy h1 {
        font-size: 1.7em;
    }

    .pp-task {
        flex-wrap: wrap;
    }

    .pp-exercise-list .pp-task {
        grid-template-columns: 52px minmax(0, 1fr);
        min-height: 0;
    }

    .pp-exercise-list .pp-task .pp-btn-start,
    .pp-exercise-list .pp-task .pp-chip {
        grid-column: 2;
        width: auto;
        min-width: 8.4rem;
        justify-self: start;
        margin-left: 0;
    }

    .pp-btn-start,
    .pp-chip {
        margin-left: auto;
    }

    .pp-bubble {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .pp-hero-copy {
        padding-bottom: 20px;
    }

    .pp-hero-art {
        width: min(846px, 48%);
        opacity: 1;
    }
}
