/* =========================================================
   1. DESIGN SYSTEM / RESET
========================================================= */

:root {
    --bg-main: #eef6ff;
    --bg-soft: #f7fbff;
    --bg-card: #ffffff;
    --bg-muted: #f8fafc;
    --bg-blue-soft: #edf6ff;
    --bg-blue-light: #ebf8ff;

    --text-main: #1f2d3d;
    --text-soft: #4a5568;
    --text-muted: #718096;

    --blue: #3182ce;
    --blue-dark: #2b6cb0;
    --blue-deep: #1f4f80;
    --green: #2f855a;
    --green-light: #38a169;
    --red: #b91c1c;
    --red-light: #ffe5e5;
    --orange: #975a16;

    --border: #d9e2ec;
    --border-soft: #edf2f7;
    --border-blue: #bee3f8;

    --shadow-sm: 0 8px 24px rgba(31, 45, 61, 0.07);
    --shadow-md: 0 18px 45px rgba(31, 45, 61, 0.09);
    --shadow-lg: 0 24px 60px rgba(31, 45, 61, 0.12);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --radius-2xl: 32px;

    --container: 1300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(49, 130, 206, 0.13), transparent 34%),
        linear-gradient(to bottom right, #edf7ff 0%, #ffffff 62%, #f7fbff 100%);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select,
textarea,
a {
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}


/* =========================================================
   2. HEADER / NAVIGATION
========================================================= */

header {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    padding: 18px 58px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(217, 226, 236, 0.85);
    box-shadow: 0 6px 24px rgba(31, 45, 61, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.logo:hover {
    transform: scale(1.025);
    opacity: 0.92;
}

.logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.logo span {
    display: inline-block;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1.4px;
    line-height: 1;
    background: linear-gradient(
        to right,
        #4a5568 0%,
        #4a5568 55%,
        #3182ce 55%,
        #3182ce 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-profile,
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile-link {
    color: var(--text-main);
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.user-profile-link:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.nav-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dbeafe;
    background-color: var(--border-soft);
}

.user-name {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-main);
}

.user-email {
    font-size: 13px;
    color: var(--text-muted);
}


/* =========================================================
   3. GLOBAL BUTTONS
========================================================= */

.login-btn,
.start-btn,
.logout-btn,
.add-trip-btn,
.open-trip-btn,
.secondary-btn,
.secondary-small-btn,
.small-action-btn,
.join-trip-btn,
.invite-btn,
.settle-btn,
.form-actions button,
.profile-actions button,
.login-box button,
.register-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
    white-space: nowrap;
}

.login-btn,
.start-btn,
.open-trip-btn,
.settle-btn,
.form-actions button,
.profile-actions button,
.login-box button,
.register-box button {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(49, 130, 206, 0.18);
}

.login-btn:hover,
.start-btn:hover,
.open-trip-btn:hover,
.settle-btn:hover,
.form-actions button:hover,
.profile-actions button:hover,
.login-box button:hover,
.register-box button:hover {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-deep));
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(49, 130, 206, 0.24);
}

.login-btn,
.logout-btn {
    padding: 11px 18px;
    border-radius: var(--radius-md);
}

.logout-btn,
.secondary-btn,
.secondary-small-btn,
.small-action-btn,
.join-trip-btn,
.invite-btn {
    background: var(--bg-blue-soft);
    color: var(--blue-dark);
    border: 1px solid #dbeafe;
}

.logout-btn:hover,
.secondary-btn:hover,
.secondary-small-btn:hover,
.small-action-btn:hover,
.join-trip-btn:hover,
.invite-btn:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

.start-btn {
    padding: 18px 38px;
    border-radius: 17px;
    font-size: 20px;
}

.add-trip-btn {
    background: linear-gradient(135deg, var(--green-light), var(--green));
    color: #ffffff;
    padding: 16px 28px;
    border-radius: 16px;
    font-size: 18px;
    box-shadow: 0 12px 24px rgba(47, 133, 90, 0.16);
}

.add-trip-btn:hover {
    background: linear-gradient(135deg, var(--green), #276749);
    transform: translateY(-1px);
}

.open-trip-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
}

.secondary-btn {
    padding: 16px 26px;
    border-radius: 16px;
}

.secondary-small-btn,
.small-action-btn {
    padding: 10px 16px;
    border-radius: 13px;
    min-height: 42px;
}

.delete-accommodation-btn,
.delete-trip-btn,
.leave-trip-btn,
.remove-image-btn,
.remove-member-btn {
    background: #fff7f7;
    color: var(--red);
    border: 1px solid #fecaca;
    border-radius: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease;
}

.delete-accommodation-btn:hover,
.delete-trip-btn:hover,
.leave-trip-btn:hover,
.remove-image-btn:hover,
.remove-member-btn:hover {
    background: var(--red-light);
    transform: translateY(-1px);
}


/* =========================================================
   4. STARTSEITE
========================================================= */

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 115px 20px 82px;
}

.hero-content {
    max-width: 880px;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 64px);
    margin-bottom: 24px;
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 760px;
    margin: 0 auto 40px;
    font-size: 22px;
    color: var(--text-soft);
    line-height: 1.65;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px 60px 86px;
    flex-wrap: wrap;
}

.feature-card {
    width: 310px;
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.85);
    border-radius: 26px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-card h2 {
    font-size: 25px;
    color: var(--blue-dark);
    margin-bottom: 14px;
    letter-spacing: -0.03em;
}

.feature-card p {
    font-size: 17px;
    color: var(--text-soft);
    line-height: 1.55;
}


/* =========================================================
   5. LOGIN / REGISTRIERUNG / PASSWORT
========================================================= */

.login-container,
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 96px);
    padding: 48px 20px;
}

.login-box,
.register-box {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.8);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-box {
    max-width: 500px;
    padding: 54px;
}

.register-box {
    max-width: 590px;
    padding: 54px;
}

