body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 6px;
    height: 15px;
    background-color: #F0F0F0
}

::-webkit-scrollbar-thumb {
    background-color: #c06;
    border-radius: 10px;
    border: 2px solid #c06;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #c06;
}

::-webkit-scrollbar-thumb:active {
    border: 0;
    border-radius: 0;
    background-color: #c06
}

::-webkit-scrollbar-thumb:window-inactive {
    background-color: #c06
}

.flex {
    display: flex;
}

.flex1 {
    flex: 1;
}

.flex3 {
    flex: 3;
}

.flex5 {
    flex: 5;
}

.flex7 {
    flex: 7;
}

.flex9 {
    flex: 9;
}

.column {
    flex-direction: column;
}

.base {
    background-color: #fff;
}

#main-left-menu {
    width: 60px;
    margin-right: 5px;
    box-shadow: 2px 0 5px #ddd;
}

#main-left-menu>div {
    align-items: center;
    justify-content: space-around;
    height: 80px;
    display: flex;
    margin-bottom: 20px;
}

#main-content {
    width: calc(100% - 60px);
    width: -webkit-calc(100% - 60px);
    width: -moz-calc(100% - 60px);
    height: 100%;
}

#panel-box {
    display: none;
    box-shadow: #ddd 2px 0px 5px;
    margin-right: 5px;
    width: 260px;
    overflow-x: hidden;
    overflow-y: scroll;
    user-select: none;
}

.panel-head {
    padding: 20px 15px 0 15px;
}

.panel-body {
    padding: 0 15px;
}

#panel-box ol.tree {
    padding: 0;
}

#panel-box li {
    position: relative;
    margin-left: -15px;
    list-style: none;
}

#panel-box li.backbone,
#panel-box li.part {
    margin-left: -1px !important;
}

#panel-box li.backbone,
#panel-box li.part {
    /* padding-left: 21px; */
    text-decoration: none;
    display: block;
}

#panel-box li.backbone:before,
#panel-box li.part:before {
    content: "🗎";
    color: #c06;
    margin-right: 10px;
    font-size: 20px;
    font-weight: 700;
}

#panel-box li input {
    position: absolute;
    left: 0;
    margin-left: 0;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
    height: 1em;
    width: 1em;
    top: 0;
}

#panel-box li input+ol {
    margin: -0.938em 0 0 -44px;
    display: block;
    height: 1em;
}

#panel-box li input+ol>li {
    height: 0;
    overflow: hidden;
    margin-left: -14px !important;
    padding-left: 1px;
}

#panel-box li label {
    cursor: pointer;
    display: block;
}

#panel-box li label:before {
    content: "📁";
    margin-right: 5px;
}

#panel-box li input:checked+ol {
    margin: -1.25em 0 0 -44px;
    padding: 1.563em 0 0 65px;
    height: auto;
}

#panel-box li input:checked+ol>li {
    height: auto;
    margin: 0 0 0.125em;
    font-size: 90%;
}

#panel-box li input:checked+ol>li:last-child {
    margin: 0 0 0.063em;
}

.map-container,
.seq-container {
    padding: 0 15px;
    flex-direction: column;
}

.map-container svg {
    max-height: calc(100vh - 170px);
}

.active {
    background-color: #cc00660a;
    cursor: pointer;
}

.nav {
    align-items: center;
}

#tabs-navigator {
    padding: 0;
    margin: 0;
    margin-top: -10px;
    background: #eeeeee7d;
    height: 50px;
    vertical-align: bottom;
    display: flex;
    align-items: end;
}

#tabs-navigator li {
    list-style: none;
    font-size: 11px;
    width: fit-content;
}


.layui-tab .layui-tab-title {
    border-bottom-width: 0;
    border-bottom-style: none;
}

.layui-tab-title .layui-this {
    background: #fff;
    border-bottom: 3px solid #c06;
    box-shadow: inset 0px -5px 10px 1px #c061;
}

.layui-tab-title li {
    width: 120px;
}

