/* STYLE – Alle Designs */

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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --border: #e0e0e0;
    --text: #333;
    --text-muted: #666;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.main {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.content {
    padding: 30px;
}

.section {
    margin-bottom: 40px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light);
}

/* FORMULARE */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* RADIO & CHECKBOX */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-item:hover,
.checkbox-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--primary);
}

.radio-item input,
.checkbox-item input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.radio-item label,
.checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

/* KATEGORIE */
.category-container {
    background: var(--light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
}

.category-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.category-input input {
    flex: 1;
    margin: 0;
}

.category-input button {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.category-input button:hover {
    background: var(--primary-dark);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-item-small {
    display: flex;
    align-items: center;
    padding: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.checkbox-item-small input {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

.checkbox-item-small label {
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

/* ITEMS */
.items-list {
    background: white;
    border-radius: 8px;
    padding: 12px;
}

.items-list p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.item-entry {
    background: var(--light);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.item-entry:last-child {
    margin-bottom: 0;
}

.item-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    flex: 1;
}

.item-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.label-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.item-delete {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.item-delete:hover {
    background: #c82333;
}

/* BUTTONS */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* STATISTIK */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--light);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* PROGRESS BAR */
.progress-bar {
    height: 24px;
    background: var(--light);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.3s ease;
}

/* ÜBERSICHT */
.overview-item {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.overview-left {
    flex: 1;
}

.overview-person {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.overview-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.overview-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* WARNUNG */
.warning {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.warning strong {
    color: var(--text);
    display: block;
    margin-bottom: 5px;
}

.warning small {
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }

    .container {
        padding: 15px;
    }

    .content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .category-input {
        flex-direction: column;
    }

    .category-input button {
        width: 100%;
    }

    .item-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-delete {
        width: 100%;
    }
}


/* ==========================================================
   NUR REPARATUR-PATCH DESIGN: bessere Kacheln, keine Quetschung
   ========================================================== */

.carousel-item,
.app-tile {
    flex: 0 0 clamp(360px, 54vw, 560px) !important;
    min-height: 168px !important;
    padding: 26px 34px !important;
    border-radius: 30px !important;
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 24px !important;
}

.carousel-item .emoji,
.app-tile .emoji,
.emoji {
    font-size: clamp(54px, 7vw, 78px) !important;
    min-width: 88px !important;
    margin-bottom: 0 !important;
    text-align: center !important;
}

.tile-copy {
    display: block;
    min-width: 0;
    flex: 1;
}

.carousel-item h3,
.app-tile h3 {
    font-size: clamp(22px, 3vw, 30px) !important;
    line-height: 1.12 !important;
    margin: 0 0 8px !important;
    white-space: normal !important;
}

.carousel-item p,
.app-tile p {
    font-size: clamp(14px, 1.7vw, 16px) !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}

.premium-category-tile {
    align-items: flex-start !important;
}

.category-preview-list,
.category-preview-empty {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,.78);
    max-height: 78px;
    overflow: hidden;
}

.category-preview-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 3px 0;
}

.category-preview-empty {
    color: rgba(255,255,255,.48);
    font-style: italic;
}

.preview-labels {
    color: rgba(255,255,255,.62);
}

.beschriften-hinweis,
.no-labels-hint {
    color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    margin: 16px 0 0;
}

@media (max-width: 768px) {
    .app-menu-section {
        grid-template-columns: 44px 1fr 44px !important;
        gap: 10px !important;
    }

    .carousel-btn {
        width: 44px !important;
        height: 44px !important;
    }

    .carousel-item,
    .app-tile {
        flex: 0 0 86vw !important;
        min-height: 150px !important;
        padding: 22px 20px !important;
        gap: 16px !important;
    }

    .carousel-item .emoji,
    .app-tile .emoji,
    .emoji {
        min-width: 58px !important;
        font-size: 48px !important;
    }

    .category-preview-list,
    .category-preview-empty {
        font-size: 12px;
        max-height: 58px;
    }
}
