/* =========================================
   GLOBAL – COLORS, TYPOGRAPHY, BASE
========================================= */

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;

    --accent-green: #16A34A;
    --accent-yellow: #FACC15;
    --accent-red: #DC2626;

    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;

    --text: #111827;
    --text-muted: #6B7280;

    --card: #FFFFFF;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
}

body {
    background: var(--gray-50);
    font-family: system-ui, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text);
}

/* =========================================
   GROUP HEADER + JOIN CODE
========================================= */

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.group-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.group-avatar {
    width: 55px;
    height: 55px;
    background: var(--primary);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 28px;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.group-title-box h1 {
    margin: 0;
    font-size: 26px;
}

.group-subtitle {
    margin: 0;
    color: var(--gray-500);
}

.join-box {
    background: var(--gray-100);
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-join-btn {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: .2s;
}

.copy-join-btn:hover {
    background: var(--primary-hover);
}

/* =========================================
   NAVIGATION TABS
========================================= */

.nav-tabs {
    display: flex;
    gap: 12px;
    background: var(--gray-100);
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    transition: .2s;
}

.nav-btn.active {
    background: var(--primary);
    color: white;
}

.nav-btn i {
    font-size: 18px;
}

/* =========================================
   OVERVIEW / DASHBOARD
========================================= */

#tab-content {
    margin-top: 20px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.overview-card {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: .2s;
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--gray-200);
    border-radius: 6px;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 6px;
    transition: width .4s ease;
}

/* =========================================
   MEMBERS LIST
========================================= */

.member-item {
    background: var(--card);
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.role-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
}

.role-badge.owner { background: #8e44ad; }
.role-badge.admin { background: #3498db; }
.role-badge.member { background: #2ecc71; }

.member-controls button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: var(--gray-200);
    cursor: pointer;
    margin-left: 6px;
}

/* =========================================
   TASKS — KANBAN
========================================= */

.kanban {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius);
}

.task-card {
    background: var(--card);
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-bottom: 10px;
    cursor: pointer;
    transition: .2s;
}

.task-card:hover {
    transform: translateY(-2px);
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
}

.priority-badge.low { background:#d1fae5; color:#047857; }
.priority-badge.medium { background:#fef3c7; color:#a16207; }
.priority-badge.high { background:#fee2e2; color:#b91c1c; }

.delete-btn {
    background: var(--accent-red);
    padding: 5px 8px;
    border-radius: 6px;
    color: white;
    border: none;
}

/* =========================================
   MODALS (Events / Tasks)
========================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal {
    background: white;
    padding: 22px;
    border-radius: 14px;
    width: 320px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

/* =========================================
   POLLS (Umfragen)
========================================= */

.poll-box {
    background: var(--card);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.poll-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.poll-fill {
    height: 8px;
    background: linear-gradient(90deg, var(--primary), #6A5BFF);
    border-radius: 6px;
    transition: width .3s ease;
}

/* =========================================
   MONEY (KASSE)
========================================= */

.money-item {
    background: var(--card);
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.money-cat.einnahme {
    color: var(--accent-green);
    font-weight: bold;
}

.money-cat.ausgabe {
    color: var(--accent-red);
    font-weight: bold;
}

/* =========================================
   BACK BUTTON
========================================= */

.back-btn {
    margin-top: 30px;
    padding: 12px 18px;
    background: var(--accent-green);
    border-radius: var(--radius);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 15px;
}

/* =========================================
   RESPONSIVE FIXES
========================================= */

@media(max-width: 600px) {
    .group-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .kanban {
        flex-direction: column;
    }
}
/* ============================
   DASHBOARD HEADER
============================ */

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h2 {
    font-size: 26px;
    margin: 0;
}

.dashboard-sub {
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================
   GRID LAYOUT
============================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

/* ============================
   DASH CARDS
============================ */

.dash-card {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: .2s;
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.dash-card h3 {
    margin: 10px 0 6px 0;
    font-size: 18px;
}

.dash-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================
   DASHBOARD ICONS
============================ */

.dash-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: white;
    margin-bottom: 10px;
}

.icon-blue { background: #3b82f6; }
.icon-yellow { background: #facc15; color:#333; }
.icon-green { background: #22c55e; }
.icon-purple { background: #a855f7; }

/* ============================
   PROGRESS BAR
============================ */

.dash-progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 6px;
    margin-top: 10px;
}

.dash-progress div {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width .35s ease;
}

/* ============================
   ACTIVITY LIST
============================ */

.activity-title {
    margin-top: 25px;
    margin-bottom: 10px;
}

.activity-list {
    background: var(--card);
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.activity-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item small {
    color: var(--gray-500);
    font-size: 12px;
}

.activity-item span {
    font-size: 14px;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header h2 {
    font-size: 26px;
    font-weight: 700;
}

.dashboard-sub {
    color: var(--text-muted);
    margin-top: -6px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.dash-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.dash-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-mini {
    font-size: 13px;
    background: var(--gray-100);
    padding: 4px 8px;
    border-radius: 6px;
    color: var(--text-muted);
}

.dash-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 22px;
}

.icon-blue { background: #3b82f6; }
.icon-yellow { background: #fbbf24; }
.icon-green { background: #34d399; }
.icon-purple { background: #a855f7; }

.dash-progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 6px;
    margin-top: 10px;
}

#ov-tasks-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    width: 0%;
    transition: width 0.4s ease;
}
/* =========================================
   DASHBOARD MAIN PAGE (dashboard.html)
   ========================================= */

.dash-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.dash-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
}

.group-list-box {
    background: white;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    margin-bottom: 25px;
}

.group-list-box h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-list {
    list-style: none;
    padding-left: 0;
}

.group-list li {
    margin: 8px 0;
}

.group-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.group-list a:hover {
    text-decoration: underline;
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.dash-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.dash-card h3 {
    margin-top: 0;
}

.dash-card input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
}

.dash-card button {
    width: 100%;
    padding: 10px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 6px;
}

.dash-card button:hover {
    background: var(--primary-hover);
}

.logout-btn {
    margin-top: 25px;
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #b91c1c;
}

/* Kommentare */
.comment {
    background: #f3f4f6;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
}

.comment-time {
    font-size: 11px;
    color: #666;
}

/* Chat */
.chat-box {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-msg {
    margin-bottom: 10px;
}

.chat-user {
    font-size: 12px;
    font-weight: bold;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
}

.chat-input button {
    padding: 10px;
}
.chat-box {
    height: 350px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    max-width: 75%;
}

.chat-msg-user {
    font-size: 12px;
    font-weight: bold;
    color: #555;
}

.chat-msg-text {
    margin: 4px 0;
    font-size: 15px;
}

.chat-msg-time {
    font-size: 11px;
    color: #777;
    text-align: right;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #bbb;
}

.chat-input-area button {
    padding: 10px 18px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
}




/* =========================================
   LOGIN PAGE – MODERNES UI
========================================= */

.login-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--gray-50);
}

.login-card {
    width: 360px;
    background: white;
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 800;
}

.login-card p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

.login-input {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    font-size: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.login-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
}

.login-btn:hover {
    background: var(--primary-hover);
}

.register-link {
    margin-top: 15px;
    display: block;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

/* =========================================
   LOGIN UI – MODERNES DESIGN
========================================= */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--gray-50);
}

.login-card {
    width: 360px;
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.login-card h1 {
    margin: 0 0 5px;
    font-size: 32px;
    font-weight: 800;
}

.subtitle {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.login-input {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    font-size: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.login-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
}

.login-btn:hover {
    background: var(--primary-hover);
}

.secondary-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: var(--gray-200);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
}

.secondary-btn:hover {
    background: var(--gray-300);
}

.error-msg {
    margin-top: 15px;
    color: red;
    font-size: 14px;
}

.info-msg {
    margin-top: 18px;
    font-size: 14px;
    color: var(--primary);
}

