/* --- Basis-Styling & Dark Theme (übernommen aus dem bestehenden Design) --- */
:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --bg: #0f1115;
    --card-bg: rgba(255, 255, 255, 0.04);
    --error: #ff4b4b;
    --success: #10b981;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg);
    background-image: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 40px 20px;
    text-align: center;
    min-height: 100vh;
    margin: 0;
}

html { scroll-behavior: smooth; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span { color: var(--accent); }

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

nav a.nav-admin {
    background: var(--primary);
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

nav a.nav-admin:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: transparent;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.hero .hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* --- Sektionen Allgemein --- */
section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

section.tight { padding: 40px 5%; }

/* Abstand unter dem fixierten Header auf Unterseiten ohne Hero. */
section.page-top { padding-top: 140px; }

@media (max-width: 768px) {
    section.page-top { padding-top: 110px; }
}

.card {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 24px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card.narrow { max-width: 560px; }
.card.medium { max-width: 820px; }

h2.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-main);
    background: linear-gradient(to right, #fff, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

h2.section-title.sub { margin-bottom: 14px; }

p.section-sub {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.05rem;
}

/* --- Leistungs-Grid (ersetzt die Projekt-Karten) --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.service-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 28px 24px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 4px solid var(--primary);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
}

.service-card i {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 14px;
    display: block;
}

.service-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Zentrierte Zahlen-Kachel, z. B. Statistiken im Admin-Dashboard. */
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card p { margin-top: 4px; }

/* --- Buttons --- */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: var(--text-main);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-danger {
    background: var(--error);
    box-shadow: 0 4px 15px rgba(255, 75, 75, 0.35);
}

.btn-danger:hover {
    background: #e03d3d;
    box-shadow: 0 6px 20px rgba(255, 75, 75, 0.5);
}

.btn-block { width: 100%; }

/* Kleine Variante für Aktionen in Tabellenzeilen. */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.88rem;
    border-radius: 6px;
}

/* --- Formulare --- */
.form { text-align: left; }

.form .field { margin-bottom: 22px; }

.form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Ein gemeinsamer, einheitlicher Look für ALLE Eingabefelder: Textfelder,
   Zahl-/URL-/E-Mail-Felder, Dropdowns und Textareas. Nichts erbt hier vom
   Browser-Standard-Styling, damit Chrome/Firefox/Safari identisch aussehen. */
.form input[type=text],
.form input[type=email],
.form input[type=password],
.form input[type=number],
.form input[type=url],
.form select,
.form textarea,
.input,
.select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form input::placeholder,
.form textarea::placeholder,
.input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form input:hover,
.form select:hover,
.form textarea:hover,
.input:hover,
.select:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.input:focus,
.select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.form input:disabled,
.form select:disabled,
.form textarea:disabled,
.input:disabled,
.select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form input.has-error,
.form select.has-error,
.form textarea.has-error {
    border-color: var(--error);
}

/* Dropdowns bekommen überall denselben eigenen Pfeil statt des
   Browser-Standards, plus Platz rechts damit der Text ihn nie überlappt. */
.form select,
.select {
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.form select:focus,
.select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b5cf6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form select::-ms-expand { display: none; }
.form select option,
.select option { background: #1a1d24; color: var(--text-main); }

/* Kompakte Variante für Dropdowns außerhalb großer Formulare, z. B. in
   Tabellenzeilen (Rollen-Auswahl in der Benutzerverwaltung). */
.select-sm {
    padding: 8px 36px 8px 14px;
    font-size: 0.92rem;
    background-position: right 12px center;
}

.form textarea { min-height: 130px; resize: vertical; }

/* Zahlenfelder: eigene, dezente Spinner-Pfeile statt der klobigen
   Browser-Variante, konsistent in Webkit-Browsern. */
.form input[type=number] { -moz-appearance: textfield; }
.form input[type=number]::-webkit-outer-spin-button,
.form input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form .help { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; }
.form .field-error { color: var(--error); font-size: 0.88rem; margin-top: 6px; display: flex; align-items: center; gap: 6px; }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 32px;
    flex-wrap: wrap;
}

.code-input {
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.6rem !important;
    font-weight: 700;
    font-family: monospace !important;
}

/* Kompakte Inline-Formulare, z. B. "Rolle ändern" in einer Tabellenzeile. */
.form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* --- Alerts --- */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.alert-error {
    border-color: rgba(255, 75, 75, 0.4);
    background: rgba(255, 75, 75, 0.1);
    color: #ffc9c9;
}

.alert-success {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
    color: #a7f3d0;
}

/* --- Stepper --- */
.stepper {
    display: flex;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.stepper .step {
    flex: 1 1 0;
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.stepper .step.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-main);
    border-color: var(--accent);
}

.stepper .step.done {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.5);
}

.progress-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 36px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* --- Tabellen --- */
.table-wrap { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

table.data th,
table.data td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

table.data th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

table.data tr:last-child td { border-bottom: none; }
table.data td code { font-family: monospace; color: var(--accent); font-size: 0.9rem; }

.status {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.new         { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.status.in_progress { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.status.contacted   { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; }
.status.completed   { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* --- Summary Liste --- */
.summary-list { text-align: left; }

.summary-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.summary-item .q {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 6px;
}

.summary-item .a { font-weight: 600; }

/* --- Preis-Kalkulation --- */
.price-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.04));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    padding: 28px;
    margin: 32px 0;
    text-align: left;
}

.price-head { text-align: center; margin-bottom: 8px; }

.price-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.price-amount {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.price-range { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; }

.price-monthly {
    text-align: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.price-monthly strong { color: var(--text-main); }

.price-details { margin-top: 20px; }

.price-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.93rem;
    padding: 10px 0;
    list-style: none;
    user-select: none;
}

.price-details summary::-webkit-details-marker { display: none; }
.price-details summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform 0.2s ease; }
.price-details[open] summary::before { transform: rotate(90deg); }

.price-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.92rem; }

.price-table td {
    padding: 9px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.price-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.price-table tr.sum td {
    color: var(--text-main);
    font-weight: 700;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
}

.price-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 14px; line-height: 1.5; }

.budget-note {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.budget-note.ok   { background: rgba(16, 185, 129, 0.1);  border: 1px solid rgba(16, 185, 129, 0.35);  color: #a7f3d0; }
.budget-note.warn { background: rgba(251, 191, 36, 0.1);  border: 1px solid rgba(251, 191, 36, 0.35);  color: #fde68a; }

@media (max-width: 768px) {
    .price-box { padding: 20px 16px; }
    .price-amount { font-size: 2.1rem; }
}

/* --- Einstellungen (Admin) --- */
.settings-group-title {
    font-size: 1.05rem;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px 20px;
}

.settings-grid .field { margin-bottom: 0; }
.settings-grid label { font-size: 0.88rem; font-weight: 500; }

/* --- Danger Zone (Löschen) --- */
.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding: 20px;
    border: 1px solid rgba(255, 75, 75, 0.3);
    background: rgba(255, 75, 75, 0.06);
    border-radius: 12px;
}
.danger-zone .help { margin-top: 4px; }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px;
    background-color: transparent;
    color: var(--text-muted);
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* --- Utilities --- */
.center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-40 { margin-bottom: 40px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 24px;
    font-weight: 500;
}
.back-link:hover { color: var(--accent); }

.animate-fade-in { animation: fadeIn .5s ease-out forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    body { padding: 20px 12px; }
    header { padding: 1rem 4%; }
    .logo { font-size: 1.2rem; }
    nav a { margin-left: 12px; font-size: 0.9rem; }
    .hero { padding: 60px 10px; }
    .hero h1 { font-size: 2rem; }
    section { padding: 40px 3%; }
    .card { padding: 24px 20px; border-radius: 16px; }
    h2.section-title { font-size: 1.8rem; margin-bottom: 30px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}
