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

body {
    font-family: 'DM Sans', Arial, sans-serif;
    background: #1a1a1a;
    color: #d0d0d0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Rahmen strukturell ── */
.page-wrap { margin-top: 60px; flex: 1; display: flex; flex-direction: column; }
.frame-row { flex: 1; display: flex; flex-direction: row; }

.frame-side {
    width: 20px; flex-shrink: 0;
    background: #111; transition: background 0.4s;
}
body.logged-in .frame-side { background: rgba(192,200,208,0.12); }

.frame-bottom { height: 20px; background: #111; transition: background 0.4s; }
body.logged-in .frame-bottom { background: rgba(192,200,208,0.12); }

.content-area {
    flex: 1; background: #1a1a1a;
    display: flex; flex-direction: column;
    gap: 16px; padding: 10px 0;
}

/* ── Cards (Spiegel/Glas) ── */
.card-title {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
}

.card-title::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.01) 50%, rgba(255,255,255,0.04) 100%);
    pointer-events: none;
}

.card-text {
  
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 36px 48px 44px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
     
}

.card-text::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
}

/* Card 1 links */
.card-title-left { display: flex; flex-direction: column; gap: 12px; }

.paw-icon {
    width: 56px; height: 56px;
    opacity: 0; animation: up 0.6s ease 0.1s forwards;
}

.hero-eyebrow {
    font-size: 12px; font-weight: 500;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: #c0c8d0;
    opacity: 0; animation: up 0.6s ease 0.25s forwards;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(64px, 11vw, 130px);
    line-height: 0.9;
    background: linear-gradient(135deg, #ff9f43 0%, #ff7a18 50%, #ffd6a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0; animation: up 0.6s ease 0.4s forwards;
    position: relative;
}



/* Card 1 rechts: Logo */
.card-title-right {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: flex-end;
    opacity: 0; animation: up 0.6s ease 0.5s forwards;
}
.card-title-right img {
    height: clamp(200px, 17vw, 210px);
    width: auto; object-fit: contain;
    border-radius: 14px;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
}

.card-title::after {
    content: "";
    position: absolute;
    right: -80px; top: -60px;
    width: 380px; height: 380px;
    /*background: url('../img/pawgress_logo.png') no-repeat center/contain;*/
    opacity: 1;
    pointer-events: none;
}

/* Card 2 */
.hero-sub {
    font-size: clamp(15px, 1.6vw, 18px); line-height: 1.85;
    color: #888; font-weight: 300; max-width: 600px; margin-bottom: 36px;
    opacity: 0; animation: up 0.6s ease 0.6s forwards;
}
.hero-sub strong { color: #c0c8d0; font-weight: 500; }

.hero-cta { opacity: 0; animation: up 0.6s ease 0.75s forwards; }

.btn-primary {
    display: inline-flex; align-items: center;
    padding: 14px 36px;
    background: rgba(192,200,208,0.15);
    color: #e8eaec;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
    border: 1px solid rgba(192,200,208,0.35);
    border-radius: 50px; cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 16px rgba(0,0,0,0.3);
}
.btn-primary:hover {
    background: rgba(192,200,208,0.25);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 24px rgba(0,0,0,0.4);
}

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


/* ── Auth Card ── */
.card-auth {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px 48px 40px;
    display: none;
    animation: up 0.4s ease forwards;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative; overflow: hidden;
    overflow-y: auto;
}
.card-auth::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
}
.card-auth.visible { display: block; }

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,0.08);
}
.auth-tab {
    padding: 9px 24px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
    background: rgba(192,200,208,0.18);
    color: #e0e4e8;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.auth-tab:not(.active):hover { color: #aaa; }

/* Formulare */
.auth-form { display: block; }
.auth-form.hidden { display: none; }

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}
.fields-grid .field-group { margin-bottom: 0; }

.field-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field-group input {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 11px 16px;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
}
.field-group input:focus {
    border-color: rgba(192,200,208,0.5);
    box-shadow: 0 0 0 3px rgba(192,200,208,0.08);
}
.field-group input::placeholder { color: #3a3a3a; }



.field-group option {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 11px 16px;
    color: #0b0a0a;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
}
.field-group option:focus {
    border-color: rgba(192,200,208,0.5);
    box-shadow: 0 0 0 3px rgba(192,200,208,0.08);
}
.field-group option::placeholder { color: #3a3a3a; }








/* Aktionszeile */
.auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-ghost {
    padding: 13px 24px;
    background: transparent;
    color: #555;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 50px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); color: #aaa; }

.auth-success {
    margin-top: 14px;
    font-size: 13px;
    color: #ff9f43;
    display: none;
    line-height: 1.5;
}

.auth-success.visible {
    
    display: block;
    animation: up 0.3s ease forwards;
}

/* Fehlermeldung */
.auth-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-bottom: 16px;
    min-height: 0;
    display: none;
}
.auth-error.visible {
    display: block;
    animation: up 0.3s ease forwards;
    opacity : 1;
}


body.logged-in #hero-cta { display: none; }

/* ── Goals Card ── */
.card-goals {
    display: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px 48px;
    animation: up 0.5s ease forwards;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative; overflow: hidden;
}
.card-goals::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
}
body.logged-in .card-goals { display: block; }

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

.goal-tile {
    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    padding: 32px 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.goal-tile::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.goal-tile:hover {
    border-color: rgba(192,200,208,0.35);
    background: rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 4px 20px rgba(0,0,0,0.3);
}

.goal-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
      color: var(--text-muted);
    transition: transform 0.25s;
}
.goal-icon svg { width: 100%; height: 100%; }
.goal-tile:hover .goal-icon { transform: scale(1.12); color: var(--color-accent); }

.goal-label {
    font-size: 13px; font-weight: 500;
      color: var(--text-muted);
    letter-spacing: 0.04em; text-align: center;
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.25s, transform 0.25s;
    min-height: 18px;
}
.goal-tile:hover .goal-label { opacity: 1; transform: translateY(0);color: var(--color-accent) }

.goal-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px; line-height: 1;
    color: #2e2e2e;
    transition: color 0.25s;
    margin-top: 8px;
}
.goal-tile:hover .goal-count {     border-color: var(--color-accent); }



/* Friends */

.card-friends  {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 36px 48px 44px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
     
}

.card-friends::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
     
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    gap: 10px;
}

.friend-item span {
    font-weight: 500;
}

.friend-item button {
    background: linear-gradient(135deg, #ff8a00, #ffb347);
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}

.friends-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.friend-tile {
    padding: 15px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

.friend-tile h3 {
    margin-bottom: 10px;
    font-size: 16px;
    opacity: 0.8;
      margin-bottom: 20px;
}


/*  CAtegories */



.card-category  {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 28px 32px 36px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.card-category::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.01) 60%);
    pointer-events: none;
     
}

.card-category input {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 11px 16px;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(8px);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    gap: 10px;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
}

.category-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.category-item span {
    font-weight: 500;
}

.category-item button {
    background: linear-gradient(135deg, #ff8a00, #ffb347);
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}



.category-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.category-tile {
    padding: 15px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);


    display: flex;
    flex-direction: column;
}

.category-tile h3 {
    margin-bottom: 10px;
    font-size: 16px;
    opacity: 0.8;
      margin-bottom: 20px;
}

.goal-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.goal-content{
flex:1;
}
/* goal-actions-bottom → siehe unten */
/*  CHATS*/


.card-text-chat {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    border-radius: 16px;

    padding: 36px 48px 44px;

    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12),
                0 8px 32px rgba(0,0,0,0.4);

    position: relative;
    overflow: visible; /* 🔥 wichtig */

    display: flex;
    flex-direction: column;
}






/* ───────── CHAT SYSTEM ───────── */

.chat-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 250px;
}

/* Card */
.chat-card {
    border-radius: 12px;
    overflow: hidden;
}

/* FRONT */
.chat-front {
    height: 70px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: background 0.2s;
}

.chat-front:hover {
    background: rgba(255,255,255,0.06);
}

/* verstecke Front wenn offen */
.chat-card.open .chat-front {
    display: none;
}

.chat-front h3 {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

/* BACK - standardmäßig versteckt */
.chat-back {
    display: none;
    height: 380px;

    border-radius: 12px;
    padding: 15px 15px 20px;

    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);

    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

/* zeige Back wenn offen */
.chat-card.open .chat-back {
    display: flex;
}

/* BUTTON ICON */
.chat-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;

    background: linear-gradient(135deg, #ff8a00, #ffb347);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    cursor: pointer;

    transition: all 0.2s ease;
}

.chat-btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255,138,0,0.4);
}

/* MESSAGES */
.messages {
    flex: 1;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    gap: 8px;

    min-height: 0; 
}

.message {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    word-break: break-word;
}

/* eigene Nachricht */
.message.me {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff8a00, #ffb347);
    color: white;
}

/* fremde Nachricht */
.message.other {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
}

