* {
    box-sizing: border-box;
}

:root {
    --bg-app: #f4f6f9;
    --bg-card: #ffffff;
    --bg-muted: #f8fafc;
    --text-main: #222222;
    --text-soft: #666666;
    --text-muted: #6b7280;
    --border: #d8dee8;
    --border-soft: #eeeeee;
    --primary: #2f6fed;
    --primary-hover: #2458bb;
    --secondary: #6b7280;
    --secondary-hover: #4b5563;
    --sidebar-bg: #1f2a37;
    --sidebar-hover: rgba(255, 255, 255, 0.14);
    --sidebar-link: rgba(255, 255, 255, 0.06);
    --sidebar-border: rgba(255, 255, 255, 0.10);
    --lang-btn-bg: rgba(255, 255, 255, 0.08);
    --lang-btn-hover: rgba(255, 255, 255, 0.16);
    --lang-btn-active-bg: #ffffff;
    --lang-btn-active-text: #1f2a37;
    --success-bg: #dff6e4;
    --success-text: #14532d;
    --success-border: #86efac;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --error-border: #fc5f5f;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* App Layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: #ffffff;
    padding: 24px 18px;
    flex-shrink: 0;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar h1 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.2;
}

.sidebar nav,
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar nav a,
.sidebar-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--sidebar-link);
    transition: background 0.2s ease, transform 0.1s ease;
    font-weight: 600;
}

.sidebar nav a:hover,
.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    transform: translateX(2px);
    color: #ffffff;
}

/* Language Switcher */
.language-switcher {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--sidebar-border);
}

.language-switcher-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.language-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    background: var(--lang-btn-bg);
    color: #ffffff;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.lang-btn:hover {
    background: var(--lang-btn-hover);
    color: #ffffff;
    transform: translateX(2px);
}

.lang-btn.active {
    background: var(--lang-btn-active-bg);
    color: var(--lang-btn-active-text);
    border-color: rgba(255, 255, 255, 0.25);
}

.lang-flag {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.lang-label {
    display: inline-block;
    line-height: 1.2;
}


/* Cards */
.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.card h1,
.card h2,
.card h3,
.card h4 {
    margin-top: 0;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
    margin-bottom: 0;
}

/* Buttons */
.button,
.btn {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.button:hover,
.btn:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.button:active,
.btn:active {
    transform: translateY(1px);
}

.button.secondary,
.btn-secondary {
    background: var(--secondary);
    color: #ffffff;
}

.button.secondary:hover,
.btn-secondary:hover {
    background: var(--secondary-hover);
    color: #ffffff;
}


.button-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Forms */
label {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: var(--text-main);
}

input[type="text"],
input[type="file"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 16px;
    border: 1px solid #cfd6df;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus,
input[type="file"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
.button:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

textarea {
    resize: vertical;
    line-height: 1.5;
    min-height: 120px;
}

.input-area.small-scroll {
    min-height: 140px;
    max-height: 220px;
    overflow-y: auto;
}

.input-area.large-scroll {
    min-height: 320px;
    max-height: 520px;
    overflow-y: auto;
}

/* Lists */
.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}

.project-list li:last-child {
    border-bottom: none;
}

.project-list li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.project-list li a:hover {
    text-decoration: underline;
}

.project-subline {
    font-size: 14px;
    color: var(--text-soft);
    margin-top: 4px;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

/* Search suggestions */
#search-suggestions-box {
    background: var(--bg-muted);
    border: 1px solid #d9e2f0;
    border-radius: var(--radius-sm);
    padding: 14px;
}

#search-suggestions-box h3,
#search-suggestions-box h4,
#search-suggestions-box p {
    margin-top: 0;
}

#search-suggestions-list {
    margin: 0;
    padding-left: 20px;
}

#search-suggestions-list li {
    margin-bottom: 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

th {
    background: #f8fafc;
    font-weight: 700;
}

/* Small helpers */
.muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 960px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
        gap: 16px;
    }

    .language-switcher {
        margin-top: 0;
        padding-top: 14px;
    }

    .main-content {
        width: 100%;
    }

    .topbar,
    .content-area {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 640px) {
    .content-area {
        gap: 16px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .card {
        padding: 16px;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
        text-align: center;
    }

    .sidebar nav a,
    .sidebar-nav a {
        padding: 12px;
    }

    .language-buttons {
        width: 100%;
    }

    .lang-btn {
        flex: 1;
    }
}

.landing-page {
    background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 45%, #f8fafc 100%);
}

.landing-header {
    padding: 32px 0 24px;
}

.landing-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    color: #1f2a37;
}

.nav-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero {
    padding: 48px 0 72px;
}

.hero-text {
    max-width: 760px;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #e8f0fb;
    color: #2f6fed;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.08;
    margin: 0 0 20px;
    color: #111827;
    max-width: 900px;
}

