/* Jakobus Theater Intern – eigenes, schlankes Stylesheet.
   Übernimmt bewusst nur die Designsprache der Hauptseite (Akzentfarbe,
   Schriftart, Grundformen), nicht die komplette main.css der Hauptseite. */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: -apple-system, sans-serif;
    background: #f4f4f4;
    color: #222;
}

a {
    color: #ab3826;
    text-decoration: none;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Header ---------- */

.header {
    background: #ab3826;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
}

.header-title {
    font-weight: 800;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    padding-left: 12px;
}

.menubar {
    display: flex;
    gap: 20px;
    align-items: center;
}

.menubar a {
    color: white;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.menubar a:hover,
.menubar a.active {
    opacity: 1;
    text-decoration: underline;
}

.content {
    flex-grow: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.85em;
    color: #777;
}

/* ---------- Login ---------- */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #ab3826;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.login-logo {
    height: 50px;
    background: #ab3826;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.login-box h1 {
    margin: 0 0 5px 0;
}

.login-subtitle {
    color: #777;
    margin: 0 0 20px 0;
    font-size: 0.9em;
}

.login-error {
    background: #fdeceb;
    color: #ab3826;
    border-radius: 6px;
    padding: 8px;
    font-weight: bold;
    font-size: 0.9em;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.login-back-link {
    font-size: 0.85em;
    color: #777;
}

/* ---------- Buttons & Inputs ---------- */

.standard-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.btn-primary {
    background: #ab3826;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #8e2e1f;
}

.btn-secondary {
    background: #555;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #333;
}

.btn-danger {
    background: transparent;
    color: #ab3826;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-danger:hover {
    text-decoration: underline;
}

/* ---------- Stück-Blöcke & Tabelle ---------- */

.piece-block {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.piece-block-header {
    background: #f8f8f8;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.piece-block-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.piece-block-header .archived-at {
    color: #777;
    font-size: 0.85em;
}

.schedule-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.schedule-table th {
    background: #fafafa;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.schedule-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-date {
    white-space: nowrap;
    font-weight: 700;
}

.schedule-date .weekday {
    color: #ab3826;
    margin-right: 4px;
}

.cell-editable {
    cursor: pointer;
    border-radius: 4px;
    padding: 6px 8px;
    min-height: 1.2em;
    display: block;
    transition: background 0.15s;
}

.cell-editable:hover {
    background: #fdeceb;
}

.cell-editable.is-empty {
    color: #bbb;
}

.cell-editable.is-empty::after {
    content: "+ hinzufügen";
    font-size: 0.85em;
}

.cell-edit-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.cell-edit-form input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ab3826;
    border-radius: 4px;
    font-size: 0.95em;
}

.cell-edit-form button {
    background: #ab3826;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.cell-saved-flash {
    color: #2e7d32;
    font-size: 0.8em;
    font-weight: 700;
    margin-left: 6px;
}

.delete-show-btn {
    background: transparent;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 4px;
}

.delete-show-btn:hover {
    color: #ab3826;
}

.empty-state {
    text-align: center;
    color: #777;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

/* ---------- Neuer-Termin-Formular ---------- */

.add-show-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 30px;
}

.add-show-box h2 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.add-show-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.add-show-grid label {
    display: block;
    font-size: 0.8em;
    font-weight: 700;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.sync-status {
    font-size: 0.8em;
    color: #777;
    margin-top: 15px;
}

/* ---------- Mobile ---------- */

@media (max-width: 800px) {
    .header {
        padding: 12px 15px;
    }

    .content {
        padding: 20px 12px;
    }

    .schedule-table-wrapper {
        display: none;
    }

    .schedule-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .schedule-card {
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 12px;
    }

    .schedule-card-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }

    .schedule-card-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .schedule-card-field {
        background: #fafafa;
        border-radius: 6px;
        padding: 6px 8px;
    }

    .schedule-card-field .field-label {
        display: block;
        font-size: 0.7em;
        text-transform: uppercase;
        color: #999;
        margin-bottom: 2px;
    }

    .add-show-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 801px) {
    .schedule-cards {
        display: none;
    }
}
