/* 主容器布局 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 顶部导航栏 */
.top-bar {
    width: 100%;
    background: linear-gradient(to right, var(--bg-card), rgba(10, 30, 50, 0.95));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 20;
    position: relative;
}

/* 应用标题组 */
.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.app-logo::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--color-primary), transparent);
    animation: verticalScan 2s infinite linear;
}

.app-logo i {
    font-size: 24px;
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary));
}

.app-name {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--color-text), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 侧边导航栏（顶部横向显示） */
.sidebar {
    width: 100%;
    background: linear-gradient(to bottom, var(--bg-card), rgba(10, 26, 40, 0.95));
    padding: 8px 15px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 15;
    overflow: visible;
}

/* 电力线路装饰 */
.sidebar::before, .sidebar::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 100%;
    left: 0;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(0, 229, 255, 0.3) 15%, 
        transparent 18%,
        transparent 25%,
        rgba(0, 229, 255, 0.3) 28%,
        rgba(0, 229, 255, 0.3) 32%,
        transparent 35%,
        transparent 42%, 
        rgba(0, 229, 255, 0.3) 45%,
        transparent 48%,
        transparent 60%,
        rgba(0, 229, 255, 0.3) 63%,
        rgba(0, 229, 255, 0.3) 68%,
        transparent 71%,
        transparent 80%,
        rgba(0, 229, 255, 0.3) 83%,
        transparent 86%);
}

.sidebar::before {
    top: 0;
}

.sidebar::after {
    bottom: 0;
}

/* 内容和面板区域容器 */
.content-panel-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 右侧常驻面板 */
.persistent-panel {
    width: 380px;
    min-width: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--color-border);
    background-color: var(--bg-panel);
    position: relative;
}

/* 面板调整器 */
.panel-resizer {
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s;
}

.persistent-panel:hover .panel-resizer {
    opacity: 0.8;
}

.panel-resizer::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    height: 40px;
    width: 2px;
    background: rgba(10, 200, 185, 0.5);
    border-radius: 1px;
    transform: translateY(-50%);
}

/* 调整时的视觉反馈 */
.panel-resizing {
    transition: none !important;
    position: relative;
}

.panel-resizing::before {
    content: attr(data-width);
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: var(--bg-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0.8;
    z-index: 1000;
}

body.resizing * {
    cursor: col-resize !important;
}

.panel-resizer {
    opacity: 0.3;
}

.persistent-panel:hover .panel-resizer,
.panel-resizing .panel-resizer {
    opacity: 1;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.panel-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.panel-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.panel-tab.active {
    color: var(--color-primary);
}

.panel-tab.active::after {
    transform: scaleX(1);
}

.panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.panel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    overflow: auto;
    padding: 15px;
}

.panel-item.active {
    opacity: 1;
    z-index: 1;
}