.login-box h1,
.register-box h1 {
    font-size: 44px;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.login-box p,
.register-box p {
    font-size: 18px;
    color: var(--text-soft);
    margin-bottom: 34px;
    line-height: 1.55;
}

.login-box form,
.register-box form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.name-row,
.date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.login-box input,
.register-box input,
.profile-form input,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 17px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.login-box input:focus,
.register-box input:focus,
.profile-form input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.13);
}

.login-box button,
.register-box button {
    padding: 18px;
    border-radius: 16px;
    font-size: 20px;
}

.extra-links {
    margin-top: 28px;
}

.extra-links a {
    color: var(--blue);
    font-weight: 800;
}

.extra-links a:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

.extra-links p {
    margin-top: 18px;
    margin-bottom: 0;
    font-size: 16px;
    color: var(--text-soft);
}


/* =========================================================
   6. MELDUNGEN / FEEDBACK
========================================================= */

.message {
    padding: 15px 18px;
    border-radius: 15px;
    margin-bottom: 22px;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.error-message {
    background: #fff1f1;
    color: var(--red);
    border: 1px solid #fecaca;
}

.success-message {
    background: #e6fffa;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.success-view {
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: #e6fffa;
    color: #047857;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    font-weight: 900;
}

.success-view h1 {
    font-size: 36px;
    margin-bottom: 14px;
}

.success-view p {
    font-size: 18px;
    color: var(--text-soft);
}


/* =========================================================
   7. PROFILBILDER / UPLOADS
========================================================= */

.profile-upload {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.profile-upload label,
.trip-image-upload label {
    cursor: pointer;
    text-align: center;
}

.profile-upload input[type="file"],
.profile-image-edit input[type="file"],
.trip-image-upload input[type="file"] {
    display: none;
}

.profile-preview {
    width: 96px;
    height: 96px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--bg-blue-soft);
    border: 2px dashed #90cdf4;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--blue);
    font-size: 34px;
    font-weight: 900;
    transition: background 0.22s ease, border-color 0.22s ease;
}

.profile-preview:hover {
    background: #e0f2fe;
    border-color: var(--blue);
}

.profile-upload p {
    font-size: 15px;
    color: var(--text-soft);
}


/* =========================================================
   8. PROFILSEITE
========================================================= */

.profile-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 72px 40px 84px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.8);
    border-radius: 30px;
    padding: 46px;
    box-shadow: var(--shadow-lg);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 35px;
}

.profile-large-avatar {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dbeafe;
    background: var(--border-soft);
}

.profile-header h1 {
    font-size: 42px;
    margin-bottom: 8px;
    letter-spacing: -0.05em;
    line-height: 1.06;
}

.profile-header p {
    font-size: 18px;
    color: var(--text-soft);
}

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

.profile-image-edit {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.profile-image-button,
.remove-image-btn {
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 850;
}

.profile-image-button {
    background: var(--bg-blue-soft);
    color: var(--blue-dark);
    border: 1px solid #dbeafe;
}

.profile-image-button:hover {
    background: #dbeafe;
}

.profile-image-edit span {
    color: var(--text-muted);
    font-size: 14px;
}

.profile-section-title {
    margin-top: 12px;
}

.profile-section-title h2 {
    font-size: 24px;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.profile-section-title p {
    font-size: 15px;
    color: var(--text-muted);
}

.profile-actions,
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
}

.profile-actions button,
.form-actions button {
    padding: 16px 26px;
    border-radius: 16px;
    font-size: 18px;
}

/* Konto löschen */
.danger-zone {
    margin-top: 42px;
    padding: 26px;
    border: 1px solid #fecaca;
    border-radius: 24px;
    background: linear-gradient(180deg, #fffafa, #fff7f7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.danger-zone-text h2 {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--red);
    letter-spacing: -0.04em;
}

.danger-zone-text p {
    max-width: 720px;
    color: var(--text-soft);
    line-height: 1.5;
    font-size: 16px;
}

.delete-account-form {
    margin: 0;
    flex-shrink: 0;
}

.delete-account-btn {
    min-width: 190px;
    padding: 14px 20px;
    border-radius: 15px;
    border: 1px solid #fecaca;
    background: #ffffff;
    color: var(--red);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.delete-account-btn:hover {
    background: var(--red-light);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.08);
}


/* =========================================================
   9. DASHBOARD
========================================================= */

.dashboard-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 40px 84px;
}

.dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 42px;
}

