/* Kundenportal v2 - Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container { width: 100%; max-width: 400px; padding: 20px; }

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.login-header { text-align: center; margin-bottom: 30px; }
.logo-large { font-size: 48px; display: block; margin-bottom: 10px; }
.login-header h1 { font-size: 24px; margin-bottom: 5px; }
.login-header p { color: var(--gray-500); font-size: 14px; }

/* Navbar */
.navbar {
    background: white;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
}

.logo { font-size: 24px; }

.nav-links { display: flex; gap: 5px; }

.nav-link {
    padding: 8px 12px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--gray-600);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

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

.page-header h1 { font-size: 28px; }
.greeting { color: var(--gray-500); font-size: 14px; }
.breadcrumb { margin-bottom: 10px; }
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

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

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; }

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input:disabled { background: var(--gray-100); }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] { width: auto; }

.hint { color: var(--gray-500); font-size: 13px; margin-bottom: 15px; }

.color-input {
    display: flex;
    gap: 10px;
}

.color-input input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

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

.stats-small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
}

.stat-icon { font-size: 32px; }
.stat-content { flex: 1; }
.stat-number { font-size: 28px; font-weight: 700; display: block; }
.stat-label { color: var(--gray-500); font-size: 13px; }

.stat-card.warning { border-left: 4px solid var(--warning); }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

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

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

.card-header h2 { font-size: 16px; }

/* Customer Detail Grid */
.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

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

.detail-card.wide { grid-column: span 2; }

.detail-card h2 { font-size: 18px; margin-bottom: 20px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.info-item span, .info-item p { font-size: 14px; }
.info-item a { color: var(--primary); text-decoration: none; }
.info-notes { margin-top: 20px; }
.price { font-weight: 600; color: var(--success); font-size: 18px; }

/* Platform Links */
.platform-links { display: flex; flex-wrap: wrap; gap: 10px; }

.platform-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--gray-100);
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s;
}

.platform-link:hover { background: var(--gray-200); }
.platform-link .icon { font-size: 20px; }
.platform-link .link-indicator { color: var(--primary); }

/* Platform Badges */
.platform-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 4px;
}

