@font-face {
    font-family: 'Montserrat';
    src: url('font/Montserrat-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('font/Montserrat-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('font/Montserrat-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

:root {
    --primary: #0077b5;
    --primary-dark: #005a8c;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --bg-main: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.stat {
    background: rgba(255,255,255,0.15);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:active {
    transform: scale(0.95);
}

.btn-generate {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-generate:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-generate:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

#posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.post-topic {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.source-tag {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-leistung { background: #eff6ff; color: #1e40af; }
.tag-zielgruppe { background: #fdf2f8; color: #9d174d; }
.tag-usp { background: #ecfdf5; color: #065f46; }
.tag-thema { background: #fffbeb; color: #92400e; }

.post-content {
    background: #fafafa;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 150px;
    white-space: pre-wrap;
    line-height: 1.8;
    color: #334155;
    flex: 1;
    font-size: 1rem;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-pending { background: #fff7ed; color: #9a3412; }
.status-approved { background: #f0fdf4; color: #166534; }
.status-rejected { background: #fef2f2; color: #991b1b; }
.status-regenerating { background: #f5f3ff; color: #5b21b6; }

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-approve { background: var(--secondary); color: white; }
.btn-approve:hover { background: var(--secondary-dark); }

.btn-reject { background: #ef4444; color: white; }
.btn-reject:hover { background: #dc2626; }

.btn-regenerate { background: var(--accent); color: white; }
.btn-regenerate:hover { background: var(--accent-dark); }

.btn-edit { background: #f1f5f9; color: var(--text-main); border: 1px solid #e2e8f0; }
.btn-edit:hover { background: #e2e8f0; }

.btn-pending { background: #f59e0b; color: white; }
.btn-pending:hover { background: #d97706; }

.btn-delete { background: #6b7280; color: white; }
.btn-delete:hover { background: #4b5563; }

.post-textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.post-textarea:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.format-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
}

.format-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.format-btn:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 20px 30px;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--secondary); }
.toast.error { background: #ef4444; }

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px;
    color: var(--text-muted);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a5f, #0d2137);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    text-align: center;
    max-width: 360px;
    width: 90%;
}
.login-box h2 {
    margin-bottom: 8px;
    color: #1e293b;
}
.login-box p {
    color: #64748b;
    margin-bottom: 24px;
}
.login-box input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.login-box input[type="password"]:focus {
    outline: none;
    border-color: #1e3a5f;
}
.login-hidden { display: none !important; }

/* Client-specific overrides */
header {
    background: linear-gradient(135deg, #1e3a5f, #0d2137);
}

.client-badge {
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 15px;
}

.agency-approved-badge {
    background: #f0fdf4;
    color: #166534;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-client_pending { background: #fff7ed; color: #9a3412; }
.status-client_approved { background: #f0fdf4; color: #166534; }
.status-client_rejected { background: #fef2f2; color: #991b1b; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    #posts-container {
grid-template-columns: 1fr;
    }
    
    header {
flex-direction: column;
gap: 20px;
text-align: center;
    }
}
