@media (max-width: 768px) {
    .sidebar {
        position: absolute !important;
        left: 0 !important;
        top: 85px !important;
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        padding: 0 !important;
        height: calc(100vh - 85px) !important;
        z-index: 100;
    }
    .layout-container {
        margin-left: 0 !important;
    }
    .main-content {
        width: 100vw !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }
    .sidebar-nav ul {
        padding: 8px 0 !important;
    }
    .nav-link {
        padding: 12px 10px !important;
        gap: 0 !important;
        justify-content: center !important;
    }
    .nav-text {
        display: none !important;
    }
    .nav-icon {
        font-size: 1.4rem !important;
        width: 32px !important;
    }
}
@media (max-width: 768px) {
    .sidebar {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        padding: 0 !important;
    }
    .sidebar-nav ul {
        padding: 8px 0 !important;
    }
    .nav-link {
        padding: 12px 10px !important;
        gap: 0 !important;
        justify-content: center !important;
    }
    .nav-text {
        display: none !important;
    }
    .nav-icon {
        font-size: 1.4rem !important;
        width: 32px !important;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
    }
    .nav-icon {
        font-size: 1.6rem !important;
        width: 36px !important;
    }
}
/* =========================
   Grundlegende Styles
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================
   Top Banner
========================= */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(175deg, #2c3e50, #1a4db7);
    color: #fff;
    padding: 20px 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    min-height: 60px;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.welcome-text {
    font-size: 1rem;
    opacity: 0.9;
}

.banner-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-role {
    background-color: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.logout-btn {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #e74c3c;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* =========================
   Layout Container
========================= */
.layout-container {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 85px);
    margin-top: 85px;
    margin-left: 250px;
}

/* =========================
   Sidebar
========================= */
.sidebar {
    position: fixed;
    top: 85px;
    left: 0;
    width: 250px;
    height: calc(100vh - 85px);
    background-color: #2c3e50;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ecf0f1;
    text-decoration: none;
    padding: 15px 25px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-link:hover {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #fff;
}

.nav-link.active {
    background-color: #007cba;
    border-left-color: #2980b9;
    color: #fff;
}

.nav-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown.active > .nav-link {
    background-color: #34495e;
}

.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: #1a252f;
}

.nav-dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 25px 12px 65px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.dropdown-menu a:hover {
    background: #243447;
    color: #fff;
    border-left-color: #3498db;
}

.dropdown-menu a.active {
    background: #007cba;
    color: #fff;
    border-left-color: #2980b9;
}

/* =========================
   Main Content
========================= */
.main-content {
    flex: 1;
    padding: 30px;
    background-color: #f8f9fa;
    overflow-y: auto;
    width: calc(100vw - 250px);
}

.page-info {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.page-info h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
}

.page-info p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* =========================
   Card Container
========================= */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Rollenbasierte Card-Styles */
.admin-card {
    border-left: 4px solid #e74c3c;
}

.admin-card:hover {
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.2);
}

.user-card {
    border-left: 4px solid #3498db;
}

.user-card:hover {
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.2);
}

.card-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.page-info {
    text-align: center;
    margin-bottom: 30px;
}

.page-info h1 {
    font-size: 2rem;
    color: #0c2f7a;
    margin-bottom: 10px;
}

.page-info p {
    font-size: 1.1rem;
    color: #555;
}

/* =========================
   Karten Layout
========================= */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: #fff;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.info-card h3 {
    color: #0c2f7a;
    margin-bottom: 10px;
}