.platform-badge.tiktok { background: #000; color: white; }
.platform-badge.instagram { background: #E1306C; color: white; }
.platform-badge.facebook { background: #1877F2; color: white; }
.platform-badge.youtube { background: #FF0000; color: white; }
.platform-badge.linkedin { background: #0A66C2; color: white; }

/* Platform Section in Form */
.platform-section { display: flex; flex-direction: column; gap: 15px; }

.platform-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    align-items: center;
}

/* Color Swatches */
.color-swatches { display: flex; gap: 15px; margin-bottom: 15px; }

.color-swatch {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Logo Preview */
.logo-preview {
    margin-bottom: 20px;
    text-align: center;
}

.logo-preview img {
    max-width: 150px;
    max-height: 100px;
    object-fit: contain;
}

/* Tables */
.table-container { overflow-x: auto; }

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-600);
}

.data-table code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.data-table tr.overdue { background: #fef2f2; }
.data-table .amount { font-weight: 600; }
.actions-cell { white-space: nowrap; }
.platforms-cell { min-width: 100px; }

.customer-link { color: var(--gray-800); text-decoration: none; }
.customer-link:hover { color: var(--primary); }

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

.status-pending, .status-open { background: #fef3c7; color: #92400e; }
.status-approved, .status-paid, .status-active { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-revision { background: #e0e7ff; color: #3730a3; }
.status-todo { background: var(--gray-200); color: var(--gray-700); }
.status-in_progress { background: #dbeafe; color: #1e40af; }
.status-review { background: #fef3c7; color: #92400e; }
.status-done { background: #d1fae5; color: #065f46; }

.tone-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active { display: flex; }

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

.modal-small { max-width: 400px; }
.modal-large { max-width: 700px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: white;
}

.modal-header h2 { font-size: 18px; }

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-content form { padding: 25px; }

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 20px;
    padding: 0 25px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content h3 { margin-bottom: 20px; font-size: 16px; }
.tab-content h4 { margin: 20px 0 10px; font-size: 14px; color: var(--gray-600); }

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-height: 500px;
}

.kanban-column {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 15px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-300);
}

.column-header h3 { font-size: 14px; }

.task-count {
    background: var(--gray-300);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.task-cards {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-cards.drag-over { background: var(--gray-200); border-radius: 8px; }

.task-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: grab;
    border-left: 4px solid transparent;
}

.task-card:active { cursor: grabbing; }
.task-card.priority-high { border-left-color: var(--danger); }
.task-card.priority-medium { border-left-color: var(--warning); }
.task-card.priority-low { border-left-color: var(--success); }

.task-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.task-title { font-weight: 600; font-size: 14px; }
.task-description { color: var(--gray-500); font-size: 13px; margin-bottom: 10px; }

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
}

.task-deadline.overdue { color: var(--danger); font-weight: 500; }

.task-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-card:hover .task-actions { opacity: 1; }

/* Task List */
.task-list { list-style: none; }

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.task-item:last-child { border-bottom: none; }

.task-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-status.status-todo { background: var(--gray-400); }
.task-status.status-in_progress { background: var(--info); }
.task-status.status-review { background: var(--warning); }
.task-status.status-done { background: var(--success); }

.task-content { flex: 1; }
.task-content strong { font-size: 14px; }
.task-customer { color: var(--primary); font-size: 12px; display: block; }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 13px;
}

.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

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

.post-card {
    background: var(--gray-100);
    border-radius: 8px;
    overflow: hidden;
}

.post-media {
    height: 150px;
    overflow: hidden;
}

.post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.post-card .post-info {
    padding: 10px;
}

.post-card .post-info strong {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

/* Post List */
.post-list { display: flex; flex-direction: column; gap: 10px; }

.post-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--gray-50);
    border-radius: 8px;
}

.post-item .post-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.post-item .video-preview {
    width: 100%;
    height: 100%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-item .post-info { flex: 1; }
.post-item .post-info strong { font-size: 14px; }
.post-item .post-customer { color: var(--gray-500); font-size: 12px; display: block; }

/* Customer List */
.customer-list { list-style: none; }

.customer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.customer-item:last-child { border-bottom: none; }
.customer-info strong { font-size: 14px; display: block; }
.customer-contact { color: var(--gray-500); font-size: 12px; }
.customer-platforms { display: flex; gap: 5px; }
.platform-icon { font-size: 16px; }

/* File List */
.file-list { list-style: none; }

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.file-item:last-child { border-bottom: none; }
.file-icon { font-size: 20px; }
.file-name { font-size: 14px; }

/* Invoice List */
.invoice-list { list-style: none; }

.invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.invoice-item:last-child { border-bottom: none; }
.invoice-number { font-weight: 500; }
.invoice-amount { font-weight: 600; }

/* Cloud Storage */
.cloud-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius);
}

.cloud-selector select {
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    min-width: 250px;
}

.cloud-content { background: white; border-radius: var(--radius); padding: 25px; }

.folder-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.folder-list { display: flex; gap: 10px; }

.folder-btn {
    padding: 6px 12px;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.folder-btn:hover { background: var(--gray-200); }
.folder-btn.active { background: var(--primary); color: white; }

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

.file-card {
    background: var(--gray-50);
    border-radius: 8px;
    overflow: hidden;
}

.file-preview {
    height: 120px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-icon { font-size: 40px; }
.preview-icon.video { color: var(--danger); }
.preview-icon.pdf { color: var(--danger); }

.file-card .file-info { padding: 12px; }
.file-card .file-name { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .file-meta { font-size: 11px; color: var(--gray-500); }
.file-card .file-actions { padding: 0 12px 12px; display: flex; gap: 8px; }

/* Settings */
.settings-container { max-width: 800px; }

.settings-section {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.settings-section h2 { margin-bottom: 20px; }

.status-indicator {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.status-ok { background: #d1fae5; color: #065f46; }
.status-warning { background: #fef3c7; color: #92400e; }

.template-list { display: flex; flex-direction: column; gap: 10px; }

.template-item { border: 1px solid var(--gray-200); border-radius: 8px; }

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.template-header:hover { background: var(--gray-50); }
.template-name { font-weight: 500; }
.toggle-icon { color: var(--gray-400); }

.template-content { padding: 0 15px 15px; border-top: 1px solid var(--gray-200); }
.template-form textarea { font-family: monospace; font-size: 13px; }

.info-box {
    background: var(--gray-100);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.info-box p { margin: 0; font-size: 13px; }

/* Empty State */
.empty-state { text-align: center; padding: 20px; color: var(--gray-500); }

.empty-state-large {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-icon { font-size: 64px; display: block; margin-bottom: 20px; }
.empty-state-large h3 { margin-bottom: 10px; }
.empty-state-large p { color: var(--gray-500); margin-bottom: 20px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* Responsive */
@media (max-width: 1200px) {
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; gap: 15px; }
    .nav-links { order: 3; width: 100%; overflow-x: auto; padding: 10px 0; }
    .container { padding: 15px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .customer-detail-grid { grid-template-columns: 1fr; }
    .detail-card.wide { grid-column: span 1; }
    .kanban-board { grid-template-columns: 1fr; }
    .platform-item { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 15px; align-items: flex-start; }
}

/* Beta Banner */
.beta-banner {
    background: linear-gradient(90deg, #f0883e, #d29922);
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
}