.dashboard-top h1,
.trips-section h2 {
    color: var(--text-main);
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.dashboard-top h1 {
    font-size: 44px;
    margin-bottom: 10px;
}

.dashboard-top p {
    font-size: 18px;
    color: var(--text-soft);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.join-trip-btn {
    padding: 16px 28px;
    border-radius: 16px;
    font-size: 18px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.stat-card,
.empty-dashboard,
.trip-card-dashboard {
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.85);
    box-shadow: var(--shadow-md);
}

.stat-card {
    padding: 28px;
    border-radius: 24px;
}

.stat-card h3 {
    font-size: 17px;
    color: var(--text-soft);
    margin-bottom: 14px;
}

.stat-card p {
    font-size: 38px;
    font-weight: 900;
    color: var(--blue);
    letter-spacing: -0.04em;
}

.trips-section h2 {
    font-size: 34px;
    margin-bottom: 24px;
}

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

.trip-card-dashboard {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.trip-card-dashboard:hover,
.clickable-trip-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.clickable-trip-card {
    position: relative;
    cursor: pointer;
}

.trip-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.trip-image,
.trip-content {
    position: relative;
    z-index: 0;
}

.trip-image,
.trip-dashboard-image {
    height: 176px;
    background-size: cover;
    background-position: center;
    object-fit: cover;
    display: block;
    width: 100%;
    background-color: var(--border-soft);
}

.trip-image.mallorca {
    background: linear-gradient(135deg, #90cdf4, var(--blue-dark));
}

.trip-image.amsterdam {
    background: linear-gradient(135deg, #bee3f8, #4a5568);
}

.trip-image.ski {
    background: linear-gradient(135deg, #e2e8f0, var(--blue));
}

.trip-content {
    padding: 26px;
}

.trip-content h3 {
    font-size: 25px;
    margin-bottom: 10px;
    letter-spacing: -0.04em;
    line-height: 1.13;
}

.trip-content p {
    color: var(--text-soft);
    margin-bottom: 8px;
    font-size: 16px;
}

.trip-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.trip-price {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.trip-owner {
    font-size: 14px !important;
    color: var(--text-muted) !important;
}

.open-trip-text {
    color: var(--blue);
    font-weight: 900;
}

.empty-dashboard {
    border-radius: 28px;
    padding: 46px;
    text-align: center;
}

.empty-dashboard h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.empty-dashboard p {
    font-size: 18px;
    color: var(--text-soft);
    line-height: 1.55;
    margin-bottom: 28px;
}

.delete-trip-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.delete-trip-btn {
    padding: 9px 13px;
    font-size: 13px;
}


/* =========================================================
   10. FORMULARSEITEN
========================================================= */

.add-trip-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 40px 84px;
}

.add-trip-card {
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.8);
    border-radius: 30px;
    padding: 46px;
    box-shadow: var(--shadow-lg);
}

.add-trip-header {
    margin-bottom: 36px;
}

.add-trip-header h1 {
    font-size: 44px;
    margin-bottom: 10px;
    letter-spacing: -0.055em;
    line-height: 1.06;
}

.add-trip-header p {
    font-size: 18px;
    color: var(--text-soft);
    line-height: 1.55;
}

.add-trip-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 15px;
    font-weight: 900;
}

.form-group textarea {
    min-height: 112px;
    resize: vertical;
}

.info-box,
.optional-date-box {
    border-radius: 22px;
    padding: 22px;
}

.info-box {
    background: linear-gradient(135deg, var(--bg-blue-light), #f4fbff);
    border: 1px solid var(--border-blue);
}

.info-box h3 {
    font-size: 20px;
    color: var(--blue-dark);
    margin-bottom: 8px;
}

.info-box p,
.optional-date-box p {
    color: var(--text-soft);
    line-height: 1.55;
}

.optional-date-box {
    background: linear-gradient(180deg, #fbfdff, var(--bg-muted));
    border: 1px solid var(--border);
}

.optional-date-box h3 {
    font-size: 21px;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.optional-date-box p {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-blue-light);
    border: 1px solid var(--border-blue);
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    font-weight: 900;
}

.checkbox-row input {
    width: auto;
    transform: scale(1.2);
}


/* =========================================================
   11. REISEBILD UPLOAD
========================================================= */

.trip-image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 18px;
    text-align: center;
}

.trip-image-preview {
    width: 100%;
    max-width: 780px;
    height: 120px;
    margin: 0 auto 10px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--bg-blue-soft), #dbeafe);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px dashed #90cdf4;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--blue);
    font-size: 34px;
    font-weight: 900;
    overflow: hidden;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.trip-image-preview:hover {
    border-color: var(--blue);
    transform: translateY(-1px);
}

.trip-image-upload p {
    font-size: 16px;
    color: var(--text-soft);
    font-weight: 850;
    margin-bottom: 6px;
}

.trip-image-upload small {
    color: var(--text-muted);
    font-size: 14px;
}

.edit-trip-preview {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}


/* =========================================================
   12. REISE DETAILS - LAYOUT
========================================================= */

.trip-details-page {
    max-width: 1340px;
    margin: 0 auto;
    padding: 64px 40px 86px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
}

.trip-details-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 16px;
}

.trip-details-header h1 {
    font-size: clamp(38px, 4vw, 50px);
    margin-bottom: 10px;
    letter-spacing: -0.06em;
    line-height: 1.05;
}

.trip-details-header p {
    font-size: 18px;
    color: var(--text-soft);
    font-weight: 650;
}

.trip-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trip-header-card {
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.85);
    padding: 18px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    min-width: 190px;
}

.trip-header-card span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 750;
}

.trip-header-card strong {
    font-size: 18px;
    font-weight: 900;
}

.edit-trip-btn {
    background: var(--bg-blue-soft);
    color: var(--blue-dark);
    border: 1px solid #dbeafe;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 900;
    white-space: nowrap;
    transition: transform 0.22s ease, background 0.22s ease;
}

.edit-trip-btn:hover {
    background: #dbeafe;
    transform: translateY(-1px);
}

.trip-overview-grid,
.trip-side-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trip-main-card,
.side-card {
    background: var(--bg-card);
    border: 1px solid rgba(217, 226, 236, 0.82);
    border-radius: 30px;
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.section-title-row h2,
.side-card h2 {
    font-size: 27px;
    margin-bottom: 8px;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.section-title-row p {
    max-width: 560px;
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 15px;
}

.empty-state,
.activity-placeholder {
    background: linear-gradient(180deg, #fbfdff 0%, var(--bg-muted) 100%);
    border: 1px dashed #b8c7d9;
    border-radius: 22px;
    padding: 26px;
}

.empty-state h3,
.activity-placeholder h3 {
    font-size: 21px;
    margin-bottom: 10px;
    letter-spacing: -0.03em;
}

.empty-state p,
.activity-placeholder p {
    color: var(--text-soft);
    line-height: 1.5;
}

.trip-message {
    grid-column: 1 / -1;
    margin-bottom: 0;
}


/* =========================================================
   13. KOSTENÜBERSICHT / SIDEBAR
========================================================= */

.cost-section-label {
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.cost-section-label:first-of-type {
    margin-top: 8px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-soft);
}

.cost-row span {
    color: var(--text-soft);
    font-size: 15px;
}

.cost-row strong {
    color: var(--text-main);
    text-align: right;
    font-size: 15px;
    font-weight: 900;
}

.cost-row-total {
    margin: 14px 0 6px;
    padding: 16px;
    border: 1px solid var(--border-blue);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--bg-blue-light), #f4fbff);
}

.cost-row-total span,
.cost-row-total strong {
    color: var(--text-main);
    font-size: 17px;
    font-weight: 950;
}

.settle-btn {
    width: 100%;
    margin-top: 22px;
    padding: 15px;
    border-radius: 17px;
    font-size: 17px;
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border-radius: 16px;
}

.member-item img {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-soft);
    border: 2px solid #dbeafe;
}

.member-item strong {
    display: block;
    font-size: 15px;
    font-weight: 900;
}

.member-item span {
    display: inline-block;
    margin-top: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--border-soft);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 850;
}

.member-item-clickable {
    color: inherit;
    transition: transform 0.22s ease, background 0.22s ease;
}

.member-item-clickable:hover {
    background: var(--bg-blue-soft);
    transform: translateY(-1px);
}

.member-connection-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 850;
}

.member-connection-link:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

.invite-btn,
.manage-members-btn {
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 14px;
    text-align: center;
}

/* Sidebar-Aktionsbuttons */
.invite-btn,
.manage-members-btn,
.leave-trip-btn {
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 900;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.invite-btn,
.manage-members-btn {
    margin-top: 16px;
}

.leave-trip-form {
    margin-top: 18px;
    width: 100%;
}

.leave-trip-btn {
    white-space: normal;
}


/* =========================================================
   14. UNTERKÜNFTE / KARTEN
========================================================= */

.accommodation-list,
.connection-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.accommodation-card,
.connection-card {
    background: linear-gradient(180deg, #fbfdff 0%, var(--bg-muted) 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.accommodation-card:hover,
.connection-card:hover {
    border-color: #c7d7ea;
    box-shadow: 0 12px 28px rgba(31, 45, 61, 0.06);
}

.accommodation-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.accommodation-card h3,
.connection-title-row h3 {
    font-size: 24px;
    margin-bottom: 7px;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.accommodation-card p,
.connection-card p {
    color: var(--text-soft);
    margin-bottom: 14px;
    line-height: 1.45;
}

.accommodation-date {
    display: inline-block;
    background: var(--bg-blue-soft);
    border: 1px solid var(--border);
    color: #3f5168;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 16px;
}

.accommodation-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 18px 0;
}

.accommodation-meta span {
    background: rgba(237, 242, 247, 0.78);
    border: 1px solid rgba(217, 226, 236, 0.88);
    border-radius: 15px;
    padding: 10px 12px;
    color: var(--text-soft);
    line-height: 1.35;
    font-size: 14px;
}

.accommodation-meta strong {
    display: block;
    margin-top: 3px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 950;
}

.accommodation-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.accommodation-link {
    display: inline-flex;
    margin-top: 0;
}

.delete-accommodation-form {
    margin: 0;
}

.delete-accommodation-btn {
    min-height: 42px;
    padding: 10px 16px;
}


/* =========================================================
   15. VERBINDUNGEN
========================================================= */

.connection-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.connection-title-row .connection-icon,
.connection-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--bg-blue-light), #e0f2fe);
    border: 1px solid #dbeafe;
    color: var(--blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(49, 130, 206, 0.10);
}

.connection-title-row span {
    color: var(--text-muted);
    font-weight: 850;
}

.connection-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--bg-blue-light);
    border: 1px solid var(--border-blue);
    border-radius: 22px;
    padding: 22px;
}

.connection-preview h3 {
    font-size: 21px;
    margin-bottom: 6px;
}


/* =========================================================
   16. AUSWAHLLISTEN / KOSTENARTEN
========================================================= */

.connection-member-select-list,
.cost-mode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.connection-member-option,
.cost-mode-option,
.transfer-owner-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.cost-mode-option {
    align-items: flex-start;
    padding: 17px;
}

.connection-member-option:hover,
.cost-mode-option:hover,
.transfer-owner-option:hover {
    border-color: var(--blue);
    background: var(--bg-blue-light);
    transform: translateY(-1px);
}

.connection-member-option input,
.cost-mode-option input,
.transfer-owner-option input {
    width: auto;
    flex-shrink: 0;
}

.cost-mode-option input {
    margin-top: 4px;
}

.connection-member-option img,
.transfer-owner-option img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-soft);
    border: 2px solid #dbeafe;
}

