/* ============================================================
   WGW-DL – Clean & Professional Admin Stylesheet
   ============================================================ */

/* ----------------------------------------------------------
   Design Tokens
   ---------------------------------------------------------- */
:root {
    --color-primary:       #2563eb;
    --color-primary-dark:  #1d4ed8;
    --color-primary-light: #eff6ff;
    --color-bg:            #f8fafc;
    --color-surface:       #ffffff;
    --color-border:        #e2e8f0;
    --color-border-focus:  #93c5fd;
    --color-text:          #0f172a;
    --color-text-muted:    #64748b;
    --color-error:         #ef4444;
    --color-error-bg:      #fef2f2;
    --color-success:       #22c55e;
    --color-row-alt:       #f8fafc;
    --color-row-hover:     #eff6ff;

    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;

    --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .07);
    --shadow-md:  0 4px 6px -1px rgb(0 0 0 / .08), 0 2px 4px -2px rgb(0 0 0 / .08);

    --font-sans:  system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono:  ui-monospace, 'SF Mono', 'Cascadia Mono', monospace;

    --max-width:  1100px;
    --header-h:   64px;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* ----------------------------------------------------------
   Header & Navigation
   ---------------------------------------------------------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    border-left: 1px solid var(--color-border);
    padding-left: 14px;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color .15s, background .15s;
}

nav a:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

nav a:last-child {
    color: var(--color-error);
    margin-left: 8px;
}

nav a:last-child:hover {
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* ----------------------------------------------------------
   Main Content
   ---------------------------------------------------------- */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 36px 24px 60px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
    margin: 32px 0 14px;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 12px;
    color: var(--color-text-muted);
}

p strong {
    color: var(--color-text);
    font-weight: 600;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Stats Bar
   ---------------------------------------------------------- */
.stats-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.table-actions a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

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

.action-sep {
    color: var(--color-border);
    user-select: none;
}

/* User management */
.current-user td {
    background: var(--color-primary-light);
}

.badge-self {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: var(--color-primary);
    color: #fff;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
}

.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.inline-form input[type="password"] {
    width: 180px;
    padding: 5px 8px;
    font-size: 13px;
}

.stat-item {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-label {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.stat-max {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.stat-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.stat-warning .stat-value {
    color: #b45309;
}

.settings-form fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.settings-form legend {
    font-weight: 600;
    padding: 0 6px;
    color: var(--color-text);
}

.settings-form small {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-top: 2px;
}

/* ----------------------------------------------------------
   Page Header (title + inline search)
   ---------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
}

.page-header input[type="search"] {
    width: 320px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%2364748b' stroke-width='2'/%3E%3Cpath d='m21 21-4.35-4.35' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 36px;
    margin: 0;
    flex-shrink: 0;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.sort-icon {
    font-style: normal;
    opacity: .5;
    font-size: 11px;
    margin-left: 4px;
}

/* ----------------------------------------------------------
   Cards
   ---------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

/* ----------------------------------------------------------
   Recent Changes Panel
   ---------------------------------------------------------- */
.recent-changes {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
    margin-top: 32px;
    margin-bottom: 0;
}

.share-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

/* Danger button (e.g. remove heir) */
.btn-danger {
    background: var(--color-error);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-danger:hover {
    background: #dc2626;
}

/* Compact heir-add form (inside member detail page) */
/* Two-column transaction form */
.tx-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
    max-width: 900px;
}

.tx-form-col {
    display: flex;
    flex-direction: column;
}

/* Align the submit button to the bottom of the right column */
.tx-form-col button[type="submit"] {
    margin-top: auto;
    align-self: flex-start;
}

/* Anchor jump link next to h1 */
.anchor-jump {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}

.anchor-jump:hover {
    text-decoration: underline;
}

/* Transaction count badge next to h2 */
.tx-total {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 8px;
}

@media (max-width: 640px) {
    .tx-form {
        grid-template-columns: 1fr;
    }
}

.heir-form {
    max-width: 560px;
    margin-top: 16px;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-focus);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.recent-changes-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.recent-changes-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
}

.change-count {
    font-size: 12px;
    color: var(--color-text-muted);
}

.recent-changes h2 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.pagination a,
.pagination-current,
.pagination-disabled,
.pagination-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
}

.pagination a {
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.pagination a:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.pagination-current {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    font-weight: 600;
}

.pagination-disabled {
    color: var(--color-text-muted);
    border: 1px solid transparent;
    cursor: default;
}

.pagination-gap {
    color: var(--color-text-muted);
    border: none;
}

.recent-changes ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.recent-changes li {
    display: grid;
    grid-template-columns: 160px 1fr 1fr auto;
    gap: 0 16px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
}

.recent-changes li:last-child {
    border-bottom: none;
}

.change-time {
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.change-subject {
    font-weight: 600;
    color: var(--color-text);
}

.change-field {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
}

.change-user {
    color: var(--color-text-muted);
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.change-old {
    color: var(--color-text-muted);
    text-decoration: line-through;
    font-family: var(--font-mono);
    font-size: 12px;
}

.change-arrow {
    color: var(--color-text-muted);
}

.change-values {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.change-new {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text);
}

/* ----------------------------------------------------------
   Tables
   ---------------------------------------------------------- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
}

thead tr {
    background: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
}

th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background: var(--color-row-alt);
}

tbody tr:hover {
    background: var(--color-row-hover);
}

td a {
    font-weight: 500;
}

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */
form {
    max-width: 560px;
}

label {
    display: block;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-border-focus);
}

input[readonly] {
    background: var(--color-row-alt);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

/* Checkbox row */
label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Remove <br> visual gap — handled by label margin */
br {
    display: none;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    text-decoration: none;
    width: auto;
    margin-top: 20px;
}

button:hover,
input[type="submit"]:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

button:focus-visible,
input[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-border-focus);
}

/* Secondary / cancel variant */
button[name="cancel"],
a.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border-color: var(--color-border);
    margin-left: 8px;
}

button[name="cancel"]:hover,
a.btn-secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

/* Action links styled as subtle buttons */
main > a,
.actions a {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    margin: 4px 4px 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-focus);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

main > a:hover,
.actions a:hover {
    background: #dbeafe;
    border-color: var(--color-primary);
    text-decoration: none;
}

/* ----------------------------------------------------------
   Alerts / Messages
   ---------------------------------------------------------- */
.error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #b91c1c;
    background: var(--color-error-bg);
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
}

.success {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
}

.deactivate-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.deactivate-prompt p {
    margin: 0;
    flex: 1;
}

.btn-secondary {
    display: inline-block;
    padding: 7px 14px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--color-bg);
}

.member-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
}

