/* Infozentrale – Design-Grundlage
   Farbwelt angelehnt an Tresor/Schließtechnik: gedecktes Tiefsee-Petrol als
   Marke, ein warmer Messing-Ton als sparsam eingesetzter Akzent (erinnert an
   einen Zahlenschloss-Ring), dazu ruhiges Off-White als Arbeitsfläche. */

:root {
    --teal-900: #0b4a4d;
    --teal-800: #0f5c60;
    --teal-700: #14767b;
    --teal-100: #e6f0ef;
    --brass:    #b3803f;
    --brass-100:#f4e9d8;
    --ink:      #1d2726;
    --ink-soft: #4d5c5a;
    --paper:    #f3f6f5;
    --card:     #ffffff;
    --line:     #d9e2e0;
    --danger:   #a3352c;
    --danger-bg:#fbeae8;
    --success:  #1f7a4d;
    --success-bg:#e7f5ec;

    --radius: 6px;
    --font: 'Public Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
    color: var(--teal-900);
}

/* ---------- Auth-Seiten (Login / Setup) ---------- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--teal-900) 0%, var(--teal-900) 220px, var(--paper) 220px);
}

.auth-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 1px 2px rgba(11, 74, 77, 0.08);
}

.auth-box h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--ink-soft);
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-box label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

.auth-box input[type="text"],
.auth-box input[type="password"] {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

.auth-box input:focus,
.btn:focus-visible,
.tile:focus-visible,
a:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

.btn {
    display: inline-block;
    background: var(--teal-800);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.65rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.btn:hover { background: var(--teal-900); text-decoration: none; }
.btn.btn-secondary { background: transparent; color: var(--teal-800); border: 1px solid var(--line); }
.btn.btn-secondary:hover { background: var(--teal-100); }
.btn.btn-danger { background: var(--danger); }
.btn.btn-danger:hover { background: #822a23; }

.error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.notice {
    background: var(--teal-100);
    color: var(--teal-900);
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.notice-success { background: var(--success-bg); color: var(--success); }
.hint { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- App-Shell (nach dem Login) ---------- */
.app-header {
    background: var(--teal-900);
    color: #fff;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.app-header .brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
}

.app-header .brand .mark {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--brass);
    display: inline-block;
}

.app-header nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.app-header nav a, .app-header nav button {
    color: #d8ebe9;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.app-header nav a:hover, .app-header nav button:hover { color: #fff; }

.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.page-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-title h1 { margin-bottom: 0.15rem; font-size: 1.6rem; }
.page-title p { color: var(--ink-soft); margin: 0; }

/* ---------- Kachel-Grid (Dashboard) ---------- */
.tile-category { margin-bottom: 2.25rem; }
.tile-category h2 {
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
}

.tile {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal-700);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    color: var(--ink);
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.tile:hover {
    border-left-color: var(--brass);
    text-decoration: none;
    transform: translateY(-1px);
}

.tile .tile-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tile .tile-title .ext-mark {
    font-size: 0.7rem;
    color: var(--ink-soft);
    font-weight: 500;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
}

.tile .tile-desc {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 0.3rem;
}

.tile.tile-placeholder {
    border-left-color: var(--line);
    color: var(--ink-soft);
    cursor: default;
}
.tile.tile-placeholder:hover { transform: none; border-left-color: var(--line); }

.empty-state {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--ink-soft);
}

/* ---------- Tabellen (Linkverwaltung etc.) ---------- */
table.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}
table.admin-table th { background: var(--teal-100); color: var(--teal-900); font-weight: 600; }
table.admin-table tr:last-child td { border-bottom: none; }

.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.3rem; }
.form-row input[type="text"],
.form-row input[type="url"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 560px;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    background: var(--brass-100);
    color: var(--brass);
}