.connection-member-option span,
.cost-mode-option strong {
    font-weight: 900;
}

.cost-mode-option span {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
    margin-top: 4px;
}


/* =========================================================
   17. AKTIVITÄTEN
========================================================= */

.activity-vote-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.activity-vote-actions form {
    margin: 0;
}

.activity-vote-btn {
    border: none;
    background: var(--border-soft);
    color: #2d3748;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
}

.activity-vote-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.activity-vote-btn.active {
    background: linear-gradient(135deg, var(--green-light), var(--green));
    color: white;
    box-shadow: 0 10px 20px rgba(56, 161, 105, 0.18);
}

.activity-vote-btn.active-no {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    box-shadow: 0 10px 20px rgba(229, 62, 62, 0.15);
}


/* =========================================================
   18. ZAHLUNGEN / ABRECHNUNG
========================================================= */

.payment-info-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, var(--bg-muted));
    border: 1px solid #e2e8f0;
}

.payment-info-box h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.payment-info-box p {
    margin: 6px 0;
    color: var(--text-soft);
    font-size: 15px;
}

.settlement-status {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 950;
}

.settlement-status-open {
    background: var(--border-soft);
    color: #2d3748;
}

.settlement-status-paid {
    background: #fff7ed;
    color: var(--orange);
}

.settlement-status-confirmed {
    background: #e6fffa;
    color: #047857;
}

.settlement-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 14px;
}


/* =========================================================
   19. EINLADUNGEN
========================================================= */

.invite-token-box,
.invite-management-box {
    background: linear-gradient(135deg, var(--bg-blue-light), #f4fbff);
    border: 1px solid var(--border-blue);
    border-radius: 22px;
    padding: 22px;
}

.invite-token-box {
    margin-top: 18px;
    text-align: center;
}

.invite-token-box span {
    display: block;
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.invite-token-box strong {
    display: block;
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.invite-token-box p,
.invite-management-box p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.45;
}

.invite-management-box {
    margin: 28px 0;
}

.invite-management-box h2 {
    font-size: 24px;
    margin-bottom: 8px;
}


/* =========================================================
   20. MITGLIEDER VERWALTEN
========================================================= */

.manage-members-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 28px;
}

.manage-member-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.manage-member-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.manage-member-info img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-soft);
    border: 2px solid #dbeafe;
    flex-shrink: 0;
}