/* ----------------------------------------------------------
   Login Page
   ---------------------------------------------------------- */
body:has(form[method="post"]:not([enctype])) main:not(:has(table)) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h) - 60px);
    padding-top: 0;
    padding-bottom: 0;
}

body:has(form[method="post"]:not([enctype])) main:not(:has(table)) h1 {
    text-align: center;
}

body:has(form[method="post"]:not([enctype])) main:not(:has(table)) form {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px;
}

/* ----------------------------------------------------------
   Member Detail — key-value pairs
   ---------------------------------------------------------- */
main > p {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 4px 12px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    margin: 0;
    font-size: 14px;
}

main > p strong {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Avoid grid on action paragraphs (containing only a message) */
main > p:only-of-type,
main > p.message {
    display: block;
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0;
}

footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 16px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

footer p {
    margin: 0;
    display: block;
}

/* ----------------------------------------------------------
   Hauberg
   ---------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.badge-entwurf       { background: #fef9c3; color: #854d0e; }
.badge-berechnet     { background: #dbeafe; color: #1e40af; }
.badge-abgeschlossen { background: #dcfce7; color: #166534; }

.hauberg-actions { white-space: nowrap; }
.hauberg-actions a {
    display: inline-block;
    margin: 0 2px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-focus);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    text-decoration: none;
}
.hauberg-actions a:hover {
    background: #dbeafe;
    border-color: var(--color-primary);
}

.hauberg-status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.hauberg-status-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.hauberg-status-actions a {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-focus);
    border-radius: var(--radius-sm);
    color: var(--color-primary);
    text-decoration: none;
}
.hauberg-status-actions a:hover {
    background: #dbeafe;
    border-color: var(--color-primary);
}

.hauberg-stammdaten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.hauberg-stammdaten > div {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}
.hauberg-stammdaten > div span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
.hauberg-stammdaten > div strong {
    font-size: 15px;
    color: var(--color-text);
}

.hauberg-protokoll {
    background: var(--color-primary-light);
    border: 1px solid var(--color-border-focus);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
}
.hauberg-protokoll h2 { margin-top: 0; }

.hauberg-action-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-top: 32px;
}
.hauberg-action-box h2 { margin-top: 0; }

.hauberg-add-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}
.hauberg-add-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.hauberg-add-card h2 { margin-top: 0; }
.hauberg-add-card form { max-width: 100%; }

/* ----------------------------------------------------------
   Export Cards
   ---------------------------------------------------------- */
.export-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.export-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 28px 24px;
}

.export-card h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.export-card p {
    margin-bottom: 0;
    font-size: 14px;
}

.export-card .btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.export-card .btn:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    text-decoration: none;
}

.export-form {
    max-width: 100%;
}

.export-form-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.export-form-row label {
    margin: 0;
    font-size: 13px;
}

.export-form-row input {
    margin: 0;
}

.export-card button[type="submit"] {
    margin-top: 20px;
}

/* ----------------------------------------------------------
   Utilities
   ---------------------------------------------------------- */
.hidden {
    display: none !important;
}

/* Inline-Umbenennen für Teilnehmer */
.tn-name-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-rename-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 13px;
    padding: 0 2px;
    line-height: 1;
    margin: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.btn-rename-toggle:hover {
    opacity: 1;
    color: var(--color-primary);
    background: none;
    box-shadow: none;
}