/* INPUT */
.chat-input {
    display: flex;
    gap: 8px;

   
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);

    /* wichtig */
    flex-shrink: 0;
}
.msg-text {
    margin-bottom: 4px;
}

.msg-time {
    font-size: 10px;
    opacity: 0.6;
    color: var(--bg-main);
    font-weight: bold;
    font-style: italic;
}

/* optional schöner */
.message.me .msg-time {
    text-align: right;
}

.message.other .msg-time {
    text-align: left;
}
.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
    color: #d0d0d0;
    outline: none;
}

.chat-input input:focus {
    border-color: rgba(255,255,255,0.3);
}

.chat-header {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    position: relative;
}

.chat-header:hover {
    opacity: 1;
}
.new-chat {
    opacity: 0.8;
}
.chat-header {
    text-align: center;
    margin-bottom: 10px;
}

.chat-title {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
}

.chat-front-left {
    display: flex;
    flex-direction: column;
}

.chat-time {
    font-size: 11px;
    opacity: 0.5;
}
/* SEND BUTTON */
.chat-input button {
    background: linear-gradient(135deg, #ff8a00, #ffb347);
    border: none;
    border-radius: 10px;
    padding: 0 14px;
    cursor: pointer;
    color: white;
}

/* SCROLLBAR */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

#friend-search-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: none;
    background: rgba(0,0,0,0.3);
    color: white;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-badge {
    background: #ff3b30;
    color: white;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 12px;
}





/*Styles für select elemente (goals)*/

.custom-select {
    position: relative;
    cursor: pointer;
}

.select-trigger {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 11px 16px;
    backdrop-filter: blur(8px);
}

.select-options {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;

    background: rgba(20,20,20,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;

    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.select-options div {
    padding: 10px 14px;
    transition: background 0.2s;
}

.select-options div:hover {
    background: rgba(255,255,255,0.08);
}

.custom-select.open .select-options {
    display: flex;
}


/*  DASHBOARD für Ziele */

.card-dashboard-categories,
.card-dashboard-goals {
    display: none;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px 48px;
    margin-top: 6px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
    gap: 20px;
}

.dashboard-tile{

    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    padding: 20px;

    border: 1px solid rgba(255,255,255,0.08);

    display:block;   /* 🔥 WICHTIG */

    overflow:hidden;
    position:relative;

    min-height:260px;
}

.dashboard-tile:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,159,67,0.4);
}

/* Kategorie-Kachel Layout */
.dashboard-tile {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;   /* kein !important – Mobile kann überschreiben */
    padding: 0 !important;
    overflow: hidden;
}

.cat-tile-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
    padding: 32px 20px 20px;
}

.cat-tile-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cat-tile-icon svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px;
    max-height: 26px;
    stroke: #999;
}

.cat-tile-name {
    font-size: 15px;
    font-weight: 500;
    color: #bbb;
    letter-spacing: 0.01em;
}

/* Stats-Leiste */
.cat-tile-stats {
    display: flex;
    align-items: stretch;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.cat-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 8px;
}

.cat-stat-num {
    font-size: 20px;
    font-weight: 600;
    color: #d0d0d0;
    line-height: 1;
    display: block;
}

.cat-stat-num.cat-stat-done {
    color: #4ade80;
}

.cat-stat-label {
    font-size: 10px;
    color: #444;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
}

.cat-stat-divider {
    width: 1px;
    background: rgba(255,255,255,0.06);
    align-self: stretch;
}


.progress-bar {
    width: 80%;
    height: 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;

    background: linear-gradient(
        90deg,
        #ff8a00,
        #ffb347
    );

    box-shadow: 0 0 10px rgba(255,138,0,0.6);

    transition: width .6s cubic-bezier(.4,0,.2,1);
}

.goal-progress-text {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

.progress-percent {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 4px;
}




.goal-actions-top{
    display:flex;
    justify-content:space-between;
    margin-bottom:10px;
}

/* goal-btn → siehe unten (konsolidiert) */




/* Goal index Card*/

/* --------------------------
   GOAL CARD DESIGN
-------------------------- */

 
.goal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    position:relative;
    margin-bottom:14px;
}

.goal-badges-left{
    display:flex;
    align-items:center;
    gap:6px;
    flex:1;
}

/* gemeinsame Badge-Basis */
.goal-badge{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 10px;
    border-radius:20px;
    font-size:12px;
    font-weight:500;
    font-family:"DM Sans",sans-serif;
    white-space:nowrap;
    line-height:1;
}
.goal-badge svg{ flex-shrink:0; }

.goal-badge-time{
    background:rgba(255,140,0,0.12);
    color:#ff9f43;
    border:1px solid rgba(255,140,0,0.2);
}

/* Visibility Badge – absolut zentriert */
.goal-badge-vis-wrap{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
}

.goal-badge-vis{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:500;
    font-family:"DM Sans",sans-serif;
    white-space:nowrap;
    background:rgba(255,255,255,0.05);
    color:#888;
    border:1px solid rgba(255,255,255,0.1);
    cursor:pointer;
    transition:background .15s, color .15s, border-color .15s;
}
.goal-badge-vis:hover{
    background:rgba(255,255,255,0.1);
    color:#ccc;
    border-color:rgba(255,255,255,0.2);
}
.goal-badge-vis svg{ flex-shrink:0; }

.goal-badge-percent{
    background:rgba(255,140,0,0.12);
    color:#ff9f43;
    border:1px solid rgba(255,140,0,0.2);
    font-weight:700;
    font-size:13px;
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 10px;
    border-radius:20px;
    font-family:"DM Sans",sans-serif;
}
.goal-badges-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.goal-title{
font-size:22px;
margin-top:10px;
}

.goal-description{
opacity:0.6;
margin-top:4px;
}

.goal-progress-big{
font-size:34px;
font-weight:700;
margin-top:20px;
}

/* ================================================
   GOAL CARD – ACTION BOTTOM BAR
   ================================================ */

.goal-actions-bottom {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    align-items: center;
}

/* Herz-Button – links außen, quadratisch, dezent */
.goal-actions-bottom .like-btn {
    grid-column: 1;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #666;
    font-size: 0; /* Zähler ausblenden im Icon-Modus */
    position: relative;
}

/* Like-Zähler als kleines Badge über dem Herz */
.goal-actions-bottom .like-btn .like-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(239,68,68,0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
    display: block;
}

/* Zähler bei 0 ausblenden */
.goal-actions-bottom .like-btn[data-count="0"] .like-count,
.goal-actions-bottom .like-btn .like-count:empty {
    display: none;
}

.goal-actions-bottom .like-btn:hover {
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.07);
    color: #ef4444;
    transform: translateY(-1px);
}

.goal-actions-bottom .like-btn.liked {
    border-color: rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

/* Mittlerer Bereich: Eintragen-Button nimmt ganzen Platz */
.goal-actions-bottom .goal-btn.add {
    grid-column: 2;
    height: 44px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    flex: none;
    width: 100%;
}

/* Rechts: Details & Delete als kleine Icons */
.goal-actions-bottom .goal-btn.details,
.goal-actions-bottom .goal-btn.delete {
    grid-column: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    flex: none;
}

/* Delete & Details nebeneinander in einer Spalte → sub-grid */
.goal-actions-bottom .goal-btn.details {
    grid-column: 3;
    grid-row: 1;
}

/* Wir wollen Delete + Details beide in Spalte 3: nutze flex-container */
.goal-actions-bottom {
    grid-template-columns: 44px 1fr auto;
}

.goal-secondary-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-secondary-btns .goal-btn {
    width: 44px;
    height: 20px;
    padding: 0;
    border-radius: 8px;
    flex: none;
    font-size: 0;
}

.goal-secondary-btns .goal-btn svg {
    width: 13px;
    height: 13px;
}


/* ===========================
   GOAL DASHBOARD SLIDER
=========================== */

.goal-panels{
    width:100%;
}

.goal-panel{
    display:none;
    flex-direction:column;
    gap:16px;
    padding:20px;
    min-height:300px;
}

.goal-panel.active{
    display:flex;
}

.dashboard-tile {

    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    padding: 20px;

    border: 1px solid rgba(255,255,255,0.08);

    display:flex;
    flex-direction:column;

    align-items:stretch;   /* wichtig */
    justify-content:flex-start;

    overflow:visible;
    position:relative;

}

.goal-chart-container canvas{
width:100% !important;
height:100% !important;
}

/* CATEGORY SLIDER */

.category-slider-wrap{
overflow:hidden;
width:100%;
max-width:100%;
box-sizing:border-box;
}

.category-slide {
box-sizing: border-box;
width: 100%;
}

.category-slider-track{
display:flex;
transition:transform .35s cubic-bezier(.4,0,.2,1);
}

.category-slide{
min-width:100%;
flex-shrink:0;
}

/* fortschritt  */

.track-header{
display:flex;
align-items:center;
gap:10px;
margin-bottom:20px;
}

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

.track-form label{
font-size:12px;
font-weight:500;
color:#666;
letter-spacing:0.06em;
text-transform:uppercase;
margin-top:6px;
}

.track-form input{
background:rgba(0,0,0,0.25);
border:1px solid rgba(255,255,255,0.1);
border-radius:10px;
padding:11px 14px;
color:#d0d0d0;
font-family:"DM Sans",sans-serif;
font-size:14px;
outline:none;
width:100%;
}

.track-form input:focus{
border-color:rgba(255,159,67,0.4);
box-shadow:0 0 0 3px rgba(255,159,67,0.08);
}

.track-form .btn-primary{
margin-top:8px;
}

.goal-chart{
width:100%;
height:180px;
display:block;
}

.goal-chart-container{

height:180px;
padding:10px 0;
width:100%;
overflow:hidden;

}

.goal-stats{

display:flex;
justify-content:space-around;
margin-top:15px;
font-size:14px;

}

.goal-stat span{

display:block;
opacity:0.6;

}

.goal-stat strong{

font-size:16px;

}

.goal-meta{

margin-top:4px;
font-size:13px;
opacity:0.6;

}





/* Responsive → siehe Ende der Datei */
/* ===========================
   GOAL COMPLETE ANIMATION
=========================== */

/* ============================================
   🎉 GOAL COMPLETE ANIMATION CSS - ULTRA EXTREME
   Massive Bounces, heftige Glow, spektakulär!
   ============================================ */

/* ULTRA Bounce animation für den erreichten Zähler */
@keyframes catNumPop {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0 rgba(255, 159, 67, 0));
    }
    20% {
        transform: scale(1.6) rotate(-10deg);
        filter: drop-shadow(0 0 30px rgba(255, 159, 67, 1));
    }
    40% {
        transform: scale(1.5) rotate(5deg);
        filter: drop-shadow(0 0 40px rgba(255, 159, 67, 1));
    }
    60% {
        transform: scale(1.3) rotate(-5deg);
        filter: drop-shadow(0 0 35px rgba(255, 159, 67, 0.9));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0 rgba(255, 159, 67, 0));
    }
}