.manage-member-info strong {
    display: block;
    font-size: 17px;
    font-weight: 900;
}

.manage-member-info span,
.member-stay-period {
    color: var(--text-muted);
    font-size: 14px;
}

.member-stay-period {
    display: block;
    margin-top: 4px;
}

.manage-member-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.manage-member-actions form {
    margin: 0;
}

.small-role-btn {
    border: none;
    background: var(--bg-blue-soft);
    color: var(--blue-dark);
    padding: 10px 13px;
    border-radius: 13px;
    font-weight: 900;
    cursor: pointer;
}

.small-role-btn:hover {
    background: #dbeafe;
}

.admin-transfer-btn {
    background: var(--bg-blue-light);
}

.admin-note {
    color: var(--text-muted);
    font-weight: 900;
}

.invite-stay-box {
    margin-bottom: 18px;
}


/* =========================================================
   21. ADMIN ÜBERTRAGEN / REISE VERLASSEN
========================================================= */

.transfer-owner-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
}

.transfer-owner-option img {
    width: 48px;
    height: 48px;
}

.transfer-owner-option strong {
    display: block;
    font-weight: 900;
    font-size: 16px;
}

.transfer-owner-option span {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
}

.leave-trip-form {
    margin-top: 18px;
}

.leave-trip-btn {
    width: 100%;
    padding: 13px 16px;
}


/* =========================================================
   22. FOOTER
========================================================= */

footer,
.site-footer {
    width: 100%;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
}

footer {
    padding: 25px;
    margin-top: 40px;
    font-size: 15px;
}

.site-footer {
    padding: 28px 20px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 60px;
}

.site-footer p {
    margin: 0;
}


/* =========================================================
   23. RESPONSIVE - TABLET
========================================================= */

@media (max-width: 1050px) {
    .trip-details-page {
        grid-template-columns: 1fr;
    }

    .trip-side-panel {
        order: 2;
    }
}

@media (max-width: 1000px) {
    .dashboard-stats,
    .trip-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    header {
        padding: 18px 24px;
    }

    nav {
        gap: 20px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
    }
}


/* =========================================================
   24. RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 700px) {
    header {
        padding: 12px 18px;
    }

    header nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .logo {
        gap: 4px;
        flex-shrink: 0;
    }

    .logo img {
        width: 34px;
        height: 34px;
    }

    .logo span {
        font-size: 26px;
        letter-spacing: -0.7px;
    }

    .user-menu {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .user-profile-link {
        gap: 0;
    }

    .nav-avatar {
        width: 34px;
        height: 34px;
    }

    .user-name {
        display: none;
    }

    .logout-btn {
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 14px;
    }

    .hero {
        padding: 82px 20px 62px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 16px;
    }

    .features {
        padding: 30px 20px 62px;
    }

    .feature-card {
        width: 100%;
    }

    .dashboard-page,
    .add-trip-page,
    .profile-page {
        padding: 46px 20px 64px;
    }

    .dashboard-top h1,
    .add-trip-header h1,
    .profile-header h1 {
        font-size: 34px;
    }

    .dashboard-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .join-trip-btn,
    .add-trip-btn,
    .small-action-btn,
    .form-actions button,
    .secondary-btn,
    .profile-actions button {
        width: 100%;
        text-align: center;
    }

    .trip-details-page {
        padding: 44px 20px 64px;
        gap: 22px;
    }

    .trip-details-header {
        flex-direction: column;
        align-items: stretch;
    }

    .trip-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trip-header-card,
    .edit-trip-btn {
        width: 100%;
    }

    .trip-details-header h1 {
        font-size: 34px;
    }

    .trip-main-card,
    .side-card,
    .add-trip-card,
    .profile-card,
    .login-box,
    .register-box {
        padding: 24px;
        border-radius: 24px;
    }

    .section-title-row {
        flex-direction: column;
        gap: 14px;
    }

    .accommodation-card,
    .connection-card {
        padding: 20px;
        border-radius: 20px;
    }

    .accommodation-title-row,
    .profile-header,
    .profile-actions,
    .form-actions,
    .manage-member-card {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-header {
        text-align: center;
        align-items: center;
    }

    .accommodation-meta {
        grid-template-columns: 1fr;
    }

    .accommodation-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .accommodation-actions a,
    .delete-accommodation-form,
    .delete-accommodation-btn {
        width: 100%;
        text-align: center;
    }

    .manage-member-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .small-role-btn {
        width: 100%;
    }

    .date-row,
    .name-row {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .date-row .form-group {
        width: 100%;
        min-width: 0;
    }

    input[type="date"],
    input[type="datetime-local"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: block;
        -webkit-appearance: none;
        appearance: none;
        background-color: #ffffff;
        color: var(--text-main);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 18px;
        font-size: 17px;
    }

    .secondary-small-btn,
    .small-action-btn,
    .delete-accommodation-btn,
    .delete-account-btn,
    .accommodation-actions button,
    .accommodation-actions a {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
    }

    .accommodation-actions {
        width: 100%;
        gap: 12px;
    }

    .connection-card,
    .accommodation-card,
    .optional-date-box,
    .info-box {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .checkbox-row {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        align-items: center;
    }

    .danger-zone {
        flex-direction: column;
        align-items: stretch;
        padding: 22px;
    }

    .delete-account-btn {
        width: 100%;
    }

}


/* =========================================================
   MOBILE APP LAYOUT - Header
========================================================= */
@media (max-width: 420px) {
    .logo span {
        font-size: 24px;
    }

    .logout-btn {
        font-size: 13px;
        padding: 8px 9px;
    }

    .trip-details-page,
    .dashboard-page,
    .add-trip-page,
    .profile-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .trip-main-card,
    .side-card,
    .add-trip-card,
    .profile-card,
    .login-box,
    .register-box {
        padding: 22px;
    }
}

