/* shopnet.network console - professional SaaS design */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #f1f5f9;
    --sidebar-active: #2563eb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border: #e2e8f0;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 220px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN ===== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-logo { margin-bottom: 1.5rem; }
.login-logo-emoji { font-size: 4rem; }
.login-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
.login-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; text-align: left; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.375rem; }
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.375rem; display: block; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-primary); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.75rem; font-size: 0.8125rem; }

/* ===== APP LAYOUT ===== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== TOP NAV ===== */
.top-nav {
    height: 48px;
    background: #0a0f1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-nav-left {
    display: flex;
    align-items: center;
}

.top-nav-logo {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}

.top-nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.25);
}

.top-nav-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
    color: var(--text-muted);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.sidebar-logo svg { color: var(--primary); }

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

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

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--sidebar-text-hover);
    background: rgba(255,255,255,0.04);
}

.nav-item.active {
    color: white;
    background: rgba(37, 99, 235, 0.15);
    border-left-color: var(--primary);
}

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details { flex: 1; min-width: 0; }
.user-name { font-size: 0.875rem; font-weight: 500; color: white; }
.user-email { font-size: 0.75rem; color: var(--sidebar-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: 48px;
    padding: 2rem;
    min-height: calc(100vh - 48px);
}

.panel { display: none; }
.panel.active { display: block; }

.panel-header {
    margin-bottom: 2rem;
}
.panel-header h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
.panel-header p { color: var(--text-muted); font-size: 0.9375rem; }

.panel-section { margin-top: 2rem; }
.panel-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon-blue { background: #dbeafe; color: #2563eb; }
.stat-icon-green { background: #d1fae5; color: #059669; }
.stat-icon-purple { background: #ede9fe; color: #7c3aed; }
.stat-icon-orange { background: #ffedd5; color: #ea580c; }

.stat-info { }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.8125rem; color: var(--text-muted); }

/* ===== QUICK ACCESS ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.quick-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}
.quick-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.quick-icon { font-size: 2rem; }
.quick-label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* ===== SITE CARDS ===== */
.site-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    display: block;
}
.site-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.site-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.site-card-disabled:hover {
    border-color: var(--border);
    box-shadow: none;
}

.site-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.site-icon { font-size: 1.75rem; }
.site-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.site-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1rem; }
.site-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ===== COMING SOON ===== */
.coming-soon-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px dashed #0ea5e9;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.coming-soon-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9, #0891b2);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.coming-soon-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* ===== CONTROL CARDS ===== */
.control-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    cursor: pointer;
}
.control-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.control-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.control-card-disabled:hover {
    border-color: var(--border);
    box-shadow: none;
}

.control-card-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.control-card-body { flex: 1; }
.control-card-body h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.control-card-body p { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.control-card-meta { display: flex; align-items: center; gap: 0.75rem; }
.meta-text { font-size: 0.75rem; color: var(--text-muted); }
.control-card-arrow { color: var(--text-muted); font-size: 1.25rem; }

/* ===== INFO CARD ===== */
.info-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.info-card-icon { font-size: 2rem; }
.info-card-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.info-card-content p { font-size: 0.875rem; color: var(--text-muted); }

/* ===== SETTINGS ===== */
.settings-section { margin-bottom: 2rem; }
.settings-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.settings-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.settings-table { width: 100%; }
.settings-table td { padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.settings-table tr:last-child td { border-bottom: none; }
.settings-label { font-weight: 500; color: var(--text-secondary); width: 120px; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-radius: 9999px;
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-default { background: var(--bg-tertiary); color: var(--text-muted); }

/* ===== ALERTS ===== */
.alert { padding: 0.875rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.875rem; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-success { background: var(--success-bg); color: #047857; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .stats-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .stats-grid, .quick-grid { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
}

/* ===== STATUS INDICATORS (Traffic Lights) ===== */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot-lg {
    width: 14px;
    height: 14px;
}
.status-dot.green { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
.status-dot.orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.status-dot.red { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.status-dot.grey { background: #9ca3af; }

/* Pulsing animation for active status */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.status-dot.green { animation: pulse 2s ease-in-out infinite; }

/* Nav status dots - positioned at right of nav item */
.nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}
.nav-status-dot.green { background: #22c55e; box-shadow: 0 0 4px rgba(34, 197, 94, 0.5); animation: pulse 2s ease-in-out infinite; }
.nav-status-dot.orange { background: #f59e0b; box-shadow: 0 0 4px rgba(245, 158, 11, 0.5); }
.nav-status-dot.red { background: #ef4444; box-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }
.nav-status-dot.grey { background: #6b7280; }

/* WIP Badge */
.wip-badge {
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* Card status dots */
.card-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5rem;
}
.card-status-dot.green { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); animation: pulse 2s ease-in-out infinite; }
.card-status-dot.orange { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.card-status-dot.red { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.card-status-dot.grey { background: #9ca3af; }

/* Ensure info-card has position for absolute positioned status dot */
.info-card {
    position: relative;
}

/* ===== NETWORK MAP ===== */
.network-map-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

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

.network-map-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.network-map-controls {
    display: flex;
    gap: 0.5rem;
}

.network-map-svg {
    width: 100%;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

/* Map nodes */
.map-node {
    cursor: pointer;
    transition: transform 0.15s;
}
.map-node:hover {
    transform: scale(1.02);
}
.map-node-box {
    fill: var(--bg-primary);
    stroke: var(--border);
    stroke-width: 1.5;
    rx: 8;
}
.map-node:hover .map-node-box {
    stroke: var(--primary);
    stroke-width: 2;
}
.map-node-label {
    font-size: 11px;
    font-weight: 600;
    fill: var(--text-primary);
}
.map-node-sublabel {
    font-size: 9px;
    fill: var(--text-muted);
}

/* Map connections */
.map-connection {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}
.map-connection.green { stroke: #22c55e; }
.map-connection.orange { stroke: #f59e0b; }
.map-connection.red { stroke: #ef4444; }
.map-connection.grey { stroke: #d1d5db; stroke-dasharray: 4 4; }

/* Animated flow on active connections */
@keyframes flow {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
}
.map-connection.green.active {
    stroke-dasharray: 10 10;
    animation: flow 1s linear infinite;
}

/* Central hub styling */
.map-hub {
    fill: var(--primary-light);
    stroke: var(--primary);
    stroke-width: 2;
}

/* Connection dots on hub */
.map-connector {
    r: 5;
    cursor: pointer;
    transition: r 0.15s;
}
.map-connector:hover { r: 7; }
.map-connector.green { fill: #22c55e; }
.map-connector.orange { fill: #f59e0b; }
.map-connector.red { fill: #ef4444; }
.map-connector.grey { fill: #9ca3af; }

/* Status summary bar */
.status-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-top: 1rem;
}
.status-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.status-summary-count {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Data view table */
.network-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}
.network-data-table th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
}
.network-data-table td {
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
.network-data-table tr:hover td {
    background: var(--bg-tertiary);
}

/* Map timestamp */
.map-timestamp {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.75rem;
}

/* ===== ENDPOINTS TABLE ===== */
.endpoints-table-container {
    margin-top: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.endpoints-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.endpoints-table-header h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.endpoints-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.endpoints-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.endpoints-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.endpoints-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border);
}

.endpoints-table tr:hover td {
    background: var(--bg-tertiary);
}

.endpoints-table tr.section-header td {
    background: var(--bg-primary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
}

.endpoints-table .endpoint-name {
    font-weight: 500;
}

.endpoints-table .endpoint-url {
    color: var(--primary);
    text-decoration: none;
}

.endpoints-table .endpoint-url:hover {
    text-decoration: underline;
}

.endpoints-table .ip-address {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.endpoints-table .instance-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
}

.instance-badge.ec2 { background: #fef3c7; color: #92400e; }
.instance-badge.lightsail { background: #dbeafe; color: #1e40af; }
.instance-badge.lambda { background: #fce7f3; color: #9d174d; }
.instance-badge.rds { background: #d1fae5; color: #065f46; }
.instance-badge.s3 { background: #ede9fe; color: #5b21b6; }
.instance-badge.shopify { background: #cffafe; color: #0e7490; }
.instance-badge.partner { background: #f3f4f6; color: #374151; }
.instance-badge.default { background: var(--bg-tertiary); color: var(--text-muted); }

/* ===== ADD ENDPOINT WIZARD ===== */

/* Wizard Progress Bar */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step.completed {
    opacity: 1;
}

.wizard-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.wizard-step.active .wizard-step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.wizard-step.completed .wizard-step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

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

.wizard-step.active .wizard-step-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Wizard Content */
.wizard-content {
    min-height: 300px;
}

.wizard-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

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

.wizard-hint {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Wizard Options */
.wizard-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wizard-option {
    display: block;
    cursor: pointer;
}

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

.wizard-option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.15s;
}

.wizard-option:hover .wizard-option-content {
    border-color: var(--primary-light);
    background: var(--bg-tertiary);
}

.wizard-option input:checked + .wizard-option-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.wizard-option-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.wizard-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wizard-option-text strong {
    font-size: 0.9375rem;
}

.wizard-option-text span {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Wizard Form Fields */
.wizard-form-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.wizard-form-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.wizard-form-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wizard-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wizard-form-field label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.wizard-form-field input[type="text"] {
    padding: 0.625rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.wizard-form-field input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.wizard-form-field input[readonly] {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

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

.wizard-nav .btn-success {
    background: #22c55e;
    color: white;
}

.wizard-nav .btn-success:hover {
    background: #16a34a;
}

/* Example Configuration Section */
.example-config {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.example-config pre {
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.example-config code {
    color: #22c55e;
}

.example-description {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.example-description h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.config-table {
    width: 100%;
    font-size: 0.875rem;
}

.config-table tr {
    border-bottom: 1px solid var(--border);
}

.config-table tr:last-child {
    border-bottom: none;
}

.config-table td {
    padding: 0.75rem 0;
    vertical-align: top;
}

.config-table td:first-child {
    width: 120px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .wizard-progress {
        gap: 0.5rem;
    }
    .wizard-step {
        min-width: 60px;
    }
    .wizard-step-label {
        display: none;
    }
    .wizard-card {
        padding: 1.25rem;
    }
}

/* ===== DEATHSTAR PANEL ===== */
.deathstar-content {
    max-width: 900px;
}

.deathstar-intro {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.deathstar-actions {
    margin-bottom: 2rem;
}

.deathstar-actions .btn {
    display: inline-flex;
    align-items: center;
}

.deathstar-sections {
    margin-bottom: 2rem;
}

.deathstar-sections h2 {
    margin-bottom: 1rem;
}

.deathstar-status {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.deathstar-status h2 {
    margin-bottom: 1rem;
}

.deathstar-status .config-table td:first-child {
    width: 30px;
    padding-right: 0.5rem;
}

.deathstar-status .config-table td:nth-child(2) {
    width: 180px;
}

/* ===== BROCHURE SITES ===== */
.brochure-status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.brochure-status-bar .card-status-dot {
    width: 10px;
    height: 10px;
}

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

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

.brochure-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1rem;
}

.brochure-section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.brochure-section-header .section-icon {
    font-size: 1.25rem;
}

.brochure-section-header.product-assist { color: #2563eb; }
.brochure-section-header.domain-assist { color: #059669; }
.brochure-section-header.ai-agents { color: #7c3aed; }
.brochure-section-header.gateway { color: #dc2626; }
.brochure-section-header.test-page { color: #f59e0b; }

.brochure-subsection {
    margin-bottom: 1rem;
}

.brochure-subsection h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.brochure-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.brochure-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.brochure-card.inactive {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

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

.brochure-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.brochure-card-icon-emoji {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.brochure-card h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.brochure-card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.brochure-card-status.active { background: var(--success); }
.brochure-card-status.inactive { background: var(--text-muted); }

.brochure-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brochure-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.brochure-card-arrow {
    color: var(--primary);
    font-weight: 600;
}

.brochure-error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    color: var(--error);
}

.brochure-error h3 {
    margin-bottom: 0.5rem;
}

.brochure-error button {
    margin-top: 1rem;
}

/* Web3 Card Meta */
.brochure-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.brochure-card-meta .meta-text {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.web3-card {
    border-left: 3px solid #0891b2; /* Teal accent for Web3 */
}

.web3-card.inactive {
    border-left-color: var(--border);
}

.brochure-card-status.unknown {
    background: var(--text-muted);
}

.brochure-card-status.degraded {
    background: #f59e0b;
}

/* Status text in card footer */
.status-text.green { color: var(--success); font-weight: 500; }
.status-text.orange { color: #f59e0b; font-weight: 500; }
.status-text.red { color: var(--danger); font-weight: 500; }
.status-text.grey { color: var(--text-muted); }

/* Web3 server section header - teal color to match network theme */
.brochure-section-header.web3-server {
    color: #0891b2;
}

/* ===== LAMBDA ADMIN MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small { width: 100%; max-width: 400px; }
.modal-medium { width: 100%; max-width: 500px; }
.modal-large { width: 100%; max-width: 800px; }

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* Progress Steps */
.progress-steps {
    margin: 1.5rem 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.progress-step.pending { color: var(--text-muted); }
.progress-step.active { background: var(--primary-light); color: var(--primary); }
.progress-step.complete { color: var(--success); }
.progress-step.error { color: var(--error); }

.progress-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.progress-text {
    font-size: 0.875rem;
}

/* Nameserver List */
.nameserver-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 1rem;
}

.nameserver-list li {
    padding: 0.375rem 0;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.nameserver-list li:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

/* Modal Result/Error */
.modal-result {
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.modal-result h3 {
    color: var(--success);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.modal-error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
}

.modal-error h3 {
    color: var(--error);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Warning Text */
.warning-text {
    color: var(--error);
    font-weight: 500;
}

/* Danger Button */
.btn-danger {
    background: var(--error);
    color: white;
}

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

/* Config Tabs */
.config-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.config-tab {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

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

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.config-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.config-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
}

/* Form Enhancements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-input-color {
    width: 60px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.image-upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.image-upload-box label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.image-preview {
    max-width: 100%;
    max-height: 80px;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.image-upload-box input[type="file"] {
    font-size: 0.75rem;
    width: 100%;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.status-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

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

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

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

/* Brochure Card Visit Link */
.brochure-card-visit {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: background 0.15s;
}

.brochure-card-visit:hover {
    background: var(--primary-light);
}