.cat-num-pop {
    animation: catNumPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    color: #ff9f43 !important;
    font-weight: bold;
    font-size: 1.2em;
}

/* Optional: Pulse effect für die ganze Kategorie Karte */
@keyframes cardPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 50px rgba(255, 159, 67, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

/* Celebration effect - heftig! */
@keyframes celebration {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.3);
    }
}

/* Für extra Celebration Moment */
.goal-celebrate {
    animation: celebration 0.5s ease-out;
}

/* ============================================
   PAW ANIMATION STYLES - ULTRA GLOW
   ============================================ */

.paw-anim {
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.paw-anim svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.4));
}
/* ===========================
   FREUNDE DASHBOARD
=========================== */

.friends-bar{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 4px;
}

.friends-search-wrap{
    display: flex;
    align-items: center;
    gap: 12px;
}

.friends-search-box{
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 10px;
    padding: 8px 14px;
    flex: 1;
    max-width: 300px;
    transition: border-color .2s;
}
.friends-search-box:focus-within{
    border-color: rgba(255,159,67,0.35);
}
.friends-search-box svg{ flex-shrink:0; stroke:#555; }

.friends-search-input{
    background: transparent;
    border: none;
    outline: none;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    width: 100%;
}
.friends-search-input::placeholder{ color: #444; }

/* Horizontaler Scroll-Streifen */
.friends-scroll{
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.friends-scroll::-webkit-scrollbar{ display: none; }

.friend-tile{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 2px;
    transition: all .2s;
    min-height: unset !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.friend-avatar{
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    letter-spacing: .02em;
    transition: all .2s;
}

.friend-tile:hover .friend-avatar{
    background: rgba(255,255,255,0.1);
    color: #ccc;
}
.friend-tile.active .friend-avatar{
    background: rgba(255,159,67,0.15);
    border-color: #ff9f43;
    color: #ff9f43;
}

.friend-name{
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-align: center;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s;
}
.friend-tile:hover .friend-name{ color: #888; }
.friend-tile.active .friend-name{ color: #ff9f43; }

.friends-empty{
    color: #444;
    font-size: 13px;
    padding: 8px 0;
}

.friend-cat-header{
    margin-bottom: 16px;
    font-size: 13px;
    color: #555;
}
.friend-cat-header strong{ color: #aaa; }

/* Teilnehmer Badge */
.goal-badge-members{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    background: rgba(255,255,255,0.05);
    color: #888;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.goal-badge-members:hover{
    background: rgba(255,255,255,0.1);
    color: #ccc;
}
.goal-badge-members svg{ flex-shrink:0; }

/* Teilnehmer Picker */
.members-picker{
    position: absolute;
    z-index: 300;
    background: #1e1e20;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: vis-picker-in .18s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.members-picker-item{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    transition: background .15s;
}
.members-picker-item:hover{ background: rgba(255,255,255,0.05); }

.members-picker-avatar{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,159,67,0.12);
    border: 1px solid rgba(255,159,67,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #ff9f43;
    flex-shrink: 0;
}

.members-picker-info{
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.members-picker-name{
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
}
.members-picker-role{
    font-size: 11px;
    color: #ff9f43;
    background: rgba(255,159,67,0.1);
    border-radius: 6px;
    padding: 1px 6px;
    width: fit-content;
}

.members-picker-val{
    font-size: 13px;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
}

.members-picker-empty{
    padding: 12px 14px;
    font-size: 13px;
    color: #555;
    text-align: center;
}

.friend-avatar-all{
    background: rgba(255,255,255,0.06);
    color: #777;
}
.friend-tile-all.active .friend-avatar-all{
    background: rgba(255,159,67,0.15);
    border-color: #ff9f43;
    color: #ff9f43;
}

.members-picker-avatar-me{
    background: rgba(255,159,67,0.2);
    border-color: rgba(255,159,67,0.4);
    color: #ff9f43;
    font-size: 10px;
    font-weight: 700;
}

.members-picker-item-me .members-picker-name{
    color: #ff9f43;
}


/* ── Join & Like Buttons ── */

.goal-btn.join-btn {
    color: #ff9f43;
    background: rgba(255,159,67,0.1);
    border-color: rgba(255,159,67,0.25);
    font-weight: 600;
}
.goal-btn.join-btn:hover {
    background: rgba(255,159,67,0.2);
    border-color: rgba(255,159,67,0.4);
}
.goal-btn.join-btn.joined {
    color: #4ade80;
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.2);
    cursor: default;
}

/* goal-btn duplikat entfernt */


/* ================================================
   LIKE BUTTON – Herz-Design
   ================================================ */

.like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    color: #888;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.like-btn:hover {
    border-color: rgba(239,68,68,0.45);
    background: rgba(239,68,68,0.07);
    color: #ef4444;
    transform: translateY(-1px);
}

/* SVG Herz */
.like-heart {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
    overflow: visible;
}

/* Outline (Standard: sichtbar) */
.heart-outline {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    opacity: 1;
    transition: opacity 0.18s ease;
}

/* Filled (Standard: unsichtbar) */
.heart-filled {
    fill: #ef4444;
    opacity: 0;
    transform: scale(0.5);
    transform-origin: center;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

/* LIKED STATE */
.like-btn.liked {
    border-color: rgba(239,68,68,0.55);
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

.like-btn.liked .heart-outline {
    opacity: 0;
}

.like-btn.liked .heart-filled {
    opacity: 1;
    transform: scale(1);
}

/* Pop-Animation */
.like-btn.liked .like-heart {
    animation: heart-pop 0.38s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes heart-pop {
    0%   { transform: scale(0.5); }
    55%  { transform: scale(1.32); }
    100% { transform: scale(1); }
}

/* Like-Zähler Badge auf eigener Ziel-Card */
.goal-badge-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.goal-badge-likes svg {
    flex-shrink: 0;
    fill: #ef4444;
    stroke: none;
}

/* Join-Button */
.join-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,159,67,0.4);
    background: rgba(255,159,67,0.08);
    color: #ff9f43;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}


/* ================================================
   GOAL BTN – Konsolidiert (überschreibt alles)
   ================================================ */

.goal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.goal-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.goal-btn span { font-size: 13px; font-weight: 500; }
.goal-btn:hover { background: rgba(255,255,255,0.09); color: #ccc; transform: translateY(-1px); }

/* Löschen */
.goal-btn.delete {
    color: #ff6b6b;
    background: rgba(255,107,107,0.06);
    border-color: rgba(255,107,107,0.18);
}
.goal-btn.delete:hover {
    background: rgba(255,80,80,0.12);
    border-color: rgba(255,80,80,0.3);
    color: #ff4f4f;
}

/* Details */
.goal-btn.details {
    color: #888;
}
.goal-btn.details:hover {
    background: rgba(255,255,255,0.08);
    color: #ccc;
}

/* Eintragen – Primär-Action */
.goal-btn.add {
    color: #ff9f43;
    background: rgba(255,159,67,0.1);
    border-color: rgba(255,159,67,0.28);
    font-weight: 600;
    flex: 1;
}
.goal-btn.add:hover {
    background: rgba(255,159,67,0.18);
    border-color: rgba(255,159,67,0.45);
}

/* Join */
.goal-btn.join-btn {
    color: #ff9f43;
    background: rgba(255,159,67,0.1);
    border-color: rgba(255,159,67,0.25);
    font-weight: 600;
}
.goal-btn.join-btn:hover {
    background: rgba(255,159,67,0.2);
    border-color: rgba(255,159,67,0.4);
}
.goal-btn.join-btn.joined {
    color: #4ade80;
    background: rgba(74,222,128,0.08);
    border-color: rgba(74,222,128,0.2);
    cursor: default;
}


/* ================================================
   GOAL CARD – BOTTOM LAYOUT (final)
   ================================================ */

.goal-actions-bottom {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    align-items: center;
}

/* Herz-Icon-Button links */
.goal-actions-bottom > .like-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 0;
    position: relative;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #666;
}

/* Like-Zahl als Badge oben rechts */
.goal-actions-bottom > .like-btn .like-count {
    position: absolute;
    top: -7px;
    right: -7px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
    display: block;
}

.goal-actions-bottom > .like-btn[data-count="0"] .like-count {
    display: none;
}

/* Eintragen – volle Breite Mitte */
.goal-actions-bottom > .goal-btn.add {
    height: 44px;
    border-radius: 12px;
    flex: none;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
}

/* Details + Delete-Container */
.goal-secondary-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-secondary-btns .goal-btn {
    width: 44px;
    height: 19px;
    padding: 0;
    border-radius: 7px;
    font-size: 0;  /* kein Text, nur Icon */
    flex: none;
    gap: 0;
}

.goal-secondary-btns .goal-btn svg {
    width: 12px;
    height: 12px;
}
/* ================================================================
   GOAL BTN – Konsolidiert
   ================================================================ */
.goal-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 7px; height: 44px; padding: 0 16px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.05);
    cursor: pointer; font-family: "DM Sans", sans-serif;
    font-size: 13px; font-weight: 500; color: #888;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
    white-space: nowrap; flex-shrink: 0;
}
.goal-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.goal-btn span { font-size: 13px; font-weight: 500; }
.goal-btn:hover { background: rgba(255,255,255,0.09); color: #ccc; transform: translateY(-1px); }
.goal-btn.delete { color: #ff6b6b; background: rgba(255,107,107,0.06); border-color: rgba(255,107,107,0.18); }
.goal-btn.delete:hover { background: rgba(255,80,80,0.12); border-color: rgba(255,80,80,0.3); color: #ff4f4f; }
.goal-btn.details { color: #888; }
.goal-btn.details:hover { background: rgba(255,255,255,0.08); color: #ccc; }
.goal-btn.add { color: #ff9f43; background: rgba(255,159,67,0.1); border-color: rgba(255,159,67,0.28); font-weight: 600; flex: 1; }
.goal-btn.add:hover { background: rgba(255,159,67,0.18); border-color: rgba(255,159,67,0.45); }
.goal-btn.join-btn { color: #ff9f43; background: rgba(255,159,67,0.1); border-color: rgba(255,159,67,0.25); font-weight: 600; }
.goal-btn.join-btn:hover { background: rgba(255,159,67,0.2); border-color: rgba(255,159,67,0.4); }
.goal-btn.join-btn.joined { color: #4ade80; background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.2); cursor: default; }

/* ================================================================
   GOAL CARD – BOTTOM LAYOUT (final)
   ================================================================ */
.goal-actions-bottom {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 8px; margin-top: auto; padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    align-items: center;
}
.goal-actions-bottom > .like-btn {
    width: 44px; height: 44px; padding: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    gap: 0; font-size: 0; position: relative;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04); color: #666;
}
.goal-actions-bottom > .like-btn .like-count {
    position: absolute; top: -7px; right: -7px;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    padding: 2px 5px; border-radius: 999px; min-width: 16px;
    text-align: center; line-height: 1.4; display: block;
}
.goal-actions-bottom > .like-btn[data-count="0"] .like-count { display: none; }
.goal-actions-bottom > .like-btn:hover { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.07); color: #ef4444; transform: translateY(-1px); }
.goal-actions-bottom > .like-btn.liked { border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.1); color: #ef4444; }
.goal-actions-bottom > .goal-btn.add { height: 44px; border-radius: 12px; flex: none; width: 100%; font-size: 13px; font-weight: 600; }
.goal-secondary-btns { display: flex; flex-direction: column; gap: 4px; }
.goal-secondary-btns .goal-btn { width: 44px; height: 19px; padding: 0; border-radius: 7px; font-size: 0; flex: none; gap: 0; }
.goal-secondary-btns .goal-btn svg { width: 12px; height: 12px; }

/* Badge oben auf eigener Karte ausblenden (Button unten ist die einzige Stelle) */
.goal-badges-right .goal-badge-likes { display: none !important; }

/* ================================================================
   LIKES-POPUP (Hover auf eigenem Herz-Button)
   ================================================================ */
.likes-popup {
    position: absolute; bottom: calc(100% + 10px); left: 50%;
    transform: translateX(-50%); z-index: 500;
    background: #1c1c1e; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 6px; min-width: 160px; max-width: 220px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.7);
    animation: likes-popup-in 0.18s cubic-bezier(0.34,1.56,0.64,1) forwards;
    pointer-events: auto;
}
@keyframes likes-popup-in {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.95); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.likes-popup::after {
    content: ""; position: absolute; bottom: -6px; left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-top: 6px solid rgba(255,255,255,0.1);
}
.likes-popup-header {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 10px 4px; font-size: 11px; font-weight: 600;
    color: #ef4444; letter-spacing: 0.04em; text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 4px;
}
.likes-popup-list {
    display: flex; flex-direction: column; gap: 2px;
    max-height: 180px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.likes-popup-list::-webkit-scrollbar { width: 4px; }
.likes-popup-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.likes-popup-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; transition: background 0.15s; }
.likes-popup-item:hover { background: rgba(255,255,255,0.05); }
.likes-popup-avatar {
    width: 26px; height: 26px; border-radius: 8px;
    background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444; font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.likes-popup-name { font-size: 12px; font-weight: 500; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.likes-popup-loading, .likes-popup-empty { padding: 10px 12px; font-size: 12px; color: #555; text-align: center; }

/* ================================================================
   RESPONSIVE DESIGN – Pawgress
   ≤ 1024px  Tablet landscape
   ≤ 768px   Tablet portrait
   ≤ 480px   Smartphone
   ≤ 360px   Kleines Smartphone
   ================================================================ */

/* ── Tablet Landscape ── */
@media (max-width: 1024px) {
    .frame-side { width: 12px; }
    .hero-title { font-size: clamp(52px, 9vw, 110px); }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .goal-btn { height: 40px; padding: 0 12px; font-size: 12px; }
    .goal-secondary-btns .goal-btn { height: 18px; }
    .friends-scroll { gap: 8px; }
    .friend-tile { min-width: 72px; }
}

/* ── Tablet Portrait ── */
@media (max-width: 768px) {
    .frame-side   { width: 8px; }
    .frame-bottom { height: 8px; }
    .content-area { gap: 12px; padding: 8px 0; }

    .card-title { padding: 24px 20px; flex-direction: row; align-items: center; gap: 16px; }
    .card-title-right img { height: 70px; }
    .card-text  { padding: 22px 20px 28px; }
    .card-auth  { padding: 22px 20px 28px; }
    .card-goals { padding: 18px 16px !important; border-radius: 12px; }

    .hero-title { font-size: clamp(44px, 12vw, 80px); }
    .hero-sub   { font-size: 15px; }

    .goals-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .goal-tile  { padding: 22px 12px 18px; gap: 10px; }
    .goal-icon  { width: 40px; height: 40px; }
    .goal-count { font-size: 36px; }
    .goal-label { opacity: 1; transform: none; font-size: 11px; min-height: unset; }

    .fields-grid { grid-template-columns: 1fr; gap: 12px; }

    .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dashboard-tile { min-height: 180px !important; }

    .friends-bar { gap: 10px; }
    .friends-scroll { gap: 6px; }
    .friend-tile { min-width: 64px; padding: 10px 6px; }
    .friend-avatar { width: 42px; height: 42px; font-size: 13px; }
    .friend-name   { font-size: 10px; }
    .friends-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }

    .chat-back { height: 320px; }
    .chat-front h3 { font-size: 14px; }

    .goal-actions-bottom { grid-template-columns: 40px 1fr auto; gap: 6px; padding-top: 12px; }
    .goal-actions-bottom > .like-btn { width: 40px; height: 40px; border-radius: 10px; }
    .goal-actions-bottom > .goal-btn.add { height: 40px; border-radius: 10px; }
    .goal-secondary-btns .goal-btn { width: 40px; height: 17px; border-radius: 6px; }

    .goal-badge { font-size: 10px; padding: 3px 7px; }
    .goal-title { font-size: 15px; }
    .goal-progress-big { font-size: 22px; }
    .cat-tile-stats { padding: 10px 12px; }
    .cat-stat-num { font-size: 18px; }
    .cat-stat-label { font-size: 9px; }
}

/* ── Smartphone ── */
@media (max-width: 480px) {
    .frame-side   { width: 4px; }
    .frame-bottom { height: 4px; }

    .card-title { padding: 18px 16px; gap: 12px; }
    .card-title-right img { height: 54px; }
    .hero-title { font-size: clamp(38px, 13vw, 60px); }
    .hero-eyebrow { font-size: 10px; letter-spacing: 0.15em; }
    .card-text  { padding: 18px 16px 22px; border-radius: 12px; }
    .card-auth  { padding: 18px 16px 22px; border-radius: 12px; }

    /* Hauptseite Ziel-Kacheln → horizontal */
    .goals-grid { grid-template-columns: 1fr; gap: 8px; }
    .goal-tile  { flex-direction: row; padding: 16px 18px; gap: 16px; align-items: center; }
    .goal-icon  { width: 36px; height: 36px; flex-shrink: 0; }
    .goal-count { font-size: 32px; margin-top: 0; }
    .goal-label { opacity: 1; transform: none; text-align: left; font-size: 13px; }

    /* Dashboard → 1 Spalte */
    .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
    .dashboard-tile { min-height: 160px !important; }

    .cat-tile-inner { padding: 16px 16px 10px; }
    .cat-tile-icon  { width: 36px; height: 36px; }
    .cat-tile-name  { font-size: 14px; }
    .cat-tile-stats { padding: 10px; }
    .cat-stat-num   { font-size: 16px; }

    .friends-scroll { gap: 4px; }
    .friend-tile    { min-width: 58px; padding: 8px 4px; }
    .friend-avatar  { width: 38px; height: 38px; font-size: 12px; border-radius: 10px; }
    .friend-name    { font-size: 9px; }
    .friends-grid   { grid-template-columns: 1fr; gap: 10px; }

    .goal-actions-bottom { grid-template-columns: 38px 1fr auto; gap: 5px; padding-top: 10px; }
    .goal-actions-bottom > .like-btn { width: 38px; height: 38px; }
    .goal-actions-bottom > .goal-btn.add { height: 38px; font-size: 12px; }
    .goal-secondary-btns .goal-btn { width: 38px; height: 16px; }
    .goal-secondary-btns { gap: 3px; }

    .goal-header { flex-wrap: wrap; gap: 4px; }
    .goal-badges-right { gap: 4px; }
    .goal-badge { font-size: 10px; padding: 3px 6px; gap: 3px; }
    .goal-title { font-size: 14px; margin: 6px 0; }
    .goal-progress-big { font-size: 18px; }

    .track-form { gap: 8px; }
    .track-form input { height: 40px; }

    .chat-front { height: 60px; padding: 0 14px; }
    .chat-back  { height: 280px; padding: 12px; }

    .auth-tabs { gap: 4px; margin-bottom: 16px; }
    .auth-tab  { padding: 8px 14px; font-size: 13px; }
    .auth-actions { flex-direction: column; gap: 8px; }
    .auth-actions .btn-primary,
    .auth-actions .btn-ghost { width: 100%; justify-content: center; }

    .friends-search-box { width: 100%; }
    .vis-picker { min-width: 200px; }
    .goal-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .goal-stat  { padding: 8px 6px; }
    .goal-stat span { font-size: 10px; }
    .goal-stat strong { font-size: 14px; }
}

/* ── Kleines Smartphone ── */
@media (max-width: 360px) {
    .frame-side { width: 2px; }
    .card-title { padding: 14px 12px; }
    .card-title-right img { height: 44px; }
    .hero-title { font-size: clamp(32px, 14vw, 50px); }
    .card-text  { padding: 14px 12px 18px; }
    .card-auth  { padding: 14px 12px 18px; }
    .goal-tile  { padding: 12px 14px; gap: 12px; }
    .goal-count { font-size: 28px; }
    .goal-icon  { width: 32px; height: 32px; }
    .dashboard-tile { min-height: 140px !important; }
    .goal-progress-big { font-size: 16px; }
    .goal-title { font-size: 13px; }
    .goal-actions-bottom { grid-template-columns: 34px 1fr auto; gap: 4px; }
    .goal-actions-bottom > .like-btn  { width: 34px; height: 34px; }
    .goal-actions-bottom > .goal-btn.add { height: 34px; font-size: 11px; }
    .goal-secondary-btns .goal-btn    { width: 34px; }
    .friends-scroll { padding-bottom: 6px; }
    .friend-tile    { min-width: 50px; }
    .friend-avatar  { width: 34px; height: 34px; font-size: 10px; }
    .friend-name    { font-size: 8px; }
    .auth-tab { padding: 6px 10px; font-size: 12px; }
}

/* ── Touch-Optimierungen ── */
@media (hover: none) {
    .goal-label { opacity: 1; transform: none; color: var(--text-muted); }
    .goal-btn    { min-height: 44px; }
    .like-btn    { min-height: 44px; }
    .friend-tile { min-height: 44px; }
    .goal-btn:hover,
    .like-btn:hover,
    .dashboard-tile:hover { transform: none; }
}


/* Likes-Popup auf Touch: größer und besser tappbar */
@media (hover: none) {
    .likes-popup {
        min-width: 180px;
        border-radius: 16px;
        padding: 8px;
    }
    .likes-popup-item {
        padding: 10px 12px;
        gap: 10px;
    }
    .likes-popup-avatar {
        width: 32px;
        height: 32px;
        font-size: 11px;
        border-radius: 9px;
    }
    .likes-popup-name {
        font-size: 13px;
    }
    .likes-popup-header {
        font-size: 12px;
        padding: 8px 12px 6px;
    }
    .likes-popup-list {
        max-height: 220px;
    }
}

/* ================================================
   GOAL-HEADER – Mobile Fix (Badges überlappen)
   ================================================ */

@media (max-width: 600px) {

    /* Header wird 2-zeilig */
    .goal-header {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
        margin-bottom: 10px;
    }

    /* Zeile 1: Zeit links, % rechts */
    .goal-badges-left {
        flex: 1;
        min-width: 0;
    }

    .goal-badges-right {
        flex-shrink: 0;
    }

    /* Visibility-Badge: nicht mehr absolut, eigene Zeile */
    .goal-badge-vis-wrap {
        position: static;
        transform: none;
        width: 100%;
        order: 10; /* geht in Zeile 2 */
        display: flex;
    }

    .goal-badge-vis {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Teilnehmer-Badge (Freunde/Community) ebenfalls in Zeile 2 */
    .goal-badge-members {
        position: static;
        transform: none;
        width: 100%;
        order: 10;
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Zeit- und %-Badge kompakter */
    .goal-badge-time {
        font-size: 11px;
        padding: 4px 8px;
    }

    .goal-badge-percent {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* goal-badge-vis-wrap bei Freundes-Karten (enthält Teilnehmer-Badge) */
    .goal-badge-vis-wrap:has(.goal-badge-members) {
        order: 10;
    }
}

/* ================================================
   GOAL-HEADER – Mobile Fix v2 (sauber)
   Struktur: [Zeit] [Vis/Teilnehmer absolut] [%]
   → Mobile: 2 Zeilen, nichts absolut
   ================================================ */

@media (max-width: 600px) {

    .goal-header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 5px;
        align-items: center;
        margin-bottom: 10px;
        position: static; /* kein relative mehr nötig */
    }

    /* Zeile 1 links: Zeit-Badge */
    .goal-badges-left {
        grid-column: 1;
        grid-row: 1;
    }

    /* Zeile 1 rechts: %-Badge */
    .goal-badges-right {
        grid-column: 2;
        grid-row: 1;
    }

    /* Zeile 2: Visibility- oder Teilnehmer-Badge, volle Breite */
    .goal-badge-vis-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        position: static !important;
        transform: none !important;
        left: auto !important;
        display: flex;
    }

    .goal-badge-vis,
    .goal-badge-members {
        font-size: 11px;
        padding: 4px 10px;
    }

    .goal-badge-time,
    .goal-badge-percent {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ================================================
   Eigene Zielkarte: Herz-Button nur zum Anzeigen
   – kein Like-Cursor, kein roter Hover-Effekt
   ================================================ */
.goal-panel-view .goal-actions-bottom > .like-btn {
    cursor: default;
}
.goal-panel-view .goal-actions-bottom > .like-btn:hover {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #666;
    transform: none;
}

/* ================================================================
   GOALS.HTML – Responsive Fixes
   ================================================================ */

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {

    /* Kategorie-Grid: 1 Spalte statt auto-fit mit 250px min */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
    }

    /* Karten card-sub-category / card-goal */
    #card-sub-category,
    #card-goal {
        padding: 20px 16px;
        border-radius: 14px;
    }

    #card-sub-category h2,
    #card-goal h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    /* Ziel-Formular: fields-grid → 1 Spalte */
    #card-goal-item .fields-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }

    /* Zurück/Speichern-Buttons */
    .goal-actions {
        flex-direction: column;
        gap: 8px;
    }
    .goal-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Custom-Select Dropdown */
    .select-trigger {
        font-size: 14px;
        padding: 10px 14px;
    }
    .select-options div {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Kategorie-Suchfeld */
    #global-cat-search {
        font-size: 14px;
    }

    /* Kategorie-Items (Liste) */
    .category-item {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ── Smartphone (≤ 480px) ── */
@media (max-width: 480px) {

    /* Cards noch kompakter */
    #card-sub-category,
    #card-goal {
        padding: 16px 14px;
        border-radius: 12px;
    }

    /* category-tile (enthält die Formulare) */
    .category-tile {
        padding: 12px;
        border-radius: 10px;
    }

    /* Inputs größer für Touch */
    #card-goal-item input[type="text"],
    #card-goal-item input[type="date"],
    #card-goal-item .select-trigger {
        min-height: 46px;
        font-size: 15px;
        padding: 10px 14px;
    }

    /* Labels */
    #card-goal-item .field-group label {
        font-size: 12px;
    }

    /* Select-Options-Items: gut tappbar */
    .select-options div {
        padding: 14px 14px;
        font-size: 15px;
        min-height: 46px;
        display: flex;
        align-items: center;
    }

    /* Buttons */
    .goal-actions {
        margin-top: 16px;
    }
    .goal-actions .btn-primary {
        height: 48px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* Kategorie-Suche */
    .field-group #global-cat-search {
        min-height: 46px;
        font-size: 15px;
    }

    /* Subcategory-Liste */
    #category-sub-list .category-item {
        min-height: 50px;
    }
    #category-sub-list .category-item button {
        min-height: 36px;
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 9px;
    }

    /* card-auth Padding */
    .card-auth {
        padding: 16px 14px 20px;
    }
}

/* ── Kleines Smartphone (≤ 360px) ── */
@media (max-width: 360px) {

    #card-sub-category,
    #card-goal {
        padding: 12px 10px;
    }

    .category-tile {
        padding: 10px;
    }

    .goal-actions .btn-primary {
        height: 44px;
        font-size: 14px;
    }

    #card-goal-item input[type="text"],
    #card-goal-item input[type="date"],
    #card-goal-item .select-trigger {
        min-height: 42px;
        font-size: 14px;
    }
}


/* ================================================================
   HAUPTKATEGORIEN – Mobile Fix (Karte nur halb sichtbar)
   Ursache: min-height + overflow:hidden schneidet Inhalt ab
   ================================================================ */

@media (max-width: 768px) {

    /* Kategorie-Kacheln: keine feste Mindesthöhe, Inhalt bestimmt Höhe */
    .dashboard-tile {
        min-height: unset !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Goal-Panel: kein festes min-height */
    .goal-panel {
        min-height: unset !important;
    }

    /* Grid-Zellen nicht abschneiden */
    .dashboard-grid {
        overflow: visible;
    }

    /* card-dashboard: kein overflow hidden */
    .card-dashboard-categories,
    .card-dashboard-goals {
        overflow: visible;
    }
}

/* ================================================================
   DASHBOARD TILES – Mobile Fix (final, überschreibt alles)
   ================================================================ */

@media (max-width: 768px) {

    /* Kategorie-Kacheln: Höhe durch Inhalt, nicht durch min-height */
    .dashboard-tile {
        min-height: unset !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Goal-Panels: kein festes min-height */
    .goal-panel {
        min-height: unset !important;
        gap: 12px;
        padding: 16px;
    }

    /* Actions-Bottom: etwas kompakter */
    .goal-actions-bottom {
        padding-top: 12px;
        margin-top: 8px;
    }

    /* Kein overflow-hidden das Inhalte abschneidet */
    .dashboard-grid,
    .card-dashboard-categories,
    .card-dashboard-goals {
        overflow: visible !important;
    }
}

@media (max-width: 480px) {
    .goal-panel {
        gap: 10px;
        padding: 14px;
    }
}

/* ================================================================
   GOALS.HTML – card-category Mobile Fix
   ================================================================ */

/* Globaler box-sizing Fix – verhindert dass padding den Container sprengt */
*, *::before, *::after {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .card-category {
        padding: 22px 18px 26px;
        border-radius: 14px;
    }

    .category-list {
        gap: 8px;
    }

    .category-item {
        padding: 10px 12px;
    }

    .category-item button {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .card-category {
        padding: 16px 14px 20px;
        border-radius: 12px;
    }

    .card-category h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .card-category p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .card-category input {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 44px;
    }

    .category-item {
        padding: 10px 10px;
        gap: 8px;
        min-height: 46px;
    }

    .category-item span {
        font-size: 14px;
    }

    .category-item button {
        padding: 7px 10px;
        font-size: 12px;
        min-height: 36px;
        border-radius: 8px;
    }

    /* Slider-Controls (zurück/weiter Buttons) */
    #category-list > div:last-child {
        gap: 10px;
        margin-top: 12px;
    }

    #category-list > div:last-child button {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ================================================================
   CHALLENGE TILES – ans Ende von main.css anhängen
   ================================================================ */

/* Challenge-Tiles bekommen einen orangenen Akzent */
.challenge-tile .goal-icon {
    color: #ff9f43;
}

.challenge-tile .goal-count {
    color: #ff9f43;
}

.challenge-tile:hover {
    border-color: rgba(255, 159, 67, 0.35) !important;
    box-shadow: 0 0 0 1px rgba(255, 159, 67, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.12),
                0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Challenge-Panel (Liste) */
#card-challenge-list {
    display: none;
}

.challenge-panel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,159,67,0.18);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.challenge-panel:hover {
    background: rgba(255,159,67,0.06);
    border-color: rgba(255,159,67,0.35);
}

.challenge-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.challenge-panel-title {
    font-size: 15px;
    font-weight: 500;
    color: #d0d0d0;
}

.challenge-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255,159,67,0.12);
    border: 1px solid rgba(255,159,67,0.3);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: #ff9f43;
    white-space: nowrap;
}

.challenge-panel-meta {
    font-size: 12px;
    color: #555;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.challenge-panel-dates {
    font-size: 12px;
    color: #555;
}

.challenge-panel-members {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

/* Invite-spezifisch */
.challenge-invite-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.btn-accept {
    padding: 8px 18px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-radius: 10px;
    color: #2ecc71;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-accept:hover { background: rgba(46, 204, 113, 0.28); }

.btn-decline {
    padding: 8px 18px;
    background: rgba(255, 107, 107, 0.10);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
    color: #ff6b6b;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-decline:hover { background: rgba(255, 107, 107, 0.22); }

.btn-join-challenge {
    padding: 8px 18px;
    background: rgba(255,159,67,0.15);
    border: 1px solid rgba(255,159,67,0.4);
    border-radius: 10px;
    color: #ff9f43;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-join-challenge:hover { background: rgba(255,159,67,0.28); }
.btn-join-challenge:disabled {
    opacity: 0.5;
    cursor: default;
}

.challenge-empty {
    color: #555;
    font-size: 14px;
    padding: 20px 0;
    text-align: center;
}

/* ── Kategorie-Badge in Einladung ── */
.challenge-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
    position: relative;
}
.challenge-cat-badge:hover {
    border-color: rgba(255,159,67,0.3);
    color: #c0c8d0;
}

/* Popups — mobile-optimiert mit soliderem Hintergrund */
.cat-path-popup,
.members-invite-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 999;
    background: #1c1c1e !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.7) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.cat-path-popup .likes-popup-name,
.members-invite-popup .likes-popup-name {
    color: #e0e0e0 !important;
}

.cat-path-popup .likes-popup-header,
.members-invite-popup .likes-popup-header {
    color: #c0c0c0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.members-invite-popup {
    left: auto;
    right: 0;
    min-width: 220px;
}

/* ── Mitglieder-Badge in Einladung ── */
.challenge-members-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
    position: relative;
}
.challenge-members-badge:hover {
    border-color: rgba(255,255,255,0.25);
    color: #c0c8d0;
}

/* ── Challenge Fortschritt & Leaderboard ── */
.ch-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.ch-progress-label {
    color: #555;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.ch-progress-val {
    color: #c0c8d0;
    flex: 1;
}
.ch-progress-pct {
    color: #ff9f43;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.btn-ch-track {
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #c0c8d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.btn-ch-track:hover { background: rgba(255,255,255,0.12); }

.btn-ch-leaderboard {
    padding: 8px 16px;
    background: rgba(255,159,67,0.08);
    border: 1px solid rgba(255,159,67,0.25);
    border-radius: 10px;
    color: #ff9f43;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.btn-ch-leaderboard:hover { background: rgba(255,159,67,0.18); }

/* Leaderboard */
.ch-leaderboard {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 14px 16px;
}
.ch-lb-title {
    font-size: 13px;
    font-weight: 600;
    color: #c0c8d0;
    margin-bottom: 12px;
}
.ch-lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.ch-lb-rank  { font-size: 14px; width: 24px; flex-shrink: 0; }
.ch-lb-name  { flex: 1; font-size: 13px; color: #c0c8d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-lb-members { white-space: nowrap; }
.ch-lb-val   { font-size: 12px; color: #888; white-space: nowrap; }
.ch-lb-pct   { font-size: 12px; color: #ff9f43; font-weight: 600; white-space: nowrap; min-width: 36px; text-align: right; }

/* ── Challenge Result Animation ── */
@keyframes ch-result-fade-in {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

@keyframes crown-jump {
    0%   { bottom: -20px;  transform: rotate(-8deg)  scale(0.9); }
    40%  { bottom: 55vh;   transform: rotate(5deg)   scale(1.1); }
    60%  { bottom: 50vh;   transform: rotate(-3deg)  scale(1.05); }
    80%  { bottom: 58vh;   transform: rotate(6deg)   scale(1.12); }
    100% { bottom: 45vh;   transform: rotate(-5deg)  scale(1);   }
}

@keyframes crown-fall {
    0%   { top: 5%;  opacity: 1; transform: translateX(-50%) rotate(0deg)   scale(1);   }
    30%  { top: 5%;  opacity: 1; transform: translateX(-50%) rotate(-10deg) scale(1);   }
    85%  { top: 60%; opacity: 1; transform: translateX(-50%) rotate(20deg)  scale(0.8); }
    100% { top: 68%; opacity: 1; transform: translateX(-50%) rotate(10deg)  scale(0.6); }
}

@keyframes crown-fall-to-slot {
    0%   { top: 5%;  opacity: 1; transform: translateX(-50%) rotate(0deg)   scale(1);   }
    30%  { top: 5%;  opacity: 1; transform: translateX(-50%) rotate(-8deg)  scale(1);   }
    80%  { top: 72%; opacity: 1; transform: translateX(-50%) rotate(15deg)  scale(0.85);}
    100% { top: 78%; opacity: 0; transform: translateX(-50%) rotate(5deg)   scale(0.7); }
}

@keyframes trash-shake {
    0%,100% { transform: translateX(-50%) rotate(0deg);   }
    20%      { transform: translateX(-50%) rotate(-5deg);  }
    40%      { transform: translateX(-50%) rotate(5deg);   }
    60%      { transform: translateX(-50%) rotate(-3deg);  }
    80%      { transform: translateX(-50%) rotate(3deg);   }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .paw-anim, [style*="crown-jump"], [style*="crown-fall"] {
        animation: none !important;
    }
}

/* ── Mobile: soliderer Hintergrund für alle Popups ── */
@media (max-width: 768px) {
    .likes-popup {
        background: #1c1c1e !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.8) !important;
        backdrop-filter: none !important;
    }
    .likes-popup-name  { color: #e0e0e0 !important; }
    .likes-popup-header { color: #bbb !important; }
    .likes-popup-avatar { background: #333 !important; color: #ff9f43 !important; }
}

/* ── Badge Lesbarkeit fixes ── */
.challenge-cat-badge,
.challenge-members-badge {
    font-size: 12px !important;
    color: #aaa !important;
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.15) !important;
}
.challenge-cat-badge:hover,
.challenge-members-badge:hover {
    color: #e0e0e0 !important;
    border-color: rgba(255,255,255,0.28) !important;
}
.challenge-panel-title {
    font-size: 15px;
    font-weight: 500;
    color: #d0d0d0;
}
.challenge-panel-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 4px 0 8px;
}
.challenge-panel-dates {
    color: #555;
}

/* ── Fortschritt Zeile ── */
.ch-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.ch-progress-val {
    font-size: 13px;
    color: #c0c8d0;
}
.ch-progress-pct {
    font-size: 13px;
    font-weight: 600;
    color: #ff9f43;
}

/* ── Leaderboard responsive fix ── */
.ch-leaderboard {
    overflow: hidden;
}
.ch-lb-row {
    display: grid;
    grid-template-columns: 24px 12px 1fr auto auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    min-width: 0;
}
.ch-lb-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.ch-lb-members {
    display: none; /* auf Mobile verstecken */
}
.ch-lb-val  { font-size: 11px; white-space: nowrap; }
.ch-lb-pct  { font-size: 11px; white-space: nowrap; min-width: 32px; text-align: right; }

@media (min-width: 480px) {
    .ch-lb-row {
        grid-template-columns: 24px 12px 1fr auto auto auto;
    }
    .ch-lb-members { display: block; }
}


/* ================================================================
   FAVORITEN — ans Ende von main.css anhängen
   ================================================================ */

/* ── Stern-Button in Kategorie-Items ── */
.fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    filter: grayscale(1) opacity(.4);
    flex-shrink: 0;
}
.fav-btn:hover {
    filter: grayscale(0) opacity(1);
    border-color: rgba(255,200,0,0.35);
    background: rgba(255,200,0,0.08);
}
.fav-btn.fav-active {
    filter: grayscale(0) opacity(1);
    border-color: rgba(255,200,0,0.4);
    background: rgba(255,200,0,0.1);
}

/* ── Favoriten-Card Grid ── */
.favorites-grid {
    padding: 4px 0;
}

/* ── Favoriten-Chips ── */
.fav-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
    position: relative;
    min-width: 80px;
    max-width: 160px;
}
.fav-chip:hover {
    background: rgba(255,159,67,0.08);
    border-color: rgba(255,159,67,0.3);
    transform: translateY(-1px);
}
.fav-chip-path {
    font-size: 10px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fav-chip-name {
    font-size: 13px;
    font-weight: 500;
    color: #c0c8d0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 18px;
}
.fav-chip-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: none;
    color: #444;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color .15s;
}
.fav-chip-remove:hover {
    color: #ff6b6b;
}


@media (max-width: 600px) {

    /* Sub-Card: Name oben, Buttons darunter nebeneinander */
    #category-sub-list .category-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px;
        align-items: center;
    }

    #category-sub-list .category-item > span:first-child {
        grid-column: 1;
        grid-row: 1;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Stern-Button rechts oben */
    #category-sub-list .category-item .fav-btn {
        grid-column: 2;
        grid-row: 1;
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }

    /* Ziel + Challenge Buttons unten, volle Breite */
    #category-sub-list .category-item button:not(.fav-btn) {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
        font-size: 12px;
        padding: 8px 10px;
        text-align: center;
    }

    /* Slider erste Ebene: kompakter aber einzeilig */
    .category-list .category-item button:not(.fav-btn) {
        font-size: 11px;
        padding: 6px 8px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .category-list .category-item .fav-btn {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
}
/* ================================================================
   CHALLENGE MODE TOGGLE BUTTONS
   ================================================================ */

.challenge-mode-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #666;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.mode-btn:hover {
    background: rgba(255,255,255,0.09);
    color: #aaa;
}

.mode-btn.active {
    background: rgba(255,159,67,0.15);
    border-color: rgba(255,159,67,0.45);
    color: #ff9f43;
}

/* ================================================================
   TEAM KONFIGURATION
   ================================================================ */

.team-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 10px;
}

.team-count-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.team-count-row input[type="number"] {
    width: 60px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.team-names-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-name-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.team-name-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}

.team-name-item input[type="text"]:focus {
    border-color: rgba(255,159,67,0.4);
}

#challenge-team-section {
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
}

/* ── Challenge verlassen Button ── */
.btn-ch-leave {
    padding: 8px 14px;
    background: rgba(255,107,107,0.08);
    border: 1px solid rgba(255,107,107,0.25);
    border-radius: 10px;
    color: #ff6b6b;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
    margin-left: auto;
}
.btn-ch-leave:hover {
    background: rgba(255,107,107,0.18);
}

/* ── Challenge Suche ── */
.ch-search-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.ch-search-field-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ch-field-btn {
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: #666;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.ch-field-btn:hover { color: #aaa; border-color: rgba(255,255,255,0.2); }
.ch-field-btn.active {
    background: rgba(255,159,67,0.12);
    border-color: rgba(255,159,67,0.4);
    color: #ff9f43;
}

.ch-search-input {
    width: 100%;
    padding: 9px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #d0d0d0;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}
.ch-search-input:focus {
    border-color: rgba(255,159,67,0.4);
}
.ch-search-input::placeholder { color: #444; }

/* ================================================================
   NOTIFICATION SETTINGS
   ================================================================ */

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
}

.notif-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.notif-label {
    font-size: 14px;
    font-weight: 500;
    color: #c0c8d0;
}

.notif-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

/* Toggle Switch */
.notif-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.notif-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.notif-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    transition: background .2s, border-color .2s;
}

.notif-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: #888;
    border-radius: 50%;
    transition: transform .2s, background .2s;
}

.notif-toggle input:checked + .notif-slider {
    background: rgba(255,159,67,0.2);
    border-color: rgba(255,159,67,0.5);
}

.notif-toggle input:checked + .notif-slider::before {
    transform: translateX(20px) translateY(-50%);
    background: #ff9f43;
}

/* ================================================================
   FRIENDS ÜBERARBEITET
   ================================================================ */

.friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background .15s;
}
.friend-item:hover { background: rgba(255,255,255,0.07); }

.friend-item-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,159,67,0.15);
    border: 1px solid rgba(255,159,67,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #ff9f43;
    flex-shrink: 0;
}

.friend-item-info {
    display: flex; flex-direction: column; gap: 2px;
    flex: 1; min-width: 0;
}

.friend-item-name {
    font-size: 14px; font-weight: 500; color: #d0d0d0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.friend-item-fullname {
    font-size: 12px; color: #555;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Aktions-Buttons */
.friend-action-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px; font-weight: 600;
    cursor: pointer; border: none;
    flex-shrink: 0; white-space: nowrap;
    transition: background .15s;
}
.friend-add-btn {
    background: rgba(255,159,67,0.15);
    border: 1px solid rgba(255,159,67,0.35) !important;
    color: #ff9f43;
}
.friend-add-btn:hover { background: rgba(255,159,67,0.28); }

.friend-accept-btn {
    background: rgba(46,204,113,0.15);
    border: 1px solid rgba(46,204,113,0.35) !important;
    color: #2ecc71;
}
.friend-accept-btn:hover { background: rgba(46,204,113,0.28); }

.friend-remove-btn, .friend-decline-btn {
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.25) !important;
    color: #ff6b6b;
}
.friend-remove-btn:hover, .friend-decline-btn:hover {
    background: rgba(255,107,107,0.22);
}

/* Placeholder */
.friend-placeholder {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    padding: 24px 16px; text-align: center;
}
.friend-placeholder-icon { font-size: 28px; }
.friend-placeholder-title { font-size: 14px; font-weight: 500; color: #555; }
.friend-placeholder-text  { font-size: 12px; color: #3a3a3a; }

/* ================================================================
   IMPRESSUM
   ================================================================ */

.impressum-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.impressum-section:last-of-type { border-bottom: none; }

.impressum-section h2 {
    font-size: 15px;
    font-weight: 600;
    color: #ff9f43;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 14px;
}

.impressum-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.impressum-block p {
    margin: 0;
    font-size: 14px;
    color: #c0c8d0;
    line-height: 1.6;
}

.impressum-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 14px;
    color: #c0c8d0;
    padding: 4px 0;
}
.impressum-label {
    color: #555;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    min-width: 70px;
    flex-shrink: 0;
}

.impressum-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 10px;
}
.impressum-text p:last-child { margin-bottom: 0; }

.impressum-link {
    color: #ff9f43;
    text-decoration: none;
}
.impressum-link:hover { text-decoration: underline; }

.impressum-source {
    font-size: 12px;
    color: #3a3a3a;
    margin-top: 8px;
}

/* ================================================================
   AVATAR UPLOAD
   ================================================================ */

.avatar-upload-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.avatar-preview {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,159,67,0.12);
    border: 2px solid rgba(255,159,67,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #ff9f43;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-upload-btn {
    display: inline-block;
    cursor: pointer;
    width: fit-content;
}

.avatar-hint {
    font-size: 12px;
    color: #555;
    margin: 0;
}

/* ================================================================
   PROFIL SECTION LABELS
   ================================================================ */

.profile-section-label {
    font-size: 13px;
    font-weight: 600;
    color: #ff9f43;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 4px;
}

.profile-section-desc {
    font-size: 12px;
    color: #555;
    margin: 0 0 20px;
}

/* ── Tipps Button ── */
.tips-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #888 !important;
    font-size: 12px !important;
}
.tips-btn:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #d0d0d0 !important;
}

/* ================================================================
   GOAL ACTIONS — NEU STRUKTURIERT
   ================================================================ */

.goal-actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Eintragen — volle Breite */
.goal-btn-primary-action {
    width: 100%;
    justify-content: center;
    padding: 10px 16px !important;
    font-size: 13px !important;
}

/* Icon-Buttons Reihe */
.goal-icon-btns {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.goal-icon-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.goal-icon-btn:hover {
    background: rgba(255,255,255,0.09);
    color: #aaa;
}

/* Herz-Button speziell */
.goal-icon-btn.like-btn { color: #555; }
.goal-icon-btn.like-btn.liked { color: #ef4444; }
.goal-icon-btn.like-btn .like-heart { width: 14px; height: 14px; }

/* Löschen rot */
.goal-icon-btn.delete {
    color: #555;
    flex: 0 0 40px;
}
.goal-icon-btn.delete:hover {
    background: rgba(255,107,107,0.1);
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.25);
}

/* Eintragen in der Reihe etwas breiter */
.goal-icon-btns .goal-icon-btn.add {
    flex: 2;
    color: #ff9f43;
    border-color: rgba(255,159,67,0.25);
    background: rgba(255,159,67,0.07);
}
.goal-icon-btns .goal-icon-btn.add:hover {
    background: rgba(255,159,67,0.15);
    color: #ffb347;
}

/* ================================================================
   GOAL ACTIONS — ÜBERARBEITET
   ================================================================ */
.goal-actions-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

/* Herz-Button: kompakt, kein flex-grow */
.goal-actions-bottom .like-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.goal-actions-bottom .like-btn:hover { background: rgba(255,255,255,0.08); color: #ef4444; }
.goal-actions-bottom .like-btn.liked { color: #ef4444; }
.goal-actions-bottom .like-btn .like-heart { width: 14px; height: 14px; }

/* Eintragen: nimmt verfügbaren Platz */
.goal-actions-bottom .goal-btn.add {
    flex: 1;
    min-width: 0;
    justify-content: center;
}

/* Sekundär-Buttons: drei kleine gleich groß */
.goal-secondary-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.goal-secondary-btns .goal-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    flex-shrink: 0;
}
.goal-secondary-btns .goal-btn.delete:hover {
    background: rgba(255,107,107,0.12);
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.25);
}

/* ================================================================
   GOAL ACTIONS GRID — 3×2
   ================================================================ */
.goal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    margin-top: 12px;
}

/* Basis-Button */
.gag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
    min-height: 40px;
}
.gag-btn:hover {
    background: rgba(255,255,255,0.09);
    color: #aaa;
}

/* Eintragen: mittlere Spalte, beide Zeilen */
.gag-center {
    grid-column: 2;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #ff9f43;
    background: rgba(255,159,67,0.1);
    border-color: rgba(255,159,67,0.25);
    min-height: 86px;
}
.gag-center:hover {
    background: rgba(255,159,67,0.18);
    color: #ffb347;
}

/* Herz */
.like-btn.gag-btn { color: #555; }
.like-btn.gag-btn.liked { color: #ef4444; }
.like-btn.gag-btn .like-heart { width: 16px; height: 16px; }

/* Löschen */
.goal-btn.delete.gag-btn:hover {
    background: rgba(255,107,107,0.12);
    color: #ff6b6b;
    border-color: rgba(255,107,107,0.25);
}

/* Goal Actions Grid — responsive Breite */
.goal-actions-grid {
    max-width: 320px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 600px) {
    .goal-actions-grid {
        max-width: 100%;
    }
    .gag-center {
        min-height: 96px;
    }
}

/* Fix: Spalten gleichmäßig, linke/rechte Buttons quadratisch */
.goal-actions-grid {
    grid-template-columns: 1fr 2fr 1fr;
}
.gag-btn:not(.gag-center) {
    aspect-ratio: 1 / 1;
    max-height: 60px;
}
/* Tipps-Button volle linke Spalte */
.goal-actions-grid .tips-btn {
    aspect-ratio: auto;
    height: auto;
}

/* Überschreibe: einheitliche Spalten, keine aspect-ratio Ausnahmen */
.goal-actions-grid {
    grid-template-columns: 1fr 2fr 1fr !important;
}
.gag-btn:not(.gag-center) {
    aspect-ratio: unset !important;
    max-height: unset !important;
    min-height: 44px;
}

/* ── Goal Actions: Grid auf Mobile, Zeile auf Desktop ── */
@media (min-width: 640px) {
    .goal-actions-grid {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        max-width: 100%;
    }

    /* Eintragen wieder als flex-Button */
    .gag-center {
        flex: 1;
        flex-direction: row !important;
        min-height: 40px !important;
        font-size: 13px !important;
        aspect-ratio: unset !important;
        grid-column: unset !important;
        grid-row: unset !important;
    }

    /* Kleine Buttons wieder normal */
    .gag-btn:not(.gag-center) {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        min-height: 40px !important;
        aspect-ratio: 1 / 1 !important;
    }
}
