/* =============================================
   ROMA-SYSTEME KUNDEN-PORTAL
   Professional Portal Styles
============================================= */

:root {
    --primary: #0a1f44;
    --accent: #00c0ff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --border: #dee2e6;
    --soft-gray: #f8f9fc;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    gap: 3rem;
    align-items: center;
}

.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-form label svg {
    color: var(--accent);
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 192, 255, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0095cc);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00a8e6, #007bb5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 192, 255, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: #666;
    margin: 0.5rem 0;
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.back-link {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Login Info */
.login-info {
    color: #fff;
}

.login-info h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.login-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.login-info li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.login-info li svg {
    color: var(--accent);
    flex-shrink: 0;
}

.support-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.support-box h3 {
    margin-bottom: 1rem;
}

.support-box p {
    margin: 0.5rem 0;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert svg {
    flex-shrink: 0;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 968px) {
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-info {
        display: none;
    }
    
    .login-box {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 1rem;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* === Portal Layout === */
.portal-page {
    min-height: 100vh;
    background: #f5f7fa;
}

.portal-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* =============================================
   BENACHRICHTIGUNGSZENTRALE
============================================= */

.notification-center {
    position: relative;
    margin-right: 1rem;
}

.notification-toggle {
    position: relative;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notification-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 380px;
    max-height: 500px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.notification-dropdown.active {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.notification-dropdown-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.notification-mark-all-read {
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-mark-all-read:hover {
    background: var(--soft-gray);
}

.notification-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-loading,
.notification-empty {
    padding: 3rem 1.25rem;
    text-align: center;
    color: #999;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 0.75rem;
}

.notification-item:hover {
    background: var(--soft-gray);
}

.notification-item.unread {
    background: #f0f8ff;
}

.notification-item.unread:hover {
    background: #e6f3ff;
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.notification-icon.ticket_created,
.notification-icon.ticket_reply,
.notification-icon.ticket_assigned {
    background: #e3f2fd;
    color: #1976d2;
}

.notification-icon.ticket_status {
    background: #fff3e0;
    color: #f57c00;
}

.notification-icon.invoice_new,
.notification-icon.invoice_overdue {
    background: #fce4ec;
    color: #c2185b;
}

.notification-icon.system_status {
    background: #f3e5f5;
    color: #7b1fa2;
}

.notification-icon.milestone {
    background: #e8f5e9;
    color: #388e3c;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-dropdown-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.notification-dropdown-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .notification-dropdown {
        width: 90vw;
        right: -5vw;
    }
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary);
}

.portal-logo a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.portal-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-toggle:hover {
    background: var(--light);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
}

.user-menu:hover .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-menu-dropdown a:hover {
    background: var(--light);
}

.user-menu-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border);
}

.logout-link {
    color: var(--danger) !important;
}

/* Portal Container */
.portal-container {
    display: flex;
    min-height: calc(100vh - 73px);
}

/* Sidebar */
.portal-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 192, 255, 0.1), transparent);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.nav-item svg {
    flex-shrink: 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-divider {
    margin: 1rem 1.5rem;
    border: none;
    border-top: 1px solid var(--border);
}

.admin-link {
    color: var(--warning) !important;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--light);
}

.support-info h4 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.support-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0;
}

/* Portal Content */
.portal-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    background: #f8f9fc;
}

.page-header {
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

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

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), #0095cc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 192, 255, 0.15);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon svg {
    color: #fff;
    width: 32px;
    height: 32px;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #adb5bd;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.quick-actions h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #0095cc);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 192, 255, 0.25);
    border-color: var(--accent);
}

.action-card:hover::before {
    transform: scaleX(1);
}

