* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    margin: 0;
    color: #222;
    line-height: 1.5;
    font-size: 16px;
}

/* Kopfbereich */
.top {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #ffffff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    border-bottom: 4px solid #2563eb;
}

.top a {
    color: #ffffff;
}

/* Logo / Marke */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-logo {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.brand-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .2px;
    line-height: 1.2;
}

.logo-login {
    display: block;
    max-width: 210px;
    max-height: 120px;
    width: auto;
    height: auto;
    margin: 0 auto 22px;
}

/* Layout */
main {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

.narrow {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Überschriften */
h1, h2, h3 {
    line-height: 1.25;
    margin-top: 0;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 22px;
    margin-top: 26px;
}

h3 {
    font-size: 18px;
}

p {
    font-size: 16px;
}

.small {
    font-size: 13px;
    color: #64748b;
}

/* Formulare */
label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
    font-size: 15px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccd;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
}

textarea {
    min-height: 95px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    border-color: #2563eb;
}

.checkbox {
    width: auto;
}

/* Buttons */
button,
.btn {
    background: #2563eb;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 11px 15px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.25;
}

button:hover,
.btn:hover {
    background: #1d4ed8;
}

.btn.secondary {
    background: #475569;
}

.btn.secondary:hover {
    background: #334155;
}

.btn.danger {
    background: #dc2626;
}

.btn.danger:hover {
    background: #b91c1c;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Meldungen */
.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

/* Tabellen */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    border: 1px solid #e5e7eb;
    padding: 9px;
    text-align: left;
    vertical-align: middle;
    font-size: 15px;
}

th {
    background: #f1f5f9;
    font-weight: 700;
}

td input,
td select {
    font-size: 15px;
    padding: 9px;
}

/* schmale Trikot-Spalte */
th.col-trikot,
td.col-trikot {
    width: 90px;
    max-width: 90px;
}

td.col-trikot input {
    width: 70px;
    min-width: 70px;
}

/* Staff Navigation */
.staff-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.staff-nav a {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    background: #f3f6fa;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
    white-space: nowrap;
    font-size: 15px;
}

.staff-nav a:hover {
    background: #005baa;
    color: #ffffff;
}

.staff-nav a.active {
    background: #005baa;
    color: #ffffff;
}

.staff-nav a.logout {
    background: rgba(220,38,38,.92);
    color: #ffffff;
}

.staff-nav a.logout:hover {
    background: #dc2626;
}

/* Login größer */
.login-wrapper {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 500px;
    padding: 36px 34px;
    border-radius: 16px;
}

.login-card h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.login-card input,
.login-card select {
    font-size: 18px;
    padding: 15px;
    border-radius: 10px;
}

.login-card button,
.login-card .btn {
    width: 100%;
    padding: 15px 16px;
    font-size: 18px;
    border-radius: 10px;
    margin-top: 14px;
}

/* Mobile: alles deutlich größer und besser lesbar */
@media (max-width: 900px) {
    body {
        font-size: 18px;
    }

    .top {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    .brand {
        min-width: 0;
        justify-content: center;
        text-align: center;
    }

    .brand-title {
        font-size: 20px;
    }

    .staff-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .staff-nav a {
        text-align: center;
        white-space: normal;
        padding: 14px 12px;
        font-size: 17px;
    }

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

    main {
        margin: 18px auto;
        padding: 0 12px;
        max-width: 100%;
    }

    .card {
        padding: 20px;
        border-radius: 12px;
    }

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 21px;
    }

    p,
    label,
    .small {
        font-size: 17px;
    }

    input,
    select,
    textarea {
        font-size: 18px;
        padding: 14px;
        min-height: 48px;
    }

    button,
    .btn {
        font-size: 17px;
        padding: 14px 16px;
        min-height: 48px;
    }

    th,
    td {
        font-size: 16px;
        padding: 10px;
    }

    td input,
    td select {
        font-size: 17px;
        padding: 11px;
        min-height: 44px;
    }
}

@media (max-width: 650px) {
    body {
        font-size: 18px;
        line-height: 1.55;
    }

    .top {
        padding: 14px 12px;
    }

    .brand-logo {
        max-width: 54px;
        max-height: 54px;
    }

    .brand-title {
        font-size: 20px;
    }

    .staff-nav {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .staff-nav a {
        width: 100%;
        font-size: 18px;
        padding: 15px 12px;
    }

    main {
        margin: 14px auto;
        padding: 0 10px;
    }

    .card {
        padding: 18px;
        border-radius: 12px;
    }

    h1 {
        font-size: 29px;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 24px;
        margin-top: 24px;
    }

    label {
        font-size: 18px;
    }

    input,
    select,
    textarea {
        font-size: 19px;
        padding: 15px;
        min-height: 52px;
    }

    button,
    .btn {
        font-size: 18px;
        min-height: 52px;
        padding: 15px 16px;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions .btn,
    .actions button {
        width: 100%;
        text-align: center;
    }

    .error,
    .success {
        font-size: 17px;
        padding: 14px;
    }

    /*
      Tabellen auf Smartphone:
      nicht winzig verkleinern, sondern horizontal scrollbar lassen.
    */
    table {
        min-width: 850px;
    }

    th,
    td {
        font-size: 17px;
        padding: 10px;
    }

    td input,
    td select {
        font-size: 18px;
        padding: 12px;
    }

    th.col-trikot,
    td.col-trikot {
        width: 90px;
        max-width: 90px;
    }

    td.col-trikot input {
        width: 70px;
        min-width: 70px;
    }

    .login-wrapper {
        padding: 14px;
        align-items: flex-start;
    }

    .login-card {
        max-width: 100%;
        padding: 28px 20px;
        margin-top: 18px;
    }

    .login-card h1 {
        font-size: 32px;
    }

    .logo-login {
        max-width: 210px;
        max-height: 125px;
    }
}

@media (max-width: 430px) {
    .card {
        padding: 16px;
    }

    .brand {
        flex-direction: column;
        gap: 8px;
    }

    .brand-title {
        font-size: 19px;
    }

    .logo-login {
        max-width: 190px;
    }

    h1 {
        font-size: 28px;
    }

    input,
    select,
    textarea {
        font-size: 19px;
    }
}

/* Druck */
@media print {
    body {
        background: #ffffff;
    }

    .top,
    .staff-nav,
    .actions,
    .btn,
    button {
        display: none !important;
    }

    main {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    table {
        min-width: 0;
    }
}
