/* 看板工具公共样式 */

/* 卡片类型标签：白字 + 圆角（全局统一，需求/缺陷/任务） */
.card-type-tag {
    display: inline-block;
    color: #fff;
    border-radius: 4px;
    padding: 0 6px;
    font-size: 11px;
    line-height: 18px;
    margin-right: 6px;
}

/* 抽屉内容统一 16px 内边距（详情/附件/变更记录等抽屉） */
.el-drawer__body {
    padding: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    color: #303133;
    background: #f0f2f5;
}

/* 主框架布局 */
.layout-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.layout-aside {
    width: 200px;
    background: #001529;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.layout-logo {
    height: 56px;
    line-height: 56px;
    text-align: left;
    padding-left: 24px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.layout-menu {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.layout-menu .menu-item {
    display: block;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.layout-menu .menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.layout-menu .menu-item.active {
    color: #fff;
    background: rgba(64, 158, 255, 0.25);
    border-left-color: #409eff;
}

.layout-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.layout-header {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

.layout-header .page-title {
    font-size: 16px;
    font-weight: bold;
}

.layout-content {
    flex: 1;
    overflow: auto;
    padding: 16px;
}

/* 计时悬浮条 */
.timer-bar {
    position: fixed;
    top: 10px;
    right: 16px;
    z-index: 3000;
    background: #1f9d55;
    color: #fff;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    font-size: 13px;
}

.timer-bar .elapsed {
    font-family: Consolas, monospace;
    font-size: 16px;
    font-weight: bold;
    min-width: 76px;
    text-align: center;
}

/* 登录页 */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c3faa 0%, #2b5ad8 50%, #409eff 100%);
}

.login-box {
    width: 380px;
    background: #fff;
    border-radius: 8px;
    padding: 40px 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 28px;
    color: #1c3faa;
}

/* 看板 */
.board-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.board-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.board-columns {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    align-items: flex-start;
}

.lane-column {
    width: 280px;
    flex-shrink: 0;
    background: #eef1f6;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.lane-header {
    padding: 10px 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dcdfe6;
}

.lane-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 120px;
}

.card {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #409eff;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.card.dragging {
    opacity: 0.5;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    word-break: break-all;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    color: #909399;
}

.card-stage-times {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e4e7ed;
    font-size: 12px;
    color: #606266;
}

.card-stage-times .stage-time {
    margin-right: 10px;
    white-space: nowrap;
}

.card-stage-times .running {
    color: #1f9d55;
    font-weight: bold;
}

.lane-drop-zone {
    min-height: 40px;
    border: 2px dashed transparent;
    border-radius: 4px;
}

.lane-drop-zone.drag-over {
    border-color: #409eff;
    background: rgba(64, 158, 255, 0.08);
}

/* 需求树 */
.tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tree-node .node-time {
    font-size: 12px;
    color: #909399;
}

/* 通用 */
.page-card {
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.text-muted {
    color: #909399;
}

.badge-time {
    display: inline-block;
    background: #ecf5ff;
    color: #409eff;
    border-radius: 10px;
    padding: 0 8px;
    font-size: 12px;
    line-height: 20px;
}

/* ==================== 移动端适配（≤768px） ==================== */
@media (max-width: 768px) {
    .layout-content {
        padding: 8px;
    }

    .page-card {
        padding: 10px;
        margin-bottom: 10px;
    }

    /* 弹窗与抽屉不超过屏幕宽度 */
    .el-dialog {
        max-width: 94vw !important;
    }
    .el-drawer {
        max-width: 94vw !important;
    }
    .el-message-box {
        max-width: 90vw;
    }

    /* 登录页 */
    .login-box {
        width: 90vw;
        max-width: 380px;
        padding: 32px 24px;
    }

    /* 看板：泳道宽度收窄，工具栏自动换行 */
    .board-toolbar {
        flex-wrap: wrap;
        padding: 8px 10px;
    }
    .lane-column {
        width: 250px;
    }
    .card {
        padding: 8px;
    }

    /* 计时悬浮条：移到左下角，避免遮挡顶部操作 */
    .timer-bar {
        top: auto;
        right: auto;
        left: 8px;
        bottom: 8px;
        padding: 6px 12px;
        font-size: 12px;
        max-width: 86vw;
    }
    .timer-bar .elapsed {
        font-size: 14px;
        min-width: 60px;
    }

    /* 列表表格：隐藏次要列（class-name="mobile-hide"） */
    .el-table .mobile-hide {
        display: none !important;
    }

    /* 操作列：仅显示图标，节省横向空间 */
    .el-table .mobile-ops .el-button {
        padding-left: 6px;
        padding-right: 6px;
    }
    .el-table .mobile-ops .el-button span {
        display: none;
    }
}
