/* RD Formstack Solutions - Stylesheet */

/* ===== Lokale Fonts (DSGVO-konform, kein externer Google Fonts Aufruf) ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --primary-color: #2E9B5E;
    --primary-dark: #247D4B;
    --primary-light: #e8f5ee;
    --secondary-color: #64748b;
    --accent-color: #2D3436;
    --success-color: #2E9B5E;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #ffffff;
    --bg-secondary: #f7faf8;
    --text-color: #2D3436;
    --text-light: #94A3B8;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

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

/* Navigation */
.navbar {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

/* Logo Styles */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-brand .logo-img {
    height: 40px;
    width: auto;
}

.nav-brand h1,
.nav-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.2;
}

.nav-brand h1 .logo-rd,
.nav-brand h2 .logo-rd {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-brand h1 .logo-formstack,
.nav-brand h2 .logo-formstack {
    color: var(--accent-color);
    font-weight: 700;
}

.nav-brand .logo-subtitle {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a6b3c 0%, #2E9B5E 50%, #3cb371 100%);
    color: white;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-graphic {
    width: 100%;
    max-width: 400px;
    color: rgba(255, 255, 255, 0.3);
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Services */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* References */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.reference-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.2s;
}

.reference-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.reference-card.detailed {
    padding: 2.5rem;
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.reference-header h2,
.reference-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.reference-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

.reference-content {
    margin-top: 1.5rem;
}

.reference-description {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.reference-features {
    margin-bottom: 1.5rem;
}

.reference-features h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.reference-features ul {
    list-style: none;
    padding-left: 0;
}

.reference-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.reference-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.reference-tech {
    margin-bottom: 1.5rem;
}

.reference-tech h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.reference-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: gap 0.2s;
}

.reference-link:hover {
    gap: 0.75rem;
}

/* Contact */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    margin: 1rem 0;
}

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

/* Footer */
.footer {
    background: var(--accent-color);
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    font-size: 1.25rem;
    line-height: 1.3;
}

.footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #1a6b3c 0%, #2E9B5E 50%, #3cb371 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
}

.login-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 155, 94, 0.15);
}

.error-message {
    background: #fee2e2;
    color: var(--danger-color);
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

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

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

.dashboard-nav {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

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

.dashboard-main {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    color: var(--text-color);
}

.dashboard-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-color);
    cursor: pointer;
}

/* Receipts List */
.receipts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.receipt-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
}

.receipt-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.receipt-category {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

.receipt-category.einnahmen {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.receipt-category.ausgaben {
    background: #fee2e2;
    color: #991b1b;
}

.receipt-category.sonstige {
    background: #e0e7ff;
    color: #3730a3;
}

.receipt-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.receipt-info {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.receipt-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

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

.modal-content {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 1.5rem;
}

/* Upload */
.upload-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-option {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-option h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.upload-option p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.upload-preview {
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.upload-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

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

/* Booking Suggestions */
.booking-suggestions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.booking-suggestions h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.suggestion-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.suggestion-item .account {
    font-weight: 600;
    color: var(--primary-color);
}

.suggestion-item .amount {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
        padding-top: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .upload-options {
        grid-template-columns: 1fr;
    }
    
    .receipts-list {
        grid-template-columns: 1fr;
    }
}

/* Page Title */
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.references-page {
    padding: 4rem 0;
}

/* Receipt Detail Styles */
.receipt-detail {
    padding: 1rem 0;
}

.receipt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
}

.receipt-amount-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
    text-align: center;
}

.receipt-detail-info {
    margin: 1.5rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-row strong {
    color: var(--text-color);
    min-width: 150px;
}

.receipt-status {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Legal Pages */
.legal-page {
    padding: 3rem 0 4rem;
    min-height: 70vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-block:last-child {
    border-bottom: none;
}

.legal-block h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.legal-block h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
}

.legal-block p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-block ul {
    margin: 0.75rem 0 0.75rem 1.5rem;
    line-height: 1.8;
}

.legal-block ul li {
    margin-bottom: 0.35rem;
    color: var(--text-color);
}

.legal-block a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.legal-block a:hover {
    text-decoration: underline;
}

.legal-block em {
    color: var(--text-light);
}

/* Footer Links */
.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    padding: 1.25rem 0;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-decline:hover {
    border-color: white;
}

@media (max-width: 768px) {
    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .legal-block h2 {
        font-size: 1.3rem;
    }
}
