/* === Variables === */
:root {
    --navy: #36454f;
    --gold: #cfb997;
    --cream: #f8f6f2;
    --white: #ffffff;
    --gray-100: #f0eee9;
    --gray-200: #e0ddd6;
    --gray-300: #b0ada6;
    --gray-400: #8a8780;
    --gray-500: #6a675f;
    --red: #c0392b;
    --green: #27ae60;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Base === */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Albert Sans', sans-serif;
    background: var(--cream);
    color: var(--navy);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Navbar === */
.navbar {
    background: var(--navy);
    padding: 0.5rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
}

.logo {
    color: var(--gold);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* === Container === */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* === Main === */
main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* === Footer === */
.footer {
    background: var(--navy);
    color: var(--gray-300);
    padding: 1.25rem 0;
    font-size: 0.85rem;
    text-align: center;
}

/* === Typography === */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--navy);
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-500);
}

/* === Progress Bar === */
.progress {
    margin-bottom: 2.5rem;
    position: relative;
}

.progress-track {
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
}

.dot-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.dot-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-dot.active .dot-number,
.progress-dot.done .dot-number {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}

.progress-dot.active .dot-label,
.progress-dot.done .dot-label {
    color: var(--navy);
}

/* === Wizard Steps === */
.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Form Elements === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

input[type="text"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: 'Albert Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--navy);
    background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(207, 185, 151, 0.15);
}

textarea {
    resize: vertical;
}

.hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.3rem;
}

/* === Option Buttons === */
.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-btn {
    padding: 0.55rem 1.2rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    font-family: 'Albert Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: var(--gold);
    background: rgba(207, 185, 151, 0.06);
}

.option-btn.selected {
    border-color: var(--gold);
    background: rgba(207, 185, 151, 0.12);
    color: var(--navy);
    box-shadow: 0 0 0 1px var(--gold);
}

/* === Euro Input === */
.euro-input {
    position: relative;
    display: flex;
    align-items: center;
}

.euro-input input {
    padding-right: 3.5rem;
    text-align: right;
}

.euro-suffix {
    position: absolute;
    right: 0.9rem;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

/* === File Input === */
.file-input {
    display: block;
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px dashed var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    font-family: 'Albert Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--navy);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.file-input:hover {
    border-color: var(--gold);
}

#file-list {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

#file-list .file-item {
    padding: 0.3rem 0;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Albert Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 0.4rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-gold:hover:not(:disabled) {
    background: #c4a87d;
}

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

.btn-navy:hover:not(:disabled) {
    background: #2a363e;
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--gray-200);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
}

/* === Wizard Nav === */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* === Children Rows === */
.child-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.child-row .form-group {
    margin-bottom: 0;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0.4rem;
    line-height: 1;
    transition: color 0.2s;
    align-self: end;
    margin-bottom: 0.35rem;
}

.btn-remove:hover {
    color: var(--red);
}

/* === Success Box === */
.success-box {
    text-align: center;
    padding: 3rem 1.5rem;
    max-width: 500px;
    margin: 2rem auto;
}

.success-icon {
    margin-bottom: 1.5rem;
}

.success-box h1 {
    color: var(--navy);
    margin-bottom: 1rem;
}

.success-box p {
    color: var(--gray-500);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.text-muted {
    color: var(--gray-400) !important;
    font-size: 0.85rem;
    margin-top: 1rem !important;
}

/* === Error Banner === */
.error-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Loading Spinner === */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Admin === */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-100);
}

.admin-table .clickable-row {
    cursor: pointer;
    transition: background 0.15s;
}

.admin-table .clickable-row:hover {
    background: var(--gray-100);
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--white);
}

.status-select {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-family: 'Albert Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--navy);
    background: var(--white);
}

.detail-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.detail-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.detail-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* === Responsive === */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .child-row {
        grid-template-columns: 1fr;
    }

    .btn-remove {
        justify-self: end;
    }

    .option-group {
        flex-direction: column;
    }

    .option-btn {
        width: 100%;
        text-align: center;
    }

    .progress-track {
        left: 20px;
        right: 20px;
    }

    .dot-label {
        font-size: 0.65rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }
}

/* === Immobilien === */
.immobilie-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--white);
}

.immobilie-card h3 {
    font-size: 1rem;
    color: var(--navy);
}

.immobilie-card .btn-remove {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    padding: 0 0.5rem;
    line-height: 1;
}

.immobilie-card select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--white);
    color: var(--navy);
}
