/* Theme Variables */
:root {
    /* Dark Mode (default) */
    --background: #1e1e2f;
    --navbar-bg: #2a2d3e;
    --card-bg: #2a2d3e;
    --input-bg: #3a3f5c;
    --text-primary: #dcdcdc;
    --text-secondary: #b0b0b0;
    --border: #3a3f5c;
    --shadow: rgba(0, 0, 0, 0.3);
    --company-blue: #0C86C8;
    --company-blue-hover: #0b73ab;
    --in-progress-bg: #e67e22;
    --input-bg-hover: #44475a;
    --dropdown-bg: #2a2d3e; /* Dark mode dropdown background */
    --dropdown-border: #3a3f5c; /* Dark mode dropdown border */
    --dropdown-text: #dcdcdc; /* Dark mode dropdown text */
    --dropdown-hover: #3a3f5c; /* Dark mode dropdown hover */
}

[data-theme="light"] {
    /* Light Mode */
    --background: #f5f6f5;
    --navbar-bg: #ffffff;
    --card-bg: #ffffff;
    --input-bg: #ebedef;
    --text-primary: #2a2d3e;
    --text-secondary: #666666;
    --border: #ebedef;
    --shadow: rgba(0, 0, 0, 0.1);
    --in-progress-bg: #f39c12;
    --input-bg-hover: #d3d7dc;
    --dropdown-bg: #ffffff;
    --dropdown-border: #ebedef;
    --dropdown-text: #2a2d3e;
    --dropdown-hover: #f5f5f5;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-text-size-adjust: 100%;
}

body.admin-dashboard {
    display: flex;
}

/* Sidebar Styles - Scoped to admin-dashboard */
body.admin-dashboard .sidebar {
    width: 250px;
    background-color: var(--navbar-bg);
    color: var(--text-primary);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 2px 0 5px var(--shadow);
    transition: transform 0.5s ease;
    z-index: 102;
}

body.admin-dashboard .sidebar.collapsed {
    transform: translateX(-250px);
}

body.admin-dashboard .sidebar-logo {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

body.admin-dashboard .sidebar-logo img {
    max-width: 80%;
    height: auto;
    object-fit: contain;
}

body.admin-dashboard .sidebar-toggle {
    background-color: transparent;
    color: var(--text-primary);
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-right: 1rem;
}

body.admin-dashboard .sidebar-toggle:hover {
    color: var(--company-blue);
}

body.admin-dashboard .sidebar-content {
    padding: 1rem;
    margin-top: 3rem; /* Platz für den Toggle-Button */
}

body.admin-dashboard .sidebar-content h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: none;
}

body.admin-dashboard .sidebar-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.admin-dashboard .sidebar-content li {
    margin-bottom: 0.5rem;
}

body.admin-dashboard .sidebar-btn {
    width: 100%;
    text-align: left;
    background-color: var(--input-bg);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 1rem;
}

body.admin-dashboard .sidebar-btn:hover {
    background-color: var(--input-bg-hover);
}

/* Main Content Wrapper - Scoped to admin-dashboard */
body.admin-dashboard .main-content-wrapper {
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: margin-left 0.5s ease, width 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.admin-dashboard .main-content-wrapper.collapsed {
    margin-left: 0;
    width: 100%;
}

/* Navbar - Generic for non-admin pages */
.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: var(--navbar-bg);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    box-shadow: 0px 4px 10px var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
    width: 100%; /* Full width for non-admin pages */
}

/* Admin Navbar - Specific for admin-dashboard */
.admin-navbar {
  display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: var(--navbar-bg);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    box-shadow: 0px 4px 10px var(--shadow);
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    box-sizing: border-box;
    width: calc(100% - 250px);
    transition: width 0.5s ease;
}

body.admin-dashboard .main-content-wrapper.collapsed .admin-navbar {
     width: 100%; /* Full width, adjusted by main-content-wrapper margin */
     margin-left: 0;
}

/* Ensure content shifts with navbar */
body:not(.admin-dashboard) #mainContent,
body.admin-dashboard .main-content-wrapper {
    margin-top: 70px; /* Clearance for navbar */
}

/* Navbar Content */
.navbar .headline,
.admin-navbar .headline {
    display: flex;
    align-items: center;
}

.navbar .headline h1,
.admin-navbar .headline h1 {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--company-blue);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar .nav-right,
.admin-navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    background-color: rgba(0, 0, 0, 0.1); 
    padding: 0.5rem 1rem; 
    border-radius: 8px; 
    transition: background-color 0.2s ease; 
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.profile-icon {
    font-size: 1.5em;
    margin-right: 8px;
    color: var(--text-primary);
    transition: none;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 4px;
    box-shadow: 0 2px 5px var(--shadow);
    min-width: 200px;
    z-index: 1000;
    color: var(--dropdown-text);
}

