/* Modern Accounts Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: #f4f6fb;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #f4f6fb;
    color: #1a1a1a;
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    overflow: hidden;
}

.auth-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.auth-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: white;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #1a1a1a;
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 16px;
    color: #999;
    font-size: 13px;
    position: relative;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

/* Event Auswahl */
.auth-container {
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(145deg, #f7f9fb 0%, #c9d7ec 100%);
}


.guest-hero {
    padding: 28px 20px 6px;
    text-align: center;
}

.guest-hero h1 {
    font-size: 32px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.guest-hero p {
    color: #4a5568;
    font-size: 15px;
}

.guest-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 28px;
}

.guest-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.guest-org {
    background: white;
    border-radius: 14px;
    border: 1px solid #e6eaf0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    padding: 18px 18px 10px;
}

.guest-org-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.guest-org-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

.guest-org-count {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.guest-org-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eef2f7;
    border: 1px solid #d9e0ec;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 6px;
    font-size: 20px;
}

.guest-org-icon.placeholder {
    color: #66738a;
}
}

.events-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.guest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding-bottom: 8px;
}

.guest-card {
    display: block;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    padding: 12px 12px 14px;
    background: #fff;
    position: relative;
}

.guest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #d5dce9;
}

.guest-card input.event-radio {
    display: none;
}

.guest-card h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
}

.guest-card-meta {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.guest-card-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.guest-event-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #4b5563, #111827);
}

.guest-event-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-icon-placeholder {
    font-size: 22px;
    color: rgba(255,255,255,0.9);
}

.org-block {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    margin-bottom: 24px;
}

.org-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.org-header h2 {
    margin: 0;
    .guest-empty {
        text-align: center;
        padding: 40px;
        color: #4b5563;
    }

.event-card:hover {
    border-color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.event-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.event-datum {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.back-to-login {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e6eaf0;
}

.back-to-login a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
    border: 1px solid #e6eaf0;
}

.back-to-login a:hover {
    color: #1a1a1a;
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Admin Panel */
.admin-container {
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding: 32px 24px 64px !important;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: white;
    border-radius: 14px;
    border: 1px solid #e6e9f2;
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
}

.admin-header h1 {
    font-size: 26px;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.btn-logout {
    padding: 10px 16px;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-logout:hover {
    background: #111827;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    transform: translateY(-1px);
}

.admin-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #e6e9f2;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.admin-section form input[type="text"],
.admin-section form input[type="email"],
.admin-section form input[type="password"],
.admin-section form input[type="file"],
.admin-section form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dfe4ee;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-section form input:focus,
.admin-section form select:focus {
    border-color: #0f172a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12);
}

.admin-section h2 {
    font-size: 20px;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    font-weight: 600;
}

.verwalter-liste {
    margin-top: 32px;
}

.verwalter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e6e9f2;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.18s ease;
}

.verwalter-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.verwalter-info h3 {
    font-size: 16px;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.verwalter-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.btn-delete {
    padding: 8px 16px;
    background: white;
    color: #c00;
    border: 1px solid #fcc;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: #fee;
    border-color: #c00;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Barkeeper Panel */
.barkeeper-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.barkeeper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.barkeeper-header h1 {
    font-size: 28px;
    color: #1a1a1a;
    margin: 0;
}

.barkeeper-content {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 60px 32px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.barkeeper-content h2 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.barkeeper-content p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.helptext {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.errorlist li {
    color: #c00;
    font-size: 13px;
}

/* Admin Panel - Neue Styles für Tabs und Organisationen */
.tabs-container {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f4f6fb;
    padding: 0 0 12px;
    margin-bottom: 10px;
}

.tabs {
    display: inline-flex;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e6e9f2;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.tab-button {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #e6e9f2;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.18s ease;
    min-width: 140px;
    text-align: center;
}

.tab-button:hover {
    border-color: #cbd5e1;
    background: #eef2ff;
    color: #1e293b;
}

.tab-button.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}
.admin-container .tab-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.admin-container .tab-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 600;
}

.admin-section h3 {
    font-size: 16px;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.admin-section h4 {
    font-size: 14px;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    font-weight: 600;
}

/* Verwalter-Liste Improvements */
.verwalter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
}

.verwalter-info h4 {
    margin: 0 0 4px 0;
}

.verwalter-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.badge-admin {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Organisationen-Liste */
.org-liste {
    display: grid;
    gap: 12px;
}

.org-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: all 0.2s;
}

.org-item:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.org-info {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-grow: 1;
}

.org-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: white;
    border: 1px solid #e8e8e8;
    padding: 6px;
}

.org-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f0f0f0;
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.org-details h4 {
    margin: 0 0 6px 0;
}

.org-details p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.org-stats {
    display: flex;
    gap: 24px;
    margin-left: 24px;
}

.stat {
    font-size: 13px;
    color: #666;
}

.stat strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Zuweisungen */
.assignment-liste {
    display: grid;
    gap: 12px;
}

.assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.assignment-info h4 {
    margin: 0 0 4px 0;
}

.assignment-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.assignment-select {
    text-align: right;
}

.assignment-select p {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
}

.org-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.org-badge-none {
    display: inline-block;
    background: #f5f5f5;
    color: #999;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.barkeeper-liste-admin {
    display: grid;
    gap: 12px;
}

.barkeeper-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.barkeeper-info h4 {
    margin: 0 0 4px 0;
}

.barkeeper-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.barkeeper-org {
    margin-left: 24px;
}

/* Organisationen Tabelle kompakt */
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-input {
    min-width: 240px;
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 14px;
}

.org-table {
    border: 1px solid #e6e9f2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.org-row {
    display: grid;
    grid-template-columns: 1.2fr 0.4fr 0.4fr 0.4fr 0.4fr;
    align-items: center;
    padding: 16px 18px;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid #eef1f7;
}

.org-head {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #dfe4ee;
}

.org-entry:last-child .org-row {
    border-bottom: none;
}

.org-col.name {
    display: flex;
    gap: 12px;
    align-items: center;
}

.org-col.counts {
    text-align: center;
    font-weight: 600;
    color: #333;
}

.org-col.actions {
    text-align: right;
}

.org-detail {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    padding: 16px 18px 22px 18px;
    background: #f8fafc;
    border-top: 1px solid #eef1f7;
}

.org-detail.open {
    display: grid;
}

.detail-block {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    min-height: 96px;
}

.detail-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: #f2f6ff;
    color: #1a4fb0;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid #d9e5ff;
}

.pill-muted {
    background: #f7f7f7;
    color: #777;
    border-color: #ececec;
}

@media (max-width: 900px) {
    .org-row {
        grid-template-columns: 1fr 0.5fr 0.5fr;
        grid-template-areas:
            "name counts counts"
            "actions actions actions";
    }
    .org-col.actions {
        grid-area: actions;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .guest-hero h1 {
        font-size: 24px;
    }

    .guest-hero p {
        font-size: 14px;
    }

    .guest-grid {
        grid-template-columns: 1fr;
    }

    .guest-org {
        padding: 14px;
    }

    .back-to-login {
        margin-top: 24px;
        padding-top: 20px;
    }

    .back-to-login a {
        width: 100%;
        justify-content: center;
    }

    .auth-box {
        padding: 24px;
    }
}
