/**
 * Dashboard Layout & Components
 */

/* ==================== DASHBOARD LAYOUT ==================== */

.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--bg-secondary);
    transition: background-color var(--transition-base);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color var(--transition-base), border-color var(--transition-base);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

[data-theme="dark"] .sidebar,
.dark-mode .sidebar {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    min-height: 80px;
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    backdrop-filter: blur(20px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s;
    width: 100%;
}



.sidebar-logo {
    position: relative;
}

/* Base logo */
.sidebar-logo-text-img {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;

    clip-path: inset(0 0 0 0);
    will-change: clip-path;
    transition-property: clip-path;
    transition-duration: 560ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0ms;
}

/* Hover logo (kein opacity:0 -> sonst Blitz/Gaps) */
.sidebar-logo-hover-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateZ(0);

    height: 2.5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;

    pointer-events: none;
    opacity: 1;

    clip-path: inset(0 0 0 100%);
    will-change: clip-path;
    transition-property: clip-path;
    transition-duration: 560ms;

    /* wichtig: kommt schneller „am Anfang“ */
    transition-timing-function: cubic-bezier(0.12, 0.9, 0.2, 1);
    transition-delay: 0ms;
}

/* HOVER IN:
   - hover kommt sofort rein
   - base geht minimal verzögert raus -> kein heller Flash */
.sidebar-logo:hover .sidebar-logo-hover-img {
    clip-path: inset(0 0 0 0);
}

.sidebar-logo:hover .sidebar-logo-text-img {
    transition-delay: 70ms;          /* tweak: 50–90ms */
    clip-path: inset(0 100% 0 0);
}

/* HOVER OUT:
   - base darf sofort wieder rein (sieht bei dir ja schon perfekt aus)
   - hover geht raus */
.sidebar-logo:not(:hover) .sidebar-logo-text-img {
    transition-delay: 0ms;
    clip-path: inset(0 0 0 0);
}

.sidebar-logo:not(:hover) .sidebar-logo-hover-img {
    clip-path: inset(0 0 0 100%);
}

.sidebar-logo:hover .sidebar-logo-text-img {
    opacity: 0;
}

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

/* White Label Logo - Hover-Effekt deaktivieren */
.sidebar-logo-white-label:hover .sidebar-logo-text-img {
    opacity: 1 !important;
    clip-path: inset(0 0 0 0) !important;
    transition-delay: 0ms !important;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 1rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
    position: relative;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.sidebar-nav-section {
    margin-bottom: 1.75rem;
}

.sidebar-nav-section:first-child {
    margin-top: 0.5rem;
}

.sidebar-nav-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.sidebar-nav-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--primary-400);
    border-radius: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.sidebar-nav-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.25rem;
    position: relative;
    min-height: 2.75rem;
}

.sidebar-nav-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding-top: 0.125rem;
}

.sidebar-nav-item-content > span:first-child {
    line-height: 1.3;
}

.sidebar-nav-sublabel {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 400;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

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

.sidebar-nav-item:hover {
    background: linear-gradient(90deg, var(--primary-50), transparent);
    color: var(--primary-700);
    transform: translateX(4px);
    padding-left: 1.25rem;
}

.sidebar-nav-item:hover .sidebar-nav-sublabel {
    color: var(--primary-600);
}

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

.sidebar-nav-item.active {
    background: linear-gradient(90deg, var(--primary-50), rgba(139, 92, 246, 0.05));
    color: var(--primary-700);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.sidebar-nav-item.active .sidebar-nav-sublabel {
    color: var(--primary-600);
    font-weight: 500;
}

.sidebar-nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    height: 70%;
}

.sidebar-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.sidebar-nav-item:hover .sidebar-nav-icon {
    transform: scale(1.1);
    color: var(--primary-600);
}

.sidebar-nav-item.active .sidebar-nav-icon {
    color: var(--primary-600);
}

.sidebar-nav-chevron {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}

.sidebar-nav-item-with-dropdown:hover .sidebar-nav-chevron {
    color: var(--primary-500);
    transform: translateX(2px);
}

/* Sidebar Nav Dropdown */
.sidebar-nav-item-with-dropdown {
    position: relative;
}

.sidebar-nav-dropdown {
    position: fixed;
    left: 280px;
    top: 0;
    margin-left: 0;
    width: 320px;
    max-height: calc(100vh - 2rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 251, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(139, 92, 246, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    pointer-events: none;
}

/* Unsichtbare Brücke zwischen Nav-Item und Dropdown - erweitert für besseren Hover */
.sidebar-nav-item-with-dropdown::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 0.5rem;
    height: 100%;
    background: transparent;
    z-index: 10001;
}

.sidebar-nav-item-with-dropdown:hover .sidebar-nav-dropdown,
.sidebar-nav-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.sidebar-nav-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
}

.sidebar-nav-dropdown-header i {
    color: var(--primary-500);
    font-size: 0.875rem;
}

.sidebar-nav-dropdown-actions {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, transparent 100%);
}

