/* =========================================
   VERWALTUNG.CSS – Admin-Bereich
   Gleiches Design wie Rest der App (site.css Tokens)
========================================= */

/* ================================
   SEITEN-LAYOUT
=============================== */
.verwaltung-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

/* .verwaltung-box Basis in site.css; nur Abstände ergänzen */
.verwaltung-box {
    padding: 26px;
}

.verwaltung-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.verwaltung-head h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    color: #0f2230;
}

/* ================================
   LISTEN (wie Karten/Boxen der App)
=============================== */
.verwaltung-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.verwaltung-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.verwaltung-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.verwaltung-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #0f2230;
}

.verwaltung-sub {
    font-size: 16px;
    color: #666;
}

.verwaltung-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.verwaltung-actions a {
    color: #1f73d9;
    text-decoration: none;
    font-weight: 600;
}

.verwaltung-actions a:hover {
    text-decoration: underline;
}

.verwaltung-empty {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Regelset (Homebrewregeln) auf Kampagne bearbeiten */
.verwaltung-regelset {
    margin-top: 8px;
}

.verwaltung-regelset-title,
.verwaltung-regelset-kampagne {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2d37;
}

.verwaltung-regelset-kampagne {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.verwaltung-regelset-info {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #666;
}

.verwaltung-regelset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.verwaltung-regelset-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #1f2d37;
}

.verwaltung-regelset-item input[type="checkbox"] {
    flex-shrink: 0;
}

/* Homebrewregeln auf Index: einzeilig mit ... kürzen, wenig Platz */
.verwaltung-homebrewregeln .verwaltung-item .verwaltung-main {
    min-width: 0;
    flex: 1 1 auto;
}

.verwaltung-homebrewregeln .verwaltung-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ================================
   LOGIN (gleiche Box wie kampagne-box)
=============================== */
.verwaltung-login-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.verwaltung-login-box {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.verwaltung-login-box h1 {
    margin-top: 0;
    margin-bottom: 22px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    color: #0f2230;
    text-align: center;
}

.verwaltung-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.verwaltung-form-row input {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 16px;
}

.verwaltung-login-error {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 10px;
    background: #fce8e8;
    color: #a12626;
}

/* ================================
   BUTTONS (App-Theme: Nav-Farbe)
=============================== */
.verwaltung-button {
    display: inline-block;
    padding: 10px 18px;
    background: #173744;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.verwaltung-button:hover {
    background: #1d5362;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
}

.verwaltung-login-button {
    width: 100%;
    margin-top: 8px;
}

/* ================================
   FORMULARE (Inputs wie filter-bar)
=============================== */
.verwaltung-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px 20px;
}

.verwaltung-form-row.full {
    grid-column: 1 / -1;
}

.verwaltung-input,
.verwaltung-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 15px;
}

.verwaltung-textarea {
    min-height: 180px;
    resize: vertical;
}

.verwaltung-subbox {
    margin-top: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.verwaltung-subbox h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    color: #0f2230;
}

.verwaltung-simple-list {
    margin: 0;
    padding-left: 18px;
}

/* Charset-Formular: Spezies + Aktuell in einer Zeile */
.verwaltung-charset-top {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.verwaltung-charset-top .verwaltung-form-row {
    margin-bottom: 0;
}

.verwaltung-charset-top label {
    display: block;
    margin-bottom: 4px;
}

/* Charset: Tabelle Klasse | Level | Subklasse */
.verwaltung-charset-klassen {
    margin-bottom: 24px;
}

.verwaltung-klasse-header {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px 0 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1f2d37;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.verwaltung-klasse-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.verwaltung-klasse-row .verwaltung-klasse-col,
.verwaltung-klasse-row .verwaltung-level-col,
.verwaltung-klasse-row .verwaltung-subklasse-col {
    min-width: 0;
}

.verwaltung-level-col {
    max-width: 80px;
}

/* ================================
   LÖSCHEN / FEHLER
=============================== */
.verwaltung-delete-link {
    color: #b42323;
}

.verwaltung-delete-link:hover {
    color: #8f1b1b;
}

.verwaltung-delete-button {
    background: #b42323;
    color: #fff !important;
}

.verwaltung-delete-button:hover {
    background: #8f1b1b;
    color: #fff !important;
    text-decoration: none;
}

.verwaltung-error {
    margin: 0;
    color: #b42323;
    font-weight: 600;
}

/* ================================
   SPEZIFISCHE BOXEN
=============================== */
.verwaltung-charakter-edit-box .verwaltung-actions,
.verwaltung-kampagne-edit-box .verwaltung-actions {
    margin-top: 22px;
}

.verwaltung-charsets-box,
.verwaltung-gebiete-box {
    margin-top: 28px;
}

.verwaltung-simple-list-wrap {
    margin-top: 10px;
}

.verwaltung-main-charset {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.verwaltung-orte-list {
    margin-top: 14px;
    gap: 10px;
}

.verwaltung-item-klein {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.verwaltung-name-klein {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f2230;
}

.verwaltung-empty-klein {
    margin-top: 12px;
    margin-bottom: 0;
}

.verwaltung-preview-img {
    width: 180px;
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: block;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* ================================
   QUERYS (Audit-Log) – nur für Admins
=============================== */
.verwaltung-querys-box {
    margin-top: 8px;
}

.verwaltung-querys-title {
    margin: 0 0 18px 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #0f2230;
}

.verwaltung-querys-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.verwaltung-querys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.verwaltung-querys-table thead {
    background: rgba(15, 34, 48, 0.08);
}

.verwaltung-querys-table th {
    text-align: left;
    padding: 14px 18px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    color: #0f2230;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.verwaltung-querys-table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: top;
}

.verwaltung-querys-table tbody tr:last-child td {
    border-bottom: none;
}

.verwaltung-querys-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.verwaltung-querys-date {
    white-space: nowrap;
    color: #555;
    font-size: 14px;
    width: 1%;
}

.verwaltung-querys-spieler {
    white-space: nowrap;
    font-weight: 600;
    color: #0f2230;
    width: 1%;
    max-width: 180px;
}

.verwaltung-querys-text {
    word-break: break-word;
    color: #333;
}

/* ================================
   RESPONSIVE (wie site.css)
=============================== */
@media (max-width: 900px) {
    .verwaltung-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .verwaltung-actions {
        width: 100%;
    }

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

    .verwaltung-form-row.full {
        grid-column: auto;
    }
}
