/* Modern Dark Theme CSS */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #090d16;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #334155;
    --font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

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

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

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

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.brand-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.badge-v3 {
    font-size: 0.7rem;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background: var(--bg-card);
    color: var(--text-main);
}

.nav-item.active {
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.status-indicator.online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: white; }
.btn-secondary { background: var(--border); color: var(--text-main); }
.btn-block { width: 100%; display: block; margin-top: 1rem; }

.tab-page { display: none; }
.tab-page.active { display: block; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

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

.stat-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-icon.gold { background: rgba(245, 158, 11, 0.15); }

.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.stat-info h3 { font-size: 1.5rem; }

.card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.data-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.badge-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-status.COMPLETED { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-status.RUNNING { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-status.PENDING { background: rgba(245, 158, 11, 0.2); color: var(--warning); }

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.25rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    width: 450px;
    border: 1px solid var(--border);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pipeline-flow {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.node-box {
    background: #0f172a;
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    width: 18%;
    text-align: center;
    position: relative;
    z-index: 2;
}

.node-box.completed { border-color: var(--success); background: rgba(16,185,129,0.1); }
.node-box.running { border-color: #3b82f6; background: rgba(59,130,246,0.1); animation: pulse 1.5s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.node-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.node-status { font-size: 0.75rem; color: var(--text-muted); }

.lucide { width: 14px; height: 14px; stroke-width: 1.2px; }