.info-card p {
    color: #555;
    font-size: 0.95rem;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* =========================
   Form Elements - Password Reset
========================= */
.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.form-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.form-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

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

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

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

/* =========================
   Buttons & Links
========================= */
a.button, button {
    display: inline-block;
    background-color: #0c2f7a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.85rem;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

a.button:hover, button:hover {
    background-color: #133d8c;
}

/* =========================
   Footer
========================= */
footer {
    margin-top: 50px;
}

footer div {
    background-color: #0c2f7a;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* =========================
   Responsive Anpassungen
========================= */
@media (max-width: 1024px) {
    .page-info h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .top-banner {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
    }
    .top-banner .logout-btn {
        margin-top: 10px;
    }
    .card-container {
        grid-template-columns: 1fr 1fr;
    }
    .layout-container {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .card-container {
        grid-template-columns: 1fr;
    }
    .page-info h1 {
        font-size: 1.5rem;
    }
    .page-info p {
        font-size: 1rem;
    }
    .top-banner {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

/* =========================
   Footer
========================= */
.footer {
    background-color: #2c3e50;
    color: #f9fcfc;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: #2c3e50;
}

/* =========================
   Mobile Responsive
========================= */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
        margin-left: 0;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
        order: 2;
    }
    
    .sidebar-nav ul {
        display: flex;
        padding: 10px;
        overflow-x: auto;
    }
    
    .sidebar-nav li {
        min-width: 120px;
    }
    
    .nav-link {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        gap: 5px;
    }
    
    .nav-text {
        font-size: 0.8rem;
    }
    
    .main-content {
        order: 1;
        padding: 15px;
        width: 100%;
    }
    
    .top-banner .app-title {
        font-size: 1.2rem;
    }
    
    .banner-left {
        flex-direction: column;
        gap: 5px;
    }
}

/* =========================
   Login Page Styles
========================= */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 700;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    text-align: left;
}

.login-box label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    box-sizing: border-box;
}

.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-box button[type="submit"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-box button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.error-box {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
    font-weight: 500;
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Login Animation */
.login-box {
    animation: slideIn 0.5s ease-out;
}

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

.login-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e1e8ed;
}

.login-footer p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* Mobile Login */
@media (max-width: 480px) {
    .login-box {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .login-box h2 {
        font-size: 1.5rem;
    }
    
    .login-box input[type="text"],
    .login-box input[type="password"] {
        padding: 12px 15px;
    }
    
    .login-box button[type="submit"] {
        padding: 12px;
        font-size: 1rem;
    }
}

/* Alte Create User Styles entfernt - jetzt einheitliches Layout */

/* =========================
   Page Actions (für alle Seiten)
========================= */
.page-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.users-table-container {
    background: white;
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0 auto;
    max-width: 1700px;
    width: 98%;
}

.users-table-wrapper {
    min-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #bdc3c7 #f8f9fa;
}

.users-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.users-table-wrapper::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.users-table-wrapper::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.users-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
    min-width: 1130px;
}

.users-table thead {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
}

.users-table th,
.users-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Spaltenbreiten definieren */
.users-table th:nth-child(1),
.users-table td:nth-child(1) { width: 70px; }  /* ID */
.users-table th:nth-child(2),
.users-table td:nth-child(2) { width: 180px; } /* Username */
.users-table th:nth-child(3),
.users-table td:nth-child(3) { width: 220px; } /* Email */
.users-table th:nth-child(4),
.users-table td:nth-child(4) { width: 60px; text-align: center; } /* Rolle */
.users-table th:nth-child(5),
.users-table td:nth-child(5) { width: 60px; text-align: center; } /* Status */
.users-table th:nth-child(6),
.users-table td:nth-child(6) { width: 140px; } /* Letzter Login */
.users-table th:nth-child(7),
.users-table td:nth-child(7) { width: 150px; } /* Erstellt am */
.users-table th:nth-child(8),
.users-table td:nth-child(8) { width: 180px; } /* Aktionen */

.users-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr {
    transition: background-color 0.3s ease;
}

.users-table tbody tr:hover {
    background-color: #f8f9fa;
}

.users-table tbody tr.current-user {
    background-color: #e3f2fd;
}

.users-table tbody tr.current-user:hover {
    background-color: #bbdefb;
}

.username-cell {
    font-weight: 600;
    position: relative;
}

.current-user-badge {
    background: linear-gradient(135deg, #007cba, #2980b9);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
    font-weight: 500;
}

.role-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.role-icon {
    display: inline-block;
    font-size: 1rem;
    cursor: help;
    transition: transform 0.2s ease;
}

.role-icon:hover {
    transform: scale(1.1);
}

.role-icon.admin {
    color: #e74c3c; /* Admin-Icon rot */
}

.role-icon.user {
    color: #6c757d; /* User-Icon grau */
}

/* Last Login Styles */
.last-login-date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.time-ago {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.75rem;
}

.time-ago.recent {
    color: #27ae60;
    font-weight: 500;
}

.time-ago.old {
    color: #e74c3c;
}

.date-cell {
    min-width: 140px;
    text-align: center;
}

.status-icon {
    display: inline-block;
    font-size: 1rem;
    cursor: help;
    transition: transform 0.2s ease;
}

.status-icon:hover {
    transform: scale(1.1);
}

.status-icon.active {
    color: #27ae60; /* Aktiv-Icon grün */
}

.status-icon.inactive {
    color: #e74c3c; /* Inaktiv-Icon rot */
}

.status-icon.suspended {
    color: #f39c12; /* Gesperrt-Icon orange */
}

.text-muted {
    color: #bdc3c7;
    font-style: italic;
    font-size: 0.85rem;
}

.date-cell {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.actions-cell {
    text-align: center;
    min-width: 180px;
    padding-right: 20px;
    padding-left: 10px;
}

.delete-form {
    display: inline-block;
    margin: 0;
}

.delete-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.delete-btn:hover {
    background: #f5c6cb;
    border-color: #f1aeb5;
}

.delete-btn .icon {
    color: #e74c3c;
}

.delete-btn-disabled {
    background: #f8f9fa;
    color: #adb5bd;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: not-allowed;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0.6;
}

.delete-btn-disabled .icon.disabled {
    color: #adb5bd;
}

/* Allgemeine Icon-Styles */
.icon {
    font-style: normal;
    display: inline;
}

.no-action {
    color: #bdc3c7;
    font-style: italic;
    font-size: 0.85rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.edit-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.edit-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.edit-btn .icon {
    color: #3498db;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #0c2f7a, #1a4db7);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ddd;
}

.edit-form {
    padding: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.cancel-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    white-space: nowrap;
}

.cancel-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.save-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    white-space: nowrap;
}

.save-btn:hover {
    background: #d4edda;
    border-color: #c3e6cb;
}

.save-btn .icon {
    color: #27ae60;
}

.table-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #e1e8ed;
    color: #7f8c8d;
    text-align: center;
}

.scroll-hint {
    display: block;
    margin-top: 8px;
    color: #95a5a6;
    font-size: 0.8rem;
}

@media (min-width: 1200px) {
    .scroll-hint {
        display: none; /* Verstecke Scroll-Hinweis auf großen Bildschirmen */
    }
}

/* =========================
   Form Container (Einheitliches Layout)
========================= */
.form-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.form-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.form-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba, #2980b9);
}

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

.user-form .input-group {
    text-align: left;
}

.user-form label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.user-form input[type="text"],
.user-form input[type="email"],
.user-form input[type="password"],
.user-form select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    box-sizing: border-box;
}

.user-form input[type="text"]:focus,
.user-form input[type="email"]:focus,
.user-form input[type="password"]:focus,
.user-form select:focus {
    outline: none;
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.user-form select {
    cursor: pointer;
}

.form-actions {
    margin-top: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, #007cba, #2980b9);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.form-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.secondary-btn {
    color: #7f8c8d;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid #e1e8ed;
    display: inline-block;
}

.secondary-btn:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
    border-color: #bdc3c7;
}

.message-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 600px;
    font-weight: 500;
}

.message-box.success {
    border-left: 4px solid #27ae60;
    color: #155724;
}

.message-box.error {
    border-left: 4px solid #e74c3c;
    color: #721c24;
}

.password-hint {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* Mobile Form */
@media (max-width: 768px) {
    .form-box {
        margin: 0 15px;
        padding: 30px 25px;
    }
    
    .form-footer {
        flex-direction: column;
        align-items: center;
    }
    
    .secondary-btn {
        text-align: center;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .user-form input[type="text"],
    .user-form input[type="email"],
    .user-form input[type="password"],
    .user-form select {
        padding: 12px 15px;
    }
    
    .primary-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* =========================
   Backup Page Styles
========================= */
.backup-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 30px;
}

.backup-section,
.backups-list-section {
    margin-bottom: 30px;
}

.section-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.section-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.section-box h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.section-box p {
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.backup-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.backup-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.backup-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.backup-info li {
    padding: 5px 0;
    color: #555;
}

.backup-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.backup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.backups-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.backups-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.backups-table thead {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
}

.backups-table th,
.backups-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
    vertical-align: middle;
}

.backups-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backups-table tbody tr {
    transition: background-color 0.3s ease;
}

.backups-table tbody tr:hover {
    background-color: #f8f9fa;
}

.backups-table .date-cell {
    color: #2c3e50;
    font-weight: 500;
    min-width: 150px;
}

.backups-table .date-cell small {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.backups-table .actions-cell {
    text-align: center;
    min-width: 100px;
}

.delete-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
}

.delete-btn:hover {
    background: #f5c6cb;
    color: #721c24;
    border-color: #f1aeb5;
}

.backup-instructions {
    margin-top: 40px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.instruction-item {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.instruction-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1rem;
}

.instruction-item p {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.instruction-item code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e74c3c;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-state p {
    margin-bottom: 10px;
}

/* Mobile Backup */
@media (max-width: 768px) {
    .backup-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-box {
        padding: 20px;
    }
    
    .backups-table {
        font-size: 0.8rem;
    }
    
    .backups-table th,
    .backups-table td {
        padding: 10px 8px;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .backup-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #7f8c8d;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* Mobile Users Table */
@media (max-width: 768px) {
    .page-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .page-actions .primary-btn,
    .page-actions .secondary-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .users-table {
        font-size: 0.85rem;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    
    .users-table th {
        font-size: 0.8rem;
    }
    
    /* Mobile: Verstecke weniger wichtige Spalten */
    .users-table th:first-child,
    .users-table td:first-child {
        display: none; /* ID verstecken */
    }
    
    .users-table th:nth-child(6),
    .users-table td:nth-child(6) {
        display: none; /* Letzter Login verstecken */
    }
    
    .current-user-badge {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .users-table th:nth-child(3),
    .users-table td:nth-child(3) {
        display: none; /* Email verstecken */
    }
    
    .users-table th:nth-child(5),
    .users-table td:nth-child(5) {
        display: none; /* Status verstecken */
    }
    
    .users-table {
        min-width: 600px;
        font-size: 0.8rem;
    }
}

/* =========================
   Error Container (Access Denied)
========================= */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f8f9fa;
    padding: 20px;
}

.error-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-content h1 {
    color: #e74c3c;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.error-content p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.error-content .btn {
    margin-top: 20px;
    padding: 12px 25px;
    font-size: 1rem;
}