.profile-dropdown.active {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dropdown-text);
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover);
}

/* Main Content */
#mainContent {
    padding: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex-grow: 1;
    box-sizing: border-box;
    padding-top: 80px;
}

h1 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1.3;
}

h2 {
    color: var(--text-secondary);
    margin: 1rem 0 0.8rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
}

/* Buttons */
button {
    background-color: var(--company-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin: 0.3rem 0;
    -webkit-tap-highlight-color: transparent;
    display: inline-block;
}

button:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background-color: var(--input-bg);
}

button.secondary:hover {
    background-color: var(--card-bg);
}

button.danger {
    background-color: #e74c3c;
}

button.danger:hover {
    background-color: #c0392b;
}

.primary-btn {
    width: 100%;
    margin-top: 1rem;
}

/* Remove File Button */
.remove-file-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    vertical-align: middle;
}

.remove-icon {
    width: 20px;
    height: 20px;
    display: block;
    content: url('img/trash_can.png');
}

.remove-file-btn:hover .remove-icon {
    content: url('img/trash_can_hover.png');
}

/* File Item */
.file-item {
    display: flex;
    align-items: center;
    margin-top: 5px;
    color: var(--text-primary);
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow);
}

/* User Form specific */
.user-form {
    max-width: 320px;
    margin: 0 auto;
    padding: 1rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 2px var(--company-blue);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

textarea#bugEnvironment {
    min-height: 80px;
}

/* Password Container for Toggle Button */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    flex-grow: 1;
    padding-right: 40px;
}

#togglePassword,
#toggleConfirmPassword,
#toggleNewPassword {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
}

#togglePassword img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Styling für die Delete- und Edit-Buttons in der User-Tabelle */
.delete-btn-div,
.edit-user-btn-div {
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px; 
    transition: all 0.2s ease;
    background-color: transparent;
}

.delete-btn-div:hover,
.edit-user-btn-div:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-1px);
}

.delete-btn-div:active,
.edit-user-btn-div:active {
    transform: translateY(0);
}

.delete-btn,
.edit-user-btn {
    width: 70%;
    height: 70%;
    transition: none;
}

.action {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
/* Standardzustand: Statisches Bild */
.password-hidden #togglePassword img {
    content: url('img/eye-open-black.png');
}

.password-visible #togglePassword img {
    content: url('img/eye-closed-black.png');
}

/* File Upload */
input[type="file"] {
    padding: 0.8rem;
    background: var(--input-bg);
    border-radius: 6px;
}

input[type="file"]::file-selector-button {
    background: var(--company-blue);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    margin-right: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: var(--company-blue-hover);
}

/* Slideshow */
.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1rem;
    height: 220px;
}

.slideshow-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 8px var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Aktives Bild */
.slideshow-slide.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    cursor: pointer;
}

/* Hintergrundbilder (gestapelt) */
.slideshow-slide.background-1 {
    transform: translateX(20px) scale(0.95);
    opacity: 0.7;
    filter: brightness(0.8);
}

.slideshow-slide.background-2 {
    transform: translateX(40px) scale(0.9);
    opacity: 0.5;
    filter: brightness(0.6);
}

.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--company-blue);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 5;
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-50%);
}

.slideshow-prev {
    left: -50px;
}

.slideshow-next {
    right: -50px;
}

.slideshow-dots {
    text-align: center;
    margin-top: 10px;
}

.slideshow-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slideshow-dot.active {
    background-color: var(--company-blue);
}

/* Remove Slide Button for Slideshow */
.remove-slide-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px var(--shadow);
    z-index: 2;
    transition: all 0.2s ease;
}

.remove-slide-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.remove-slide-btn:focus {
    outline: 2px solid var(--company-blue);
    outline-offset: 2px;
}

.remove-icon {
    width: 20px;
    height: 20px;
    display: block;
}

/* Image Popup */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Hero Section */
.index-hero {
    margin-top: 180px;
    text-align: center;
}

.index-hero h1 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.3;
}

.index-hero p {
    color: var(--text-secondary);
    margin: 1rem 0 0.8rem;
}

.search-container {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 10px;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.search-container select {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.index-hero button {
    background-color: var(--company-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin: 0.3rem 0;
}

.hero button:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-1px);
}

.hero button:active {
    transform: translateY(0);
}

.image-popup-content {
    position: relative;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px var(--shadow);
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: modalFadeIn 0.3s ease-out;
}

.image-popup-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* Schließen-Button im Bild-Popup */
.image-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0.5rem;
}

.image-popup-close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

/* Tables - Mobile First Approach */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: 0px 4px 10px var(--shadow);
}

.primary-btn:disabled {
    background-color: #0a5c88;
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Tables - Mobile First Approach (continued) */
table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    color: var(--text-primary);
}

