/* 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(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

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

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.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(200px, 1fr));
    gap: 20px;
}

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

.photo-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-large .modal-content {
    max-width: 900px;
}

.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 */
.photo-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.photo-preview img {
    width: 100%;
    border-radius: var(--radius);
}

/* 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);
}

/* 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;
    }
}
