@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
    /* Pure Black & Purple Theme */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #0d0d0d;
    --bg-input: #111111;
    --bg-hover: #1a1a1a;

    --text-primary: #ffffff;
    --text-secondary: #b8b8b8;
    --text-muted: #6b6b6b;

    /* Vibrant Purple Accents */
    --accent-primary: #9333ea;
    --accent-secondary: #a855f7;
    --accent-hover: #7e22ce;
    --accent-glow: rgba(147, 51, 234, 0.3);
    --accent-gradient: linear-gradient(135deg, #9333ea 0%, #c026d3 50%, #ec4899 100%);
    --accent-gradient-subtle: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(192, 38, 211, 0.1) 100%);

    --border-color: #1f1f1f;
    --border-focus: #9333ea;
    --border-hover: #2a2a2a;

    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Modern Spacing & Radius */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-card: 0 20px 60px -15px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 30px rgba(147, 51, 234, 0.2);
    --shadow-glow-strong: 0 0 50px rgba(147, 51, 234, 0.4);
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: -0.01em;
}


a:hover {
    color: #d946ef;
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.4);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.card h3,
.card h4,
.card h5,
.card h6 {
    color: #fff;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1 {
    font-size: 2.75rem;
}

h2 {
    font-size: 2rem;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--accent-glow);
    transform: translateY(-1px);
}

input[type="file"]:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -6px rgba(147, 51, 234, 0.6);
    filter: brightness(1.1);
}

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

