* {
    box-sizing: border-box;
}

:root {
    --black: #111111;
    --dark: #2b2b2b;
    --mid: #777777;
    --light: #d9d9d9;
    --lighter: #f3f3f3;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--lighter);
    color: var(--black);
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card,
.panel {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border: 1px solid var(--light);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.login-header,
.panel-header {
    background: var(--black);
    color: var(--white);
    padding: 28px 30px 24px;
}

.login-header h1,
.panel-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-header p,
.panel-header p {
    margin: 0;
    color: #cfcfcf;
    line-height: 1.5;
}

.login-body,
.panel-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #bcbcbc;
    background: #fafafa;
    color: var(--black);
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: var(--black);
    background: var(--white);
}

button,
.button {
    display: inline-block;
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: var(--dark);
}

.alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #7d7d7d;
    background: #ededed;
    color: var(--black);
    font-size: 14px;
    line-height: 1.45;
}

.dashboard {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.sidebar {
    background: var(--black);
    color: var(--white);
    padding: 28px 22px;
}

.brand {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 34px;
}

.sidebar nav a {
    display: block;
    padding: 11px 0;
    color: #d6d6d6;
    text-decoration: none;
    border-bottom: 1px solid #333;
}

.sidebar nav a:hover {
    color: var(--white);
}

.main {
    padding: 36px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.topbar h1 {
    margin: 0;
    font-size: 30px;
}

.user-box {
    color: var(--mid);
    font-size: 14px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background: var(--white);
    border: 1px solid var(--light);
    padding: 22px;
}

.card h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.card p {
    margin: 0;
    color: var(--mid);
    line-height: 1.5;
}

.logout-link {
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
}

.logout-link:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 20px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 24px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Geschichten: kompakte Produktionsliste */
.story-list-panel{padding:0;overflow:hidden}
.story-list{display:grid;grid-template-columns:minmax(260px,1.4fr) minmax(180px,.8fr) minmax(260px,1.2fr) 120px;gap:20px;align-items:center}
.story-list-head{padding:14px 20px;background:rgba(45,58,46,.055);font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#6f766f;border-bottom:1px solid var(--line,#ded8cc)}
.story-list-row{padding:15px 20px;color:inherit;text-decoration:none;border-bottom:1px solid var(--line,#e4ded3);transition:background .16s ease}
.story-list-row:last-child{border-bottom:0}
.story-list-row:hover{background:rgba(185,145,58,.07)}
.story-title-cell{display:flex;flex-direction:column;gap:4px;min-width:0}
.story-title-cell strong{font-size:1rem;color:var(--ink,#263127)}
.story-title-cell small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7a817a}
.product-tags{display:flex;gap:6px;flex-wrap:wrap}
.product-tags em,.status-chip{font-style:normal;display:inline-flex;padding:5px 9px;border-radius:999px;background:#edf2ec;color:#344237;font-size:.76rem;line-height:1}
.muted{color:#92978f}

/* Geschichten: ruhige Leseansicht */
.story-reader{padding:clamp(28px,5vw,70px);max-width:1120px;margin-inline:auto}
.story-reader-head{max-width:830px;margin:0 auto 36px;text-align:center}
.story-reader-head h1{font-size:clamp(2.3rem,5vw,4.6rem);line-height:1.04;margin:.25em 0}
.story-intro{font-size:1.15rem;color:#737b73;line-height:1.6}
.story-text{max-width:780px;margin:auto;font-family:Georgia,'Times New Roman',serif;font-size:1.12rem;line-height:1.9;color:#283128}

@media (max-width:900px){
 .story-list{grid-template-columns:minmax(220px,1.3fr) minmax(150px,.8fr) minmax(190px,1fr)}
 .story-list>*:last-child{display:none}
}
@media (max-width:680px){
 .story-list{grid-template-columns:1fr}
 .story-list-head{display:none}
 .story-list-row{gap:8px}
 .story-list-row>span{display:block}
 .story-list-row>span:nth-child(2)::before{content:'Ort: ';font-weight:700}
 .story-list-row>span:nth-child(3)::before{content:'Produkte: ';font-weight:700;display:block;margin-bottom:6px}
}
