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

        :root {
            --primary: #2563eb;
            --primary-dark: #1d4ed8;
            --primary-light: #3b82f6;
            --secondary: #64748b;
            --success: #10b981;
            --success-dark: #059669;
            --danger: #ef4444;
            --danger-dark: #dc2626;
            --warning: #f59e0b;
            --info: #06b6d4;
            --gray-50: #f8fafc;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e1;
            --gray-400: #94a3b8;
            --gray-500: #64748b;
            --gray-600: #475569;
            --gray-700: #334155;
            --gray-800: #1e293b;
            --gray-900: #0f172a;
            --border: #e2e8f0;
            --bg: #ffffff;
            --bg-secondary: #f8fafc;
            --header-bg: #0f172a;
            --header-text: #ffffff;
            --tabs-bg-start: #ffffff;
            --tabs-bg-end: #f8fafc;
            --surface: #ffffff;
            --input-bg: #ffffff;
            --modal-overlay: rgba(0,0,0,0.6);
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
            --warning-bg: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
            --warning-color: #991b1b;
            --warning-border: #f59e0b;
            --warning-border-strong: #dc2626;
            --warning-shadow: 0 4px 12px rgba(217, 119, 6, 0.18);
        }

        [data-theme="dark"] {
            --primary: #60a5fa;
            --primary-dark: #3b82f6;
            --primary-light: #93c5fd;
            --secondary: #94a3b8;
            --success: #34d399;
            --success-dark: #10b981;
            --danger: #f87171;
            --danger-dark: #ef4444;
            --warning: #fbbf24;
            --info: #22d3ee;
            --gray-50: #0b1220;
            --gray-100: #111827;
            --gray-200: #1f2937;
            --gray-300: #334155;
            --gray-400: #64748b;
            --gray-500: #94a3b8;
            --gray-600: #cbd5e1;
            --gray-700: #e2e8f0;
            --gray-800: #f1f5f9;
            --gray-900: #f8fafc;
            --border: #334155;
            --bg: #0f172a;
            --bg-secondary: #111827;
            --header-bg: #020617;
            --header-text: #f8fafc;
            --tabs-bg-start: #111827;
            --tabs-bg-end: #0b1220;
            --surface: #111827;
            --input-bg: #0b1220;
            --modal-overlay: rgba(2, 6, 23, 0.82);
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.45);
            --shadow-md: 0 8px 22px rgba(0,0,0,0.35);
            --warning-bg: linear-gradient(90deg, #3f2d09 0%, #7c2d12 100%);
            --warning-color: #fef3c7;
            --warning-border: #f59e0b;
            --warning-border-strong: #ef4444;
            --warning-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
        }

        [data-theme="tux"] {
            --primary: #0f0f0f;
            --primary-dark: #000000;
            --primary-light: #2f2f2f;
            --secondary: #6b6b6b;
            --success: #2c2c2c;
            --success-dark: #141414;
            --danger: #1f1f1f;
            --danger-dark: #000000;
            --warning: #525252;
            --info: #3a3a3a;
            --gray-50: #fafafa;
            --gray-100: #f2f2f2;
            --gray-200: #e5e5e5;
            --gray-300: #cccccc;
            --gray-400: #a3a3a3;
            --gray-500: #737373;
            --gray-600: #525252;
            --gray-700: #404040;
            --gray-800: #1f1f1f;
            --gray-900: #0a0a0a;
            --border: #d4d4d4;
            --bg: #ffffff;
            --bg-secondary: #f5f5f5;
            --header-bg: #111111;
            --header-text: #f5f5f5;
            --tabs-bg-start: #f9f9f9;
            --tabs-bg-end: #eeeeee;
            --surface: #ffffff;
            --input-bg: #ffffff;
            --modal-overlay: rgba(0,0,0,0.58);
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.18);
            --shadow-md: 0 6px 16px rgba(0,0,0,0.15);
            --warning-bg: linear-gradient(90deg, #e5e5e5 0%, #d4d4d4 100%);
            --warning-color: #111111;
            --warning-border: #525252;
            --warning-border-strong: #111111;
            --warning-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        [data-theme="tux"] .brand-logo,
        [data-theme="tux"] .settings-icon span,
        [data-theme="tux"] .tab span {
            filter: grayscale(1) saturate(0) contrast(1.05);
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--bg-secondary);
            color: var(--gray-800);
            min-height: 100vh;
            line-height: 1.6;
            font-size: 14px;
            overflow-x: hidden;
        }

        .app-shell {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            padding: 12px 14px 0;
        }

        .sidebar-nav {
            width: 260px;
            flex: 0 0 260px;
            position: sticky;
            top: 12px;
            max-height: calc(100vh - 24px);
        }

        .sidebar-toggle-row {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 8px;
        }

        .sidebar-compact-toggle {
            width: 36px;
            height: 36px;
            border-radius: 12px;
            border: 1px solid color-mix(in srgb, var(--gray-300) 75%, var(--primary) 25%);
            background: linear-gradient(180deg, color-mix(in srgb, var(--tabs-bg-start) 90%, var(--primary) 10%) 0%, var(--tabs-bg-end) 100%);
            color: var(--gray-800);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
            transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease, color 0.2s ease;
        }

        .sidebar-compact-toggle:hover {
            background: color-mix(in srgb, var(--primary-light) 16%, var(--surface) 84%);
            border-color: color-mix(in srgb, var(--primary) 30%, var(--border) 70%);
            color: var(--gray-900);
            transform: translateX(1px);
            box-shadow: 0 10px 22px -14px rgba(37, 99, 235, 0.45);
        }

        .sidebar-compact-toggle:active {
            transform: translateX(0);
        }

        .sidebar-nav.compact .sidebar-compact-toggle:active {
            transform: translateX(0);
        }

        .sidebar-nav.compact {
            width: 64px;
            flex: 0 0 64px;
        }

        .sidebar-nav.compact .tabs {
            padding: 8px 6px;
            gap: 6px;
        }

        .sidebar-nav.compact .tab {
            justify-content: center;
            padding: 9px 8px;
            font-size: 0;
            gap: 0;
        }

        .sidebar-nav.compact .tab span {
            width: auto;
            font-size: 16px;
            margin: 0;
        }

        .sidebar-nav.compact .tab.active {
            transform: none;
        }

        .app-shell.sidebar-compact-mode {
            gap: 8px;
            padding-left: 10px;
            padding-right: 10px;
        }

        .app-shell.sidebar-compact-mode .content-area .container {
            max-width: none;
            width: 100%;
            padding-left: 12px;
            padding-right: 12px;
        }

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

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            min-width: 0;
        }

        header {
            background: var(--header-bg);
            color: var(--header-text);
            padding: 24px 0;
            margin-bottom: 0;
            border-bottom: 3px solid var(--primary);
            box-shadow: var(--shadow-sm);
        }

        header h1 {
            font-size: 1.75rem;
            font-weight: 600;
            letter-spacing: -0.025em;
            margin: 0;
        }

        header .subtitle {
            font-size: 0.875rem;
            color: var(--gray-400);
            margin-top: 4px;
        }

        .brand-block {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .header-top-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
        }

        .header-right-area {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .auth-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .brand-logo {
            width: 56px;
            height: 56px;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
            background: rgba(255, 255, 255, 0.08);
            padding: 4px;
            flex-shrink: 0;
        }

        .header-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 14px 18px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }

        .stat-item {
            display: flex;
            flex-direction: column;
            min-width: 88px;
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--header-text);
        }

        .stat-label {
            font-size: 0.75rem;
            color: var(--gray-400);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .settings-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            text-decoration: none;
            font-size: 20px;
            transition: all 0.2s ease;
        }

        .settings-icon:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: rotate(90deg);
        }

        .user-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            color: #ffffff;
            background: linear-gradient(120deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92));
            background-size: 200% 200%;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            padding: 0 14px;
            min-width: 110px;
            height: 40px;
            max-width: 260px;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
            animation: userLinkGradient 3.5s ease infinite, userLinkPulse 2.6s ease-in-out infinite;
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
        }

        .user-link:hover {
            color: #ffffff;
            transform: translateY(-1px);
            filter: brightness(1.08);
            box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.9);
        }

        #auth-user,
        #auth-user:link,
        #auth-user:visited,
        #auth-user:hover,
        #auth-user:active {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            color: #ffffff !important;
            text-decoration: none !important;
            background: linear-gradient(120deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.92)) !important;
            background-size: 200% 200% !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            border-radius: 10px !important;
            padding: 0 14px !important;
            min-width: 110px !important;
            height: 40px !important;
            max-width: 260px !important;
            font-size: 13px !important;
            font-weight: 700 !important;
            letter-spacing: 0.02em !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45) !important;
            animation: userLinkGradient 3.5s ease infinite, userLinkPulse 2.6s ease-in-out infinite !important;
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
        }

        #auth-user:hover {
            transform: translateY(-1px) !important;
            filter: brightness(1.08) !important;
            box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.9) !important;
        }

        @keyframes userLinkGradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        @keyframes userLinkPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
            50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12); }
        }

        @media (prefers-reduced-motion: reduce) {
            .user-link {
                animation: none;
            }
        }

        .tabs {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 0;
            padding: 14px;
            background: linear-gradient(180deg, color-mix(in srgb, var(--tabs-bg-start) 88%, var(--primary) 12%) 0%, var(--tabs-bg-end) 100%);
            border: 1px solid color-mix(in srgb, var(--gray-300) 75%, var(--primary) 25%);
            border-radius: 16px;
            box-shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
            overflow-y: auto;
            max-height: calc(100vh - 30px);
            scrollbar-width: thin;
        }

        .tab {
            padding: 11px 13px;
            cursor: pointer;
            background: color-mix(in srgb, var(--surface) 88%, transparent);
            border: 1px solid color-mix(in srgb, var(--gray-200) 80%, transparent);
            font-size: 13px;
            color: var(--gray-700);
            transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.22s ease;
            font-weight: 600;
            position: relative;
            display: flex;
            align-items: center;
            gap: 8px;
            border-radius: 12px;
            white-space: nowrap;
            width: 100%;
            justify-content: flex-start;
            overflow: hidden;
        }

        .tab:hover {
            color: var(--gray-900);
            background: linear-gradient(90deg, color-mix(in srgb, var(--primary-light) 16%, var(--surface) 84%) 0%, var(--surface) 100%);
            border-color: color-mix(in srgb, var(--primary) 25%, var(--gray-300) 75%);
            transform: translateX(2px);
            box-shadow: 0 8px 20px -14px rgba(37, 99, 235, 0.45);
        }

        .tab.active {
            color: #ffffff;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border-color: var(--primary-dark);
            box-shadow: 0 12px 22px -10px rgba(37, 99, 235, 0.6);
            transform: translateX(4px);
        }

        .tab span {
            font-size: 15px;
            line-height: 1;
            display: inline-flex;
            width: 22px;
            justify-content: center;
            filter: drop-shadow(0 1px 0 rgba(0,0,0,0.08));
        }

        .tab::before {
            content: "";
            position: absolute;
            left: 0;
            top: 8px;
            bottom: 8px;
            width: 3px;
            border-radius: 10px;
            background: transparent;
            transition: background 0.2s ease, box-shadow 0.2s ease;
        }

        .tab.active::before {
            background: #ffffff;
            box-shadow: 0 0 10px rgba(255,255,255,0.75);
        }

        .tab::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.14) 45%, transparent 100%);
            transform: translateX(-140%);
            transition: transform 0.5s ease;
            pointer-events: none;
        }

        .tab:hover::after {
            transform: translateX(140%);
        }

        .tabs .tab:nth-child(1) { animation: menuItemIn 0.26s ease both; }
        .tabs .tab:nth-child(2) { animation: menuItemIn 0.3s ease both; }
        .tabs .tab:nth-child(3) { animation: menuItemIn 0.34s ease both; }
        .tabs .tab:nth-child(4) { animation: menuItemIn 0.38s ease both; }
        .tabs .tab:nth-child(5) { animation: menuItemIn 0.42s ease both; }
        .tabs .tab:nth-child(6) { animation: menuItemIn 0.46s ease both; }
        .tabs .tab:nth-child(7) { animation: menuItemIn 0.5s ease both; }
        .tabs .tab:nth-child(8) { animation: menuItemIn 0.54s ease both; }
        .tabs .tab:nth-child(9) { animation: menuItemIn 0.58s ease both; }
        .tabs .tab:nth-child(10) { animation: menuItemIn 0.62s ease both; }

        @keyframes menuItemIn {
            from {
                opacity: 0;
                transform: translateX(-8px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @media (max-width: 900px) {
            .app-shell {
                display: flex;
                align-items: flex-start;
                gap: 10px;
                padding: 10px 10px 0;
            }

            .sidebar-nav {
                width: 220px;
                flex: 0 0 220px;
                position: sticky;
                top: 10px;
                max-height: calc(100vh - 20px);
                margin-bottom: 0;
            }

            .sidebar-nav.compact {
                width: 58px;
                flex: 0 0 58px;
            }

            .tabs {
                padding: 8px;
                border-radius: 12px;
                flex-direction: column;
                overflow-y: auto;
                overflow-x: hidden;
                max-height: calc(100vh - 20px);
            }
            .tab {
                padding: 9px 12px;
                font-size: 12px;
                gap: 6px;
                width: 100%;
            }
        }

        @media (max-width: 1024px) {
            .container {
                padding: 16px;
            }

            .header-top-row {
                flex-direction: column;
                align-items: flex-start;
            }

            .header-right-area {
                width: 100%;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 12px;
            }

            .header-stats {
                margin-top: 0;
                padding-top: 0;
                border-top: none;
            }
        }

        @media (max-width: 768px) {
            body {
                font-size: 13px;
            }

            header {
                padding: 16px 0;
            }

            header h1 {
                font-size: 1.35rem;
                line-height: 1.25;
            }

            .brand-logo {
                width: 44px;
                height: 44px;
                border-radius: 6px;
                padding: 3px;
            }

            .header-right-area {
                flex-direction: column;
                align-items: stretch;
            }

            .header-stats {
                gap: 14px;
                justify-content: space-between;
            }

            .stat-value {
                font-size: 1.2rem;
            }

            .auth-controls {
                width: 100%;
                justify-content: flex-end;
            }

            .container {
                padding: 12px;
            }

            .card {
                padding: 14px;
                margin-bottom: 14px;
                border-radius: 10px;
            }

            .card h2 {
                font-size: 1.05rem;
                margin-bottom: 14px;
            }

            .toolbar {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
                margin-bottom: 16px;
            }

            .toolbar > div {
                width: 100%;
            }

            .toolbar h2,
            .toolbar h3 {
                width: 100%;
                margin-bottom: 0;
            }

            .toolbar [style*="display: flex"] {
                width: 100% !important;
                flex-wrap: wrap !important;
                justify-content: stretch !important;
                gap: 8px !important;
            }

            .toolbar [style*="display: flex"] > .btn,
            .toolbar [style*="display: flex"] > button,
            .toolbar [style*="display: flex"] > a {
                flex: 1 1 100%;
            }

            .btn {
                min-height: 40px;
                justify-content: center;
            }

            .form-row,
            .run-form {
                grid-template-columns: 1fr;
                gap: 12px;
            }

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

            .list-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                padding: 12px;
            }

            .list-item-actions {
                width: 100%;
                flex-wrap: wrap;
                gap: 8px;
            }

            .list-item-actions .btn {
                flex: 1 1 48%;
            }

            .list-item-meta {
                gap: 8px;
                flex-direction: column;
            }

            .modal-content {
                width: calc(100% - 16px);
                max-height: calc(100vh - 16px);
                padding: 18px 14px;
                border-radius: 12px;
                overflow-x: hidden;
            }

            .modal-content [style*="display:flex"],
            .modal-content [style*="display: flex"] {
                flex-wrap: wrap !important;
            }

            .modal-content [style*="justify-content:flex-end"] > .btn,
            .modal-content [style*="justify-content: flex-end"] > .btn,
            .modal-content [style*="justify-content:flex-end"] > button,
            .modal-content [style*="justify-content: flex-end"] > button,
            .modal-content [style*="justify-content:flex-end"] > a,
            .modal-content [style*="justify-content: flex-end"] > a {
                flex: 1 1 100%;
            }

            .modal-content input,
            .modal-content select,
            .modal-content textarea {
                max-width: 100% !important;
            }

            .modal-header {
                margin-bottom: 16px;
                padding-bottom: 12px;
            }

            .modal-header h3 {
                font-size: 1.1em;
            }

            .data-table {
                font-size: 12px;
            }

            .data-table th,
            .data-table td {
                padding: 10px 8px;
                white-space: nowrap;
            }

            .stats-layout,
            .stats-main-grid,
            .admin-stat-grid,
            .provider-grid,
            .feature-grid {
                grid-template-columns: 1fr !important;
            }
        }

        @media (max-width: 520px) {
            .tabs {
                padding: 6px;
                gap: 6px;
            }

            .tab {
                padding: 8px 10px;
                font-size: 11px;
            }

            .tab span {
                font-size: 13px;
            }

            .user-link,
            #auth-user {
                min-width: 90px !important;
                height: 34px !important;
                font-size: 12px !important;
                padding: 0 10px !important;
            }

            .settings-icon {
                width: 34px;
                height: 34px;
                font-size: 18px;
            }

            .list-item-actions .btn {
                flex: 1 1 100%;
            }

            .header-stats {
                width: 100%;
                gap: 10px;
            }

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

            .brand-block {
                align-items: flex-start;
            }

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

        .tab-content {
            display: none;
            animation: fadeIn 0.3s ease-in;
        }

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

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

        .toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .card {
            background: var(--surface);
            border-radius: 8px;
            padding: 24px;
            margin-bottom: 24px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            transition: box-shadow 0.2s ease;
            min-width: 0;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
        }

        .card h2 {
            margin-bottom: 20px;
            color: var(--gray-900);
            font-size: 1.25rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            letter-spacing: -0.025em;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }

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

        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid transparent;
        }

        .btn:hover {
            opacity: 0.9;
        }

        .btn:active {
            transform: scale(0.98);
        }

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

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

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

        .btn-success:hover {
            background: var(--success-dark);
            border-color: var(--success-dark);
        }

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

        .btn-danger:hover {
            background: var(--danger-dark);
            border-color: var(--danger-dark);
        }

        .btn-secondary {
            background: var(--surface);
            color: var(--gray-700);
            border-color: var(--border);
        }

        .btn-secondary:hover {
            background: var(--gray-50);
            border-color: var(--gray-300);
        }

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

        .btn-info:hover {
            background: #0891b2;
            border-color: #0891b2;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            background: var(--surface);
        }

        .data-table thead {
            background: var(--gray-50);
            border-bottom: 2px solid var(--border);
        }

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

        .data-table td {
            padding: 16px;
            border-bottom: 1px solid var(--border);
            color: var(--gray-700);
            font-size: 0.875rem;
        }

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

        .data-table tbody tr:hover {
            background: var(--gray-50);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }

        .list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            border-bottom: 1px solid var(--border);
            transition: background-color 0.15s ease;
        }

        .list-item:hover {
            background: var(--gray-50);
        }

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

        .list-item-info {
            flex: 1;
        }

        .list-item-name {
            font-weight: 600;
            color: var(--gray-900);
            margin-bottom: 6px;
            font-size: 0.875rem;
        }

        .list-item-meta {
            font-size: 0.75rem;
            color: var(--gray-500);
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .list-item-actions {
            display: flex;
            gap: 10px;
        }

        .btn-sm {
            padding: 6px 12px;
            font-size: 0.8125rem;
            border-radius: 6px;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-left: 8px;
        }

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

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

        .status-running {
            background: var(--info);
            color: white;
            animation: pulse 2s infinite;
        }

        .status-pending {
            background: var(--gray-400);
            color: white;
        }

        .status-cancelled {
            background: var(--gray-500);
            color: white;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--modal-overlay);
            backdrop-filter: blur(4px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
        }

        .modal.active {
            display: flex;
        }

        .modal-content {
            background: var(--surface);
            border-radius: 20px;
            padding: 40px;
            max-width: 900px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideUp 0.3s ease;
            position: relative;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--gray-200);
        }

        .modal-header h3 {
            color: var(--gray-800);
            font-size: 1.5em;
            font-weight: 700;
        }

        .close-btn {
            background: var(--gray-100);
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--gray-600);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .close-btn:hover {
            background: var(--danger);
            color: white;
            transform: rotate(90deg);
        }

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

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--gray-700);
            font-weight: 600;
            font-size: 14px;
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid var(--gray-200);
            border-radius: 10px;
            font-size: 14px;
            transition: all 0.2s;
            background: var(--input-bg);
            color: var(--gray-800);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group textarea {
            min-height: 300px;
            resize: vertical;
            font-family: 'Courier New', monospace;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-pending {
            background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
            color: #c53030;
        }

        .status-running {
            background: linear-gradient(135deg, #bee3f8 0%, #63b3ed 100%);
            color: #2c5282;
            animation: pulse-badge 2s infinite;
        }

        @keyframes pulse-badge {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .status-success {
            background: linear-gradient(135deg, #c6f6d5 0%, #68d391 100%);
            color: #22543d;
        }

        .status-failed {
            background: linear-gradient(135deg, #fed7d7 0%, #fc8181 100%);
            color: #c53030;
        }

        .log-container {
            background: var(--gray-900);
            color: #a0aec0;
            padding: 20px;
            border-radius: 12px;
            font-family: 'Courier New', 'Monaco', monospace;
            font-size: 13px;
            max-height: 600px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
            box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
            border: 1px solid var(--gray-700);
        }

        .log-container::-webkit-scrollbar {
            width: 8px;
        }

        .log-container::-webkit-scrollbar-track {
            background: var(--gray-800);
        }

        .log-container::-webkit-scrollbar-thumb {
            background: var(--gray-600);
            border-radius: 4px;
        }

        .log-container::-webkit-scrollbar-thumb:hover {
            background: var(--gray-500);
        }

        .run-form {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 25px;
        }

        .run-form-full {
            grid-column: 1 / -1;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: var(--gray-500);
        }

        .empty-state {
            text-align: center;
            padding: 60px 40px;
            color: var(--gray-500);
        }

        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.5;
        }

        .empty-state p {
            font-size: 16px;
            margin-top: 10px;
        }

        /* Улучшенные стили для чекбоксов и радиокнопок */
        input[type="checkbox"],
        input[type="radio"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: var(--primary);
        }

        /* Стили для скроллбара */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background: var(--gray-100);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--gray-400);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--gray-500);
        }

        /* Анимация для кнопок */
        @keyframes buttonPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .btn:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
        }

        /* Улучшенные карточки для задач */
        .task-module-item {
            background: var(--gray-50);
            border: 2px solid var(--gray-200);
            transition: all 0.2s;
        }

        .task-module-item:hover {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
        }

        /* Градиентные акценты */
        .gradient-text {
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* Улучшенные иконки в кнопках */
        .btn span {
            font-size: 16px;
        }

        /* Анимация загрузки */
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .loading::before {
            content: '⏳';
            display: inline-block;
            animation: spin 2s linear infinite;
            margin-right: 10px;
        }

        /* Улучшенные поля ввода */
        .form-control {
            font-family: inherit;
        }

        textarea.form-control {
            font-family: 'Courier New', 'Monaco', monospace;
        }

        /* Подсказки */
        small {
            display: block;
            margin-top: 5px;
            color: var(--gray-500);
            font-size: 12px;
        }

        /* Улучшенные карточки групп */
        .task-module-item,
        .group-item {
            background: linear-gradient(135deg, #ffffff 0%, var(--gray-50) 100%);
        }

        [data-theme="dark"] .task-module-item,
        [data-theme="dark"] .group-item {
            background: linear-gradient(135deg, var(--surface) 0%, var(--bg-secondary) 100%);
        }

        /* Тени для глубины */
        .card h2 {
            text-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        /* Плавные переходы для всех интерактивных элементов */
        button, input, select, textarea {
            transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }
