/* DocTrack – schlichtes Stylesheet für den Admin-Bereich. Keine externen Fonts/CDNs (NFA-16). */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f5f7;
    color: #1f2933;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.login-box h1 {
    font-size: 1.25rem;
    margin: 0 0 1.25rem;
    text-align: center;
}

.login-box label {
    display: block;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-box input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    font-size: 1rem;
}

.login-box button {
    margin-top: 1.25rem;
    width: 100%;
    padding: 0.6rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.login-box button:hover {
    background: #1d4ed8;
}

.error-message {
    background: #fdecea;
    color: #a12622;
    border: 1px solid #f5c6c3;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.success-message {
    background: #e6f4ea;
    color: #1e6b34;
    border: 1px solid #b7e3c4;
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

/* --- Admin-Bereich: Topbar, Inhalt, Formulare, Tabelle --- */

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #dfe3e8;
    padding: 0.75rem 1.5rem;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.admin-logo {
    height: 32px;
    width: auto;
}

.admin-topbar-title {
    font-weight: 600;
}

.admin-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.admin-content h1 {
    font-size: 1.4rem;
}

.admin-actions {
    margin-bottom: 1rem;
}

.form-section {
    background: #ffffff;
    border: 1px solid #2563eb;
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.form-section-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
}

.button-orange {
    display: inline-block;
    background: #f97316;
    color: #000000;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button-orange:hover {
    background: #ea6a0a;
    color: #000000;
}

.hint {
    font-size: 0.85rem;
    color: #52606d;
    margin: 0.25rem 0 0.75rem;
}

label {
    display: block;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

button,
.button-primary,
.button-danger {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

button,
.button-primary {
    background: #2563eb;
    color: #ffffff;
}

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

.button-danger {
    background: #dc2626;
    color: #ffffff;
}

.button-danger:hover {
    background: #b91c1c;
}

.link-danger {
    color: #dc2626;
}

.confirm-box {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e4e7eb;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background: #f4f5f7;
}

.data-table td.actions a {
    margin-right: 0.75rem;
    font-size: 0.85rem;
}

.csv-import {
    margin-top: 1.25rem;
}

.warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.warning-box ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

.button-secondary {
    background: #e4e7eb;
    color: #1f2933;
}

.button-secondary:hover {
    background: #cbd2d9;
}

.csv-preview .form-actions form {
    margin: 0;
}

/* --- Kampagnen-Auswertung (Prompt 6): Kennzahlen, Filter, Links, Status --- */

.admin-content-wide {
    max-width: 1200px;
}

.stats-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-tile {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    padding: 0.75rem 1.1rem;
    min-width: 120px;
    text-align: center;
}

.stat-tile .stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-tile .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #52606d;
    margin-top: 0.15rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.filter-bar label {
    margin: 0;
    font-size: 0.85rem;
}

.filter-bar select,
.filter-bar input[type="text"] {
    width: auto;
}

.filter-bar .recipient-add-trigger {
    margin-left: auto;
}

.table-scroll {
    overflow-x: auto;
}

.link-cell {
    max-width: 260px;
}

.link-cell .link-text {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.85rem;
}

.link-cell .copy-button {
    margin-left: 0.4rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    background: #e4e7eb;
    color: #1f2933;
}

.link-cell .copy-button:hover {
    background: #cbd2d9;
}

.link-cell .copy-button.copied {
    background: #16a34a;
    color: #ffffff;
}

.status-cell {
    white-space: nowrap;
}

.status-cell .status-label {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-cell.status-yes .status-label {
    background: #dcfce7;
    color: #166534;
}

.status-cell.status-no .status-label {
    background: #e4e7eb;
    color: #52606d;
}

.status-cell .status-meta {
    display: block;
    font-size: 0.75rem;
    color: #52606d;
    margin-top: 0.15rem;
}

.data-table td.actions form {
    margin: 0;
}

.link-danger-button {
    background: none;
    border: none;
    color: #dc2626;
    padding: 0;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.link-danger-button:hover {
    color: #b91c1c;
    background: none;
}

.recipient-form-section {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.recipient-form-section h2 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.recipient-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipient-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.recipient-form-field {
    display: flex;
    flex-direction: column;
}

.recipient-form-field label {
    margin: 0 0 0.25rem;
}

.recipient-form-field input {
    width: auto;
    min-width: 160px;
}
