* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background: #FAFAFA;
    color: #0A0A0A;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
    flex-shrink: 0;
}

/* Main Layout Wrapper */
.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

/* Content wrapper */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
}

.header-container {
    margin-left: 260px;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.header-title h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.track-toggle {
    display: flex;
    gap: 6px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 4px;
}

.track-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.track-btn.active {
    background: #0A0A0A;
    color: white;
}

/* Main Layout */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    /* padding: 32px; */
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    height: 100%;
}

/* Left - Hierarchical Tree View */
.tree-section {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.tree-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tree-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.tree-header p {
    font-size: 13px;
    color: #777;
}

/* Tree Container */
.tree-container {
    padding: 20px;
    height: calc(100vh);
    overflow-y: auto;
}

/* Tree Node Styles */
.tree-node {
    margin-bottom: 8px;
}

.node-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.node-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.node-header.selected {
    background: #0A0A0A;
    color: white;
}

.expand-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #999;
}

.node-header.selected .expand-icon {
    color: white;
}

.tree-node.expanded > .node-header .expand-icon {
    transform: rotate(90deg);
}

.node-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    font-size: 16px;
}

/* Level-specific colors */
.node-icon.category {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1E40AF;
}

.node-icon.block {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    color: #15803D;
}

.node-icon.industry {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
}

.node-icon.jobline {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
}

.node-header.selected .node-icon {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.node-info {
    flex: 1;
    min-width: 0;
}

.node-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-meta {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.node-header.selected .node-meta {
    color: rgba(255, 255, 255, 0.6);
}

.node-badge {
    padding: 4px 10px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border: 1px solid #93C5FD;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #1E40AF;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.node-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.node-header.selected .node-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Tree Children */
.node-children {
    display: none;
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
}

.tree-node.expanded > .node-children {
    display: block;
    animation: expandDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Career Path Badge */
.career-path-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border: 1px solid #93C5FD;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #1E40AF;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.career-path-badge:hover {
    background: linear-gradient(135deg, #BFDBFE 0%, #93C5FD 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.career-path-badge .material-icons {
    font-size: 14px;
}

/* Right - Detail Panel */
.detail-panel {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 28px;
    position: sticky;
    height: fit-content;
    max-height: calc(100vh);
    overflow-y: auto;
}

.panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.panel-empty .material-icons {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.panel-empty h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}

.panel-empty p {
    font-size: 13px;
    line-height: 1.6;
}

.panel-content {
    display: none;
}

.panel-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.panel-header {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.panel-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex: 1;
    min-width: 200px;
    word-break: break-word;
}

.panel-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    border: 1px solid #A5B4FC;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #3730A3;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.panel-type-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.panel-type-badge .material-icons {
    font-size: 14px;
}

.panel-meta {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #0C4A6E;
    white-space: nowrap;
    transition: all 0.3s ease;
    max-width: 100%;
}

.meta-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.meta-badge .material-icons {
    font-size: 14px;
    flex-shrink: 0;
}

.meta-badge span:not(.material-icons) {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.panel-section {
    margin-bottom: 28px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 12px;
}

.section-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #FAFAFA;
    border-radius: 8px;
    font-size: 13px;
}

.info-label {
    color: #777;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #0A0A0A;
}

.career-paths-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.career-path-item {
    padding: 16px;
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #6EE7B7;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.career-path-item:hover {
    background: linear-gradient(135deg, #A7F3D0 0%, #6EE7B7 100%);
    transform: translateX(6px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.career-path-name {
    font-size: 14px;
    font-weight: 600;
    color: #065F46;
    margin-bottom: 6px;
}

.career-path-meta {
    font-size: 11px;
    color: #047857;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn .material-icons {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: white;
    border: 1px solid #B91C1C;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #3B82F6;
    border: 2px solid #3B82F6;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Animations */
@keyframes expandDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        position: relative;
        top: 0;
        max-height: none;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F5F5;
}

::-webkit-scrollbar-thumb {
    background: #D0D0D0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B0B0B0;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #F0F0F0;
    border-top-color: #0A0A0A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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