.action-card svg {
    color: var(--accent);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.action-card:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.action-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.action-card p {
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Recent Section */
.recent-section {
    margin-bottom: 3rem;
}

.recent-section h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header-inline h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-link:hover {
    color: #0095cc;
    transform: translateX(4px);
}

/* Ticket List */
.ticket-list {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ticket-item {
    padding: 2rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.ticket-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ticket-item:hover {
    background: linear-gradient(90deg, rgba(0, 192, 255, 0.03), transparent);
    transform: translateX(4px);
}

.ticket-item:hover::before {
    transform: scaleY(1);
}

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

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.ticket-header h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0;
    font-weight: 700;
}

.ticket-status {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ticket-excerpt {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.ticket-priority {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-date {
    color: #adb5bd;
    font-weight: 500;
}

/* System Status */
.system-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.system-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.system-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.system-status-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.system-info {
    flex: 1;
}

.system-info h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.system-info p {
    font-size: 0.9rem;
    color: #adb5bd;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.system-status-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.system-uptime {
    text-align: right;
}

.uptime-bar {
    width: 120px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.uptime-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #20c997);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.system-uptime span {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
}

/* Ticket Status Overview */
.ticket-status-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-overview-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.status-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.status-overview-card.status-open {
    border-color: #ffc107;
}

.status-overview-card.status-progress {
    border-color: #17a2b8;
}

.status-overview-card.status-resolved {
    border-color: #28a745;
}

.status-overview-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.status-overview-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.empty-state {
    background: #fff;
    padding: 4rem 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-state svg {
    color: #dee2e6;
    margin-bottom: 2rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Ticket Meta Inline */
.ticket-meta-inline {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ticket-id {
    color: #adb5bd;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.ticket-category {
    color: #6c757d;
    font-weight: 600;
}

.ticket-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-updated {
    color: #adb5bd;
    font-size: 0.85rem;
    font-weight: 500;
}

.ticket-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.ticket-date svg {
    color: #adb5bd;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #adb5bd;
}

/* Ticket Detail Grid */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.ticket-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ticket-detail-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 2rem;
}

.ticket-detail-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.ticket-description h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.ticket-description p {
    color: #495057;
    line-height: 1.8;
    font-size: 1.05rem;
}

.ticket-timestamps {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
}

.timestamp-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.timestamp-item svg {
    color: #adb5bd;
}

/* Comments */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.comment-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fc;
    border-radius: 12px;
    border-left: 4px solid #dee2e6;
}

.comment-item.comment-admin {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fc 100%);
    border-left-color: var(--accent);
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #0095cc);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 192, 255, 0.3);
}

.comment-admin .comment-avatar {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.comment-avatar svg {
    color: #fff;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-header strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.admin-badge-small {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-time {
    color: #adb5bd;
    font-size: 0.9rem;
    margin-left: auto;
}

.comment-content p {
    color: #495057;
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    padding: 3rem 2rem;
}

.no-comments svg {
    color: #dee2e6;
    margin-bottom: 1rem;
}

.no-comments p {
    color: #6c757d;
    font-size: 1.05rem;
}

/* Add Comment */
.add-comment {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.add-comment h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.add-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.add-comment textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 192, 255, 0.1);
}

/* Ticket Sidebar */
.ticket-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-card h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-large,
.priority-badge-large {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fc;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}

.attachment-item:hover {
    background: var(--accent);
    color: #fff;
    transform: translateX(4px);
}

.attachment-item svg {
    flex-shrink: 0;
}

.info-box {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-box svg {
    flex-shrink: 0;
    color: #0066cc;
}

/* Form Container */
.form-container {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.ticket-form .form-group,
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 192, 255, 0.1);
}

.form-group small {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.help-section {
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 16px;
    margin-top: 2rem;
}

.help-section h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.help-section p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.contact-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 192, 255, 0.2);
}

.contact-option svg {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-option div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-option strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.contact-option span {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Admin Ticket List */
.admin-ticket-list .ticket-item.ticket-urgent {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.05), transparent);
}

.ticket-customer-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

.ticket-customer-name svg {
    color: #adb5bd;
}

.status-overview-card.status-urgent {
    border-color: #dc3545;
}

/* Customer Info */
.customer-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.customer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #0095cc);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 192, 255, 0.3);
}

.customer-avatar svg {
    color: #fff;
}

.customer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.customer-details strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.customer-details p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

.customer-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.customer-contact:hover {
    color: #0095cc;
    transform: translateX(2px);
}

.customer-contact svg {
    flex-shrink: 0;
}

/* Status & Priority Select */
.status-select,
.priority-select {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.status-select:focus,
.priority-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 192, 255, 0.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-info {
    background: #17a2b8;
    color: #fff;
}

.badge-secondary {
    background: #6c757d;
    color: #fff;
}

/* Code */
code {
    font-family: 'Courier New', monospace;
    background: #f8f9fc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #e83e8c;
}

/* === Admin-Bereich === */
.admin-page {
    background: #f0f2f5;
}

.admin-sidebar {
    background: var(--primary);
    color: #fff;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.admin-sidebar .nav-item {
    color: rgba(255, 255, 255, 0.8);
}

.admin-sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .nav-item.active {
    background: rgba(0, 192, 255, 0.2);
    color: #fff;
    border-left-color: var(--accent);
}

.admin-sidebar .sidebar-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

.admin-stats .stat-card {
    position: relative;
}

.stat-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-link:hover {
    text-decoration: underline;
}

.admin-section {
    margin-bottom: 2rem;
}

.admin-section h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

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

.status-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-count {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.status-label {
    font-size: 0.9rem;
    color: #666;
}

.ticket-customer {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.ticket-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.activity-time {
    font-size: 0.85rem;
    color: #999;
}

/* Filter Bar */
.filter-bar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.filter-form input {
    flex: 1;
    min-width: 200px;
}

/* Data Table */
.table-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: var(--light);
}

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

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--light);
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--accent);
    color: #fff;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-content form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
    .portal-container {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-toggle {
        display: block;
    }

    .portal-sidebar {
        display: none;
    }

    .portal-sidebar.active {
        display: flex;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

    /* =============================================
       BENACHRICHTIGUNGSSEITE
    ============================================= */

    .notifications-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .notification-card {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1.5rem;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        align-items: center;
        transition: all 0.3s ease;
    }

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

    .notification-card.unread {
        background: #f0f8ff;
        border-color: #b3d9ff;
    }

    .notification-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        flex-shrink: 0;
    }

    .notification-card-icon.ticket_created,
    .notification-card-icon.ticket_reply,
    .notification-card-icon.ticket_assigned {
        background: #e3f2fd;
        color: #1976d2;
    }

    .notification-card-icon.ticket_status {
        background: #fff3e0;
        color: #f57c00;
    }

    .notification-card-icon.invoice_new,
    .notification-card-icon.invoice_overdue {
        background: #fce4ec;
        color: #c2185b;
    }

    .notification-card-icon.system_status {
        background: #f3e5f5;
        color: #7b1fa2;
    }

    .notification-card-icon.milestone {
        background: #e8f5e9;
        color: #388e3c;
    }

    .notification-card-content {
        min-width: 0;
    }

    .notification-card-content h3 {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary);
        margin-bottom: 0.5rem;
    }

    .notification-card-content p {
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 0.5rem;
    }

    .notification-card-meta {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .notification-time {
        font-size: 0.85rem;
        color: #999;
    }

    .notification-unread-badge {
        background: var(--accent);
        color: #fff;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 0.2rem 0.6rem;
        border-radius: 12px;
    }

    .notification-card-link {
        color: var(--accent);
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .notification-card-link:hover {
        background: var(--soft-gray);
    }

    .empty-state {
        text-align: center;
        padding: 4rem 2rem;
    }

    .empty-state svg {
        color: #ccc;
        margin-bottom: 1.5rem;
    }

    .empty-state h2 {
        color: var(--primary);
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: #666;
    }
@media (max-width: 768px) {
    .portal-content {
        padding: 1rem;
    }

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

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

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .system-card {
        flex-direction: column;
        text-align: center;
    }

    .system-uptime {
        text-align: center;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form input {
        width: 100%;
    }

    .table-container {
        overflow-x: scroll;
    }

    .documents-grid,
    .invoices-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   DOCUMENTS & INVOICES
============================================= */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.document-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.document-icon {
    font-size: 3rem;
    text-align: center;
}

.document-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.document-info p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.document-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.document-actions {
    margin-top: auto;
}

.invoices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.invoice-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.invoice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.invoice-card.paid {
    border-left-color: #28a745;
}

.invoice-card.unpaid {
    border-left-color: #ffc107;
}

.invoice-card.overdue {
    border-left-color: #dc3545;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.invoice-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.invoice-header p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

.invoice-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.invoice-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-detail .label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

.invoice-detail .value {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

.invoice-detail .value.amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

.invoice-actions {
    margin-top: 1rem;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.document-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
/* === SYSTEM STATUS STYLES === */
.status-overview {
    margin-bottom: 3rem;
}

.status-summary {
    background: linear-gradient(135deg, #fff, #f8f9fc);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.system-card.status-online {
    border-left: 4px solid #28a745;
}

.system-card.status-slow {
    border-left: 4px solid #ffc107;
}

.system-card.status-offline {
    border-left: 4px solid #dc3545;
}

.system-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.system-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #0095cc);
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.status-online {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-slow {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.system-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 192, 255, 0.05);
    border-radius: 8px;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.uptime-chart {
    margin-top: 1.5rem;
}

.uptime-bars {
    display: flex;
    gap: 2px;
    height: 30px;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 4px;
}

.uptime-bar {
    flex: 1;
    border-radius: 2px;
}

.uptime-bar.status-online {
    background: #28a745;
}

.uptime-bar.status-slow {
    background: #ffc107;
}

.uptime-bar.status-offline {
    background: #dc3545;
}

.last-update {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.chart-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}