/* Foto-Freigabe V3 - Stylesheet */
/* © Thomas Weste 2026 */

/* === RESET & BASE === */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

/* === UPLOAD PORTAL === */

.upload-portal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.upload-container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.upload-header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 120px;
    height: auto;
}

.upload-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--dark);
}

.subtitle {
    color: var(--secondary);
    font-size: 16px;
}

.upload-wizard {
    padding: 30px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-label {
    font-size: 13px;
    color: var(--secondary);
}

.step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.step.completed .step-number {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-content h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--dark);
}

.step-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover,
.upload-area.highlight {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-hint {
    color: var(--secondary);
    font-size: 14px;
    margin: 10px 0;
}

/* Preview Area */
.preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
    align-items: start;
}

.preview-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-item img {
    /* Ganzes Bild in voller Hoehe - hier ordnet der Hochladende die
       Personen zu, ein Zuschnitt koennte jemanden verdecken. */
    display: block;
    width: 100%;
    height: auto;
    background: #f2f2f2;
}

.preview-name {
    padding: 8px;
    font-size: 12px;
    background: var(--light);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* Person Checkboxes */
.person-checkbox-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
}

.person-checkbox {
    padding: 8px 0;
}

.person-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.person-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Summary */
.summary-box {
    background: var(--light);
    border-radius: var(--radius);
    padding: 20px;
}

.summary-box h3 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.summary-box h3:first-child {
    margin-top: 0;
}

.status-box {
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 10px;
}

.status-box.status-granted {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-box.status-check {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: #d97706;
}

.status-box.status-blocked {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Success Box */
.success-box {
    text-align: center;
    padding: 30px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.upload-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    color: var(--secondary);
    font-size: 14px;
}

/* === ADMIN AREA === */

.admin-area {
    background: #f1f5f9;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo-container {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar .logo {
    max-width: 80px;
    margin-bottom: 10px;
}

.sidebar h2 {
    font-size: 18px;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    margin-right: 10px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 {
    font-size: 24px;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.content-body {
    flex: 1;
    padding: 30px;
}

.content-footer {
    background: white;
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--secondary);
    font-size: 14px;
}

/* Views */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

.view-toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-detail {
    display: flex;
    gap: 8px;
}

/* Card */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
}

.card-body {
    padding: 20px;
}

/* Warnings */
.warnings-container {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    color: #d97706;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
    font-size: 14px;
}

.data-table td {
    padding: 15px;
    border-top: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Groups Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.group-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.group-header h3 {
    margin: 0;
    font-size: 18px;
}

.group-actions {
    display: flex;
    gap: 8px;
}

.group-body {
    font-size: 14px;
}

.member-list {
    color: var(--secondary);
    margin-top: 8px;
}

.group-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-style: italic;
    color: var(--secondary);
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.event-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.event-header h3 {
    margin: 0;
    font-size: 18px;
}

.event-actions {
    display: flex;
    gap: 8px;
}

.event-body {
    font-size: 14px;
}

.event-description {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--secondary);
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    /* Kacheln behalten ihre eigene Hoehe statt auf Zeilenhoehe zu strecken */
    align-items: start;
}

.photo-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.photo-thumbnail {
    /* Kein festes 4:5-Fenster mehr - die Kachel richtet sich nach dem Bild.
       position: relative bleibt, weil Auswahlkaestchen und Status-Zeichen
       darin absolut positioniert werden. */
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f2f2f2;
}

.photo-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}

.photo-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow);
}

.photo-info {
    padding: 15px;
}