.btn-block {
    display: flex;
    width: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* --- Dashboard Redesign Styles --- */

/* New Flexible Dashboard Layout */
.dashboard-layout-new {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
}

/* Main Sidebar (Icons only - schmal) */
.sidebar-main {
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0.5rem;
    z-index: 50;
    position: fixed;
    height: 100vh;
    width: 80px;
    left: 0;
    top: 0;
}

/* Secondary Sidebar (User Management Navigation) */
.sidebar-secondary {
    position: fixed;
    top: 0;
    left: 80px;
    width: 220px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 40;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(10px);
}

.sidebar-secondary.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Sidebar Overlay (optional, für mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    display: none;
    /* Standardmäßig versteckt, nur auf mobilen Geräten sichtbar */
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design für Tablets und Mobile */
@media (max-width: 1024px) {
    .sidebar-overlay {
        display: block;
    }

    .sidebar-secondary {
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Hide main sidebar by default on mobile/tablet */
    .sidebar-main {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Show main sidebar when open */
    .sidebar-main.mobile-open {
        transform: translateX(0);
    }

    /* Adjust main content margin */
    .main-content-new {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem !important;
    }

    .dashboard-layout-new.has-secondary-sidebar .main-content-new {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem !important;
    }

    /* Adjust secondary sidebar position */
    .sidebar-secondary {
        left: 0;
        z-index: 60;
        /* Higher than main sidebar if needed, or manage z-index */
    }
}

@media (max-width: 768px) {
    .sidebar-secondary {
        width: 280px;
        /* Full width or wider on mobile */
        max-width: 85vw;
    }

    /* Stack grid layouts */
    .homepage-layout {
        grid-template-columns: 1fr;
    }

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

    /* Adjust card padding */
    .card {
        padding: 1.5rem;
    }
}

/* Utility for responsive tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Help Center Responsive Header */
.help-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.help-center-actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .help-center-header {
        flex-direction: column;
        align-items: stretch;
    }

    .help-center-actions {
        flex-direction: column;
    }

    .help-center-header .btn {
        width: 100%;
        justify-content: center;
    }
}

/* User Info Section */
.user-info-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    margin-bottom: 1rem;
}

.user-details h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.user-details p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.user-roles {
    margin-top: 1rem;
}

.roles-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Overview Section */
.overview-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.overview-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-stat-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.overview-stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

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

.stat-header span {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-header i {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.overview-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Main Content */
.main-content-new {
    flex: 1;
    margin-left: 80px;
    padding: 2rem;
    padding-left: 2rem;
    padding-right: 4rem;
    overflow-y: auto;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: calc(100% - 80px - 4rem);
    max-width: calc(100% - 80px - 4rem);
    box-sizing: border-box;
}

/* When secondary sidebar is open, adjust main content to be narrower with spacing - zentriert */
.dashboard-layout-new.has-secondary-sidebar .main-content-new {
    margin-left: 300px !important;
    margin-right: 0 !important;
    width: calc(100% - 300px - 12rem) !important;
    max-width: calc(100% - 300px - 12rem) !important;
    padding-left: 6rem !important;
    padding-right: 6rem !important;
    box-sizing: border-box;
}

/* Add New Button Position - rechts oben (immer gleich) */
.add-new-button-container {
    right: 2rem;
    left: auto;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.sidebar-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-logo:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.sidebar-logo:hover::before {
    opacity: 1;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
    flex-grow: 1;
    width: 100%;
    align-items: center;
}

.nav-item {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.nav-item span {
    display: none;
    /* Text verstecken, nur Icons anzeigen */
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-item i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* Secondary Sidebar (Overview) */
.secondary-sidebar {
    position: fixed;
    top: 0;
    left: 240px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
}

.secondary-sidebar.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    /* Offset for fixed sidebar */
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    width: calc(100% - 80px);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* User Management Navigation Sidebar */
.user-management-nav {
    padding: 0;
    padding-top: 0.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
}

.nav-subsection-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.25rem 0 0.75rem 0;
    padding: 0 0.5rem;
}

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

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
}

.nav-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 0;
    background: var(--accent-gradient);
    border-radius: 0 2px 2px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu-item i {
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.15);
}

.nav-menu-item:hover::before {
    transform: translateY(-50%) scaleY(1);
    height: 60%;
}

.nav-menu-item:hover i {
    transform: scale(1.15);
    color: var(--accent-primary);
}

.nav-menu-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-menu-item.active::before {
    background: white;
    transform: translateY(-50%) scaleY(1);
    height: 60%;
}

.nav-menu-item.active i {
    color: white;
}

/* Chart Container Placeholder */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    height: 400px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ========== User Management Styles ========== */

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

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

.data-table tbody tr {
    transition: background 0.2s ease;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.badge-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.badge-staff {
    background: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
    color: white;
}

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

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: #f59e0b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: #3b82f6;
}

/* Button Icon */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

/* Info Group */
.info-group {
    margin-bottom: 1.5rem;
}

.info-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.info-group p {
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

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

/* Permission Table */
.permission-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.permission-table th,
.permission-table td {
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.permission-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.permission-table td {
    background: var(--bg-card);
}

/* Toggle Button */
.toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
}

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

.toggle-btn.active {
    color: var(--accent-primary);
}

.toggle-btn i {
    display: block;
}

/* Settings Container */
.settings-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.settings-form {
    width: 100%;
}

/* ========== Toast Messages ========== */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    min-width: 320px;
    max-width: 420px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

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

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

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

/* Toast Types */
.toast-success {
    border-left-color: var(--success);
}

.toast-success::before {
    background: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
    background: rgba(16, 185, 129, 0.15);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-error::before {
    background: var(--error);
}

.toast-error .toast-icon {
    color: var(--error);
    background: rgba(239, 68, 68, 0.15);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-warning::before {
    background: var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.15);
}

.toast-info {
    border-left-color: var(--info);
}

.toast-info::before {
    background: var(--info);
}

.toast-info .toast-icon {
    color: var(--info);
    background: rgba(59, 130, 246, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ============================================
   RESPONSIVE DESIGN - DASHBOARD
   ============================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .sidebar-main {
        width: 70px;
        padding: 1rem 0.25rem;
    }

    .sidebar-logo {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .nav-item {
        width: 40px;
        height: 40px;
    }

    .nav-item i {
        font-size: 1.25rem;
    }

    .main-content-new {
        margin-left: 70px;
        padding: 1.5rem;
        width: calc(100% - 70px);
    }

    .dashboard-layout-new.has-secondary-sidebar .main-content-new {
        margin-left: 70px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        width: calc(100% - 70px);
    }

    .sidebar-secondary {
        left: 70px;
        width: 240px;
    }

    .sidebar-overlay {
        display: block;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .sidebar-main {
        width: 60px;
        padding: 0.75rem 0.25rem;
    }

    .sidebar-logo {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .nav-item {
        width: 36px;
        height: 36px;
    }

    .nav-item i {
        font-size: 1.1rem;
    }

    .main-content-new {
        margin-left: 60px;
        padding: 1rem;
        width: calc(100% - 60px);
    }

    .sidebar-secondary {
        left: 60px;
        width: 220px;
        padding: 1rem;
    }
}

.dashboard-layout-new.has-secondary-sidebar .main-content-new {
    margin-left: 60px;
    padding-left: 1rem;
    padding-right: 1rem;
    width: calc(100% - 60px);
}

.page-title {
    font-size: 1.25rem;
}

.top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

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

.card {
    padding: 1.5rem;
}

.add-new-button-container {
    right: 1rem;
    bottom: 1rem;
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: flex !important;
    }

    .sidebar-main {
        width: 0;
        padding: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 60;
    }

    .sidebar-main.mobile-open {
        transform: translateX(0);
        width: 60px;
        padding: 0.75rem 0.25rem;
    }

    .main-content-new {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }

    .dashboard-layout-new.has-secondary-sidebar .main-content-new {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }

    .sidebar-secondary {
        left: 0;
        width: 200px;
    }

    .card {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.1rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN - AUTH PAGES
   ============================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    body[style*="padding: 2rem"] {
        padding: 1.5rem !important;
    }

    .card {
        padding: 2rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    body[style*="padding: 2rem"] {
        padding: 1rem !important;
    }

    .card {
        padding: 1.5rem;
    }

    .card h2 {
        font-size: 1.5rem !important;
    }

    .card p {
        font-size: 0.9rem !important;
    }

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

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body[style*="padding: 2rem"] {
        padding: 0.75rem !important;
    }

    .card {
        padding: 1.25rem;
        border-radius: var(--radius-sm);
    }

    .card h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .card p {
        font-size: 0.85rem !important;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem !important;
        font-size: 16px !important;
    }

    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }
}