/* meet-login – mobile-first, Saphirblau */
:root {
    --ml-bg: #0F52BA;
    --ml-bg-end: #1a237e;
    --ml-primary: #4fc3f7;
    --ml-primary-dark: #0288d1;
    --ml-accent: #ffd54f;
    --ml-card: #ffffff;
    --ml-text: #1a237e;
    --ml-muted: #5c6bc0;
    --ml-success: #26a69a;
    --ml-danger: #ef5350;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(0, 20, 60, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.user-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(160deg, var(--ml-bg) 0%, var(--ml-bg-end) 100%);
    background-attachment: fixed;
    color: var(--ml-text);
    line-height: 1.5;
    min-height: 100vh;
    padding: 16px;
}

.container { max-width: 520px; margin: 0 auto; }

.site-header {
    text-align: center;
    margin-bottom: 18px;
    padding-top: 8px;
    color: #fff;
    overflow: visible;
}

/* Header-Medien: Glow (Fluux-analog) darf über den Rand strahlen */
.header-media {
    overflow: visible !important;
    isolation: isolate;
}
.header-media.has-glow {
    box-sizing: content-box;
}
.header-media-mount {
    position: relative;
    z-index: 1;
}
.ml-header-glow-halo {
    z-index: 0;
}
.site-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 4px;
}
.site-header p { font-size: 0.9rem; color: rgba(255,255,255,0.85); }

.card {
    background: var(--ml-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}
.card h2 {
    font-size: 1.08rem;
    margin-bottom: 14px;
    color: var(--ml-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--ml-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
input[type="search"],
input:not([type]),
select,
textarea,
.input-full {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid #c5cae9;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    color: var(--ml-text);
}

/* Farbwähler: kompakt, nicht volle Breite */
input[type="color"] {
    display: inline-block;
    width: 48px;
    height: 40px;
    max-width: 48px;
    min-width: 48px;
    padding: 2px;
    margin: 0;
    border: 1.5px solid #c5cae9;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}
input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.color-field input[type="color"] {
    flex: 0 0 48px;
}
.color-field input[type="text"],
.color-field .color-hex {
    flex: 0 1 9rem;
    width: 9rem;
    max-width: 100%;
    margin-bottom: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
}

/* Checkboxen nie auf 100% Breite ziehen */
input[type="checkbox"],
input[type="radio"] {
    display: inline-block;
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    -webkit-appearance: auto;
    appearance: auto;
}

/* Einheitliche Größe auch bei Browser-Autofill */
input.input-full:-webkit-autofill,
input.input-full:-webkit-autofill:hover,
input.input-full:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ml-text);
    transition: background-color 9999s ease-in-out 0s;
}

.mysql-settings {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-top: 4px;
}
.mysql-settings[hidden] {
    display: none !important;
}
.mysql-settings-title {
    font-size: 1rem;
    margin: 10px 0 8px;
    color: var(--ml-text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--ml-primary);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.25);
}

.password-wrap {
    position: relative;
    margin-bottom: 14px;
}
.password-wrap .password-input {
    margin-bottom: 0;
    padding-right: 48px;
}
.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--ml-muted);
}
.pw-toggle:hover, .pw-toggle:focus {
    background: rgba(79, 195, 247, 0.15);
    outline: none;
}

.checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    padding: 8px 0;
}
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] {
    display: inline-block;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    max-width: 22px;
    margin: 0;
    padding: 0;
    accent-color: var(--ml-primary-dark);
    flex: 0 0 22px;
    cursor: pointer;
}
.checkbox-row label {
    margin: 0;
    font-size: 0.95rem;
    color: var(--ml-text);
    font-weight: 500;
    flex: 1 1 auto;
    cursor: pointer;
    line-height: 1.35;
}

.hint {
    font-size: 0.78rem;
    color: var(--ml-muted);
    margin-top: -8px;
    margin-bottom: 14px;
}