.layui-tab-title>li:nth-child(1) .layui-tab-close {
    display: none;
}

.slice-box {
    background: #fff;
    cursor: text;
    max-height: calc(100vh - 140px);
    overflow-y: scroll;
    overflow-x: hidden;
    user-select: none;
}

.novopro-context-menu {
    position: fixed;
    border: 1px solid #ccc;
    list-style: none;
    padding: 4px 0;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0px 2px 6px 2px #ddd;
}

.hide-cus-context-menu {
    display: none;
}

.novopro-context-menu li {
    padding: 8px 12px;
    user-select: none;
    transition: all 0.1s;
    min-width: 120px;
}

.novopro-context-menu li span {
    margin: 0 8px 0 20px;
    border-bottom: 1px solid #ddd;
    padding: 5px 0;
}

.novopro-context-menu li:last-child span {
    border-bottom: none;
}

.novopro-context-menu li:hover {
    cursor: pointer;
    background-color: #c06;
    color: #fff;
}

.novopro-context-menu li:active {
    background-color: #f0f2f7;
}

.seq-box {
    width: 100%;
    height: 100px;
    resize: none;
    font-size: 12px;
    font-family: consolas;
}

.upld-btn {
    padding: 8px 30px;
    background: #f0f0f0;
    color: #053777;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 11px;
    border: 1px solid #053777;
    border-radius: 4px;
    text-shadow: 0 1px 2px #fff;
    cursor: pointer;
    margin-top: 20px;
}

.pos-hint {
    position: absolute;
    padding: 10px;
}

/*cart box start*/
td {
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-collapse: collapse;
    line-height: 25px;
    vertical-align: middle;
    padding-left: 20px;
}

th {
    border-bottom: 1px solid #bdd1e9;
    border-right: 1px solid #e0e0e0;
    color: #707070;
    font: bold 12px 'PT Sans', Arial, Verdana, sans-serif;
    height: 49px;
    vertical-align: middle;
    text-align: center;
    background: #ddd3;
}

.cart-items {
    width: 100%;
    margin-top: 5px;
    padding: 0;
}

.cart-items th {
    background-color: #f5f5f5;
    text-align: left;
    min-height: 30px;
}

.cart-items td {
    padding: 2px 20px 2px 5px;
}

.cart-item-catno {
    font-size: 12px;
    color: #333;
}

.cart-item-url,
.cart-item-delete {
    text-decoration: none;
    font-size: 13px;
    color: #005aab;
}

.cart-action-row {
    margin-top: 20px;
    overflow: hidden;
    margin-bottom: 5px;
}

.btn-block {
    display: block;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    user-select: none;
    border: 1px solid #ffa200;
    margin-right: 20px;
    width: 120px;
    text-align: center;
    height: 40px;
    line-height: 40px;
    background: #fc0;
    color: #000;
    font-weight: 700;
    float: right;
}

.btn-default {
    background: #428bca;
    border: 1px solid #357ebd;
    color: #fff;
}

.cart-item-quantity {
    width: 25px;
}

.text-right {
    text-align: right;
}

select.plsmid-target {
    min-height: 36px;
    margin: 0 5px;
    border-radius: 5px;
    border-color: #ccc;
    padding: 0 10px;
}

.btn-cart-cloning {
    display: block;
    border: 0;
    background: #08c;
    padding: 0 15px;
    font-size: 14px;
    color: #fff;
    line-height: 34px;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    margin: 15px auto;
    cursor: pointer;
}

/*cart box end*/

/* plasmid table */
.plasmid-table-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow-y: scroll;
    max-height: 90vh;
}

.plasmid-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.plasmid-actions button {
    background-color: #104c82;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.plasmid-actions button:hover {
    background-color: #0d3b66;
    transform: translateY(-1px);
}

.plasmid-actions button#delete-selected-plasmids {
    background-color: #cc0066;
}

.plasmid-actions button#delete-selected-plasmids:hover {
    background-color: #a80055;
}

.plasmid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.plasmid-table thead {
    background-color: #f2fffe;
}