.sidebar-nav-dropdown-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.sidebar-nav-dropdown-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.sidebar-nav-dropdown-action-btn i {
    font-size: 0.75rem;
}

.sidebar-nav-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-nav-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav-dropdown-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.sidebar-nav-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.sidebar-nav-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.08), transparent);
    border-left-color: var(--primary-500);
    color: var(--primary-700);
}

.sidebar-nav-dropdown-item-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.25);
    transition: all 0.2s;
}

.sidebar-nav-dropdown-item:hover .sidebar-nav-dropdown-item-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.sidebar-nav-dropdown-item-content {
    flex: 1;
    min-width: 0;
}

.sidebar-nav-dropdown-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.sidebar-nav-dropdown-item:hover .sidebar-nav-dropdown-item-title {
    color: var(--primary-700);
}

.sidebar-nav-dropdown-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.sidebar-nav-dropdown-item-meta i {
    font-size: 0.6875rem;
    margin-right: 0.25rem;
}

.sidebar-nav-dropdown-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, transparent 100%);
}

.sidebar-nav-dropdown-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-600);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav-dropdown-footer-link:hover {
    color: var(--primary-700);
    transform: translateX(4px);
}

.sidebar-nav-dropdown-footer-link i {
    font-size: 0.75rem;
}

.sidebar-nav-badge {
    margin-left: auto;
    background: var(--primary-500);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    min-width: 1.5rem;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
    transition: all 0.2s;
}

.sidebar-nav-item:hover .sidebar-nav-badge {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(139, 92, 246, 0.3);
}

.sidebar-nav-badge.warning {
    background: var(--warning-500);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.sidebar-nav-item:hover .sidebar-nav-badge.warning {
    box-shadow: 0 3px 6px rgba(245, 158, 11, 0.3);
}

.sidebar-nav-badge.danger {
    background: var(--danger-500);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.sidebar-nav-item:hover .sidebar-nav-badge.danger {
    box-shadow: 0 3px 6px rgba(239, 68, 68, 0.3);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    position: relative;
}

.sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid var(--border-color);
}

.sidebar-user:hover {
    background: linear-gradient(135deg, var(--primary-50), var(--bg-primary));
    border-color: var(--primary-200);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-user-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.sidebar-user-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.sidebar-user-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.sidebar-user-avatar:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.sidebar-user-avatar:hover::before {
    left: 100%;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
    transition: color 0.2s;
    line-height: 1.3;
}

.sidebar-user-name:hover {
    color: var(--primary-600);
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.125rem;
    font-weight: 500;
}

.sidebar-user-role i {
    font-size: 0.6875rem;
    color: var(--primary-500);
}

.sidebar-user-menu {
    position: relative;
}

.sidebar-user-menu-dropdown {
    position: relative;
}

.sidebar-user-menu-items {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.sidebar-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color-light);
}

.sidebar-user-menu-item:last-child {
    border-bottom: none;
}

.sidebar-user-menu-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-600);
}

.sidebar-user-menu-item-danger {
    color: var(--danger);
}