.field { margin-bottom: 0; }

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s, filter 0.2s;
    text-decoration: none;
    color: #fff;
    box-sizing: border-box;
    margin: 0;
    vertical-align: middle;
}
button:active, .btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--ml-primary) 0%, var(--ml-primary-dark) 100%);
    box-shadow: 0 4px 14px rgba(2, 136, 209, 0.35);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-success {
    background: linear-gradient(135deg, #4db6ac 0%, var(--ml-success) 100%);
}
.btn-accent {
    background: linear-gradient(135deg, var(--ml-accent) 0%, #ffb300 100%);
    color: #1a237e;
}
.btn-secondary {
    background: #e8eaf6;
    color: var(--ml-text);
}
/* Abstand nur in vertikalen Stapeln, nicht neben anderen Buttons */
.btn-row > .btn-secondary,
.btn-row > button.btn-secondary,
form > .btn-secondary + .btn-secondary,
form > button.btn-primary + .btn-secondary,
form > .btn-primary + .btn-secondary {
    margin-top: 8px;
}
.btn-row-h > .btn-secondary,
.btn-row-h > .btn-primary,
.btn-row-h > a.btn,
.btn-row-h > button {
    margin-top: 0 !important;
}
.btn-danger {
    background: var(--ml-danger);
}
.btn-sm {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.88rem;
    display: inline-flex;
}
.btn-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-row > .btn,
.btn-row > button,
.btn-row > a.btn {
    margin-top: 0 !important;
    width: 100%;
}
.btn-row-h {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}
.btn-row-h .btn,
.btn-row-h button,
.btn-row-h a.btn {
    width: auto;
    flex: 1 1 0;
    min-width: 140px;
    min-height: 48px;
    margin-top: 0 !important;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 0.92rem;
}
.message.success {
    background: #e0f2f1;
    color: #00695c;
    border: 1px solid #b2dfdb;
}
.message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.message.warn {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}
.message.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.15);
    padding: 4px;
    border-radius: 12px;
}
.tabs a, .tabs button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    width: auto;
}
.tabs a.active, .tabs button.active {
    background: #fff;
    color: var(--ml-text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.summary-list {
    list-style: none;
    margin: 0 0 16px;
}
.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e8eaf6;
    font-size: 0.95rem;
}
.summary-list .k { color: var(--ml-muted); font-weight: 500; }
.summary-list .v { font-weight: 600; color: var(--ml-text); text-align: right; word-break: break-word; }

.badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.badge-ok { background: #e0f2f1; color: #00695c; }
.badge-no { background: #eceff1; color: #546e7a; }
.badge-warn { background: #fff3e0; color: #e65100; }
.badge-mod { background: #e3f2fd; color: #1565c0; }

details.token-box {
    background: #f5f7ff;
    border: 1px solid #c5cae9;
    border-radius: 12px;
    margin: 12px 0 16px;
    overflow: hidden;
}
details.token-box > summary {
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ml-muted);
    user-select: none;
}
.token-raw {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    background: #1a237e;
    color: #b3e5fc;
    padding: 12px;
    word-break: break-all;
    line-height: 1.4;
}
.copy-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    background: #eef1ff;
}
.copy-row button { width: auto; flex: 1; padding: 10px; font-size: 0.9rem; }

.site-footer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 18px;
    padding-bottom: 24px;
}

.choice-grid {
    display: grid;
    gap: 10px;
}
.choice-card {
    display: block;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #c5cae9;
    background: #fafbff;
    text-decoration: none;
    color: var(--ml-text);
    transition: border-color 0.2s, background 0.2s;
}
.choice-card:hover, .choice-card:focus {
    border-color: var(--ml-primary);
    background: #e3f2fd;
}
.choice-card strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.choice-card span { font-size: 0.85rem; color: var(--ml-muted); }

.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fff;
    font-size: 0.9rem;
}
.user-bar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.user-bar-nav form {
    margin: 0;
    display: inline-flex;
}
/* Nav-Buttons wie Abmelden */
.user-bar .btn-nav {
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    margin: 0;
    background: #e8eaf6;
    color: var(--ml-text);
    box-shadow: none;
}
.user-bar .btn-nav:hover {
    filter: brightness(0.97);
}
/* Aktive Rubrik */
.user-bar .btn-nav.is-active {
    background: linear-gradient(135deg, var(--ml-primary) 0%, var(--ml-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(2, 136, 209, 0.35);
}
.badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    margin-top: 4px;
}
.badge-ok { background: #e0f2f1; color: #00695c; }
.badge-no { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }
.card .badge-no { background: #eceff1; color: #546e7a; }

@media (max-width: 480px) {
    body.user-body { padding: 12px; }
    .card { padding: 16px; }
    .site-header h1 { font-size: 1.32rem; }
    button, .btn { padding: 14px 16px; font-size: 1.02rem; min-height: 48px; }
    .btn-row-h .btn, .btn-row-h button, .btn-row-h a.btn {
        min-width: 100%;
        flex: 1 1 100%;
    }
    .user-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .user-bar-nav {
        justify-content: stretch;
    }
    .user-bar .btn-nav {
        flex: 1 1 auto;
    }
}