.photo-filename {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-event,
.photo-persons {
    font-size: 13px;
    color: var(--secondary);
}

.photo-card .btn {
    width: 100%;
    margin: 0 15px 15px;
    width: calc(100% - 30px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-large .modal-content {
    max-width: 960px;
    width: 95vw;
    max-height: 92vh;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--secondary);
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Photo Detail */
.modal-large .modal-content {
    display: flex;
    flex-direction: column;
}

.modal-large .modal-body {
    flex: 1;
    overflow: hidden;
    padding: 20px;
}

.photo-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

.photo-preview {
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.photo-preview img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.photo-info {
    overflow-y: auto;
    max-height: 70vh;
    padding-right: 5px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    display: block;
    font-size: 13px;
    color: var(--secondary);
    margin-top: 5px;
}

.info-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

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

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Export */
.export-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* Utilities */
.text-muted {
    color: var(--secondary);
}

/* === HILFE-SYSTEM === */

.help-modal-content {
    max-width: 1100px;
    width: 96vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.help-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.help-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.help-sidebar {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--light);
}

.help-cat { margin-bottom: 4px; }

.help-cat-label {
    padding: 10px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--secondary);
}

.help-nav-item {
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    color: var(--dark);
    transition: background 0.15s;
    border-left: 3px solid transparent;
}

.help-nav-item:hover   { background: rgba(37,99,235,0.06); }
.help-nav-item.active  { background: rgba(37,99,235,0.08); border-left-color: var(--primary); font-weight: 600; color: var(--primary); }

.help-search-result {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.help-search-result:hover { background: rgba(37,99,235,0.06); }
.help-result-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.help-result-cat   { font-size: 11px; color: var(--secondary); }

.help-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
    line-height: 1.75;
}

.help-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--dark);
}

.help-content h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 24px 0 8px;
    color: var(--dark);
}

.help-content p { margin-bottom: 12px; }

.help-list {
    padding-left: 20px;
    margin-bottom: 12px;
}
.help-list li { margin-bottom: 6px; font-size: 14px; }

.help-table-wrap { overflow-x: auto; margin-bottom: 16px; }

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.help-table th {
    background: var(--light);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--border);
    font-size: 13px;
}
.help-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    vertical-align: top;
}
.help-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }

.help-box {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid;
}
.help-box-info    { background: rgba(37,99,235,0.08);  border-color: var(--primary); }
.help-box-warning { background: rgba(245,158,11,0.1);  border-color: var(--warning); }
.help-box-danger  { background: rgba(239,68,68,0.08);  border-color: var(--danger);  }

.help-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.help-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.help-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* === PLATTFORM-VORSCHAU === */

.preview-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.platform-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.platform-label {
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.platform-frame {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #000;
}

/* Achtung: Hier ist object-fit: cover beabsichtigt - die Vorschau soll
   zeigen, wie Instagram & Co. das Bild spaeter zuschneiden. Nicht aendern. */
.platform-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.platform-hint {
    font-size: 12px;
    color: var(--secondary);
}

/* === ÄNDERUNGSVERLAUF === */

.history-timeline {
    border-left: 2px solid var(--border);
    margin-left: 8px;
    padding-left: 16px;
}

.history-entry {
    position: relative;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.history-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    position: absolute;
    left: -21px;
    top: 4px;
    flex-shrink: 0;
}

.history-content {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
}

.history-user   { font-weight: 600; color: var(--dark); }
.history-action { color: var(--secondary); }
.history-ts     { color: var(--secondary); font-style: italic; }

/* === DASHBOARD EDITORIAL STATS === */

.editorial-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.editorial-stat-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--light);
    border-radius: var(--radius);
}

.editorial-stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.editorial-stat-label {
    font-size: 12px;
    color: var(--secondary);
}

@media (max-width: 1200px) {
    .editorial-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .preview-platforms     { grid-template-columns: 1fr; }
}

/* === POSTS GRID === */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.post-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.post-channel-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.post-status-badge {
    font-size: 12px;
    color: var(--secondary);
}

.post-card-thumbs {
    display: flex;
    gap: 3px;
    height: 90px;
    overflow: hidden;
    background: var(--light);
    padding: 6px;
}

.post-card-thumb {
    height: 78px;
    width: 78px;
    object-fit: cover;
    border-radius: 4px;
}

.post-card-body {
    padding: 12px 14px;
    flex: 1;
}

.post-card-date {
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.post-card-caption {
    font-size: 13px;
    color: var(--dark);
    line-height: 1.5;
}

.post-card-actions {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--light);
}

/* === KANAL-BUTTONS === */

.channel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    user-select: none;
}

.channel-btn input[type="radio"] { display: none; }

.channel-btn:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37,99,235,0.06);
    font-weight: 600;
}

/* === CONTENT-KALENDER === */

.kalender-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--secondary);
}

