/* ==========================================================================
   ElementAdmin 风格主题（手写复刻版）
   主色 #409EFF  侧栏 #304156  顶栏 #fff  背景 #f0f2f5
   ========================================================================== */

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #303133;
    background: #f0f2f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: #409EFF; text-decoration: none; }
a:hover { color: #66b1ff; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; outline: none; }

/* ---------- 布局 ---------- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧栏 */
.el-sidebar {
    width: 210px;
    background: #304156;
    color: #bfcbd9;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100;
    transition: width 0.2s;
}
.el-sidebar__logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    background: #2b3a4e;
    letter-spacing: 1px;
    user-select: none;
}
.el-sidebar__logo .logo-mark {
    display: inline-block;
    width: 28px; height: 28px;
    line-height: 28px;
    background: #409EFF;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    margin-right: 8px;
    vertical-align: middle;
}
.el-menu {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 10px 0;
}
.el-menu::-webkit-scrollbar { width: 6px; }
.el-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.el-menu__item {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 20px;
    color: #bfcbd9;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
    user-select: none;
}
.el-menu__item:hover { background: #263445; color: #fff; }
.el-menu__item.is-active {
    background: #263445;
    color: #fff;
    border-left-color: #409EFF;
}
.el-menu__item .icon { width: 20px; text-align: center; margin-right: 10px; font-size: 16px; }

/* 右侧主区 */
.el-main-wrap {
    margin-left: 210px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.el-header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    box-shadow: 0 1px 4px rgba(0,21,41,0.05);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.el-header__breadcrumb {
    color: #606266;
    font-size: 14px;
}
.el-header__breadcrumb .sep { margin: 0 8px; color: #c0c4cc; }
.el-header__right {
    margin-left: auto;
    color: #606266;
    font-size: 13px;
}
.el-header__right .badge {
    display: inline-block;
    background: #f56c6c;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
}

.el-main {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

/* ---------- 卡片 ---------- */
.el-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,21,41,0.08);
    margin-bottom: 20px;
}
.el-card__header {
    padding: 14px 20px;
    border-bottom: 1px solid #ebeef5;
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    display: flex;
    align-items: center;
}
.el-card__header .el-icon { margin-right: 8px; color: #409EFF; }
.el-card__body { padding: 20px; }

/* ---------- 按钮 ---------- */
.el-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    line-height: 1;
    padding: 0 18px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #606266;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    white-space: nowrap;
}
.el-button:hover { color: #409EFF; border-color: #b3d8ff; background: #ecf5ff; }
.el-button:active { transform: translateY(1px); }
.el-button:disabled { opacity: 0.6; cursor: not-allowed; }
.el-button--primary { background: #409EFF; color: #fff; border-color: #409EFF; }
.el-button--primary:hover { background: #66b1ff; color: #fff; border-color: #66b1ff; }
.el-button--success { background: #67c23a; color: #fff; border-color: #67c23a; }
.el-button--success:hover { background: #85ce61; color: #fff; border-color: #85ce61; }
.el-button--warning { background: #e6a23c; color: #fff; border-color: #e6a23c; }
.el-button--warning:hover { background: #ebb563; color: #fff; border-color: #ebb563; }
.el-button--danger { background: #f56c6c; color: #fff; border-color: #f56c6c; }
.el-button--danger:hover { background: #f78989; color: #fff; border-color: #f78989; }
.el-button--text { background: transparent; border-color: transparent; color: #409EFF; padding: 0 6px; }
.el-button--text:hover { background: transparent; color: #66b1ff; }
.el-button--mini { height: 28px; padding: 0 10px; font-size: 12px; }
.el-button--large { height: 44px; padding: 0 24px; font-size: 16px; }
.el-button .icon { margin-right: 6px; font-size: 14px; }
.el-button + .el-button { margin-left: 10px; }

/* ---------- 表单 ---------- */
.el-form-item { margin-bottom: 18px; }
.el-form-item__label { display: block; margin-bottom: 6px; color: #606266; font-size: 14px; }
.el-input, .el-textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    transition: border-color 0.15s;
}
.el-input:focus, .el-textarea:focus { border-color: #409EFF; }
.el-textarea { height: auto; padding: 8px 12px; min-height: 80px; resize: vertical; line-height: 1.5; }

/* ---------- 提示 / 标签 ---------- */
.el-tag {
    display: inline-block;
    padding: 0 8px;
    height: 24px;
    line-height: 22px;
    font-size: 12px;
    border-radius: 3px;
    background: #ecf5ff;
    color: #409EFF;
    border: 1px solid #d9ecff;
    margin-right: 6px;
}
.el-tag--info { background: #f4f4f5; color: #909399; border-color: #e9e9eb; }
.el-tag--success { background: #f0f9eb; color: #67c23a; border-color: #e1f3d8; }
.el-tag--warning { background: #fdf6ec; color: #e6a23c; border-color: #faecd8; }
.el-tag--danger { background: #fef0f0; color: #f56c6c; border-color: #fde2e2; }

/* ---------- Loading / 空状态 ---------- */
.el-loading {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid #f3f3f3;
    border-top-color: #409EFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
.el-loading--block {
    display: block;
    width: 32px; height: 32px;
    border-width: 3px;
    margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.el-empty {
    padding: 40px 20px;
    text-align: center;
    color: #909399;
    font-size: 13px;
}
.el-empty .el-empty__icon {
    font-size: 48px;
    color: #c0c4cc;
    margin-bottom: 12px;
}

/* ---------- 弹窗 ---------- */
.el-modal-mask {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}
.el-modal-mask.is-visible { display: flex; }
.el-modal {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.el-modal__header {
    padding: 14px 20px;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    font-weight: 600;
}
.el-modal__header .el-modal__close {
    margin-left: auto;
    cursor: pointer;
    color: #909399;
    font-size: 18px;
    background: none;
    border: 0;
}
.el-modal__header .el-modal__close:hover { color: #409EFF; }
.el-modal__body {
    padding: 20px;
    overflow: auto;
    flex: 1;
}
.el-modal__footer {
    padding: 12px 20px;
    border-top: 1px solid #ebeef5;
    text-align: right;
}

/* ---------- 提示气泡（轻量） ---------- */
.el-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #303133;
    padding: 10px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 200px;
    text-align: center;
    border: 1px solid #ebeef5;
    animation: fadeDown 0.2s;
}
.el-message--success { border-color: #e1f3d8; background: #f0f9eb; color: #67c23a; }
.el-message--error   { border-color: #fde2e2; background: #fef0f0; color: #f56c6c; }
.el-message--warning { border-color: #faecd8; background: #fdf6ec; color: #e6a23c; }
.el-message--info    { border-color: #d9ecff; background: #ecf5ff; color: #409EFF; }
@keyframes fadeDown {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 进度条 ---------- */
.el-progress {
    background: #ebeef5;
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}
.el-progress__bar {
    height: 100%;
    background: #409EFF;
    transition: width 0.2s;
    border-radius: 100px;
}

/* ---------- 表格 ---------- */
.el-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}
.el-table th, .el-table td {
    padding: 12px;
    border-bottom: 1px solid #ebeef5;
    text-align: left;
}
.el-table th {
    background: #fafafa;
    color: #909399;
    font-weight: 600;
    font-size: 13px;
}
.el-table tr:hover td { background: #f5f7fa; }

/* ---------- 栅格 ---------- */
.el-row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.el-col { padding: 0 10px; }
.el-col-6 { flex: 0 0 25%; max-width: 25%; }
.el-col-8 { flex: 0 0 33.33%; max-width: 33.33%; }
.el-col-12 { flex: 0 0 50%; max-width: 50%; }
.el-col-24 { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 900px) {
    .el-col-6, .el-col-8 { flex: 0 0 50%; max-width: 50%; }
    .el-col-12 { flex: 0 0 100%; max-width: 100%; }
}