/* =========================================================
   MOBILE APP LAYOUT - DASHBOARD / TRIP DETAILS / SETTLEMENT
========================================================= */

/* Mobile-Elemente auf Desktop ausblenden */
.mobile-trip-list-wrapper,
.mobile-trip-summary,
.mobile-trip-jumpnav,
.settlement-mobile-summary {
    display: none;
}

/* Dashboard Geldfarben */
.dashboard-money-debt {
    color: #b91c1c !important;
}

.dashboard-money-receivable {
    color: #047857 !important;
}

.dashboard-money-balanced {
    color: #2b6cb0 !important;
}

/* =========================================================
   HANDY LAYOUT
========================================================= */

@media (max-width: 700px) {

    /* -----------------------------------------------------
       Allgemein
    ----------------------------------------------------- */

    main {
        overflow-x: hidden;
    }

    .dashboard-page,
    .trip-details-page,
    .settlement-page {
        padding-top: 28px;
        padding-bottom: 56px;
    }

    .add-trip-card,
    .profile-card,
    .trip-main-card,
    .side-card,
    .settlement-card {
        padding: 18px;
        border-radius: 22px;
    }

    .connection-card,
    .accommodation-card,
    .optional-date-box,
    .info-box {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    /* -----------------------------------------------------
       Dashboard Mobile-Liste
    ----------------------------------------------------- */

    .desktop-trip-card {
        display: none;
    }

    .mobile-trip-list-wrapper {
        display: block;
        width: 100%;
        padding: 13px;
        background: var(--bg-card);
        border: 1px solid rgba(217, 226, 236, 0.9);
        border-radius: 19px;
        box-shadow: 0 10px 28px rgba(31, 45, 61, 0.07);
    }

    .trip-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .dashboard-top {
        gap: 18px;
        margin-bottom: 22px;
    }

    .dashboard-top h1 {
        font-size: 29px;
        line-height: 1.08;
        margin-bottom: 8px;
    }

    .dashboard-top p {
        font-size: 15px;
        line-height: 1.45;
    }

    .dashboard-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 28px;
    }

    .stat-card {
        padding: 13px 8px;
        border-radius: 17px;
        text-align: center;
    }

    .stat-card h3 {
        font-size: 11px;
        line-height: 1.2;
        margin-bottom: 7px;
    }

    .stat-card p {
        font-size: 22px;
        line-height: 1;
    }

    .trips-section h2 {
        font-size: 26px;
        margin-bottom: 14px;
    }

    .mobile-trip-list-item {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 13px;
        width: 100%;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        color: var(--text-main);
    }

    .mobile-trip-list-item:active {
        transform: scale(0.985);
    }

    .mobile-trip-image {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        overflow: hidden;
        background: var(--border-soft);
        flex-shrink: 0;
    }

    .mobile-trip-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-trip-info {
        min-width: 0;
    }

    .mobile-trip-title-row {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        margin-bottom: 3px;
    }

    .mobile-trip-title-row h3 {
        min-width: 0;
        font-size: 17px;
        line-height: 1.15;
        font-weight: 950;
        letter-spacing: -0.035em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-trip-badge {
        flex-shrink: 0;
        padding: 3px 7px;
        border-radius: 999px;
        background: var(--border-soft);
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 900;
    }

    .mobile-trip-info p {
        margin: 0 0 6px;
        color: var(--text-soft);
        font-size: 13px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-trip-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 9px;
        margin-bottom: 8px;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-trip-money {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 8px 10px;
        border-radius: 13px;
        background: rgba(237, 242, 247, 0.78);
        border: 1px solid rgba(217, 226, 236, 0.85);
    }

    .mobile-trip-money span {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 850;
    }

    .mobile-trip-money strong {
        font-size: 12px;
        line-height: 1.25;
        font-weight: 950;
    }

    .mobile-trip-arrow {
        color: var(--text-muted);
        font-size: 28px;
        line-height: 1;
        font-weight: 300;
    }

    .mobile-delete-trip-form {
        margin-top: 10px;
        display: flex;
        justify-content: flex-end;
    }

    .mobile-delete-trip-form .delete-trip-btn {
        position: static;
        width: auto;
        max-width: max-content;
        min-width: 0;
        min-height: auto;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(185, 28, 28, 0.04);
        border: 1px solid rgba(185, 28, 28, 0.14);
        color: rgba(185, 28, 28, 0.72);
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        box-shadow: none;
    }

    .mobile-delete-trip-form .delete-trip-btn:hover,
    .mobile-delete-trip-form .delete-trip-btn:active {
        background: rgba(185, 28, 28, 0.08);
        border-color: rgba(185, 28, 28, 0.22);
        color: rgba(185, 28, 28, 0.9);
        transform: none;
    }

    /* -----------------------------------------------------
       Trip Details Mobile
    ----------------------------------------------------- */

    .trip-details-page {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .trip-details-header {
        margin-bottom: 0;
    }

    .trip-details-header h1 {
        font-size: 30px;
        line-height: 1.08;
    }

    .trip-details-header p {
        font-size: 15px;
        line-height: 1.4;
    }

    .mobile-trip-summary {
        display: block;
        background: var(--bg-card);
        border: 1px solid rgba(217, 226, 236, 0.9);
        border-radius: 22px;
        padding: 18px;
        box-shadow: var(--shadow-md);
    }

    .mobile-trip-summary h2 {
        font-size: 22px;
        letter-spacing: -0.04em;
        margin-bottom: 14px;
    }

    .mobile-summary-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        padding: 14px;
        border-radius: 17px;
        background: linear-gradient(135deg, var(--bg-blue-light), #f4fbff);
        border: 1px solid var(--border-blue);
        margin-bottom: 12px;
    }

    .mobile-summary-total span {
        color: var(--text-soft);
        font-size: 13px;
        font-weight: 850;
    }

    .mobile-summary-total strong {
        color: var(--text-main);
        font-size: 20px;
        font-weight: 950;
        white-space: nowrap;
    }

    .mobile-summary-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .mobile-summary-box {
        padding: 12px;
        border-radius: 15px;
        background: rgba(237, 242, 247, 0.78);
        border: 1px solid rgba(217, 226, 236, 0.88);
    }

    .mobile-summary-box span {
        display: block;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 850;
        margin-bottom: 5px;
    }

    .mobile-summary-box strong {
        color: var(--text-main);
        font-size: 15px;
        font-weight: 950;
    }

    /* Reihenfolge:
       oben: Private Kosten / Gemeinsame Kosten
       unten: Du schuldest / Dir schulden
    */
    .mobile-summary-grid .mobile-summary-box:nth-child(3) {
        order: 1;
    }

    .mobile-summary-grid .mobile-summary-box:nth-child(4) {
        order: 2;
    }

    .mobile-summary-grid .mobile-summary-box:nth-child(1) {
        order: 3;
    }

    .mobile-summary-grid .mobile-summary-box:nth-child(2) {
        order: 4;
    }

    .mobile-summary-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-trip-jumpnav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 0 4px;
        scrollbar-width: none;
    }

    .mobile-trip-jumpnav::-webkit-scrollbar {
        display: none;
    }

    .mobile-trip-jumpnav a {
        flex: 0 0 auto;
        padding: 10px 13px;
        border-radius: 999px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        color: var(--text-soft);
        font-size: 13px;
        font-weight: 900;
        box-shadow: var(--shadow-sm);
    }

    .desktop-cost-card {
        display: none;
    }

    .trip-overview-grid,
    .trip-side-panel {
        gap: 14px;
    }

    .section-title-row {
        margin-bottom: 16px;
    }

    .section-title-row h2,
    .side-card h2 {
        font-size: 23px;
    }

    .section-title-row p {
        font-size: 14px;
        line-height: 1.4;
    }

    /* -----------------------------------------------------
       Settle Costs Mobile
    ----------------------------------------------------- */

    .settlement-card .add-trip-header {
        margin-bottom: 18px;
    }

    .settlement-card .add-trip-header h1 {
        font-size: 30px;
        line-height: 1.08;
    }

    .settlement-card .add-trip-header p {
        font-size: 15px;
        line-height: 1.45;
    }

    .settlement-mobile-summary {
        display: block;
        margin-bottom: 14px;
        padding: 16px;
        border-radius: 20px;
        background: var(--bg-card);
        border: 1px solid rgba(217, 226, 236, 0.9);
        box-shadow: var(--shadow-md);
    }

    .settlement-mobile-summary h2 {
        font-size: 21px;
        margin-bottom: 13px;
        letter-spacing: -0.04em;
    }

    .settlement-summary-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    /* In der Settle-Übersicht nur diese zwei Werte anzeigen:
       Du schuldest offen / Dir schulden offen
       Die Felder "Von dir gesendet" und "An dich gesendet" werden ausgeblendet.
    */
    .settlement-summary-grid .settlement-summary-box:nth-child(2),
    .settlement-summary-grid .settlement-summary-box:nth-child(4) {
        display: none;
    }

    .settlement-summary-box {
        padding: 11px;
        border-radius: 15px;
        background: rgba(237, 242, 247, 0.78);
        border: 1px solid rgba(217, 226, 236, 0.88);
    }

    .settlement-summary-box span {
        display: block;
        margin-bottom: 5px;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 850;
        line-height: 1.25;
    }

    .settlement-summary-box strong {
        display: block;
        color: var(--text-main);
        font-size: 15px;
        font-weight: 950;
        line-height: 1.2;
    }

    .settlement-summary-box-danger strong {
        color: var(--red);
    }

    .settlement-summary-box-success strong {
        color: #047857;
    }

    /* -----------------------------------------------------
       Karten kompakter
    ----------------------------------------------------- */

    .accommodation-list,
    .connection-list {
        gap: 12px;
    }

    .accommodation-card,
    .connection-card {
        padding: 15px;
        border-radius: 18px;
    }

    .connection-title-row {
        gap: 11px;
        margin-bottom: 10px;
    }

    .connection-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 14px;
        font-size: 21px;
    }

    .connection-title-row h3,
    .accommodation-title-row h3 {
        font-size: 18px;
        line-height: 1.18;
        letter-spacing: -0.03em;
    }

    .connection-title-row span {
        font-size: 13px;
        line-height: 1.3;
    }

    .payment-info-box {
        padding: 13px;
        border-radius: 15px;
    }

    .payment-info-box h4 {
        font-size: 15px;
    }

    .payment-info-box p {
        font-size: 13px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .accommodation-meta {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 11px 0;
    }

    .accommodation-meta span {
        padding: 9px 10px;
        border-radius: 13px;
        font-size: 12px;
    }

    .accommodation-meta strong {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .checkbox-row {
        padding: 12px;
        border-radius: 15px;
        font-size: 14px;
        white-space: normal;
    }

    .settlement-status {
        font-size: 11px;
        padding: 6px 9px;
        white-space: nowrap;
    }

    .settlement-note {
        font-size: 13px;
        line-height: 1.4;
    }

    .info-box {
        padding: 14px;
        border-radius: 17px;
    }

    .info-box h3 {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .info-box p {
        font-size: 13px;
        line-height: 1.4;
    }

    /* -----------------------------------------------------
       Buttons sicher innerhalb der Karten
    ----------------------------------------------------- */

    .accommodation-actions,
    .form-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .accommodation-actions button,
    .accommodation-actions a,
    .form-actions a,
    .form-actions button,
    .secondary-small-btn,
    .secondary-btn,
    .small-action-btn,
    .open-trip-btn,
    .delete-accommodation-btn,
    .delete-account-btn,
    .settle-btn,
    .invite-btn,
    .manage-members-btn,
    .leave-trip-btn {
        width: 100%;
        max-width: 100%;
        min-height: 42px;
        padding: 11px 13px;
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        font-size: 14px;
    }

    .mobile-delete-trip-form .delete-trip-btn {
        width: auto;
        max-width: max-content;
        min-height: auto;
        padding: 6px 10px;
        font-size: 12px;
    }

    form {
        max-width: 100%;
    }

    .accommodation-title-row {
        gap: 8px;
        align-items: flex-start;
    }
}




/* =========================================================
   STARTSEITE MOBILE: kompakteres Layout
========================================================= */

@media (max-width: 700px) {
    .hero {
        padding: 44px 18px 30px;
        min-height: auto;
        align-items: flex-start;
    }

    .hero-content {
        max-width: 100%;
        text-align: left;
    }

    .hero h1 {
        font-size: 31px;
        line-height: 1.08;
        letter-spacing: -0.055em;
        margin-bottom: 14px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.45;
        margin: 0 0 22px;
        max-width: 100%;
    }

    .start-btn {
        width: 100%;
        min-height: 48px;
        padding: 13px 18px;
        border-radius: 15px;
        font-size: 16px;
    }

    .features {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 18px 44px;
    }

    .feature-card {
        width: 100%;
        padding: 18px;
        border-radius: 20px;
        text-align: left;
        box-shadow: 0 10px 28px rgba(31, 45, 61, 0.07);
    }

    .feature-card:hover {
        transform: none;
    }

    .feature-card h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .feature-card p {
        font-size: 14px;
        line-height: 1.4;
    }
}



/* =========================================================
   DASHBOARD: Mobile Listenansicht
========================================================= */

.dashboard-trip-money {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px;
}

.dashboard-money-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 11px 13px;
    border-radius: 15px;
    background: rgba(237, 242, 247, 0.78);
    border: 1px solid rgba(217, 226, 236, 0.88);
}

.dashboard-money-row span {
    color: #718096;
    font-size: 14px;
    font-weight: 850;
}

.dashboard-money-row strong {
    color: #1f2d3d;
    font-size: 15px;
    font-weight: 950;
    text-align: right;
}

.dashboard-money-row-open {
    background: #f8fafc;
}

.dashboard-money-debt {
    color: #b91c1c !important;
}

.dashboard-money-receivable {
    color: #047857 !important;
}

.dashboard-money-balanced {
    color: #2b6cb0 !important;
}

.mobile-trip-list-wrapper {
    display: none;
}

/* =========================================================
   DASHBOARD MOBILE
========================================================= */

@media (max-width: 700px) {
    .dashboard-page {
        padding-top: 30px;
        padding-bottom: 56px;
    }

    .dashboard-top {
        gap: 18px;
        margin-bottom: 28px;
    }

    .dashboard-top h1 {
        font-size: 29px;
        line-height: 1.08;
        margin-bottom: 8px;
    }

    .dashboard-top p {
        font-size: 15px;
        line-height: 1.45;
    }

    .dashboard-actions {
        gap: 10px;
    }

    .add-trip-btn,
    .join-trip-btn {
        min-height: 46px;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 14px;
    }

    /* Statistik-Kacheln auf Handy ausblenden */
    body .dashboard-page .dashboard-stats {
        display: none !important;
    }

    .trips-section h2 {
        font-size: 26px;
        margin-bottom: 14px;
    }

    .trip-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .desktop-trip-card {
        display: none;
    }

    .mobile-trip-list-wrapper {
        display: block;
    }

    .mobile-trip-list-item {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 13px;
        width: 100%;
        padding: 13px;
        background: var(--bg-card);
        border: 1px solid rgba(217, 226, 236, 0.9);
        border-radius: 19px;
        box-shadow: 0 10px 28px rgba(31, 45, 61, 0.07);
        color: var(--text-main);
        transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    }

    .mobile-trip-list-item:active {
        transform: scale(0.985);
    }

    .mobile-trip-image {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        overflow: hidden;
        background: var(--border-soft);
        flex-shrink: 0;
    }

    .mobile-trip-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .mobile-trip-info {
        min-width: 0;
    }

    .mobile-trip-title-row {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        margin-bottom: 3px;
    }

    .mobile-trip-title-row h3 {
        min-width: 0;
        font-size: 17px;
        line-height: 1.15;
        font-weight: 950;
        letter-spacing: -0.035em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-trip-badge {
        flex-shrink: 0;
        padding: 3px 7px;
        border-radius: 999px;
        background: var(--border-soft);
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 900;
    }

    .mobile-trip-info p {
        margin: 0 0 6px;
        color: var(--text-soft);
        font-size: 13px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-trip-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 9px;
        margin-bottom: 8px;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-trip-money {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 8px 10px;
        border-radius: 13px;
        background: rgba(237, 242, 247, 0.78);
        border: 1px solid rgba(217, 226, 236, 0.85);
    }

    .mobile-trip-money span {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 850;
    }

    .mobile-trip-money strong {
        font-size: 12px;
        line-height: 1.25;
        font-weight: 950;
    }

    .mobile-trip-arrow {
        color: var(--text-muted);
        font-size: 28px;
        line-height: 1;
        font-weight: 300;
    }

    .mobile-delete-trip-form {
        margin-top: 8px;
        display: flex;
        justify-content: flex-end;
    }

    .mobile-delete-trip-form .delete-trip-btn {
        width: auto;
        min-width: 0;
        min-height: auto;
        padding: 6px 10px;
        border-radius: 999px;
        background: rgba(185, 28, 28, 0.04);
        border: 1px solid rgba(185, 28, 28, 0.14);
        color: rgba(185, 28, 28, 0.72);
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        box-shadow: none;
    }

    .mobile-delete-trip-form .delete-trip-btn:hover,
    .mobile-delete-trip-form .delete-trip-btn:active {
        background: rgba(185, 28, 28, 0.08);
        border-color: rgba(185, 28, 28, 0.22);
        color: rgba(185, 28, 28, 0.9);
        transform: none;
    }
}