/* public/assets/style.css – dunkelblau, gut lesbar auf Handy & PC */

:root {
    /* Dunkelblau, aber hell genug für gute Lesbarkeit */
    --bg-body: #0f172a;        /* Slate 900 */
    --bg-card: #1e293b;        /* Slate 800 */
    --bg-card-alt: #172030;    /* etwas dunkler für Kontrast */

    --text-main: #e2e8f0;      /* Slate 200 */
    --text-muted: #94a3b8;     /* Slate 400 */

    --border: #334155;         /* Slate 700 */

    --primary: #1d4ed8;        /* Blau 700 */
    --primary-hover: #2563eb;  /* Blau 600 */

    --success: #22c55e;        /* Grün 500 */
    --success-dark: #16a34a;   /* Grün 600 */

    --error-bg: #3b0e0e;
    --error-text: #fecaca;
    --info-bg: #172554;
    --info-text: #bfdbfe;
    --success-bg: #052e1a;
    --success-text: #86efac;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px; /* gut lesbar auf Mobil */
}

.container {
    max-width: 900px;
    margin: 24px auto 40px;
    padding: 0 16px;
}

/* Überschriften */
h1 {
    font-size: 1.6rem;
    margin: 0 0 16px;
    color: #f1f5f9;
}

h2 {
    font-size: 1.25rem;
    margin: 0 0 12px;
    color: #f1f5f9;
}

h3 {
    font-size: 1.05rem;
    margin: 16px 0 8px;
    color: #e2e8f0;
}

/* Karten */
.card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    border: 1px solid var(--border);
}

/* Alerts */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    font-size: 15px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #7f1d1d;
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: #1e3a8a;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #064e3b;
}

/* Formulare */
.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #f1f5f9;
    font-size: 15px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card-alt);
    color: var(--text-main);
    font-size: 16px; /* verhindert Zoom auf iOS */
}

input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
button,
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1e3a8a;
    text-decoration: none;
}

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

/* Responsive Buttons in Tabellen */
table button {
    padding: 6px 10px;
    font-size: 13px;
}

/* Kleingedrucktes */
small, .small {
    font-size: 14px;
    color: var(--text-muted);
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 15px;
}

th, td {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

th {
    font-weight: 600;
    background: var(--bg-card-alt);
    color: #f1f5f9;
    position: sticky;
    top: 0;
}

/* Auf sehr kleinen Bildschirmen Tabelle scrollbar machen */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

code {
    background: var(--bg-card-alt);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 13px;
    color: #cbd5e1;
    border: 1px solid var(--border);
    white-space: nowrap;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Progress bars */
.progress-bar {
    background: var(--bg-card-alt);
    border-radius: 999px;
    height: 20px;
    overflow: hidden;
    margin: 8px 0 6px;
    border: 1px solid var(--border);
}

.progress-fill {
    background: linear-gradient(90deg, var(--success), var(--success-dark));
    height: 100%;
    width: 0;
    transition: width 0.4s ease;
}

/* Mobile-Optimierung */
@media (max-width: 600px) {
    .container {
        margin-top: 16px;
        padding: 0 12px;
    }

    h1 {
        font-size: 1.35rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .card {
        padding: 14px;
    }

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

    /* In Tabellen auf Mobile jede Zeile als Block darstellen */
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 10px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px;
        background: var(--bg-card-alt);
    }

    td {
        border: none;
        padding: 6px 4px;
        position: relative;
        padding-left: 45%;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        top: 6px;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .table-wrapper {
        overflow-x: visible;
    }
}