/* Akquise-Tool – Styles (angelehnt an Finabase) */

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #fdf8f1;
}

h1 {
    font-size: 30px;
    text-align: center;
}

h2 {
    font-size: 25px;
    opacity: 0.7;
    text-align: center;
}

h3 { padding-top: 10px; font-size: 20px; }
h4 { font-size: 18px; }
p { font-size: 18px; margin-top: 3px; margin-bottom: 5px; }

/* Navigation */
nav {
    background-color: #DD3333;
    color: #fff;
    padding: 12px 10px;
    min-height: 56px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-right: 20px;
    font-size: 18px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    display: block;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #C02A2A;
}

/* Hamburger */
.hamburger-container {
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: absolute;
    left: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger-label {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    user-select: none;
}

/* Main */
main {
    flex: 1;
    padding: 20px;
    margin-top: 64px;
    padding-bottom: 80px;
}

/* Dashboard Cards */
.dashboard-cards {
    max-width: 1400px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 20px auto;
    padding: 0 20px;
}

.dashboard-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
    padding: 0;
    display: flex;
    overflow: hidden;
}

.dashboard-card-icon {
    width: 120px;
    min-height: 100%;
    height: 48px;
    border-right: 1px solid #e5e7eb;
    border-radius: 16px 0 0 16px;
    display: flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    font-size: 48px;
}

.dashboard-card-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 0;
}

.dashboard-card-title {
    font-size: 26px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.dashboard-card-subtitle {
    font-size: 22px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.dashboard-card-content {
    margin: 0;
    font-size: 16px;
}

.dashboard-card-content p {
    padding-top: 10px;
    color: #6b7280;
}

.dashboard_highlight {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: transparent;
    border: 1px solid black;
    color: black;
    font-size: 16px;
    font-weight: 600;
    display: inline-block;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.dashboard-card.clickable-card {
    cursor: pointer;
}

.dashboard-card.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* Buttons */
button {
    padding: 12px;
    border: 1px solid #DD3333;
    color: black;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #C02A2A;
    color: white;
}

.button-group {
    display: inline-flex;
    gap: 10px;
}

/* Forms */
input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 18px;
    box-sizing: border-box;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 18px;
    resize: vertical;
    box-sizing: border-box;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

/* Auth */
.welcome-card,
.auth-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.welcome-card h2 {
    margin-bottom: 1rem;
    color: #DD3333;
}

.welcome-card p {
    margin-bottom: 1rem;
    color: #6b7280;
}

.btn {
    background-color: white;
    color: black;
    padding: 0.75rem 1.5rem;
    border: 1px solid #DD3333;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: #DD3333;
    color: white;
}

.btn-primary:hover {
    background-color: #C02A2A;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #2ecc71;
    color: white;
}

.btn-secondary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-block {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #DD3333;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.auth-form {
    text-align: left;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.auth-footer a {
    color: #DD3333;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.error-message,
.success-message {
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.error-message {
    background-color: #fee;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.success-message {
    background-color: #efe;
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

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

.page-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    text-align: center;
}

.page-header .back-button {
    display: inline-block;
    color: #DD3333;
    text-decoration: none;
    margin-right: 15px;
    font-size: 15px;
    padding: 8px 20px;
    border: 2px solid #DD3333;
    border-radius: 8px;
}

.page-header .back-button:hover {
    background-color: #DD3333;
    color: #fff;
    text-decoration: none;
}

/* Tabellen (Finabase-Stil) */
.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}
.form-section h3 { margin-top: 0; margin-bottom: 15px; color: #333; }

/* Auf- und zuklappbar (Kontaktformular) */
.form-section--collapsible { padding-top: 12px; }
.form-section__toggle {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: #DD3333;
    list-style: none;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    user-select: none;
}
.form-section__toggle::-webkit-details-marker { display: none; }
.form-section__toggle::before {
    content: '▶ ';
    font-size: 0.85em;
    opacity: 0.8;
}
.form-section--collapsible[open] .form-section__toggle::before {
    content: '▼ ';
}
.form-section__toggle:hover { background: #f8f9fa; }
.form-section--collapsible[open] .form-section__toggle { margin-bottom: 16px; }
.form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 1rem;
}
.form-section .form-group--full { grid-column: 1 / -1; }
@media (max-width: 600px) {
    .form-section .form-row { grid-template-columns: 1fr; }
}
.form-inline-message { margin-left: 12px; font-size: 14px; }
.table-header { margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.table-header h3 { margin: 0; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay--open {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fdf8f1;
    border-radius: 12px 12px 0 0;
}
.modal__title { margin: 0; font-size: 1.25rem; color: #1f2937; }
.modal__close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
}
.modal__close:hover { color: #DD3333; }
.modal__body { padding: 20px; }
.modal__body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 1rem;
}
.modal__body .form-group--full { grid-column: 1 / -1; }
@media (max-width: 600px) {
    .modal__body .form-row { grid-template-columns: 1fr; }
}
.modal__footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}
.data-table thead { background-color: #DD3333; color: white; }
.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}
.data-table tbody tr:hover { background-color: #f9fafb; }
.data-table .search-row { background-color: #f3f4f6; }
.data-table .search-row input,
.data-table .search-row select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.action-btn {
    background: transparent;
    border: 1px solid #DD3333;
    color: black;
    padding: 6px 10px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}
.action-btn:hover { background: #C02A2A; color: white; }
a.action-btn { text-decoration: none; color: black; display: inline-block; }
a.action-btn:hover { color: white; }
.action-btn--has-notes { background: #DD3333; color: white; }
a.action-btn--has-notes { color: white; }
a.action-btn--has-notes:hover { background: #C02A2A; color: white; }
.action-btn.small { padding: 4px 8px; font-size: 12px; }

.pagination-controls {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.pagination-browser-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.pagination-btn {
    background: #DD3333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}
.pagination-btn:hover:not(:disabled) { background: #C02A2A; }
.pagination-btn:disabled { background: #ccc; cursor: not-allowed; }
#clear-all-search-btn { display: block; align-self: center; width: auto; margin-bottom: 10px; }
.pagination-info { font-size: 14px; color: #333; margin: 0 10px; }

.data-table .mobile-label { display: none; }
.data-table .mobile-content { display: inline-block; white-space: nowrap; }

@media (max-width: 768px) {
    .data-table { display: block; }
    .data-table thead { display: none; }
    .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tr {
        margin-bottom: 15px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }
    .data-table td { border: none; padding: 8px 0; text-align: left; }
    .data-table .mobile-label {
        font-weight: 600;
        color: #DD3333;
        display: inline-block;
        min-width: 120px;
        margin-right: 10px;
    }
    .data-table .mobile-content { display: inline-block; }
    .pagination-controls { width: 100%; flex-direction: column; }
}

/* Mobile */
@media (max-width: 1200px) {
    .hamburger-container {
        display: flex;
    }

    nav {
        justify-content: space-between;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 0;
        margin: 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    nav ul li a {
        padding: 15px 20px;
        color: #333;
    }

    nav ul li a:hover {
        background-color: #f3f4f6;
        color: #DD3333;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 1024px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 10px;
    }

    .dashboard-card {
        flex-direction: column;
        height: auto;
    }

    .dashboard-card-icon {
        width: 100%;
        min-height: 80px;
        font-size: 40px;
        border-bottom: 1px solid #e5e7eb;
        border-right: none;
        border-radius: 16px 16px 0 0;
        background: radial-gradient(circle, #ede7df 35px, transparent 35px);
    }

    .dashboard-card-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        padding: 0 5px;
    }

    .dashboard-card-body {
        padding: 18px;
    }
}
