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

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --danger: #DC2626;
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --border: #334155;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a2332 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

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

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

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

.alert-info {
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Wizard Container */
.wizard-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.step-item.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.step-item.active .step-label {
    color: var(--primary-light);
    font-weight: 600;
}

/* Form */
.wizard-form {
    max-width: 900px;
    margin: 0 auto;
}

.form-step {
    animation: fadeIn 0.3s ease;
}

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

.form-step h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

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

.form-group input,
.form-group select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

/* Collapsible Sections */
.collapsible-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.collapsible-section summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    user-select: none;
    transition: background 0.2s;
}

.collapsible-section summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.collapsible-section[open] summary {
    border-bottom: 1px solid var(--border);
    background: rgba(79, 70, 229, 0.1);
}

.collapsible-section .form-grid {
    padding: 1.5rem;
}

/* Preset Selector */
.preset-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.preset-option {
    cursor: pointer;
}

.preset-option input[type="radio"] {
    display: none;
}

.preset-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-option input:checked + .preset-card {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.preset-card strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.preset-card span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Review Section */
.review-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-section h3 {
    margin-bottom: 1rem;
}

.review-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem 1.5rem;
}

.review-grid dt {
    font-weight: 500;
    color: var(--text-secondary);
}

.review-grid dd {
    color: var(--text-primary);
}

.json-preview {
    background: #1a1a2e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.json-preview h3 {
    margin-bottom: 0.75rem;
}

.json-preview pre {
    background: #0f0f20;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.json-preview code {
    font-family: 'Courier New', monospace;
    color: #a5d6ff;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -1px rgba(79, 70, 229, 0.5);
}

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

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

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

.btn-success:not(:disabled):hover {
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #B91C1C;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Manage Container */
.manage-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Tenant Grid */
.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.tenant-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tenant-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

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

.tenant-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge-lg {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

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

.status-provisioning,
.status-initializing {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-provisioning .status-dot,
.status-initializing .status-dot,
.status-updating .status-dot,
.status-migrating .status-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.status-updating,
.status-migrating {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

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

.status-unknown,
.status-pending {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Card status left border */
.tenant-card.card-ready {
    border-left: 4px solid var(--success);
}

.tenant-card.card-provisioning,
.tenant-card.card-initializing {
    border-left: 4px solid var(--warning);
}

.tenant-card.card-updating,
.tenant-card.card-migrating {
    border-left: 4px solid #818CF8;
}

.tenant-card.card-failed,
.tenant-card.card-error {
    border-left: 4px solid var(--error);
    background: rgba(239, 68, 68, 0.04);
}

.tenant-card.card-pending,
.tenant-card.card-unknown {
    border-left: 4px solid var(--text-muted);
}

/* Tenant card info section */
.tenant-info {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tenant-domain {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.domain-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.domain-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.tenant-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* TLS indicator */
.tls-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
}

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

.tls-off {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
}

/* Status Summary Bar */
.status-summary {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
}

.summary-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-ready { background: var(--success); }
.dot-progress { background: var(--warning); animation: pulse-dot 1.5s ease-in-out infinite; }
.dot-pending { background: var(--text-muted); }
.dot-failed { background: var(--error); }

.summary-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-total {
    border-color: var(--border);
}

.summary-failed {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Detail Modal Status Hero */
.detail-status-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hero-namespace {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.hero-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    min-width: 120px;
}

.progress-bar-wrap {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-bar.progress-complete {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-bar.progress-failed {
    background: linear-gradient(90deg, var(--error), #f87171);
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hero-ready { border-color: rgba(16, 185, 129, 0.3); }
.hero-failed, .hero-error { border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }
.hero-provisioning, .hero-initializing { border-color: rgba(245, 158, 11, 0.3); }
.hero-updating, .hero-migrating { border-color: rgba(99, 102, 241, 0.3); }

.tenant-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

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

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

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.modal-body pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.875rem;
}

/* Detail modal */
.modal-detail {
    max-width: 720px;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
}

.detail-grid dt {
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-grid dd {
    margin: 0;
    color: var(--text-primary);
}

.detail-section a {
    color: var(--primary-light);
    text-decoration: none;
}

.detail-section a:hover {
    text-decoration: underline;
}

.detail-pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.75rem;
    max-height: 200px;
}

/* Detail modal header with tabs */
.detail-modal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.detail-modal-header h2 {
    margin-right: auto;
}

.detail-tabs-header {
    display: flex;
    gap: 0.25rem;
}

.detail-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.detail-tab:hover {
    background: var(--border);
    color: var(--text-primary);
}

.detail-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.detail-tab-content {
    margin-top: 0;
}

.logs-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pod-select {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
}

.logs-container {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow: auto;
}

.logs-output {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.loading-overlay {
    color: var(--text-muted);
    padding: 1rem;
}

.events-header {
    margin-bottom: 0.75rem;
}

.events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.events-table th,
.events-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.events-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.text-center.text-muted {
    text-align: center;
    color: var(--text-muted);
}

/* Search Input */
.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Edit Modal */
.modal-edit {
    max-width: 720px;
}

.edit-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.edit-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
    white-space: nowrap;
}

.edit-tab:hover {
    color: var(--text-primary);
}

.edit-tab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.edit-tab-content {
    animation: fadeIn 0.2s ease;
}

.edit-tab-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.edit-tab-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* HPA Section */
.hpa-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.hpa-header {
    margin-bottom: 0.5rem;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.hpa-fields {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Resource Edit Section */
.resource-edit-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.resource-edit-section h4 {
    margin-bottom: 0.75rem;
}

/* Resource Table (Detail Modal) */
.resource-table-wrap {
    overflow-x: auto;
}

.resource-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.resource-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.resource-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hpa-on {
    color: var(--success);
    font-weight: 500;
}

.hpa-off {
    color: var(--text-muted);
}

/* Host Tags */
.host-section {
    padding: 1.5rem;
}

.host-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.host-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    flex: 1;
}

.host-input:focus {
    outline: none;
    border-color: var(--primary);
}

.host-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.host-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--primary-light);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.host-tag-static {
    background: rgba(79, 70, 229, 0.1);
    border-color: transparent;
}

.host-tag-remove {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    padding: 0;
    display: flex;
    align-items: center;
}

.host-tag-remove:hover {
    opacity: 1;
    color: var(--error);
}

/* Text muted helper */
.text-muted {
    color: var(--text-muted);
}

/* Warning button */
.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    filter: brightness(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    #app {
        padding: 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .step-indicator {
        flex-wrap: wrap;
    }
    
    .step-indicator::before {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .tenant-grid {
        grid-template-columns: 1fr;
    }
    
    .wizard-nav {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .filters {
        flex-wrap: wrap;
    }

    .edit-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .modal-edit {
        max-width: 95%;
    }
}