.plasmid-table th {
    padding: 2px 15px;
    text-align: left;
    font-size: 13px;
}

.plasmid-table td {
    padding: 5px 15px;
    text-align: left;
    font-size: 14px;
}

.plasmid-table th {
    font-weight: 600;
    position: relative;
    white-space: nowrap;
}

.plasmid-table th input[type="checkbox"] {
    margin-right: 8px;
}

.plasmid-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.plasmid-table tbody tr:hover {
    background-color: #f1f5f9;
}

.plasmid-table tbody tr:last-child {
    border-bottom: none;
}

.plasmid-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #104c82;
    cursor: pointer;
}

.plasmid-table td a {
    color: #104c82;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.plasmid-table td a:hover {
    color: #cc0066;
    text-decoration: underline;
}

.plasmid-table td button {
    background-color: transparent;
    color: #104c82;
    border: 1px solid #104c82;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.plasmid-table td button:hover {
    background-color: #104c82;
    color: white;
}

/* plasmid table end */

/* slice view */
.slices-container {
    margin: 20px 0;
}

.slice-svg {
    display: block;
    cursor: crosshair;
    margin-bottom: 20px;
    user-select: none;
}

.enz {
    font-size: 12px;
    font-family: Consolas, Monaco, monospace, "Courier New";
    font-weight: 700;
    letter-spacing: normal;
}

.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 98%;
    box-sizing: border-box;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.6rem;
    background: #f0f7ff;
    color: #4a90e2;
    border-radius: 4px;
    font-size: 0.9rem;
}

.tag-remove-btn {
    background: none;
    border: none;
    color: rgb(33, 150, 243);
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
}