.sidebar-user-menu-item-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.sidebar-user-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.25rem 0;
}

.sidebar-user-menu-item .badge {
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Top Bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 90;

    /* Gleicher Farbverlauf, aber „glasig“ */
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--primary-700) 80%, transparent),
        color-mix(in srgb, var(--primary-600) 100%, transparent)
    );

    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);

    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);

    padding: 1rem;
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: white;
}

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

.mobile-menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.topbar-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.topbar-title-section.topbar-title-minimal {
    opacity: 0.6;
}

.topbar-title-section.topbar-title-minimal .topbar-breadcrumb {
    font-size: 0.875rem;
}

.topbar-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.topbar-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.2s;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.topbar-breadcrumb a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.breadcrumb-current {
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
}

/* Duplicate removed - using the styled version above */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
}

.topbar-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-quick-actions-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.topbar-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.topbar-quick-action-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
}

.topbar-quick-action-custom i {
    font-size: 0.875rem;
}

.topbar-quick-action-custom {
    position: relative;
}

.topbar-quick-action-badge {
    margin-left: 0.35rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    white-space: nowrap;
}

.topbar-quick-action-badge-count {
    min-width: 1.25rem;
    text-align: center;
}

.topbar-quick-action-badge-sms {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    padding: 0.2rem 0.5rem;
}
.topbar-quick-action-badge-sms .topbar-quick-action-badge-amount {
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}
.topbar-quick-action-badge-sms .topbar-quick-action-badge-sms-count {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
}

.topbar-quick-action-custom.topbar-quick-action-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border-color: var(--primary-600);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.topbar-quick-action-custom.topbar-quick-action-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.topbar-quick-action-custom.topbar-quick-action-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    border-color: var(--success-600);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.topbar-quick-action-custom.topbar-quick-action-success:hover {
    background: linear-gradient(135deg, var(--success-600), #15803d);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.topbar-quick-action-custom.topbar-quick-action-warning {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
    color: white;
    border-color: var(--warning-600);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.topbar-quick-action-custom.topbar-quick-action-warning:hover {
    background: linear-gradient(135deg, var(--warning-600), #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.topbar-quick-action-custom.topbar-quick-action-info {
    background: linear-gradient(135deg, var(--info-500), var(--info-600));
    color: white;
    border-color: var(--info-600);
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.2);
}

.topbar-quick-action-custom.topbar-quick-action-info:hover {
    background: linear-gradient(135deg, var(--info-600), #0e7490);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 182, 212, 0.3);
}

.topbar-quick-action-custom.topbar-quick-action-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: white;
    border-color: var(--danger-600);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.topbar-quick-action-custom.topbar-quick-action-danger:hover {
    background: linear-gradient(135deg, var(--danger-600), #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.topbar-quick-action-edit,
.topbar-quick-action-setup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-quick-action-edit:hover,
.topbar-quick-action-setup:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.topbar-quick-action-edit i,
.topbar-quick-action-setup i {
    font-size: 0.875rem;
}

.topbar-quick-action {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.topbar-quick-action:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.topbar-search-expanded .topbar-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.topbar-search-input-expanded {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.topbar-search-input-expanded::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.topbar-search-input-expanded:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.topbar-search-input-expanded:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.topbar-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

/* Legacy Search (für Kompatibilität) */
.topbar-search {
    position: relative;
    width: 320px;
}

.topbar-search input {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: white;
}

.topbar-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.topbar-search input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.topbar-search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.topbar-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: color 0.2s;
}

.topbar-search input:focus + .topbar-search-icon {
    color: white;
}

.topbar-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.topbar-search-result-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.topbar-search-result-item:hover {
    background: var(--bg-tertiary);
}

.topbar-search-result-item:last-child {
    border-bottom: none;
}

.topbar-search-result-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--primary-100);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-search-result-content {
    flex: 1;
    min-width: 0;
}

.topbar-search-result-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.topbar-search-result-subtitle {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.topbar-messages,
.topbar-notifications {
    position: relative;
}

.topbar-icon-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%);
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(255, 255, 255, 0.3) inset,
                0 2px 8px rgba(255, 255, 255, 0.2);
}

.topbar-icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.topbar-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse-badge 2s infinite;
    height: 1.25rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    animation: pulse 2s infinite;
    border: 2px solid white;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4);
    }
}

.notifications-dropdown {
    position: fixed;
    top: auto;
    bottom: auto;
    right: 1.5rem;
    width: 420px;
    max-height: calc(100vh - 120px);
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

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

.notifications-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 1rem;
    min-width: 0;
}

.notifications-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.notifications-header h4::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: linear-gradient(to bottom, var(--primary-500), var(--primary-600));
    border-radius: 2px;
}

