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

:root {
    --primary-color: #6366f1;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);

    /* Icon-Farben nach Bereich */
    --icon-dashboard: #7c3aed;
    --icon-projects: #0cb981;
    --icon-clients: #f59e0a;
    --icon-tracking: #6266f1;
    --icon-reports: #ef4344;
    --icon-cloud: #15b8a6;
}

/* Icon-Farbklassen */
.icon-dashboard { color: var(--icon-dashboard) !important; }
.icon-projects { color: var(--icon-projects) !important; }
.icon-clients { color: var(--icon-clients) !important; }
.icon-tracking { color: var(--icon-tracking) !important; }
.icon-reports { color: var(--icon-reports) !important; }
.icon-cloud { color: var(--icon-cloud) !important; }

/* Navigation-Icons im aktiven Zustand weiß */
.nav-link.active [class^="icon-"],
.nav-link.active [class*=" icon-"] {
    color: white !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Screen & View Management */
.screen {
    display: none !important;
}

.screen.active {
    display: block !important;
}

#loginScreen.active {
    display: flex !important;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Login Screen */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
}

.login-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.login-logo-img {
    width: 64px;
    height: 64px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-container .form-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.login-container .form-control {
    background-color: #fff;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.login-register-link p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.login-register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

.info-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Navigation */
.navbar {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
    position: fixed;
    top: 0;
    left: 72px;
    right: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-color);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.container h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container h2 svg,
.view-header h2 svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-page-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-right: auto;
}

.nav-page-title svg {
    width: 24px;
    height: 24px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-action-btn {
    display: none;
}

.nav-action-btn.active {
    display: inline-flex;
}

.nav-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 0.8rem;
    transition: background-color 0.15s, border-color 0.15s;
    margin-right: 0.75rem;
}

.nav-search-btn:hover {
    background: var(--border-color);
    border-color: var(--secondary-color);
    color: var(--text-color);
}

.nav-search-btn svg {
    width: 16px;
    height: 16px;
}

.nav-search-shortcut {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-search-shortcut kbd {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.7rem;
    font-family: inherit;
    line-height: 1.4;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   Sidebar Navigation
   ======================================== */
.sidebar {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    background: #1e293b;
    flex-direction: column;
    z-index: 200;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    border-bottom: 1px solid #334155;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: #334155;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-link svg {
    width: 22px;
    height: 22px;
}

.sidebar-link:hover {
    background: #475569;
    color: white;
}

.sidebar-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid #334155;
}

.sidebar-footer .sidebar-link {
    background: transparent;
    color: #94a3b8;
}

.sidebar-footer .sidebar-link:hover {
    background: #334155;
    color: #ef4444;
}

/* Desktop: Sidebar immer sichtbar, Top-Menu versteckt */
.navbar .nav-menu {
    display: none !important;
}

.navbar .nav-brand {
    display: none;
}

.navbar {
    justify-content: flex-end;
}

/* Content unter fixed navbar positionieren */
.view {
    padding-top: 72px;
}

.view .container,
#projectDetailView .container,
#clientDetailView .container {
    margin-left: 72px;
    max-width: calc(100% - 72px);
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

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

.burger-menu.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Container & Layout */
.container {
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    padding-right: 5rem;
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h3 svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.card-header-with-action h3 {
    margin-bottom: 0;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

.form-group label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    background-color: var(--bg-color);
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control[readonly] {
    background-color: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Select styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

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

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

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

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Stopwatch */
.stopwatch-container {
    text-align: center;
}

.stopwatch-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0;
    font-variant-numeric: tabular-nums;
}

.stopwatch-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.stopwatch-controls .form-control {
    max-width: 300px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    background: var(--bg-color);
}

th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 0.75rem;
    vertical-align: middle;
}

tr {
    min-height: 48px;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background: var(--bg-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 32px;
}

#entriesTable .action-buttons,
#projectsTable .action-buttons,
#clientsTable .action-buttons,
#tasksTable .action-buttons,
#archivedProjectsTable .action-buttons,
#archivedClientsTable .action-buttons,
#archivedTasksTable .action-buttons,
#archiveClientsTable .action-buttons,
#archiveProjectsTable .action-buttons,
#archiveTasksTable .action-buttons {
    flex-direction: column;
    align-items: stretch;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Report Summary */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-color);
    background: var(--bg-color);
}

.modal select[multiple] {
    padding: 0.5rem;
}

.modal select[multiple] option {
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 4px;
}

.modal select[multiple] option:checked {
    background: var(--primary-color);
    color: white;
}

.modal small {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.75rem;
}

/* Color Dot */
.color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    /* Sidebar auf Mobile ausblenden */
    .sidebar {
        display: none;
    }

    /* Navbar zurücksetzen für Mobile */
    .navbar {
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        justify-content: space-between;
    }

    .navbar .nav-brand {
        display: flex;
        flex: 1;
    }

    .nav-page-title {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .nav-search-btn {
        margin-right: 0.25rem;
        padding: 0.3rem;
        border: none;
        background: transparent;
    }

    .nav-search-shortcut {
        display: none;
    }

    /* View padding für Mobile */
    .view {
        padding-top: 60px;
    }

    .burger-menu {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .burger-menu.active {
        position: fixed;
        top: 1rem;
        right: 1rem;
    }

    .navbar .nav-menu {
        display: none !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: var(--card-bg);
        z-index: 1000;
        padding: 5rem 1.5rem 2rem;
        overflow-y: auto;
    }

    .navbar .nav-menu.active {
        display: flex !important;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-user {
        display: none;
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0.75rem;
        z-index: 1000;
    }

    .nav-user.active {
        display: flex;
    }

    .nav-user #currentUser {
        font-size: 0.875rem;
        color: var(--secondary-color);
        text-align: center;
    }

    .nav-user #logoutBtn {
        width: 100%;
    }

    /* Container margins für Mobile zurücksetzen */
    .container,
    .view .container,
    #projectDetailView .container,
    #clientDetailView .container {
        padding: 1rem;
        margin-left: 0;
        max-width: 100%;
    }

    /* View Header */
    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .view-header h2 {
        font-size: 1.25rem;
    }

    .view-header .btn {
        width: 100%;
    }

    /* Stoppuhr */
    .stopwatch-display {
        font-size: 2.5rem;
        margin: 1rem 0;
    }

    .stopwatch-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stopwatch-controls .form-control {
        max-width: 100%;
        width: 100%;
    }

    .stopwatch-controls .btn {
        width: 100%;
    }

    /* Formulare */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-control {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    /* Filter-Bereiche */
    .filters,
    .entries-filter {
        margin-bottom: 1rem;
    }

    .filters .form-group,
    .entries-filter .form-group {
        margin-bottom: 0.5rem;
    }

    .export-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .export-buttons .btn {
        width: 100%;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-buttons .btn {
        width: 100%;
    }

    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Detail-Grids */
    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    .detail-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .detail-header .btn {
        width: 100%;
    }

    .detail-title {
        text-align: center;
    }

    .detail-title h2 {
        font-size: 1.25rem;
    }

    .info-grid {
        grid-template-columns: 1fr !important;
    }

    /* Summary Cards */
    .dashboard-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .summary-card {
        padding: 1rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Charts */
    .charts-container {
        grid-template-columns: 1fr !important;
    }

    .chart-card {
        min-height: 250px;
    }

    /* Pagination */
    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination .btn {
        width: 100%;
    }

    /* Bulk Actions */
    .bulk-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .bulk-actions input {
        width: 100% !important;
    }

    .bulk-actions .btn {
        width: 100%;
    }

    /* Responsive Tabellen - Card Layout */
    .table-responsive {
        overflow-x: visible;
    }

    table.mobile-cards,
    .table-responsive table {
        display: block;
    }

    table.mobile-cards thead,
    .table-responsive thead {
        display: none;
    }

    table.mobile-cards tbody,
    .table-responsive tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    table.mobile-cards tr,
    .table-responsive tr {
        display: flex;
        flex-direction: column;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        gap: 0.5rem;
    }

    table.mobile-cards tr:hover,
    .table-responsive tr:hover {
        background: var(--card-bg);
    }

    table.mobile-cards td,
    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.25rem 0;
        border: none;
        font-size: 0.875rem;
    }

    table.mobile-cards td::before,
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
        flex-shrink: 0;
        margin-right: 1rem;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    table.mobile-cards td:last-child,
    .table-responsive td:last-child {
        border-top: 1px solid var(--border-color);
        padding-top: 0.75rem;
        margin-top: 0.5rem;
    }

    table.mobile-cards td:last-child::before,
    .table-responsive td:last-child::before {
        display: none;
    }

    table.mobile-cards .action-buttons,
    .table-responsive .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
    }

    table.mobile-cards .action-buttons .btn,
    .table-responsive .action-buttons .btn {
        width: auto;
        flex: 1;
        min-width: 80px;
    }

    /* Checkbox in Tabellen */
    table.mobile-cards td:first-child input[type="checkbox"],
    .table-responsive td:first-child input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    /* File Manager Mobile */
    .file-manager-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

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

    .file-manager-actions .btn {
        flex: 1;
    }

    .file-list {
        gap: 0.5rem;
    }

    .file-item {
        padding: 0.75rem;
    }

    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }

    /* Budget Übersicht */
    .budget-breakdown {
        flex-direction: column;
        gap: 0.5rem;
    }

    .add-deduction-form .form-row {
        gap: 0.5rem;
    }
}

/* Hide admin elements for non-admin users */
body:not(.is-admin) .admin-only {
    display: none !important;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 4px 0;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-success {
    background: #10b981;
}

.progress-warning {
    background: #f59e0b;
}

.progress-danger {
    background: #ef4444;
}

/* Links in tables */
table a {
    color: var(--primary-color);
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

table small {
    color: var(--secondary-color);
    font-size: 0.75rem;
}

/* Dashboard Styles */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.summary-card .summary-label {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.summary-card .summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Dashboard Overview Cards */
.dashboard-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.overview-card:active {
    transform: translateY(-2px);
}

.overview-card-tracking {
    background: linear-gradient(135deg, var(--icon-tracking), #818cf8);
}

.overview-card-clients {
    background: linear-gradient(135deg, var(--icon-clients), #fbbf24);
}

.overview-card-projects {
    background: linear-gradient(135deg, var(--icon-projects), #34d399);
}

.overview-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.overview-card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.overview-card-content {
    flex: 1;
}

.overview-card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.overview-card-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

@media (max-width: 900px) {
    .dashboard-overview {
        grid-template-columns: 1fr;
    }
}

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

.chart-card {
    min-height: 400px;
}

.chart-card canvas {
    max-height: 350px;
}

.chart-card-full {
    width: 100%;
    margin-bottom: 1.5rem;
    min-height: 350px;
}

.chart-card-full:first-of-type {
    margin-top: 0;
}

.chart-card-full h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.chart-card-full h3 svg {
    width: 24px;
    height: 24px;
}

.chart-card-full canvas {
    max-height: 320px;
}

.budget-chart-container {
    height: 400px;
    position: relative;
}

/* Billing Status */
.billing-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.invoice-input {
    width: 120px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.invoice-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.invoice-number {
    font-size: 0.75rem;
    color: var(--secondary-color);
    background: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
}

/* Entry Selection */
.entry-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive Charts */
@media (max-width: 900px) {
    .charts-container {
        grid-template-columns: 1fr;
    }

    .chart-card {
        min-height: 300px;
    }
}

/* Detail Views */
.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #374151;
}

.detail-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-title h2 {
    margin: 0;
    font-size: 1.75rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-info,
.detail-budget,
.detail-summary {
    height: fit-content;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item.full-width {
    grid-column: span 2;
}

.info-item label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-item span {
    font-size: 1rem;
    color: #1f2937;
}

.info-item a {
    color: #60a5fa;
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Budget Summary */
.budget-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.budget-progress-large .progress-bar {
    height: 1.5rem;
    border-radius: 0.5rem;
}

.budget-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.budget-breakdown {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.breakdown-label {
    font-size: 0.75rem;
    color: #9ca3af;
}

.breakdown-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #10b981;
}

.breakdown-value.deduction {
    color: #f59e0b;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.summary-item .summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #10b981;
}

.summary-item .summary-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Add deduction form */
.add-deduction-form {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

.add-deduction-form h4 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* View Toggle */
.view-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.view-toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.view-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Card Grid View */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.card-grid-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.card-grid-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.card-grid-item-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    word-break: break-word;
}

.card-grid-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
}

.card-grid-item-body .card-grid-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-grid-item-body .card-grid-label {
    font-weight: 500;
    color: var(--text-color);
}

.card-grid-item-links {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.card-grid-item-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.card-grid-item-footer .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Clickable table rows */
#projectsTable tbody tr,
#clientsTable tbody tr,
#clientDetailProjectsTable tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#projectsTable tbody tr:hover,
#clientsTable tbody tr:hover,
#clientDetailProjectsTable tbody tr:hover {
    background-color: #e1f5f2;
}

/* Responsive detail views */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-wrap: wrap;
    }

    .detail-title {
        order: -1;
        width: 100%;
        margin-bottom: 0.5rem;
    }

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

    .info-item.full-width {
        grid-column: span 1;
    }

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

    .budget-breakdown {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

#entriesPageInfo {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Entries Filter */
.entries-filter {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #374151;
}

/* External Links Card */
.external-links-card h3 {
    margin-bottom: 1rem;
}

.external-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.external-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.external-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.external-link-btn:active {
    transform: translateY(0);
}

.external-link-btn i,
.external-link-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.text-muted {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* ============================================
   Spotlight Search
   ============================================ */

@keyframes spotlightFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spotlightSlideDown {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.spotlight-overlay {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    padding-top: 15vh;
    animation: spotlightFadeIn 0.15s ease-out;
}

.spotlight-overlay.active {
    display: flex;
}

.spotlight-container {
    width: 100%;
    max-width: 640px;
    height: fit-content;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: spotlightSlideDown 0.2s ease-out;
}

.spotlight-input-wrapper {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
}

.spotlight-search-icon {
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-color);
    background: transparent;
    font-family: inherit;
}

.spotlight-input::placeholder {
    color: var(--secondary-color);
    opacity: 0.6;
}

.spotlight-shortcut {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    color: var(--secondary-color);
    font-family: inherit;
    flex-shrink: 0;
}

.spotlight-results {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 0.5rem;
}

.spotlight-category {
    padding: 0.75rem 1.25rem 0.25rem;
}

.spotlight-category-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-color);
}

.spotlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.1s;
}

.spotlight-item:hover,
.spotlight-item.selected {
    background: rgba(37, 99, 235, 0.08);
}

.spotlight-item-icon {
    width: 18px;
    height: 18px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

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

.spotlight-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-item-subtitle {
    font-size: 0.78rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-empty,
.spotlight-loading {
    padding: 2rem;
    text-align: center;
    color: var(--secondary-color);
}

.spotlight-empty i {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .spotlight-overlay {
        padding-top: 5vh;
    }
    .spotlight-container {
        max-width: calc(100% - 2rem);
        margin: 0 1rem;
        max-height: 80vh;
    }
}

/* Floating Support Button */
.floating-support-btn {
    position: fixed;
    bottom: 8.5rem;
    right: calc(2.5rem - 25px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--warning-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    z-index: 90;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.floating-support-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
    color: white;
}

.floating-support-btn svg {
    width: 22px;
    height: 22px;
}

/* Floating External Links Button */
.floating-stopwatch-btn {
    position: fixed;
    bottom: 5rem;
    right: calc(2.5rem - 25px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    z-index: 90;
    transition: transform 0.2s, box-shadow 0.2s;
}

.floating-stopwatch-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.floating-stopwatch-btn svg {
    width: 22px;
    height: 22px;
}

.floating-links-btn {
    position: fixed;
    bottom: 1.5rem;
    right: calc(2.5rem - 25px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    z-index: 90;
    transition: transform 0.2s, box-shadow 0.2s;
}

.floating-links-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.floating-links-btn.active {
    background: var(--text-color);
}

.floating-links-btn svg {
    width: 22px;
    height: 22px;
}

.floating-links-panel {
    position: fixed;
    bottom: 5rem;
    right: 0.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    width: 280px;
    max-height: 400px;
    z-index: 91;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.floating-links-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.floating-links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.floating-links-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.floating-links-close:hover {
    color: var(--text-color);
}

.floating-links-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 340px;
}

.floating-links-content .external-link-btn {
    width: 100%;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .floating-support-btn,
    .floating-stopwatch-btn,
    .floating-links-btn {
        right: 1.5rem;
    }
    .floating-links-panel {
        right: 1.5rem;
    }
}

/* Chart Header with Total */
.chart-header-with-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-header-with-total h3 {
    margin-bottom: 0;
}

.chart-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

/* Budget Chart with Legend Right (50/50 split) */
.chart-card-budget .budget-chart-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-card-budget canvas {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 768px) {
    .chart-card-budget .budget-chart-container {
        height: auto;
        min-height: 400px;
    }

    .chart-header-with-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .chart-total {
        font-size: 1rem;
    }
}

/* ========================================
   Account / Plan Styles
   ======================================== */

.account-plan-section {
    margin-top: 1rem;
}

.plan-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.plan-details {
    margin-top: 1rem;
}

.plan-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-badge-starter {
    background: #e2e8f0;
    color: #475569;
}

.plan-badge-business {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.plan-badge-trial {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
}

.plan-badge-expired {
    background: #ef4444;
    color: white;
}

/* Trial Banner in Header */
.trial-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.trial-activate-btn {
    background: white;
    color: #f59e0b;
    border: none;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.trial-activate-btn:hover {
    background: #fef3c7;
}

/* Trial Expired Overlay */
.trial-expired-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trial-expired-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.trial-expired-card h2 {
    margin: 1rem 0 0.5rem;
    color: #1e293b;
}

.trial-expired-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .trial-banner {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .trial-banner span {
        display: none;
    }

    .trial-activate-btn {
        font-size: 0.7rem;
    }
}

#currentUser {
    cursor: pointer;
    transition: opacity 0.2s;
}

#currentUser:hover {
    opacity: 0.7;
}

/* ========================================
   Settings Tab Navigation
   ======================================== */

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.settings-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.settings-tab:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
}

.settings-tab i,
.settings-tab svg {
    width: 18px;
    height: 18px;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .settings-tabs {
        gap: 0.25rem;
    }

    .settings-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .settings-tab span {
        display: none;
    }

    .settings-tab i,
    .settings-tab svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   NextCloud File Manager Styles
   ======================================== */

.file-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.file-manager-header h3 {
    margin: 0;
}

.file-manager-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.file-manager-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
}

.file-manager-actions .btn svg,
.file-manager-actions .btn i {
    width: 16px;
    height: 16px;
}

.file-manager-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.breadcrumb-item:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.breadcrumb-item:last-child {
    color: var(--text-color);
    font-weight: 500;
    cursor: default;
}

.breadcrumb-item:last-child:hover {
    background-color: transparent;
}

.breadcrumb-separator {
    color: var(--secondary-color);
    font-size: 0.75rem;
}

.file-manager-content {
    min-height: 200px;
    position: relative;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    gap: 0.75rem;
}

.file-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.file-item.selected {
    background-color: rgba(37, 99, 235, 0.1);
}

.file-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item-icon svg,
.file-item-icon i {
    width: 24px;
    height: 24px;
}

.file-item-icon.folder {
    color: #f59e0b;
}

.file-item-icon.file {
    color: var(--secondary-color);
}

.file-item-icon.image {
    color: #8b5cf6;
}

.file-item-icon.document {
    color: #2563eb;
}

.file-item-icon.spreadsheet {
    color: #10b981;
}

.file-item-icon.pdf {
    color: #ef4444;
}

.file-item-icon.archive {
    color: #6366f1;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-meta {
    font-size: 0.75rem;
    color: var(--secondary-color);
    display: flex;
    gap: 1rem;
}

.file-item-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.file-item:hover .file-item-actions {
    opacity: 1;
}

.file-item-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.file-item-actions .btn svg,
.file-item-actions .btn i {
    width: 14px;
    height: 14px;
}

.file-manager-loading,
.file-manager-empty,
.file-manager-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--secondary-color);
    text-align: center;
}

.file-manager-loading svg,
.file-manager-empty svg,
.file-manager-error svg,
.file-manager-loading i,
.file-manager-empty i,
.file-manager-error i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.file-manager-error {
    color: var(--danger-color);
}

.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(37, 99, 235, 0.05);
    border-radius: 6px;
}

.upload-progress-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.upload-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.upload-progress-text {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Context Menu */
.file-context-menu {
    position: fixed;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 160px;
    padding: 0.25rem 0;
}

.file-context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 0.875rem;
}

.file-context-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.file-context-menu-item.danger {
    color: var(--danger-color);
}

.file-context-menu-item svg,
.file-context-menu-item i {
    width: 16px;
    height: 16px;
}

.file-context-menu-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.25rem 0;
}

/* Folder Browser Modal */
.folder-browser {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 1rem 0;
}

.folder-browser-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s;
}

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

.folder-browser-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.folder-browser-item.selected {
    background-color: rgba(37, 99, 235, 0.1);
}

.folder-browser-item svg,
.folder-browser-item i {
    width: 20px;
    height: 20px;
    color: #f59e0b;
}

.folder-browser-path {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Modal Large */
.modal-content.modal-large {
    max-width: 800px;
    width: 90%;
}

/* ============================================
   Portal Section
   ============================================ */
.detail-portal {
    border-left: 4px solid var(--primary-color);
}

.portal-description {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.portal-status {
    margin-bottom: 1rem;
}

.portal-active {
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.portal-inactive {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-url-container {
    margin-bottom: 1rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button .form-control {
    flex: 1;
    background-color: var(--bg-color);
    font-family: monospace;
    font-size: 0.8rem;
}

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

/* ========================================
   KONTAKTE / ANSPRECHPARTNER
   ======================================== */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.contact-card {
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.contact-card.contact-primary {
    border-color: var(--primary-color, #2563eb);
    border-width: 2px;
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-card-header strong {
    font-size: 1rem;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    margin-bottom: 0.25rem;
}

.contact-info i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.contact-info a {
    color: var(--primary-color, #2563eb);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-notes {
    font-style: italic;
    margin-top: 0.25rem;
}

.contact-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}