.kalender-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.kalender-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 16px;
}

.kal-header {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kal-cell {
    background: white;
    border-radius: 6px;
    padding: 6px 8px;
    min-height: 80px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background 0.15s;
}

.kal-cell:hover     { background: rgba(37,99,235,0.04); }
.kal-empty          { background: transparent; border-color: transparent; cursor: default; }
.kal-today          { border-color: var(--primary); border-width: 2px; }
.kal-has-posts      { background: #f8faff; }

.kal-day-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    display: block;
    margin-bottom: 5px;
}

.kal-today .kal-day-num {
    color: var(--primary);
}

.kal-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.kalender-day-detail {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-top: 8px;
}

/* === NAVIGATION SECTION LABELS === */

.nav-section-label {
    padding: 16px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}

/* === CURRENT USER BADGE === */

.current-user-badge {
    font-size: 13px;
    color: var(--secondary);
    padding: 4px 10px;
    background: var(--light);
    border-radius: var(--radius);
}

/* === KANBAN BOARD === */

.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
}

.kanban-column {
    /* 280 statt 240 Pixel: mehr Flaeche fuers Bild. Die Vorschaubilder
       sind 400 Pixel breit, bleiben also scharf. */
    flex: 0 0 280px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.kanban-col-header {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
}

.kanban-count {
    background: var(--light);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    color: var(--secondary);
    font-weight: 600;
}

.kanban-cards {
    overflow-y: auto;
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    /* Nicht stauchen lassen: Die Karten stehen in einem Flexbox-Behaelter
       mit begrenzter Hoehe. Ohne diese Zeile quetscht Flexbox sie zusammen,
       statt die Spalte scrollen zu lassen - wegen overflow:hidden sogar
       unter ihre natuerliche Groesse. */
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light);
    cursor: default;
    transition: box-shadow 0.2s;
}

.kanban-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kanban-thumb {
    /* Keine feste Hoehe: das Bild wird auf Spaltenbreite skaliert und
       behaelt sein Seitenverhaeltnis. Die Karte waechst mit, die Spalte
       scrollt. So ist das ganze Foto sichtbar - noetig, weil hier ueber
       die Freigabe entschieden wird. */
    width: 100%;
    height: auto;
    display: block;
    background: #f2f2f2;
}