.notifications-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.notifications-actions .btn {
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.notifications-actions .btn i {
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.notifications-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 450px;
    background: var(--gray-50);
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.notification-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-primary);
    position: relative;
}

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

.notification-item:hover {
    background: var(--primary-50);
    transform: translateX(2px);
}

.notification-item.unread {
    background: linear-gradient(to right, var(--primary-50), var(--bg-primary));
    border-left: 3px solid var(--primary-500);
    padding-left: calc(1.5rem - 3px);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-100);
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.625rem;
    gap: 0.75rem;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-900);
    line-height: 1.4;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-item-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-item-type.info {
    background: var(--info);
    color: white;
    font-size: 0.625rem;
}

.notification-item-type.success {
    background: var(--success);
    color: white;
    font-size: 0.625rem;
}

.notification-item-type.warning {
    background: var(--warning);
    color: white;
    font-size: 0.625rem;
}

.notification-item-type.danger {
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    font-weight: 500;
}

.notification-item-message {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.notifications-loading {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.notifications-loading i {
    font-size: 1.5rem;
    color: var(--primary-500);
}

.notifications-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.notifications-empty i {
    font-size: 3rem;
    color: var(--gray-300);
    opacity: 0.5;
}

.notifications-empty-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

.notifications-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: linear-gradient(to bottom, white, var(--gray-50));
    flex-shrink: 0;
}

.notifications-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
}

