 :root {
    --bg: #050a1f;
    --card: linear-gradient(135deg, #141e3c 0%, #0a1229 100%);
    --primary: #6a0dad;
    --primary-glow: rgba(106, 13, 173, 0.4);
    --secondary: #00f0ff;
    --accent: #ff00ff;
    --text: #e0e7ff;
    --sub: #a5b4fc;
    --text-dim: #4f46e5;
    --icon: #00f0ff;
    --icon-accent: #ff00ff;
    --success: #00ff9d;
    --danger: #ff4d6d;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
        "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    background: var(--bg);
    background-image: radial-gradient(
            circle at 100% 150%,
            var(--bg) 24%,
            #141e3c 25%,
            #141e3c 28%,
            var(--bg) 29%,
            var(--bg) 36%,
            #141e3c 36%,
            #141e3c 40%,
            transparent 40%,
            transparent
        ),
        radial-gradient(
            circle at 0 150%,
            var(--bg) 24%,
            #141e3c 25%,
            #141e3c 28%,
            var(--bg) 29%,
            var(--bg) 36%,
            #141e3c 36%,
            #141e3c 40%,
            transparent 40%,
            transparent
        ),
        radial-gradient(
            circle at 50% 100%,
            #141e3c 10%,
            var(--bg) 11%,
            var(--bg) 23%,
            #141e3c 24%,
            #141e3c 30%,
            var(--bg) 31%,
            var(--bg) 43%,
            #141e3c 44%,
            #141e3c 50%,
            var(--bg) 51%,
            var(--bg) 63%,
            #141e3c 64%,
            #141e3c 71%,
            transparent 71%,
            transparent
        ),
        radial-gradient(
            circle at 100% 50%,
            #141e3c 5%,
            var(--bg) 6%,
            var(--bg) 15%,
            #141e3c 16%,
            #141e3c 20%,
            var(--bg) 21%,
            var(--bg) 30%,
            #141e3c 31%,
            #141e3c 35%,
            var(--bg) 36%,
            var(--bg) 45%,
            #141e3c 46%,
            #141e3c 49%,
            transparent 50%,
            transparent
        ),
        radial-gradient(
            circle at 0 50%,
            #141e3c 5%,
            var(--bg) 6%,
            var(--bg) 15%,
            #141e3c 16%,
            #141e3c 20%,
            var(--bg) 21%,
            var(--bg) 30%,
            #141e3c 31%,
            #141e3c 35%,
            var(--bg) 36%,
            var(--bg) 45%,
            #141e3c 46%,
            #141e3c 49%,
            transparent 50%,
            transparent
        );
    background-size: 100px 50px;
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
}

/* 复用头部导航样式 */
header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(10, 18, 41, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(106, 13, 173, 0.2);
    z-index: 99;
    box-shadow: 0 4px 30px rgba(106, 13, 173, 0.1);
}

header > div {
    flex: 1;
}

header .logo {
    height: 28px;
}

.title {
    font-size: 20px;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(106, 13, 173, 0.2);
}

@media (max-width: 750px) {
    .title {
        font-size: 16px;
    }
}

.register {
    display: flex;
    justify-content: flex-end;
}

#app1 {
    overflow-x: auto;
     }
.table {
      min-width: 900px; /* 强制表格最小宽度，保证不缩进成一团，允许左右滑动 */
  }