.kanban-thumb-placeholder {
    width: 100%;
    height: 130px;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.kanban-card-body {
    padding: 8px 10px 4px;
}

.kanban-card-title {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.kanban-card-meta {
    font-size: 11px;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-card-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    align-items: center;
}

.kanban-card-actions {
    padding: 6px 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    border-top: 1px solid var(--border);
    background: white;
}

.kanban-status-select {
    flex: 1;
    font-size: 11px;
    padding: 3px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
}

/* === SICHTUNGS-MODUS === */

.review-stars {
    display: flex;
    gap: 6px;
}

.star-btn {
    background: none;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
}

.star-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* === EDITORIAL STATUS BADGES === */

.badge-eingang        { background: rgba(100,116,139,0.15); color: #475569; }
.badge-gesichtet      { background: rgba(59,130,246,0.15);  color: #1d4ed8; }
.badge-ausgewaehlt    { background: rgba(139,92,246,0.15);  color: #6d28d9; }
.badge-geplant        { background: rgba(245,158,11,0.15);  color: #d97706; }
.badge-veroeffentlicht{ background: rgba(16,185,129,0.15);  color: #059669; }
.badge-archiviert     { background: rgba(100,116,139,0.1);  color: #94a3b8; }
.badge-abgelehnt      { background: rgba(239,68,68,0.15);   color: #dc2626; }

/* === PERSON TAGS / CHIPS === */

.person-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 38px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
}

.person-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 13px;
    white-space: nowrap;
}

.person-tag.tag-revoked { background: var(--danger); }
.person-tag.tag-unclear { background: var(--warning); }

.tag-remove {
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    opacity: 0.75;
    margin-left: 2px;
}
.tag-remove:hover { opacity: 1; }

/* === AUTOCOMPLETE === */

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: var(--shadow-lg);
}

.autocomplete-item {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: rgba(37, 99, 235, 0.07); }

.autocomplete-empty {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--secondary);
    font-style: italic;
}

/* === PER-FOTO PERSONEN-KARTEN === */

.per-photo-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.photo-person-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: white;
}

.photo-person-card-header {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.photo-person-card-thumb {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.photo-person-card-thumb-placeholder {
    width: 72px;
    height: 90px;
    border-radius: var(--radius);
    flex-shrink: 0;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid var(--border);
}

.photo-person-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === IMPORT VORSCHAU === */

.import-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 12px;
}

.import-preview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.import-preview th {
    background: var(--light);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}

.import-preview td {
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
}

.import-preview tr:last-child td { border-bottom: none; }

.import-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 14px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid,
    .groups-grid,
    .events-grid,
    .photos-grid {
        grid-template-columns: 1fr;
    }

    .photo-detail-grid {
        grid-template-columns: 1fr;
    }

    .step-indicator {
        overflow-x: auto;
    }

    .step-label {
        display: none;
    }
}

/* Warnhinweis: offener Eingang läuft auf die automatische Löschung zu */
.retention-warn {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    padding: 1px 6px;
    border-radius: 10px;
    background: #fdecea;
    color: #a4262c;
    border: 1px solid #f3c4c0;
    white-space: nowrap;
    cursor: help;
}

/* Aufbewahrungs-Schutz: von der automatischen Löschung ausgenommen */
.retention-hold {
    display: inline-block;
    font-size: 11px;
    line-height: 1.4;
    padding: 1px 6px;
    border-radius: 10px;
    background: #eef3fb;
    color: #2b579a;
    border: 1px solid #c7d8ef;
    white-space: nowrap;
    cursor: help;
}

/* Freigabestatus auf der Kanban-Karte: Zeichen plus Klartext.
   Die Farben stuetzen die Bedeutung, tragen sie aber nicht allein -
   Zeichen und Wort stehen immer dabei. */
.dsgvo-badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1.5;
    padding: 1px 7px;
    border-radius: 10px;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: help;
}

.dsgvo-badge.dsgvo-granted {
    background: #e8f5ec;
    color: #1d6f3b;
    border-color: #bfe3cb;
}

.dsgvo-badge.dsgvo-partial {
    background: #fff6e0;
    color: #8a5a00;
    border-color: #f0dca6;
}

/* Bewusst neutral-grau statt gelb: "Prüfen" heisst unentschieden,
   nicht halb freigegeben - sonst verwechselt man es mit 🟡. */
.dsgvo-badge.dsgvo-check {
    background: #eef1f5;
    color: #46536b;
    border-color: #d3dae3;
}

.dsgvo-badge.dsgvo-blocked {
    background: #fdecea;
    color: #a4262c;
    border-color: #f3c4c0;
}

/* Erklaerung "keine Person abgebildet" im Foto-Dialog */
.ohne-personen {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f7f9fb;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.ohne-personen input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    cursor: pointer;
}

.ohne-personen-hinweis {
    font-size: 11px;
    color: var(--secondary);
    margin: 5px 2px 12px;
}

/* Hinweis, wenn die Anmeldung abgelaufen ist */
.session-abgelaufen {
    position: fixed;
    inset: 0;
    background: rgba(20, 25, 35, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.session-abgelaufen-box {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    padding: 28px 32px;
    max-width: 440px;
    text-align: center;
}

.session-abgelaufen-icon {
    font-size: 34px;
    margin-bottom: 6px;
}

.session-abgelaufen-box h3 {
    margin: 0 0 12px;
    font-size: 19px;
}

.session-abgelaufen-box p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--secondary);
}

.session-abgelaufen-box .btn {
    margin-top: 8px;
}

/* Sicherungsstand im Dashboard */
.backup-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.backup-zeile {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    padding: 9px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
}

.backup-titel {
    font-weight: 600;
}

.backup-zusatz {
    font-size: 11px;
    opacity: 0.75;
}

.backup-frisch {
    background: #e8f5ec;
    color: #1d6f3b;
    border-color: #bfe3cb;
}

.backup-alt,
.backup-fehlt {
    background: #fdecea;
    color: #a4262c;
    border-color: #f3c4c0;
    font-weight: 600;
}
