/* =====================================================
   steuererklaerung.jetzt - Dashboard Styles V1.04
   User Dashboard nach Login
   ===================================================== */

/* Dashboard Layout */
.dashboard-page {
    min-height: 100vh;
    background: var(--color-bg-page);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* Welcome Section */
.dashboard-welcome {
    margin-bottom: var(--space-xl);
}

.dashboard-welcome h1 {
    font-size: var(--font-size-2xl);
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.dashboard-welcome p {
    color: var(--color-text-secondary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Full Width Cards */
.dashboard-card.full-width {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .dashboard-card.two-thirds {
        grid-column: span 2;
    }
}

/* Dashboard Card Base */
.dashboard-card {
    background: var(--color-mask-bg);
    border: 2px solid var(--color-mask-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-mask);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.dashboard-card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-mask-text-dark);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.dashboard-card-title .icon {
    font-size: 1.25rem;
}

/* ===== A) STATUS-KARTE (Hero) ===== */
.status-card {
    background: linear-gradient(135deg, var(--color-mask-bg) 0%, #F0F4E8 100%);
    border-color: var(--color-accent-primary);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(60, 134, 135, 0.1);
    border-radius: 50%;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.status-info h2 {
    font-size: var(--font-size-xl);
    color: var(--color-mask-text-dark);
    margin-bottom: var(--space-xs);
}

.status-year {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.status-badge-large {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.status-badge-large.draft {
    background: rgba(245, 166, 35, 0.15);
    color: #B8860B;
}

.status-badge-large.questions {
    background: rgba(33, 150, 243, 0.15);
    color: #1565C0;
}

.status-badge-large.ready {
    background: rgba(156, 39, 176, 0.15);
    color: #7B1FA2;
}

.status-badge-large.paid {
    background: rgba(67, 160, 71, 0.15);
    color: #2E7D32;
}

.status-badge-large.submitted {
    background: rgba(67, 160, 71, 0.15);
    color: #2E7D32;
}

/* Progress Bar */
.progress-section {
    margin-bottom: var(--space-lg);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.progress-bar {
    height: 8px;
    background: rgba(83, 129, 197, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* Status CTA */
.status-cta {
    margin-top: var(--space-lg);
}

/* ===== B) ERSTATTUNG / NACHZAHLUNG ===== */
.refund-card {
    text-align: center;
}

.refund-amount {
    margin: var(--space-lg) 0;
}

.refund-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.refund-value {
    font-size: var(--font-size-4xl);
    font-weight: 800;
}

.refund-value.positive {
    color: var(--color-success);
}

.refund-value.negative {
    color: var(--color-error);
}

.refund-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
}

/* ===== C) KI-ASSISTENT HINWEIS ===== */
.ai-hint-card {
    background: linear-gradient(135deg, #F5F0FF 0%, var(--color-mask-bg) 100%);
    border-color: #9C27B0;
}

.ai-hint-content {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.ai-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-message {
    flex: 1;
}

.ai-message p {
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.ai-message .highlight {
    color: #7B1FA2;
    font-weight: 600;
}

.ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: #9C27B0;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ai-action-btn:hover {
    background: #7B1FA2;
    transform: translateY(-1px);
}

/* Premium Lock */
.premium-lock {
    text-align: center;
    padding: var(--space-lg);
}

.premium-lock-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.premium-lock h3 {
    font-size: var(--font-size-lg);
    color: var(--color-mask-text-dark);
    margin-bottom: var(--space-sm);
}

.premium-lock p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

/* ===== D) DOKUMENTENSTATUS ===== */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-field-bg);
    border: 1px solid var(--color-field-border);
    border-radius: var(--radius-md);
}

.document-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.document-icon {
    font-size: 1.5rem;
}

.document-name {
    font-weight: 500;
    color: var(--color-text-primary);
}

.document-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
}

.document-status.complete {
    color: var(--color-success);
}

.document-status.missing {
    color: var(--color-error);
}

.document-status.warning {
    color: var(--color-warning);
}

.document-actions {
    display: flex;
    gap: var(--space-sm);
}

.document-btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    background: var(--color-btn-secondary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.document-btn:hover {
    background: var(--color-btn-secondary-hover);
}

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

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

/* ===== E) ABGABE-CHECKLISTE ===== */
.checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.checklist-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.checklist-icon.done {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.checklist-icon.pending {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
    border: 2px solid #9E9E9E;
}

.checklist-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

.checklist-text.done {
    color: var(--color-success);
}

.checklist-text.pending {
    color: var(--color-text-muted);
}

/* ===== F) ZAHLUNG & ABGABE ===== */
.payment-card .price-display {
    text-align: center;
    padding: var(--space-lg) 0;
}

.price-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.price-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-mask-text-dark);
    margin: var(--space-sm) 0;
}

.price-note {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-field-bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.payment-status.pending {
    border: 1px solid var(--color-warning);
    color: #8B6914;
}

.payment-status.paid {
    border: 1px solid var(--color-success);
    color: var(--color-success);
}

/* PayPal Button Container */
#paypal-button-container {
    margin-top: var(--space-md);
}

/* ===== G) ABGABE-HISTORIE ===== */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-field-border);
}

.history-table th {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-mask-text);
    background: rgba(83, 129, 197, 0.05);
}

.history-table td {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

.history-table tr:last-child td {
    border-bottom: none;
}

.history-link {
    color: var(--color-accent-secondary);
    font-weight: 500;
}

.history-link:hover {
    text-decoration: underline;
}

/* ===== H) SOCIAL PROOF ===== */
.social-proof-card {
    text-align: center;
    background: linear-gradient(135deg, #E8F5E9 0%, var(--color-mask-bg) 100%);
}

.social-proof-stat {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--color-success);
    margin: var(--space-md) 0;
}

.social-proof-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* ===== I) SICHERHEITSHINWEIS ===== */
.security-notice {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-info-bg);
    border: 1px solid var(--color-info);
    border-radius: var(--radius-md);
}

.security-notice .icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.security-notice p {
    font-size: var(--font-size-sm);
    color: #1565C0;
    margin: 0;
}

/* ===== ABO STATUS CARD ===== */
.abo-card {
    background: linear-gradient(135deg, #FFF8E1 0%, var(--color-mask-bg) 100%);
    border-color: var(--color-warning);
}

.abo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-field-bg);
    border-radius: var(--radius-md);
}

.abo-details h4 {
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.abo-details p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.abo-price {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-success);
}

.abo-manage-link {
    display: block;
    text-align: center;
    margin-top: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ===== FLOATING AI BUTTON ===== */
.ai-fab {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 100;
    border: none;
}

.ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(156, 39, 176, 0.5);
}

.ai-fab.disabled {
    background: #9E9E9E;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
}

/* ===== AI CHAT WINDOW ===== */
.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: var(--space-xl);
    width: 380px;
    max-height: 500px;
    background: var(--color-field-bg);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 101;
    overflow: hidden;
    display: none;
}

.ai-chat-window.open {
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ai-chat-header-info h4 {
    color: white;
    font-size: var(--font-size-base);
    margin: 0;
}

.ai-chat-header-info span {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.7);
}

.ai-chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ai-chat-messages {
    flex: 1;
    height: 300px;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ai-message-bubble {
    max-width: 85%;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.ai-message-bubble.assistant {
    background: #F3E5F5;
    color: var(--color-text-primary);
    align-self: flex-start;
}

.ai-message-bubble.user {
    background: var(--color-btn-primary);
    color: white;
    align-self: flex-end;
}

.ai-chat-input-area {
    padding: var(--space-md);
    border-top: 1px solid var(--color-field-border);
    display: flex;
    gap: var(--space-sm);
}

.ai-chat-input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-field-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
}

.ai-chat-input:focus {
    outline: none;
    border-color: #9C27B0;
}

.ai-chat-send {
    padding: var(--space-sm) var(--space-md);
    background: #9C27B0;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.ai-chat-send:hover {
    background: #7B1FA2;
}

/* Responsive AI Chat */
@media (max-width: 480px) {
    .ai-chat-window {
        right: var(--space-md);
        left: var(--space-md);
        width: auto;
        bottom: 90px;
    }
    
    .ai-fab {
        right: var(--space-md);
        bottom: var(--space-md);
    }
}

/* ===== HEADER NAV FOR DASHBOARD ===== */
.dashboard-header {
    background: var(--color-header);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-md);
}

.dashboard-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.dashboard-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    color: white;
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: var(--font-size-sm);
}

.user-name {
    color: white;
    font-size: var(--font-size-sm);
}

.logout-btn {
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Mobile Header */
@media (max-width: 768px) {
    .dashboard-nav {
        display: none;
    }
    
    .user-name {
        display: none;
    }
}