/* 复用底部标签样式 */
.tab {
    position: relative;
    display: flex;
    background: rgba(10, 18, 41, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(106, 13, 173, 0.2);
    box-shadow: 0 -4px 30px rgba(106, 13, 173, 0.1);
}

.tab a {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    color: var(--sub);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tab a.active {
    color: var(--secondary);
    border-top: 2px solid var(--secondary);
    box-shadow: 0 -2px 10px rgba(0, 240, 255, 0.3);
    background: linear-gradient(
        to top,
        rgba(0, 240, 255, 0.05),
        transparent
    );
}

.icon {
    color: var(--icon);
    margin-right: 8px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.icon-accent {
    color: var(--icon-accent);
}

.tab a .icon {
    display: block;
    margin: 0 auto 4px;
    font-size: 18px;
}

.page {
    padding: 16px;
}

/* 复用卡片样式 */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(106, 13, 173, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(106, 13, 173, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        var(--primary),
        var(--secondary),
        var(--accent),
        var(--primary)
    );
    animation: rotate 15s linear infinite;
}

.card::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: var(--card);
    border-radius: 11px;
    z-index: 1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(106, 13, 173, 0.2),
        0 0 0 1px rgba(106, 13, 173, 0.1);
}

.card .content {
    position: relative;
    z-index: 2;
}

/* 搜索框固定 */
.select-search-box {
    position: relative;   /* 正常流 */
    width: 100%;          /* 宽度为页面宽度 */
    background-color: white;  /* 设置背景颜色 */
    padding: 10px;        /* 内边距 */
}

/* 下拉选项列表滚动区域 */
.select-dropdown-list {
    max-height: 200px;  /* 设置下拉框最大高度 */
    overflow-y: auto;   /* 使下拉框内容可滚动 */
    position: relative; /* 保持原有定位 */
}

/* 当滚动到顶部时固定搜索选项 */
.select-dropdown-list li {
    position: sticky;    /* 使列表项在滚动时固定 */
    top: 0;              /* 固定在顶部 */
    background-color: white; /* 设置背景色，确保背景不会被透明 */
    z-index: 1000;       /* 确保列表项在其他内容之上 */
    padding: 5px;        /* 设置内边距 */
}


@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

.card .label {
    font-size: 17px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.fixed-controls {
    position: relative;
    z-index: 90;
    margin-bottom: 16px;
    /* background: var(--bg); */
    background-color: rgba(10, 18, 41, 0.8);
    backdrop-filter: blur(8px);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(106, 13, 173, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fixed-controls .select-selection {
    background-color: rgba(17, 30, 60, 0.5);
    border: 1px solid rgba(106, 13, 173, 0.6);
}

.fixed-controls .select-selection:hover,
.fixed-controls .select-selection.select-focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 240, 255, 0.6);
}

.fixed-controls .select-selected-value {
    height: 45px;
    color: #e0e7ff;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.fixed-controls .icon-select-arrow::before {
    width: 10px;
    height: 10px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: 4px;
}

.fixed-controls .icon-select-arrow {
    right: 16px;
}

.mode-tabs {
    display: flex;
    /* margin-bottom: 16px; */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(106, 13, 173, 0.3);
}

.mode-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: rgba(17, 30, 60, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-tab.active {
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary)
    );
    color: white;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.3);
}

.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: rgba(106, 13, 173, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.btn-success {
    background: rgba(0, 255, 157, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.btn-danger {
    background: rgba(255, 77, 109, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 77, 109, 0.3);
}

.btn-group {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.power-status {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
    font-size: 18px;
}

/* 统一的字段间距 - 覆盖power-status的margin和padding */
.meter-field-spacing {
    margin: 15px 0 !important;
    padding: 12px 10px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meter-info-text {
    font-size: 18px;
    font-family: var(--font);
    color: var(--text);
    text-align: center;
}

.retail-amount-title {
    font-size: 18px;
    font-family: var(--font);
    color: #fff;
}

.retail-amount-container {
    font-size: 18px;
    font-family: var(--font);
}

.meter-update-time {
    font-size: 18px;
    font-family: var(--font);
    color: var(--text);
    text-align: center;
}

.power-on {
    background: rgba(0, 255, 157, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 255, 157, 0.2);
}

.power-off {
    background: rgba(255, 77, 109, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 77, 109, 0.2);
}

.electricity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

.electricity-value {
    min-width: 80px;
    text-align: center;
    padding: 10px;
    margin: 0 10px;
    background: rgba(17, 30, 60, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(106, 13, 173, 0.3);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--sub);
    font-size: 13px;
}

select,
input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: rgba(17, 30, 60, 0.5);
    border: 1px solid rgba(106, 13, 173, 0.3);
    color: var(--text);
    font-family: var(--font);
}

.warning-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

.hide {
    display: none;
}

/* 电量操作提示 */
.electricity-operation {
    font-size: 12px;
    color: var(--sub);
    text-align: center;
    margin-top: 5px;
}

.electricity-input {
    width: 236px;
    padding: 0 16px;
    position: relative;
}

.electricity-input input {
    height: 46px;
    background-color: rgba(17, 30, 60, 0.5);
    border: 1px solid rgba(106, 13, 173, 0.6);
    color: #fff;
    text-align: center;
}

.electricity-input .form-control:hover {
    background-color: rgba(17, 30, 60, 0.5);
    border-color: rgba(106, 13, 173, 0.3);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(0, 240, 255, 0.6);
}

.electricity-input .form-control:focus {
    background-color: rgba(17, 30, 60, 0.5);
    border-color: rgba(106, 13, 173, 0.3);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(0, 240, 255, 0.6);
}

.electricity-input .invalid-feedback {
    position: absolute;
    bottom: -4px;
    left: 16px;
    transform: translateY(100%);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.destroy {
    width: 360px;
}

.destroy-title {
    padding-top: 16px;
    text-align: center;
    color: #dd524d;
    font-size: 18px;
    font-weight: 600;
}

.icon-select-arrow::before {
    width: 10px;
    height: 10px;
    border-left: 2px solid #808695;
    border-bottom: 2px solid #808695;
    margin-bottom: 4px;
}

.icon-select-arrow {
    right: 16px;
}

/* 针对特定模态框的遮罩层（无论位置） */
body:has(#addUserModal.show) .modal-backdrop:last-of-type {
    z-index: 1059 !important; /* 最新的遮罩层应用此样式 */
}

#app input,
#app1 input,
#app4 input,
#app3 input {
    background-color: #ffffff;
}

.el-input__inner.is-invalid {
    border-color: #dd524d;
}

.el-date-editor .el-range-separator {
    width: fit-content;
}

#electricityRetailing .el-input--suffix .el-input__inner {
    width: 204px;
    height: 45px;
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(106, 13, 173, 0.6);
    font-size: 16px;
    text-align: center;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

#electricityRetailing .el-range-editor.is-active,
#electricityRetailing .el-range-editor.is-active:hover,
#electricityRetailing
    .el-select
    .el-input.is-focus
    .el-input__inner {
    border-color: rgba(106, 13, 173, 0.3);
    box-shadow: 0 0 0 0.25rem rgba(0, 240, 255, 0.6);
}

#electricityRetailing .el-select:hover .el-input__inner {
    border-color: rgba(106, 13, 173, 0.3);
    box-shadow: 0 0 0 0.25rem rgba(0, 240, 255, 0.6);
}

#electricityRetailing .el-select .el-input__inner:focus {
    border-color: rgba(106, 13, 173, 0.6);
}

.el-tabs__nav {
    width: 100%;
}

.el-tabs__item {
    width: 50%;
    text-align: center;
    font-size: 18px;
    padding: 0;
}

.el-tabs__content {
    overflow: visible;
}

/* 表格样式 */
.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #f5f7fa;
}

.table > :not(caption) > * > * {
    border-color: #ebeef5;
    transition: all 0.25s ease;
    color: #606266;
    font-size: 14px;
}

.table > thead > * > * {
    color: #909399;
    font-weight: 600;
}

.table-hover > tbody > .empty:hover > * {
    --bs-table-accent-bg: #ffffff;
}

.table > tbody > tr > .empty-td {
    color: #909399;
}

.table > tbody > tr > .empty-td > .empty-td-item {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-loading-mask {
    position: absolute;
    z-index: 9;
    background-color: rgba(255, 255, 255, 0.9);
    margin: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

.table-loading-mask-show {
    opacity: 1;
    visibility: visible;
}

.loader {
    border: 2px solid #f3f3f3; /* 浅色边框，模拟环形的背景 */
    border-top: 2px solid #3498db; /* 深色边框，模拟环形的进度部分 */
    border-radius: 50%; /* 让 div 变成圆形 */
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite; /* 应用旋转动画，1秒完成一次，线性速度，无限循环 */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    } /* 动画开始时的旋转角度 */
    100% {
        transform: rotate(360deg);
    } /* 动画结束时的旋转角度，完成一圈 */
}

.table-btn-edit, .table-btn-danger {
    width: 56px;
    height: 28px;
    font-size: 12px;
    border-radius: 3px;
    cursor: pointer;
    color: rgb(96, 98, 102);
    box-sizing: border-box;
    font-weight: 500;
    background: rgb(255, 255, 255);
    border-width: 1px;
    border-style: solid;
    border-color: rgb(220, 223, 230);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-btn-danger {
    color: rgb(255, 255, 255);
    background-color: rgb(245, 108, 108);
    border-color: rgb(245, 108, 108);
    margin-left: 10px;
}

.table-btn-edit:focus, .table-btn-edit:hover {
    color: rgb(64, 158, 255);
    background-color: rgb(236, 245, 255);
    border-color: rgb(198, 226, 255);
}

.table-btn-edit:active {
    color: rgb(58, 142, 230);
    border-color: rgb(58, 142, 230);
    outline: none;
}

.table-btn-danger:focus, .table-btn-danger:hover {
    color: rgb(255, 255, 255);
    background: rgb(247, 137, 137);
    border-color: rgb(247, 137, 137);
}

.table-btn-danger.is-active, .table-btn-danger:active {
    color: rgb(255, 255, 255);
    background: rgb(221, 97, 97);
    border-color: rgb(221, 97, 97);
}

.table-button {
    width: fit-content;
    height: 40px;
    font-size: 14px;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    font-weight: 500;
    border-width: 1px;
    border-style: solid;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    background-color: rgb(64, 158, 255);
    border-color: rgb(64, 158, 255);
}

.table-button:focus, .table-button:hover {
    color: rgb(255, 255, 255);
    background: rgb(102, 177, 255);
    border-color: rgb(102, 177, 255);
}

.table-button.is-active, .table-button:active {
    color: rgb(255, 255, 255);
    background: rgb(58, 142, 230);
    border-color: rgb(58, 142, 230);
}