.notifications-footer a:hover {
    color: var(--primary-600);
    background: var(--primary-50);
    border-color: var(--primary-200);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notifications-footer a i {
    font-size: 1rem;
}

.notifications-footer a .badge {
    margin-left: auto;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: var(--spacing-xl);
    overflow-x: hidden;
}

/* Content Wrapper für Seiten mit Padding */
.page-content-wrapper {
    padding: var(--spacing-xl);
}

/* Seiten mit Header-Bereichen: Header bis zum Rand, Content mit Padding */
.events-page-header,
.templates-page-header,
.event-detail-header,
.order-page-header,
.orders-page-header,
.event-templates-page-header,
.dashboard-header,
.print-queue-header,
.print-sheets-page-header,
.messages-page-header,
.notifications-page-header,
.quick-actions-page-header,
.fonts-page-header,
.registration-settings-page-header,
.agency-settings-page-header,
.team-page-header,
.profile-page-header,
.subscription-page-header,
.printers-page-header,
.automations-page-header,
.print-client-page-header {
    margin-left: calc(-1 * var(--spacing-xl)) !important;
    margin-right: calc(-1 * var(--spacing-xl)) !important;
    margin-top: calc(-1 * var(--spacing-xl)) !important;
    width: calc(100% + 2 * var(--spacing-xl)) !important;
    padding-left: var(--spacing-xl) !important;
    padding-right: var(--spacing-xl) !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.page-header-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* ==================== DASHBOARD WIDGETS ==================== */

.widget {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.widget-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.widget-body {
    padding: var(--spacing-lg);
}

.widget-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ==================== DATA TABLE ==================== */

.data-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.data-table-search {
    position: relative;
    min-width: 300px;
}

.data-table-search input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.data-table-search input:hover {
    border-color: var(--gray-400);
}

.data-table-search input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.data-table-search-icon {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.data-table-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ==================== TEMPLATE EDITOR ==================== */

.template-editor {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: var(--spacing-lg);
    height: calc(100vh - 200px);
}

.template-editor-sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.template-editor-canvas {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
}

.template-editor-preview {
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-300);
}

.template-field-draggable {
    position: absolute;
    border: 2px dashed var(--primary-500);
    background: rgba(139, 92, 246, 0.1);
    cursor: move;
    padding: 0.5rem;
    min-width: 100px;
    min-height: 30px;
}

.template-field-draggable.active {
    border-style: solid;
    box-shadow: 0 0 0 3px var(--primary-100);
}

.template-field-draggable-label {
    position: absolute;
    top: -1.5rem;
    left: 0;
    background: var(--primary-600);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.template-field-draggable-handle {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: var(--primary-600);
    border: 2px solid white;
    border-radius: 50%;
    cursor: nwse-resize;
}

.template-editor-properties {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.field-list-item {
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.field-list-item:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.field-list-item.active {
    border-color: var(--primary-600);
    background: var(--primary-50);
}

/* ==================== MOBILE ==================== */

.mobile-menu-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-700);
    font-size: 1.5rem;
}

@media (max-width: 1024px) {
    .template-editor {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .template-editor-sidebar,
    .template-editor-properties {
        height: auto;
        max-height: 400px;
    }
}

/* ==================== MOBILE RESPONSIVE ==================== */

/* Sidebar Overlay für Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 1024px) {
    /* Tablet Optimierungen */
    .sidebar {
        width: 260px;
    }
    
    .main-content {
        margin-left: 260px;
    }
    
    .topbar-search {
        width: 250px;
    }
}

@media (max-width: 768px) {
    /* Mobile Haupt-Styles */
    
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.open,
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: var(--radius-md);
        background: transparent;
        color: var(--gray-700);
        font-size: 1.5rem;
        transition: all 0.2s ease;
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:active {
        background: var(--gray-100);
        color: var(--gray-900);
    }
    
    /* Topbar Mobile */
    .topbar {
        padding: 0.75rem 1rem;
        min-height: 60px;
    }
    
    .topbar-left {
        gap: 0.75rem;
    }
    
    .topbar-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    .topbar-subtitle {
        font-size: 0.875rem;
        display: none; /* Verstecke Subtitle auf Mobile */
    }
    
    .topbar-breadcrumb {
        font-size: 0.75rem;
        display: none; /* Verstecke Breadcrumb auf Mobile */
    }
    
    .topbar-quick-actions {
        display: none;
    }
    
    .topbar-search {
        width: auto;
        flex: 1;
        max-width: 200px;
    }
    
    .topbar-search input {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    }
    
    /* Topbar Icons Mobile */
    .topbar-icon-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.125rem;
    }
    
    .topbar-icon-btn .badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
    }
    
    /* Topbar Dropdowns Mobile */
    .topbar-dropdown {
        right: 0;
        left: auto;
        width: 90vw;
        max-width: 320px;
        max-height: 70vh;
    }
    
    /* Page Content */
    .page-content {
        padding: 1rem;
    }
    
    /* Page Headers */
    .events-page-header,
    .templates-page-header,
    .event-detail-header,
    .order-page-header,
    .orders-page-header,
    .event-templates-page-header,
    .dashboard-header,
    .print-queue-header,
    .print-sheets-page-header,
    .messages-page-header,
    .notifications-page-header,
    .quick-actions-page-header,
    .fonts-page-header,
    .registration-settings-page-header,
    .agency-settings-page-header,
    .team-page-header,
    .profile-page-header,
    .subscription-page-header,
    .printers-page-header,
    .automations-page-header,
    .help-page-header,
    .print-client-page-header {
        margin-left: calc(-1 * 1rem) !important;
        margin-right: calc(-1 * 1rem) !important;
        margin-top: calc(-1 * 1rem) !important;
        width: calc(100% + 2rem) !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 1.25rem !important;
        padding-bottom: 1.25rem !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Buttons Mobile */
    .btn {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
        touch-action: manipulation;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards Mobile */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tables Mobile */
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table table {
        min-width: 600px;
    }
    
    .data-table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .data-table-search {
        min-width: auto;
        width: 100%;
    }
    
    .data-table-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Forms Mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 1rem; /* Verhindert Zoom auf iOS */
        padding: 0.625rem 0.75rem;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
    
    /* Grid Layouts Mobile */
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Stats Cards Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    /* Event Cards Mobile */
    .event-card,
    .template-card {
        padding: 1rem;
    }
    
    /* Modals Mobile */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 1rem;
        flex-wrap: wrap;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Tabs Mobile */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tabs-list {
        flex-wrap: nowrap;
        min-width: max-content;
    }
    
    .tab-item {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Print Queue Mobile */
    .print-queue-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .print-queue-item-info {
        width: 100%;
    }
    
    .print-queue-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Participant List Mobile */
    .participant-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    /* Help Articles Mobile */
    .help-article-card {
        padding: 1rem;
    }
    
    .help-category-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    /* Utility Classes Mobile */
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    /* Spacing Mobile */
    .mb-mobile-0 {
        margin-bottom: 0;
    }
    
    .mt-mobile-0 {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    /* Kleine Mobile Geräte */
    
    .topbar {
        padding: 0.625rem 0.75rem;
        min-height: 56px;
    }
    
    .topbar-title {
        font-size: 1.125rem;
    }
    
    .topbar-search {
        max-width: 150px;
    }
    
    .page-content {
        padding: 0.75rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: var(--radius-md);
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
    }
}

/* ==================== DARK MODE ==================== */

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.05);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle i {
    transition: transform var(--transition-base), opacity var(--transition-base);
    position: absolute;
}

.dark-mode-toggle .fa-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.8);
}

.dark-mode-toggle .fa-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .dark-mode-toggle .fa-sun,
.dark-mode .dark-mode-toggle .fa-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .dark-mode-toggle .fa-moon,
.dark-mode .dark-mode-toggle .fa-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.8);
}

/* Dark Mode - Cards */
[data-theme="dark"] .card,
.dark-mode .card {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .card-header,
.dark-mode .card-header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Dark Mode - Buttons */
[data-theme="dark"] .btn-secondary,
.dark-mode .btn-secondary {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover,
.dark-mode .btn-secondary:hover {
    background: var(--gray-300);
    border-color: var(--gray-300);
}

/* Dark Mode - Inputs */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
.dark-mode .form-control,
.dark-mode .form-select {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
    background: var(--bg-primary);
    border-color: var(--primary-500);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control::placeholder,
.dark-mode .form-control::placeholder {
    color: var(--text-tertiary);
}

/* Dark Mode - Tables */
[data-theme="dark"] .data-table,
.dark-mode .data-table {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .data-table th,
.dark-mode .data-table th {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .data-table td,
.dark-mode .data-table td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .data-table tr:hover,
.dark-mode .data-table tr:hover {
    background: var(--bg-tertiary);
}

/* Dark Mode - Modals */
[data-theme="dark"] .modal,
.dark-mode .modal {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-header,
.dark-mode .modal-header {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

[data-theme="dark"] .modal-body,
.dark-mode .modal-body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-footer,
.dark-mode .modal-footer {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

/* Dark Mode - Dropdowns */
[data-theme="dark"] .topbar-dropdown,
.dark-mode .topbar-dropdown {
    background: var(--bg-primary);
    border-color: var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .notification-item,
.dark-mode .notification-item {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .notification-item:hover,
.dark-mode .notification-item:hover {
    background: var(--bg-tertiary);
}

/* Dark Mode - Sidebar Navigation */
[data-theme="dark"] .sidebar-nav-item,
.dark-mode .sidebar-nav-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar-nav-item:hover,
.dark-mode .sidebar-nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar-nav-item.active,
.dark-mode .sidebar-nav-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-400);
    border-left-color: var(--primary-500);
}

/* Dark Mode - Topbar */
[data-theme="dark"] .topbar,
.dark-mode .topbar {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .topbar-title,
.dark-mode .topbar-title {
    color: var(--text-primary);
}

[data-theme="dark"] .topbar-search input,
.dark-mode .topbar-search input {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .topbar-search input:focus,
.dark-mode .topbar-search input:focus {
    background: var(--bg-primary);
    border-color: var(--primary-500);
}

/* Dark Mode - Main Content */
[data-theme="dark"] .main-content,
.dark-mode .main-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .page-content,
.dark-mode .page-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Dark Mode - Dashboard Cards */
[data-theme="dark"] .dashboard-stat-card,
[data-theme="dark"] .dashboard-feature-card,
[data-theme="dark"] .quick-action-card,
.dark-mode .dashboard-stat-card,
.dark-mode .dashboard-feature-card,
.dark-mode .quick-action-card {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .dashboard-stat-card:hover,
[data-theme="dark"] .dashboard-feature-card:hover,
[data-theme="dark"] .quick-action-card:hover,
.dark-mode .dashboard-stat-card:hover,
.dark-mode .dashboard-feature-card:hover,
.dark-mode .quick-action-card:hover {
    border-color: var(--gray-400);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .dashboard-stat-value,
[data-theme="dark"] .dashboard-stat-label,
.dark-mode .dashboard-stat-value,
.dark-mode .dashboard-stat-label {
    color: var(--text-primary);
}

/* Dark Mode - Recent Sections */
[data-theme="dark"] .recent-section,
.dark-mode .recent-section {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .recent-section-header,
.dark-mode .recent-section-header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Dark Mode - Empty States */
[data-theme="dark"] .empty-state-modern,
.dark-mode .empty-state-modern {
    color: var(--text-secondary);
}

/* Dark Mode - Page Headers */
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .events-page-header,
[data-theme="dark"] .templates-page-header,
.dark-mode .dashboard-header,
.dark-mode .events-page-header,
.dark-mode .templates-page-header {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
}

/* Smooth Transitions */
* {
    transition: background-color var(--transition-base), 
                color var(--transition-base), 
                border-color var(--transition-base);
}

/* Exclude certain elements from transitions for performance */
img, svg, video, iframe {
    transition: none;
}

/* ==================== PRINT QUEUE ==================== */

.print-queue-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.print-queue-item-check {
    width: 1.25rem;
    height: 1.25rem;
}

.print-queue-item-info {
    flex: 1;
}

.print-queue-item-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.print-queue-item-meta {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.print-queue-item-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ==================== TABS ==================== */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    background: var(--gray-50);
}

.tab {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    background: transparent;
}

.tab:hover {
    color: var(--primary-600);
    background: var(--gray-100);
}

.tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
    background: var(--bg-primary);
}

.tab i {
    font-size: 0.875rem;
}

.tab-content {
    display: none;
}

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

/* ==================== EMPTY STATES ==================== */

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.empty-state-text {
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
}

/* Drag & Drop für Datenfelder */
.sortable-list {
    position: relative;
}

.sortable-item {
    transition: all 0.2s ease;
    position: relative;
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.sortable-item.drag-over {
    border-top: 3px solid var(--primary) !important;
    margin-top: -3px;
}

.drag-handle {
    cursor: move;
    cursor: grab;
    user-select: none;
    padding: 0.5rem;
    margin: -0.5rem;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: var(--primary) !important;
}

.drag-handle:active {
    cursor: grabbing;
}

.data-field-item {
    position: relative;
}

.data-field-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-field-item .card-body {
    padding: 1.5rem;
}

/* ==================== TOAST NOTIFICATIONS ==================== */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gray-400);
}

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

.toast-hide {
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
}

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

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

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

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

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

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

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

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

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

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

.toast-message {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    font-weight: 500;
}

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

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

.toast-close i {
    font-size: 0.75rem;
}

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

/* ==================== TOAST NOTIFICATIONS ==================== */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gray-400);
}

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

.toast-hide {
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
}

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

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

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

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

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

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

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

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

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

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

.toast-message {
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.5;
    font-weight: 500;
}

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

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

.toast-close i {
    font-size: 0.75rem;
}

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