.tag-input {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.seq {
    font-size: 14px;
    font-family: Consolas, Monaco, monospace, "Courier New";
    letter-spacing: 0.8px;
}

.seq.forward {
    fill: #000;
}

.seq.reverse {
    fill: #666;
}

.position {
    font-family: Consolas, Monaco, monospace, "Courier New";
    font-size: 12px;
    fill: #888;
}

.featpath {
    fill-opacity: 0.7;
    stroke-width: 1px;
    cursor: pointer;
}

rect.orf {
    cursor: pointer
}

.feat {
    font-family: Consolas, Monaco, monospace, "Courier New";
    font-size: 11px;
    font-weight: bold;
    fill: #333;
}

.enzyme-label {
    font-family: Consolas, Monaco, monospace, "Courier New";
    font-size: 12px;
    font-weight: 700;
    fill: #d32f2f;
}

.featpath:hover {
    fill-opacity: 1;
}

.stats {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.stats h3 {
    margin-top: 0;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.stat-item {
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
}

.amino-acid {
    font-size: 12px;
    font-family: Consolas, Monaco, monospace, "Courier New";
    letter-spacing: 0.8px;
    fill: #333;
}

.amino-acid.acidic {
    fill: red;
}

.amino-acid.basic {
    fill: blue;
}

.amino-acid.nonpolar {
    fill: green;
}

.amino-acid.amides {
    fill: orange;
}

.amino-acid.aromatic {
    fill: purple;
}

.enz-mask {
    fill: #009688;
    fill-opacity: 0.2;
    stroke-width: 0;
    display: none;
}

.enz-cutline {
    fill: none;
    stroke: #f44336;
    stroke-width: 1;
    display: none;
}

.base-line {
    stroke: #ff4444;
    stroke-width: 2;
    pointer-events: none;
}

/* slice view end */

/* circle map */
.mapsvg {
    user-select: none;
}

.mapsvg circle {
    stroke: #cfd9db;
    fill: none;
    stroke-width: 5
}

.mapsvg .plasmid-name {
    font-weight: 700;
    user-select: none;
    fill: #666;
}

.mapsvg .seq-len {
    font-size: 12px;
    font-weight: 400;
    fill: #999;
}

.mapsvg .t-l {
    stroke-width: 2;
    stroke: black;
}

.mapsvg .t-s {
    stroke-width: 1;
    stroke: grey;
}

.mapsvg .t-n {
    font-size: 8pt;
    user-select: none;
    fill: #999;
    alignment-baseline: middle;
}

.mapsvg .user {
    stroke: #CC0066;
    fill: #CC0066;
}

.mapsvg path,
.slice-svg path {
    stroke: #a6acb3;
    fill: #dadada;
    cursor: pointer;
    fill-opacity: 1;
}

svg .C_region {
    stroke: #7CAF9A;
    /* 比#8CBCA6 稍深的绿色系描边，强化边界 */
    fill: #8CBCA6;
    fill-opacity: 1;
}

svg .CDS {
    stroke: #be7baa;
    fill: #D38BBD;
    fill-opacity: 1;
}

svg .exon {
    stroke: #6B8BA0;
    /* 比#81AABC 稍深的蓝色系描边 */
    fill: #81AABC;
    fill-opacity: 1;
}

svg .gene {
    stroke: #9F89B8;
    /* 与CDS 描边保持一致，强化基因关联 */
    fill: #AF99C8;
    fill-opacity: 1;
    /* 与CDS保持一致 */
}

svg .mRNA {
    stroke: #268B7B;
    /* 比#299d8f 稍深的绿色系描边 */
    fill: #299d8f;
    fill-opacity: 1;
}

svg .operon {
    stroke: #C79E7A;
    /* 比#DFAD92 稍深的棕色系描边 */
    fill: #DFAD92;
    fill-opacity: 1;
    /* 浅棕色，文字清晰 */
}

svg .rep_origin {
    stroke: #D6B55A;
    /* 比#e7c66b 稍深的黄色系描边 */
    fill: #e7c66b;
    fill-opacity: 1;
    /* 亮黄色，黑色文字最清晰 */
}

svg .precursor_RNA {
    stroke: #6FB08A;
    /* 比#80cba4 稍深的绿色系描边 */
    fill: #80cba4;
    fill-opacity: 1;
    /* 调整为浅绿，提升对比度 */
}

svg .prim_transcript {
    stroke: #7AAE6B;
    /* 比#8ab07c 稍深的橄榄绿系描边 */
    fill: #8ab07c;
    fill-opacity: 1;
    /* 浅橄榄绿，文字可读 */
}

svg .primer_bind {
    stroke: #E69251;
    /* 比#f3a361 稍深的橙色系描边 */
    fill: #f3a361;
    fill-opacity: 1;
    /* 橙色系，对比度良好 */
}

svg .promoter {
    stroke: #1f989b;
    fill: #69c6c6;
    fill-opacity: 1;
}

svg .RBS {
    stroke: #8BAE6D;
    /* 比#9CB87D 稍深的绿色系描边 */
    fill: #9CB87D;
    fill-opacity: 1;
}

svg .rRNA {
    stroke: #D9E093;
    /* 比#e9f4a3 稍深的黄绿色系描边 */
    fill: #e9f4a3;
    fill-opacity: 1;
    /* 浅黄绿色，提升文字可读性 */
}

svg .tRNA {
    stroke: #EACB73;
    /* 比#fbda83 稍深的黄色系描边 */
    fill: #fbda83;
    fill-opacity: 1;
}

svg .unsure {
    stroke: #9c6bf5;
    fill: #b28bf8;
    fill-opacity: 1;
}


svg .selected-region,
svg .selection-rect {
    stroke: rgba(255, 68, 68, 0.2);
    fill: #ff4444;
    cursor: pointer;
    fill-opacity: 0.3;
    pointer-events: none;
}

path.orf-fwd {
    fill: #333;
    stroke: #ffd281;
    stroke-width: 3px;
    stroke-opacity: 0.6;
}

rect.orf-fwd {
    fill: #ffd281;
}

path.orf-rev {
    fill: #333;
    stroke: #c3f991;
    stroke-width: 4px;
    stroke-opacity: 0.6;
}

rect.orf-rev {
    fill: #c3f991;
}

/* circle map end */