/**
 * Trennlotse.de - Styles
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg: #f8fafc;
    --fg: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--fg);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: var(--secondary);
    text-decoration: none;
}

.nav a:hover {
    color: var(--primary);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 5px 15px;
    font-size: 0.9rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Features */
.features {
    padding: 60px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* How it works */
.how-it-works {
    background: var(--card-bg);
    padding: 60px 0;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 10px;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 30px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--muted);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.checkbox input {
    width: auto;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid var(--success);
    color: var(--success);
}

/* Dashboard */
.dashboard {
    padding: 30px 0;
}

/* Partner Invite */
.partner-invite {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid var(--primary);
}

.partner-code {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--radius);
    margin: 15px 0;
    text-align: center;
}

.partner-code code {
    font-size: 1.2rem;
    font-family: monospace;
}

/* Progress */
.progress-overview {
    margin-bottom: 30px;
}

.progress-bar {
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: var(--muted);
}

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

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--muted);
    margin-bottom: 15px;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h2 {
    margin-bottom: 20px;
}

/* Next Steps */
.next-items {
    list-style: none;
}

.next-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.next-items li:last-child {
    border-bottom: none;
}

.item-category {
    font-size: 1.2rem;
}

.item-title {
    flex: 1;
}

.item-due {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    margin-top: 30px;
}

.quick-actions h2 {
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--fg);
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary);
    background: #f0f9ff;
    text-decoration: none;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.action-text {
    font-weight: 500;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-offen {
    background: #fef3c7;
    color: #92400e;
}

.badge-bearbeitung {
    background: #dbeafe;
    color: #1e40af;
}

.badge-erledigt {
    background: #d1fae5;
    color: #065f46;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-col h4 {
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    color: var(--muted);
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-minimal {
    text-align: center;
    padding: 20px;
    color: var(--muted);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 1000;
}

.cookie-banner p {
    margin: 0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text);
}

.modal h2 {
    margin-bottom: 20px;
}

/* Vorlagen Modal */
.template-category {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.template-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.template-items {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.template-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.template-items li:last-child {
    border-bottom: none;
}

.template-items .priority-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Template Checkbox Styling */
.template-item-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.template-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.template-item-title {
    flex: 1;
}

.template-item-label:hover .template-item-title {
    color: var(--primary);
}

.btn-add-selected:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.priority-hoch {
    background: #fee2e2;
    color: #dc2626;
}

.priority-mittel {
    background: #fef3c7;
    color: #d97706;
}

.priority-niedrig {
    background: #d1fae5;
    color: #059669;
}

/* Dashboard - Nächste Schritte klickbar */
.next-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.next-item-row:last-child {
    border-bottom: none;
}

.next-item-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-decoration: none;
    color: var(--text);
}

.next-item-link:hover {
    color: var(--primary);
}

.next-item-link .item-title {
    flex: 1;
}

.btn-success {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

/* Zweispaltiges Layout Checkliste */
.checkliste-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.checkliste-left .card {
    position: sticky;
    top: 20px;
}

.checkliste-right {
    min-width: 0;
}

.checkliste-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 900px) {
    .checkliste-grid {
        grid-template-columns: 1fr;
    }
    
    .checkliste-left .card {
        position: static;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}