/**
 * Admin CSS
 * Minimalistisch, professionell, clean
 * Keine Gradienten, nicht zu bold
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111;
}

.login-box .subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
}

.nav-menu {
    list-style: none;
    padding: 20px 0 0;
}

.nav-menu li {
    margin: 2px 0;
}

.nav-menu a {
    display: block;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-menu a:hover {
    background: #f8f9fa;
    color: #2563eb;
}

.nav-menu li.active a {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 30px;
    max-width: 1400px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #111;
}

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

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Box */
.content-box {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    margin-bottom: 20px;
}

.content-box h2 {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="url"],
input[type="tel"] {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #2563eb;
}

.hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

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

.btn-primary {
    background: #2563eb;
    color: white;
}

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

.btn-secondary {
    background: #f3f4f6;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

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

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #111;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.text-muted {
    color: #999;
    font-size: 13px;
}

.sharelink {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-action {
    display: inline-block;
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s;
}

.btn-action:hover {
    background: #e5e7eb;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Tags */
.tag-suggestions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-suggestion {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.tag-suggestion:hover {
    background: #e5e7eb;
}

/* Upload Section */
.upload-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.upload-status {
    color: #666;
    font-size: 14px;
}

.upload-progress {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* Images Grid */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.image-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    aspect-ratio: 1;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 30px 10px 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-name {
    color: white;
    font-size: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-action-small {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #2563eb;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-small:hover {
    background: white;
}

.btn-remove {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #dc2626;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-remove:hover {
    background: white;
}

.upload-hint {
    color: #999;
    font-size: 13px;
    margin-left: 12px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.hamburger:hover {
    background: #f9fafb;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-overlay {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 15px 30px;
    }

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