.hero p {
    font-size: 19px;
    line-height: 1.7;
    color: #4b5563;
    margin: 0 0 28px;
    max-width: 760px;
}

.landing-section {
    padding: 36px 0 64px;
}

.landing-section.alt {
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #eef2f7;
}

.landing-section h2 {
    font-size: 34px;
    margin: 0 0 24px;
    color: #111827;
}

.feature-grid,
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.steps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cta-section .card {
    padding: 36px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 980px) {
    .hero h1 {
        font-size: 42px;
    }

    .feature-grid,
    .steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .landing-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 24px 0 48px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 17px;
    }

    .feature-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
    max-width: 760px;
    margin-bottom: 1.5rem;
}

.hero-points {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 28px;
}

.hero-points span {
    display: inline-block;
    padding: 8px 12px;
    background: #eef4ff;
    color: #2458bb;
    border: 1px solid #dbe7ff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.problem-section .card {
    max-width: 900px;
    margin: 0 auto;
}

.problem-section p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.button.danger {
    background: #dc2626 !important;
    color: #ffffff !important;
    border: none !important;
}

.button.danger:hover {
    background: #b91c1c !important;
    color: #ffffff !important;
}

/* ===== Language Switcher Override ===== */
.sidebar .language-switcher {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .language-switcher-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar .language-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.sidebar a.lang-btn,
.sidebar a.lang-btn:visited {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.sidebar a.lang-btn:hover,
.sidebar a.lang-btn:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar a.lang-btn.active,
.sidebar a.lang-btn.active:visited {
    background: #ffffff;
    color: #1f2a37;
    border-color: #ffffff;
}

.sidebar .lang-flag {
    width: 24px;
    min-width: 24px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.sidebar .lang-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}
.custom-file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.custom-file-upload .form-help {
    margin: 0;
    color: #666;
}
/* ===== Landing Hero mit Coverbild ===== */
.hero-with-image {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-with-image .hero-text {
    flex: 1 1 560px;
    max-width: 760px;
}

.hero-image {
    flex: 0 1 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-cover-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    object-fit: cover;
    background: #ffffff;
}

/* Optional für Kapitelkarten mit Bild in Zukunft */
.chapter-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
    background: #f3f4f6;
}

@media (max-width: 980px) {
    .hero-with-image {
        gap: 28px;
    }

    .hero-image {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .landing-cover-image {
        max-width: 280px;
    }
}

@media (max-width: 640px) {
    .hero-with-image {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-image {
        width: 100%;
        justify-content: flex-start;
    }

    .landing-cover-image {
        max-width: 220px;
    }
}
/* ===== KI-Proofread-Buttons ===== */
.proofread-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.proofread-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 10px !important;
    background: #eef4ff !important;
    color: #1d4ed8 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    appearance: none;
    -webkit-appearance: none;
}

.proofread-btn:hover {
    background: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
}

.proofread-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.proofread-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.proofread-status {
    display: inline-block;
    font-size: 0.92rem;
    color: #666;
}
.publish-link-group {
    margin-bottom: 20px;
}

.publish-link-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.publish-link-group input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-branding {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.hero-cover-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-branding-logo {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 160px;
  height: auto;
  z-index: 10;
}

.marketing-preview-image,
.marketing-preview-video,
.marketing-preview-qr {
    max-width: 320px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 8px;
}

.marketing-section-divider {
    margin: 24px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}
.workflow-split-card {
    border-left: 5px solid #2563eb;
}

.workflow-intro {
    margin-top: 8px;
    color: #4b5563;
    line-height: 1.6;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.workflow-box {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    background: #f8fafc;
}

.workflow-box h4 {
    margin-top: 10px;
    margin-bottom: 10px;
}

.workflow-box-auto {
    border-left: 5px solid #2563eb;
}

.workflow-box-manual {
    border-left: 5px solid #059669;
}

.workflow-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.workflow-badge-auto {
    background: #dbeafe;
    color: #1d4ed8;
}

.workflow-badge-manual {
    background: #d1fae5;
    color: #047857;
}

.workflow-note {
    color: #6b7280;
    line-height: 1.6;
}

.workflow-success {
    margin: 0;
    color: #15803d;
    font-weight: 600;
}

@media (max-width: 900px) {
    .workflow-grid {
        grid-template-columns: 1fr;
    }
}

.workflow-box-manual .button-row,
.workflow-box-auto .button-row {
    flex-direction: column;
    align-items: flex-start;
}

.workflow-box-manual .button-row .button,
.workflow-box-auto .button-row .button,
.workflow-box-manual .button-row form,
.workflow-box-auto .button-row form {
    width: 100%;
    max-width: 100%;
}

.workflow-box-manual .button-row .button,
.workflow-box-auto .button-row .button {
    width: 100%;
    text-align: center;
}