th,
td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.action{
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    display: flex;
}


th {
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
    cursor: pointer;
    position: relative;
}

th:hover {
    background-color: var(--input-bg-hover);
}

th.sorted {
    background-color: var(--company-blue);
    color: white;
}

th.sorted::after {
    content: attr(data-sort);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
}

/* Highlight "In Progress" rows */
tr.in-progress {
    background-color: var(--in-progress-bg);
    color: var(--card-bg);
}

/* Mobile Table Stack Layout */
@media (max-width: 767px) {
    .table-container {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
    }

    table {
        min-width: 100%;
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        display: block;
        margin-bottom: 0.8rem;
        background: var(--card-bg);
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0px 2px 8px var(--shadow);
    }

    tr.in-progress {
        background-color: var(--in-progress-bg);
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 0.6rem 0.8rem;
        border-bottom: 1px solid var(--border);
        font-size: 0.9rem;
    }

    td:last-child {
        border-bottom: none;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--text-secondary);
        margin-right: 0.5rem;
        flex: 1;
    }

    td>span {
        flex: 2;
        text-align: right;
        word-break: break-word;
    }

    body.admin-dashboard .sidebar {
        width: 200px;
    }

    body.admin-dashboard .sidebar.collapsed {
        transform: translateX(-200px);
    }

    body.admin-dashboard .main-content-wrapper {
        margin-left: 200px;
        width: calc(100% - 200px);
    }

    body.admin-dashboard .main-content-wrapper.collapsed {
        margin-left: 0;
        width: 100%;
    }

    body.admin-dashboard .main-content-wrapper.collapsed .admin-navbar {
        width: 100%;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Success Popup */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

.success-popup .modal-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px var(--shadow);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    text-align: center;
}

.success-popup .modal-content h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.success-popup .modal-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.success-popup .modal-content .primary-btn {
    background-color: var(--company-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: auto;
    margin-top: 1rem;
}

.success-popup .modal-content .primary-btn:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-1px);
}

.modal-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px var(--shadow);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0.5rem;
}

.close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: var(--company-blue);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password a:hover {
    text-decoration: underline;
    color: var(--company-blue-hover);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open {
    background-color: var(--company-blue);
    color: white;
}

.status-in-progress {
    background-color: var(--in-progress-bg);
    color: var(--card-bg);
}

.status-resolved {
    background-color: #2ecc71;
    color: white;
}

.add-user-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    background-color: var(--company-blue);
    color: white;
    border: none;
    transition: all 0.2s ease;
}

.add-user-btn:hover {
    background-color: var(--company-blue-hover);
    transform: scale(1.1);
}

/* User Table Actions */
#userTable table td {
    vertical-align: middle;
}

#userTable table input[type="password"] {
    padding: 0.5rem;
    margin: 0 0.5rem;
    width: 150px;
}

/* Modal Form Layout */
.modal-content label {
    display: block;
    margin-top: 1rem;
    color: var(--text-primary);
}

.modal-content input,
.modal-content select {
    margin-bottom: 0.5rem;
}

#userTable th:last-child {
    position: relative;
    padding: 0.8rem;
    text-align: left;
    white-space: nowrap;
}

#userTable th:last-child .addUserButton {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    background-color: var(--company-blue);
    color: white;
    border: none;
    transition: all 0.2s ease;
    margin: 0;
}

#userTable th:last-child .addUserButton:hover {
    background-color: var(--company-blue-hover);
    transform: translateY(-50%) scale(1.1);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.button-group {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Character Count Indicator for Summary Fields */
.char-count {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: -0.8rem;
    margin-bottom: 1rem;
}

.char-count.warning {
    color: #f39c12;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .navbar {
        padding: 0.25rem 2rem;
    }

    .navbar .headline h1 {
        font-size: 1.3rem;
    }

    #mainContent {
        padding: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.4rem;
    }

    .hero-content button {
        padding: 1rem 2rem;
        font-size: 1.2rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 2rem;
        max-width: 600px;
    }
}

/* Error Messages */
.error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Accessibility */
:focus {
    outline: 2px solid var(--company-blue);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline-offset: 0;
}

/* Ensure modals are visible */
#bugReportModal,
#ticketModal,
#changePasswordModal,
#unsavedChangesModal,
#imagePopup {
    display: flex;
}

/* Fix for modal scrolling on iOS */
@supports (-webkit-touch-callout: none) {
    .modal {
        padding-bottom: 60px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--company-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--company-blue-hover);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --company-blue: #00f;
        --company-blue-hover: #0033ff;
        --border: #000;
    }

    [data-theme="light"] {
        --background: #fff;
        --text-primary: #000;
        --text-secondary: #333;
    }

    [data-theme="dark"] {
        --background: #000;
        --text-primary: #fff;
        --text-secondary: #ccc;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
    }
}