:root {
    /* Light Mode (Default) */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;
    --dark: #1e293b;
    --dark-hover: #0f172a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --text: #334155;
    --text-light: #94a3b8;
    --text-lighter: #cbd5e1;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --provider-hetzner: #d90429;
    --provider-contabo: #0077b6;
    --provider-proxmox: #ff9e00;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode */
        --primary: #818cf8;
        --primary-hover: #6366f1;
        --primary-light: #312e81;
        --success: #4ade80;
        --success-hover: #34d399;
        --success-light: #064e3b;
        --warning: #fbbf24;
        --warning-light: #713f12;
        --danger: #f87171;
        --danger-hover: #ef4444;
        --danger-light: #7f1d1d;
        --dark: #f1f5f9;
        --dark-hover: #e2e8f0;
        --gray: #94a3b8;
        --gray-light: #1e293b;
        --gray-lighter: #0f172a;
        --text: #f1f5f9;
        --text-light: #cbd5e1;
        --text-lighter: #64748b;
        --bg: #0f172a;
        --white: #1e293b;
        --border: #334155;
        --provider-hetzner: #fa7b75;
        --provider-contabo: #38bdf8;
        --provider-proxmox: #fcd34d;
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
        --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    }
}

/* Custom theme selection */
body.light-theme {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fee2e2;
    --dark: #1e293b;
    --dark-hover: #0f172a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --text: #334155;
    --text-light: #64748b;
    --text-lighter: #cbd5e1;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --provider-hetzner: #d90429;
    --provider-contabo: #0077b6;
    --provider-proxmox: #ff9e00;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body.dark-theme {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #312e81;
    --success: #4ade80;
    --success-hover: #34d399;
    --success-light: #064e3b;
    --warning: #fbbf24;
    --warning-light: #713f12;
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-light: #7f1d1d;
    --dark: #f1f5f9;
    --dark-hover: #e2e8f0;
    --gray: #94a3b8;
    --gray-light: #1e293b;
    --gray-lighter: #0f172a;
    --text: #f1f5f9;
    --text-light: #cbd5e1;
    --text-lighter: #64748b;
    --bg: #0f172a;
    --white: #1e293b;
    --border: #334155;
    --provider-hetzner: #fa7b75;
    --provider-contabo: #38bdf8;
    --provider-proxmox: #fcd34d;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    height: 56px;
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    justify-content: space-between;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    margin-left: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    height: 100%;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notifications {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notifications i {
    font-size: 1rem;
    color: var(--text);
}

.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
}

.user-profile:hover {
    background-color: var(--bg);
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.user-profile span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

/* Main Workspace */
.workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.resource-toggle {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.toggle-btn {
    flex: 0 0 auto;
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    font-size: 0.75rem;
    display: flex;
    gap: 0.25rem;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 1.75rem;
}

.toggle-btn i {
    font-size: 0.875rem;
}

.toggle-btn .badge {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5rem;
    font-size: 0.7rem;
    background-color: var(--gray-light);
    color: var(--text-light);
}

.toggle-btn.active .badge {
    background-color: var(--primary);
    color: white;
}

.toggle-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.toggle-btn:hover:not(.active) {
    background-color: var(--bg);
}

.sidebar-search {
    padding: 1rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sidebar-search i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.875rem;
}

.resource-filter {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.filter-header span {
    font-size: 0.875rem;
}

.filter-header i {
    font-size: 0.75rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.filter-header.collapsed i {
    transform: rotate(-90deg);
}

.filter-body {
    padding: 0.25rem 0;
}

.checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
    color: var(--text);
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.15s ease;
}

.checkbox:hover .checkmark {
    border-color: var(--primary);
}

.checkbox input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label {
    flex: 1;
    font-size: 0.875rem;
}

.count {
    background-color: var(--gray-lighter);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background-color: var(--bg);
}

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

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.view-selector {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.view-btn.active {
    background-color: var(--bg);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    height: 36px;
    border-radius: var(--radius);
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

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

.action-btn i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

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

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

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

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

.action-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn.disabled:hover {
    background-color: var(--white);
    color: var(--text);
    border-color: var(--border);
}

.batch-actions {
    display: flex;
    align-items: center;
}

.selection-count {
    margin-right: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Content Body */
.content-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Quick Actions Section */
.quick-actions {
    margin-bottom: 1.5rem;
}

.quick-actions h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.card-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-content p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Resources Section */
.resources-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.resource-card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

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

.card-checkbox {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

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

.status-indicator.stopped {
    background-color: var(--gray);
}

.status-indicator.error {
    background-color: var(--danger);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-left: 1.5rem;
}

.provider {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.provider.hetzner .provider-dot {
    background-color: var(--provider-hetzner);
}

.provider.contabo .provider-dot {
    background-color: var(--provider-contabo);
}

.provider.proxmox .provider-dot {
    background-color: var(--provider-proxmox);
}

.location {
    font-size: 0.875rem;
    color: var(--text-light);
}

.card-details {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.detail-label {
    width: 70px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    gap: 0.5rem;
    padding-left: 1.5rem;
}

.tag {
    padding: 0.25rem 0.5rem;
    background-color: var(--gray-lighter);
    color: var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.icon-btn:hover {
    background-color: var(--gray-lighter);
}

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

.icon-btn.green:hover {
    background-color: var(--success-hover);
}

.icon-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.icon-btn.disabled:hover {
    background-color: var(--white);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 200px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 10;
    display: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--gray-lighter);
}

.dropdown-item i {
    width: 24px;
    margin-right: 0.5rem;
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background-color: var(--danger-light);
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-item.disabled:hover {
    background-color: transparent;
}

/* Recent Activity */
.recent-activity {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

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

.activity-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.view-all {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    margin-right: 1rem;
    color: var(--white);
}

.activity-icon.create {
    background-color: var(--success);
}

.activity-icon.restart {
    background-color: var(--warning);
}

.activity-icon.stop {
    background-color: var(--gray);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

.activity-meta .time {
    margin-right: 0.5rem;
}

/* Context Panel */
.context-panel {
    width: 0;
    background-color: var(--white);
    border-left: 1px solid var(--border);
    transition: width 0.3s ease;
    overflow: hidden;
}

.context-panel.open {
    width: 320px;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle-icon {
    margin-right: 0.5rem;
    color: var(--text);
    font-size: 0.875rem;
}

.theme-toggle-label {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin-left: 0;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-light);
    transition: .3s;
    border-radius: 20px;
}

.theme-toggle-slider:before {
    position: absolute;
    content: '';
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.theme-toggle input:checked + .theme-toggle-slider {
    background-color: var(--primary);
}

.theme-toggle input:checked + .theme-toggle-slider:before {
    transform: translateX(16px);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Mobile Responsive Adjustments */
@media (max-width: 1200px) {
    .workflows-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        height: 100vh;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .workflow-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .workflows-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 1rem;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .user-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .page-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .workflow-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .workflow-card-badges {
        margin-top: 0.5rem;
    }
    
    .setup-step-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
    }
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.sidebar-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--dark);
}

.sidebar-menu-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

body.dark-theme .sidebar-menu-item:hover {
    color: white;
}

body.dark-theme .sidebar-menu-item.active {
    background-color: var(--primary-light);
    color: white;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

body.dark-theme .badge-primary {
    background-color: rgba(99, 102, 241, 0.2);
    color: var(--primary);
}

body.dark-theme .badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

body.dark-theme .badge-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

body.dark-theme .badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

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

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

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background-color: var(--gray-light);
}

body.dark-theme .btn-outline {
    color: var(--text-light);
}

body.dark-theme .btn-outline:hover {
    background-color: var(--gray-light);
    color: white;
}

.input-group input, .input-group select {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--white);
    color: var(--text);
    font-size: 0.875rem;
    width: 100%;
}

body.dark-theme .input-group input,
body.dark-theme .input-group select {
    background-color: var(--gray-light);
    border-color: var(--border);
    color: var(--text);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.running {
    background-color: var(--success-light);
    color: var(--success);
}

.status-badge.stopped {
    background-color: var(--gray-light);
    color: var(--gray);
}

.status-badge.error {
    background-color: var(--danger-light);
    color: var(--danger);
}

.status-badge.warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

body.dark-theme .status-badge.running {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

body.dark-theme .status-badge.stopped {
    background-color: rgba(100, 116, 139, 0.2);
    color: var(--gray);
}

body.dark-theme .status-badge.error {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

body.dark-theme .status-badge.warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--white);
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: sticky;
    bottom: 0;
    background-color: var(--white);
    z-index: 10;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--white);
    color: var(--text);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.provider-select,
.location-select {
    position: relative;
}

.provider-select .provider-icon,
.location-select .location-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.provider-select select,
.location-select select {
    padding-right: 40px;
}

.location-icon {
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    margin-right: 0.75rem;
}

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

.btn-secondary:hover {
    background-color: var(--bg);
}

.modal-actions {
    display: flex;
    align-items: center;
}

/* OS Options Styling */
.os-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.os-option {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.os-option:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.os-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.os-option input[type="radio"]:checked + .os-icon {
    color: var(--primary);
}

.os-option input[type="radio"]:checked ~ .os-info .os-name {
    color: var(--primary);
}

.os-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-light);
}

.os-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.os-version {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Pricing Plan Styling */
.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 1.25rem;
}

.pricing-plan {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pricing-plan:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.pricing-plan.selected {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.pricing-plan input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.pricing-plan input[type="radio"]:checked ~ * {
    color: var(--primary);
}

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

.plan-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.plan-price {
    font-weight: 600;
    font-size: 0.875rem;
}

.plan-details {
    font-size: 0.75rem;
    color: var(--text-light);
}

.plan-details div {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.plan-details i {
    margin-right: 4px;
    width: 12px;
}

.pricing-summary {
    background-color: var(--bg);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 1.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 4px;
    color: var(--text-light);
}

.summary-total {
    font-weight: 600;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .os-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-plans {
        grid-template-columns: repeat(2, 1fr);
    }
}
