/* Dashboard und interne Seiten Styles */

/* Reset und Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #2563eb;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #2563eb;
    background: #f1f5f9;
}

.nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 90px auto 20px;
    padding: 0 20px;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid #e2e8f0;
}

.header-left h1 {
    color: #1e293b;
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.header-left p {
    color: #64748b;
    font-size: 1.1rem;
}

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

/* Plan Status Banner */
.plan-status {
    background: white;
    color: #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid #e2e8f0;
}

.plan-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
}

.plan-price {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2563eb;
}

.plan-status-active {
    color: #059669;
    font-weight: 600;
    background: #d1fae5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.plan-status-inactive {
    color: #dc2626;
    font-weight: 600;
    background: #fee2e2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.plan-usage {
    text-align: center;
    background: #f8fafc;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.plan-usage p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #64748b;
}

.plan-actions {
    text-align: right;
}

.upgrade-message {
    color: #d97706;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 10px;
}

.stat-card p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.content-card h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.data-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

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

.data-table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-sent {
    background: #dbeafe;
    color: #1e40af;
}

.status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-paid {
    background: #d1fae5;
    color: #065f46;
}

.status-overdue {
    background: #fef2f2;
    color: #dc2626;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    gap: 8px;
    min-width: 100px;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: auto;
    border-radius: 6px;
}

.btn-small:hover {
    transform: translateY(-1px);
}

/* Forms */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.form-section h2 {
    color: #1e293b;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    background: white;
}

/* Position Rows */
.position-row {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.position-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.position-header span {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
    color: #64748b;
}

.btn-icon:hover {
    background: #fee2e2;
    color: #dc2626;
}

.position-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.position-fields .form-group {
    margin-bottom: 0;
}

.position-fields .form-group label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.position-fields .form-group input,
.position-fields .form-group select {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.position-total-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.position-total-display span {
    font-size: 0.9rem;
    color: #374151;
}

.position-total {
    font-weight: 600;
    color: #2563eb;
}

.position-fields .form-row {
    grid-column: 1 / -1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fed7aa;
}

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

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #374151;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Preview Container */
.vorschau-container {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.vorschau-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.vorschau-header h3 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.vorschau-header p {
    color: #64748b;
    margin-bottom: 5px;
}

.vorschau-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.vorschau-table th,
.vorschau-table td {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.vorschau-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #374151;
}

.vorschau-summe {
    text-align: right;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.vorschau-summe p {
    margin: 8px 0;
}

/* Profile Main */
.profile-main {
    max-width: 800px;
    margin: 0 auto;
}

/* Current Plan Info */
.current-plan-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.plan-details h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.plan-details p {
    opacity: 0.9;
    margin-bottom: 5px;
}

/* Plan Selection */
.plan-selection {
    margin-bottom: 30px;
}

.plan-selection h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.plan-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.plan-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.plan-card.current-plan {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8faff 0%, #f0f2ff 100%);
}

.plan-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.plan-header h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1e293b;
    font-weight: 600;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.plan-features ul {
    list-style: none;
    margin-bottom: 25px;
}

.plan-features li {
    padding: 8px 0;
    color: #64748b;
    position: relative;
    padding-left: 25px;
}

.plan-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
}

.plan-select label {
    display: inline-block;
    padding: 12px 24px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: #475569;
}

.plan-select label:hover {
    background: #e2e8f0;
    border-color: #667eea;
}

.plan-card input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Pro Features */
.pro-features {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.pro-features h2 {
    color: #1e293b;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border-left: 4px solid #667eea;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.feature-card h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Limit Reached */
.limit-reached {
    color: #dc2626;
    font-weight: 600;
    margin-top: 15px;
    padding: 12px 16px;
    background: #fef2f2;
    border-radius: 10px;
    border: 1px solid #fecaca;
}

.limit-reached a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.limit-reached a:hover {
    text-decoration: underline;
}

/* Mahnstufe Badges */
.mahnstufe-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mahnstufe-1 {
    background: #fef3c7;
    color: #92400e;
}

.mahnstufe-2 {
    background: #fed7aa;
    color: #ea580c;
}

.mahnstufe-3 {
    background: #fecaca;
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 0 15px;
        margin-top: 80px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .header-left h1 {
        font-size: 1.8rem;
    }
    
    .plan-status {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .current-plan-info {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .position-row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    
    .actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .content-card,
    .form-section {
        padding: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
    
    .status-badge,
    .mahnstufe-badge {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* Angebotsformular */
.angebot-form {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1400px;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.2);
}

.form-card h3 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo Upload */
.logo-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.current-logo {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
}

.current-logo img {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.current-logo span {
    color: #64748b;
    font-size: 0.9rem;
}

/* Zusammenfassung */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.summary-card h3 {
    color: white;
}

.summary {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
    padding-top: 15px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

/* Verbesserte Form-Gruppen */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: #f9fafb;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* Form Reihen */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Buttons */
.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Responsive Design für Formular */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-column {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .form-card {
        padding: 20px;
    }
    
    .position-fields {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .position-fields .form-group {
        margin-bottom: 8px;
    }
    
    .position-total-display {
        grid-column: 1 / -1;
        margin-top: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .position-row {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 15px;
    }
    
    .form-card h3 {
        font-size: 1.1rem;
    }
    
    .position-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .position-total-display {
        text-align: center;
    }
    
    .position-fields .form-group label {
        font-size: 0.75rem;
    }
    
    .position-fields .form-group input,
    .position-fields .form-group select {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
} 