/* Musiker-Verwaltung – Layout & Basis */
:root {
    --bg: #0f0f12;
    --bg-card: #1a1a1f;
    --text: #e8e6e3;
    --text-muted: #9a9895;
    --akzent: #c9a227;
    --akzent-hover: #e0b82e;
    --border: #2d2d33;
    --fehler: #c75c5c;
    --erfolg: #5c9e5c;
    --radius: 8px;
    --font: 'Segoe UI', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.container.schmal {
    max-width: 420px;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--akzent);
    text-decoration: none;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header .user {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.header a:hover {
    color: var(--akzent);
}

/* Login / Register Seiten */
.seite-login {
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.seite-login h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: var(--akzent);
}

.seite-login h2 {
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Formulare */
.formular label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.formular input[type="text"],
.formular input[type="email"],
.formular input[type="password"],
.formular input[type="number"],
.formular input[type="date"],
.formular select,
.formular textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font: inherit;
}

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

.formular input:focus,
.formular textarea:focus {
    outline: none;
    border-color: var(--akzent);
}

.formular button {
    padding: 0.8rem 1.5rem;
    background: var(--akzent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.formular button:hover {
    background: var(--akzent-hover);
}

.hinweis {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hinweis a {
    color: var(--akzent);
}

.fehler {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    background: rgba(199, 92, 92, 0.15);
    color: var(--fehler);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.erfolg {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    background: rgba(92, 158, 92, 0.15);
    color: var(--erfolg);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Main – Musikstücke */
main {
    flex: 1;
    padding: 2rem 0;
}

main h1 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

.meldung {
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    background: rgba(201, 162, 39, 0.12);
    color: var(--akzent);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.formular-bereich {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.formular-bereich h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.inline-form .zeile {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0.75rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

.inline-form .zeile label {
    margin-bottom: 0;
    padding-top: 0.5rem;
}

.inline-form .zeile.buttons {
    grid-template-columns: 100px auto;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-items: start;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    text-decoration: none;
    max-width: 100%;
}

/* Buttons allgemein: Text soll nicht abgeschnitten wirken */
button.btn,
a.btn {
    line-height: 1.1;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sekundaer {
    background: var(--border);
    color: var(--text);
}

.btn-sekundaer:hover {
    background: #3d3d45;
    color: var(--text);
}

/* Tabelle */
.tabelle-bereich h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.leer {
    color: var(--text-muted);
    font-style: italic;
}

.tabelle {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.tabelle th,
.tabelle td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.tabelle th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tabelle tbody tr:last-child td {
    border-bottom: none;
}

.tabelle tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.tabelle .bemerkung {
    max-width: 220px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-neu {
    background: rgba(201, 162, 39, 0.2);
    color: var(--akzent);
}

.status-probe {
    background: rgba(72, 126, 176, 0.25);
    color: #70a5ff;
}

.status-fertig {
    background: rgba(92, 158, 92, 0.2);
    color: var(--erfolg);
}

.status-abgelehnt {
    background: rgba(199, 92, 92, 0.25);
    color: var(--fehler);
}

.status-zurueckgestellt {
    background: rgba(154, 152, 149, 0.2);
    color: var(--text-muted);
}

.feld-fehler input,
.feld-fehler textarea,
.feld-fehler select {
    border-color: var(--fehler);
    background: rgba(199, 92, 92, 0.1);
}

.tabelle .aktionen {
    white-space: nowrap;
}

.tabelle .aktionen a {
    color: var(--akzent);
    text-decoration: none;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

.link-button {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 0.75rem 0 0;
    color: var(--akzent);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

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

.tabelle .aktionen a:hover {
    text-decoration: underline;
}

.tabelle .link-loeschen {
    color: var(--text-muted);
}

.tabelle .link-loeschen:hover {
    color: var(--fehler);
}

/* Details (aufklappbar) */
.details-row td {
    background: rgba(0,0,0,0.18);
}

.details-box {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.02);
}

.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.details-box h3 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.tabelle-klein th,
.tabelle-klein td {
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
}

/* PDF Modal */
.pdf-modal {
    width: min(1100px, 92vw);
    height: min(85vh, 900px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    background: var(--bg-card);
    color: var(--text);
}

.pdf-modal::backdrop {
    background: rgba(0,0,0,0.6);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.pdf-modal-title {
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.pdf-frame {
    width: 100%;
    height: calc(100% - 56px);
    border: 0;
    background: #111;
}

.img-frame {
    width: 100%;
    height: calc(100% - 56px);
    object-fit: contain;
    background: #111;
}

/* Detailseite Musikstück */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--akzent);
    text-decoration: none;
}

.stueck-info {
    margin-bottom: 1.5rem;
}

.stueck-info .bemerkung {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.formular input[type="file"] {
    padding: 0.4rem 0;
}

/* Kalender */
.kalender-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}

.kalender-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.kalender {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.kalender th,
.kalender td {
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    vertical-align: top;
    padding: 0.5rem;
    height: 110px;
}

.kalender-click {
    cursor: pointer;
}

.kalender-click:hover {
    background: rgba(201, 162, 39, 0.06);
}

.me-keine-zeit .kalender-zahl {
    color: var(--fehler);
}

.kalender th:last-child,
.kalender td:last-child {
    border-right: none;
}

.kalender thead th {
    background: rgba(0,0,0,0.2);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.leer-zelle {
    background: rgba(255,255,255,0.02);
}

.kalender-tag {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.kalender-zahl {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.kalender-ok {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.kalender-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.kalender-liste li {
    font-size: 0.8rem;
    color: var(--fehler);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .inline-form .zeile {
        grid-template-columns: 1fr;
    }
    .inline-form .zeile.buttons {
        grid-template-columns: 1fr;
    }
    .tabelle .bemerkung {
        max-width: 120px;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    .kalender th,
    .kalender td {
        height: 90px;
    }
}
