:root {
    --el-primary: #409eff;
    --el-success: #67c23a;
    --el-warning: #e6a23c;
    --el-danger: #f56c6c;
    --el-info: #909399;
    --el-bg: #f5f7fa;
    --color: #606266;
}

body {
    background-color: var(--el-bg);
    font-family:
        "Helvetica Neue", "PingFang TC", "Microsoft JhengHei", sans-serif;
    color: #303133;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    user-select: none;
    cursor: pointer;
}

.toggle-wrapper.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.label {
    color: #000;
}

.toggle {
    width: 60px;
    height: 28px;
    border-radius: 50px;
    position: relative;
    background-color: #ccc;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-sizing: border-box;
}

.toggle.active {
    background-color: #409eff;
}

.text {
    position: absolute;
    font-size: 12px;
    width: 30px;
    text-align: center;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.on-text {
    left: 6px;
    color: #fff;
}

.off-text {
    right: 6px;
    color: #000;
}

.visible {
    opacity: 1;
}

.circle {
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    transition: left 0.3s;
    left: 2px;
}

.toggle.active .circle {
    left: calc(100% - 26px);
}

.el-btn {
    border: none;
    border-radius: 4px;
    padding: 6px 20px;
    color: #fff;
    background-color: var(--el-primary);
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

.el-btn i {
    color: white;
}

.el-btn.btn-white {
    background-color: white;
    color: black;
    border: 1px solid #dcdfe6;
}

.el-btn.btn-white i {
    color: black;
}

.el-btn:hover {
    background-color: #66b1ff;
}

.el-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.el-input {
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.2s;
}

.el-input:focus {
    border-color: var(--el-primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.modal-content {
    border-radius: 8px;
}

#toast-root {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    pointer-events: none;
}

.toast-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    max-width: 400px;
    padding: 8px 12px;
    background: #effaec;
    color: #67c23a;
    border: 1px solid #e1f3d8;
    border-radius: 4px;
    opacity: 0;
    transform: translate(-50%, -20px);
    transition: all 0.4s ease;
    font-size: 16px !important;
    font-weight: 500;
    pointer-events: all;
    margin-bottom: 10px;
}

.toast-msg.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.toast-icon {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.el-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    margin-top: 8px;
}

.el-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.el-radio__inner {
    position: relative;
    width: 16px;
    height: 16px;
    border: 1px solid #dcdfe6;
    border-radius: 50%;
    margin-right: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.el-radio:hover .el-radio__inner {
    border-color: #409eff;
}

.el-radio input[type="radio"]:checked+.el-radio__inner {
    border-color: #409eff;
    background-color: #409eff;
}

.el-radio__inner::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    top: 4px;
    left: 4px;
    background-color: #fff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s;
}

.el-radio input[type="radio"]:checked+.el-radio__inner::after {
    transform: scale(1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
}

.page-link {
    border: none;
    color: var(--el-primary);
}

.page-item.active .page-link {
    background-color: var(--el-primary);
    border-color: var(--el-primary);
    color: #fff;
}

.el-icon {
    --color: inherit;
    align-items: center;
    display: inline-flex;
    height: 1em;
    justify-content: center;
    line-height: 1em;
    position: relative;
    width: 1em;
    fill: currentColor;
    color: var(--color);
    font-size: inherit;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

.tab-content {
    height: 100%;
    padding: 20px;
    background-color: white;
}

#app {
    padding: 20px;
}

.datatable th {
    font-weight: normal !important;
    line-height: 23px;
    padding-bottom: 8px;
    padding-top: 8px;
    padding-left: 12px;
}

.datatable td {
    padding-left: 12px;
    vertical-align: middle;
}

.datatable .empty {
    line-height: 60px;
    text-align: center;
}

.datatable .bottom-tool {
    display: flex;
    align-items: center;
}

.datatable .pagination {
    flex: 1;
}

.datatable .buttons {
    display: inline-block;
    width: 100%;
}

.datatable .buttons .btn {
    font-size: 14px;
    height: 30px;
    padding: 0px;
    width: 70px;
    margin-right: 10px;
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.datatable .buttons .btn.btn-warning {
    color: white !important;
}

.col-form-label {
    text-align: right;
}

.required {
    color: red;
    margin-right: 3px;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: dashed 1px gray;
    padding: 20px;
    cursor: pointer;
}

.qr-code-container i {
    width: 30px;
    height: 30px;
    color: gainsboro;
    margin-bottom: 10px;
}

.qr-code-container img {
    width: 150px;
}

small {
    color: #6c757d !important;
    font-size: 11px;
}

.text-ellipsis {
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.middle-center {
    display: flex;
    height: 100%;
    align-items: center;
}

.btn-outline-secondary:hover i {
    color: white;
}

.btn-purple {
    background-color: purple;
    border-color: purple;
    color: white;
}

.btn-purple:hover {
    background-color: #460146;
    border-color: #460146;
    color: white;
}

div.form-control {
    border: none;
}

.no-copy {
    user-select: none;
    -webkit-user-select: none;
    /* Safari 和 Chrome */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE 10+ */
}

.text-red {
    color: red !important;
}

.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.25s ease;
    background-color: #fafafa;
    cursor: pointer;
}

.upload-zone.is-dragover {
    border-color: #007bff;
    background-color: #eaf3ff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
    transform: scale(1.03);
}

.upload-zone.is-dragover::before {
    content: "📂 拖曳檔案到此";
    display: block;
    font-size: 16px;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 6px;
    animation: pulse 0.8s ease-in-out infinite alternate;
}

.info-box-container {
    display: flex;
    gap: 20px;
}

.info-box {
    border: solid 1px #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 3px 3px 10px gray;
}

.info-box.danger {
    background-color: rgb(252, 195, 195);
}

.info-box.good {
    background-color: lightgreen;
}

.info-box.middle {
    background-color: lightgoldenrodyellow;
}


.info-box .info-box-content {
    display: flex;
    flex-direction: column;
}

.info-box .info-box-content .info-box-number {
    font-size: larger;
}

@keyframes pulse {
    from {
        opacity: 0.6;
        transform: translateY(0);
    }

    to {
        opacity: 1;
        transform: translateY(-4px);
    }
}