:root{
--bg-main:#0f1720;
--bg-card:#1b2530;
--bg-soft:#243142;

--text-main:#e5e7eb;
--text-muted:#9ca3af;

--primary:#4da3ff;
--primary2: #ff5c8a;
--primary-hover:#2586fd;

--border:rgba(255,255,255,0.06);
}

*{
    box-sizing: border-box;
}


html{
scroll-behavior:smooth;
font-family: Arial, sans-serif;
}


body{
margin:0;
font-family:Segoe UI,Roboto,Arial;
background:var(--bg-main);
color:var(--text-main);
overflow-y:auto;
}

/* ─── GLOBAL SCROLLBAR (Thin + accent) ───
   Áp dụng đồng nhất cho mọi element scrollable, cả Firefox lẫn WebKit. */
* {
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
}
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
*::-webkit-scrollbar-thumb {
    background: #4da3ff33;
    border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
    background: #4da3ff66;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-corner {
    background: transparent;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-soft); /* Hoặc màu tối tùy bạn */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Luôn nổi trên cùng */
    opacity: 1;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2586fd; /* Màu xanh của bạn */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.title{
    display: block;
}

.title h2{
margin: 0;
padding-top: 0 ;

}
.tool_info{
    background:rgba(11, 15, 19, 0.396);
    box-shadow:0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    display: flex;
    gap: 5px;
    align-items: center;
    text-align: center;
    max-height: 0;
    overflow: hidden;
    transition:all 0.3s ease;
    opacity: 0;
    padding: 8px 15px;

}
.tool_info.show{
    max-height: 70px;
    opacity: 1;
    
}




.tool_info input{
    margin-bottom: 0;
}

.tool_info .kvL,
.tool_info .kvS {
    background: rgba(15, 23, 32, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px;
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
}

[data-theme="light"] .tool_info .kvL,
[data-theme="light"] .tool_info .kvS {
    background: var(--bg-well) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main);
}

#tool_bar span{
padding: 3px 0;
display: inline-block;
vertical-align: middle;
}

.main_layout{
position: relative;
display:flex;
gap:10px;
padding:10px;
height:calc(100vh - 61px);
overflow: hidden;
}

#pricing{
    scroll-margin-top:70px;

}
#tool{
scroll-margin-top:60px;
}
#price_pro{
    color: var(--primary);
    font-weight: 700;
}


.left_panel{
width:420px;
background:var(--bg-card);
border-radius:10px;
display:flex;
flex-direction:column;
overflow:hidden;
}

.canvas-wrapper-outer{
    height: 100%;
}
#tool_bar{
    display: flex;
    position: fixed;
    top: 30px;
    right: 0px;
    padding-right: 20px;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    align-items: flex-end;
    transition:all 0.3s ease;
    z-index: 800;
    justify-self: flex-end;
    flex-direction:column;
    overflow: visible;
}
#tool_bar.show{
    top: 10px;
    opacity: 1;
    pointer-events: auto;

}

#table{
flex:1;
background:#1f2933;
}


#main_page{
transition:transform 0.4s;
}

#login_panel{
margin: 0;
padding: 10px;
position:fixed;
top:0;
right:-320px;
width:320px;
height:100%;
background:linear-gradient(180deg,#0f1720,#1b2530);
transition:0.4s;
z-index:999;
display: flex;
text-align: center;
justify-content: center;
box-shadow: -10px 0 30px rgba(0,0,0,0.5);

}

#login_panel input{
    width: 100%;
}
.show_passChange .change_pass_box, .admin_box{

display: flex;
}
.show_login #login_panel{

right:0;

}
.show_login #main_page{
transform:translateX(-320px);
}

.nav{
position: relative;
top: 0;
display:flex;
align-items:center;
gap:10px;
height:60px;
padding:0 20px;
background:#243142;
border-bottom:1px solid rgba(255,255,255,0.06);
z-index: 610;
}
.nav h4{
    margin: 0;
    padding-top: 0 ;
    font-weight: 350;
    font-size: 0.9rem;
    padding: 0;

}

.nav .footer_logo{
margin-right:20px;
margin-bottom: 0;
margin-top: 0;
padding-bottom: 0;
font-size: 1.3rem;
}

#header {
    position: relative;
  display: flex;
  align-items: center;
  height: 50px;
}
#userbar {
    position: relative;
    margin-left: auto;
    display: flex;
    right: auto;
    gap: 10px;
    align-items: right;
    background:rgba(255, 255, 255, 0);
}
#login_card{

    width: 100%;
    max-width: 300px;
    margin-top: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100dvh - 28px);
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding-bottom: 8px;

}
#login_card h3{
    color: #ffffff;
    text-align: center;

}

.auth-pane h3 {
    margin: 6px 0 16px;
}

.auth-slide-viewport {
    width: 100%;
    overflow: hidden;
    padding-top: 4px;
}

.auth-track {
    display: flex;
    width: 200%;
    transition: transform 0.35s ease;
    align-items: flex-start;
}

.auth-track.auth-track--register {
    transform: translateX(-50%);
}

.auth-pane {
    flex: 0 0 50%;
    width: 50%;
    box-sizing: border-box;
    padding: 8px 6px 20px;
    min-height: 0;
}

.auth-google-host {
    margin: 4px 0 12px;
    padding: 14px 12px 16px;
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.99) 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow:
        0 10px 32px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-google-label {
    margin: 0 0 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

.auth-google-btn-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
}

.auth-google-btn-slot > div {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-or-line {
    margin: 2px 0 10px;
    font-weight: 400;
    color: #94a3b8;
    font-size: 13px;
}

.auth-verify-banner {
    text-align: left;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
    font-size: 13px;
    line-height: 1.45;
}

.auth-verify-banner__text {
    margin: 0 0 8px;
}

.auth-verify-banner__resend {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.auth-verify-banner__resend:hover {
    border-color: var(--primary);
    color: #fff;
}

.auth-back-login {
    margin-top: 12px;
    font-size: 13px;
    color: #b8b8b8;
    text-align: center;
}

.auth-forgot-extra {
    display: none;
    width: 100%;
    margin-top: 4px;
}

.auth-forgot-extra.show {
    display: block;
}

.kvL{
    width: 70px;
    text-align: center;
}
.kvs{
    width: 50px;
    text-align: center;
}
input{
background:var(--bg-card);
border:1px solid rgba(255,255,255,0.08);
color:var(--text-main);
padding:10px;
border-radius:6px;
}
input:focus{
outline:none;
border:1px solid var(--primary);
box-shadow:0 0 0 2px rgba(77,163,255,0.5);
}

::placeholder {
  color: var(--text-muted);
  opacity: 0.7; /* Firefox cần thiết lập opacity */
}


button{
background:linear-gradient(135deg,var(--primary),var(--primary-hover));
border:none;
color:white;
padding:10px 14px;
border-radius:6px;
cursor:pointer;
transition:0.2s;
box-sizing: border-box;
}

button:hover{
transform:translateY(-1px);
box-shadow:0 6px 20px rgba(77,163,255,0.4);
}
#login_card button{
width:100%;
margin-top:10px;
font-size:14px;
}

#login_panel input:focus{
border:1px solid #4da3ff;
box-shadow:0 0 0 2px rgba(77,163,255,0.2);
}

 #x{
    width: 35px;
}

#overlay{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.5);
backdrop-filter:blur(3px);
z-index:997;
display:none;
}

.show_login #overlay{
display:block;
}

#login_card input{
width:100%;
box-sizing:border-box;
}

#login_card span{
    display: block;
    padding-top: 8px;
    padding-left: 13px;
    width: 100%;
    color: #b8b8b8;
    font-weight:450;
}

/* TABLE */

#table_container{
position: relative;
flex:1;
background:#1f2933;
border-radius:8px;
height:100%;
overflow: auto;
scroll-behavior: auto; /* Tắt smooth của CSS để JS xử lý cuộn ngang không bị giật */
scrollbar-width: thin;
scrollbar-color: #4da3ff33 transparent;
}

#parts_table{
width:100%;
border-collapse:collapse;
table-layout:fixed;
font-size:13px;
color:#e5e7eb;
}

#parts_table td{
height: 30px;
padding:0;
position: relative;
}
#parts_table th{
height: 30px;

}

#parts_table thead th{
background:#32414b;
padding:6px;
border-right:1px solid rgba(255,255,255,0.05);
}

#parts_table tbody td{
border-right:1px solid rgba(255,255,255,0.05);
border-bottom:1px solid rgba(255,255,255,0.05);
}

#parts_table tbody tr:nth-child(odd){
background:#24313a;
}

#parts_table tbody tr:nth-child(even){
background:#1f2933;
}

#parts_table input{
width:100%;
height:100%;
border:none;
outline:none;
background:transparent;
padding:4px;
box-sizing:border-box;
}

#parts_table td input#parts_table td input:focus{
outline: none !important;
}

.stt{
width:40px;
text-align:center;
}


.selected{
background-color: rgba(255, 77, 77, 0.05) !important; /* Màu nền cực nhạt */
    border: none !important; /* BẮT BUỘC: Xóa viền từng ô */
    outline: none !important;
    
}


#parts_table th:nth-child(1),
#parts_table td:nth-child(1){
width:40px;
}

#parts_table th:nth-child(2),
#parts_table td:nth-child(2){
width:auto;
}

#parts_table th:nth-child(3),
#parts_table td:nth-child(3){
width:60px;
}

#parts_table th:nth-child(4),
#parts_table td:nth-child(4){
width:60px;
}

#parts_table th:nth-child(5),
#parts_table td:nth-child(5){
width:50px;
}

#parts_table td:nth-child(1){
text-align:center;
}

#parts_table td:nth-child(2) input{
text-align:left;
}

#parts_table td:nth-child(3) input,
#parts_table td:nth-child(4) input{
text-align:right;
}

#parts_table td:nth-child(5) input{
text-align:center;
}


#part_info{
position:fixed;
width: 150px;
top:70px;
right:30px;
background:rgba(0,0,0,0.45);
backdrop-filter:blur(8px);
padding:12px 16px;
border-radius:8px;
font-size:13px;
color:white;
pointer-events:none;
display:none;
line-height:1.4;
z-index:999;
}


.hero{
text-align:center;
padding:120px 20px;
background:linear-gradient(
135deg,
#0f1720 0%,
#1b2530 50%,
#1f3a5f 100%
);
}

.features,
.pricing,
.testimonials{
background:var(--bg-main);
color:var(--text-main);
}

.feature,
.plan,
.testimonial{
background:var(--bg-card);
border:1px solid var(--border);
border-radius:12px;
transition:0.25s;
}

.feature:hover,
.plan:hover,
.testimonial:hover{
transform:translateY(-4px);
box-shadow:0 10px 30px rgba(0,0,0,0.3);
}

.plan.pro{
border:2px solid #4da3ff;
}

.feature:hover{
border:1px solid #4da3ff;
}

.testimonial{
padding:20px;
box-sizing:border-box;
}

.hero h1{
font-size:48px;
font-weight:700;
margin-bottom:10px;
}

.hero p{
font-size:18px;
color:var(--text-muted);
max-width:600px;
margin:auto;
}

.hero_buttons{
margin-top:30px;
}

.hero_buttons button{
padding:12px 22px;
margin:5px;
cursor:pointer;
}

.features{
display:flex;
justify-content:center;
gap:40px;
padding:40px;
}

 .feature{
padding:20px;
border-radius:10px;
box-shadow:0 6px 20px rgba(0,0,0,0.05);
width:220px;
text-align:center;
}

.pricing{
text-align:center;
padding:60px 20px;
}

.pricing_container{
display:flex;
justify-content:center;
gap:40px;
margin-top:30px;
}

.plan{

padding:30px;
border-radius:12px;
box-shadow:0 6px 20px rgba(0,0,0,0.08);
width:260px;
}

.plan.pro{
border:2px solid #2586fd;
}

.plan .price{
font-size:24px;
margin:10px 0;
}

.plan ul{
list-style:none;
padding:0;
}

.plan li{
margin:8px 0;
}

.plan button{
margin-top:15px;
cursor:pointer;
}

.testimonials{
padding:20px;
text-align:center;
}

.testimonial_container{
margin-top:30px;
width: 100%;
max-width: 1120px;
margin-left: auto;
margin-right: auto;
padding: 20px;
box-sizing: border-box;
}

.testimonial_carousel {
    position: relative;
    padding: 20px;
}

.testimonial_carousel_row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    min-height: 140px;
}

@media (max-width: 900px) {
    .testimonial_carousel_row {
        grid-template-columns: 1fr;
    }
    .testimonial_carousel {
        padding: 20px;
    }
}

.testimonial_carousel .testimonial {
    width: auto;
    margin: 0;
}

.testimonial_car_ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 32, 0.75);
    color: var(--text-main, #e5e7eb);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    z-index: 2;
}

.testimonial_car_ctrl:hover {
    background: rgba(77, 163, 255, 0.2);
    border-color: rgba(77, 163, 255, 0.5);
}

.testimonial_car_ctrl--prev { left: 0; }
.testimonial_car_ctrl--next { right: 0; }

.testimonial_car_dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.testimonial_car_dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(148, 163, 184, 0.45);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.testimonial_car_dots button.is-active {
    background: var(--primary, #4da3ff);
    transform: scale(1.25);
}

.public_review_hint {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted, #9ca3af);
    line-height: 1.65;
}

.btn-review-login {
    display: inline-block;
    margin-right: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4da3ff, #6366f1);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(77, 163, 255, 0.35);
}

.btn-review-login:hover {
    filter: brightness(1.06);
}

.public_review_form label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
    font-weight: 500;
}

.public_review_form textarea,
.public_review_form select,
.public_review_form .custom_dropdown__trigger {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 32, 0.55);
    color: var(--text-main, #e5e7eb);
    font-family: inherit;
    font-size: 14px;
}

.public_review_submit {
    margin-top: 14px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.public_review_submit:hover {
    filter: brightness(1.05);
}

.public_review_msg {
    margin: 10px 0 0;
    min-height: 1.2em;
    font-size: 13px;
}

.public_review_done {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted, #9ca3af);
    line-height: 1.6;
}

/* ─── Invoice request modal (dashboard) ─── */
.invoice_modal_overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
}

.invoice_modal_overlay.is-open {
    display: flex !important;
}

.invoice_modal_panel {
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    border-radius: 14px;
    box-sizing: border-box;
    background: var(--bg-card, #1a1a2e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main, #e5e7eb);
}

.invoice_modal_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.invoice_modal_x {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
}

.invoice_modal_hint {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.invoice_modal_label {
    display: block;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.invoice_modal_field {
    margin-bottom: 12px;
}

.invoice_payment_dd {
    width: 100%;
}

.invoice_payment_dd .custom_dropdown__menu {
    z-index: 10050;
    max-height: 240px;
    overflow-y: auto;
}

.invoice_modal_fields_col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invoice_modal_input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    box-sizing: border-box;
}

.invoice_modal_textarea {
    resize: vertical;
    min-height: 72px;
}

.invoice_modal_status {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.invoice_modal_actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.invoice_modal_btn {
    border: none;
    border-radius: 8px;
    padding: 11px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.invoice_modal_btn--primary {
    flex: 1 1 200px;
    background: #10b981;
    color: #fff;
}

.invoice_modal_btn--muted {
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.invoice_modal_btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .invoice_modal_panel {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .invoice_modal_hint,
[data-theme="light"] .invoice_modal_label {
    color: #475569 !important;
}

[data-theme="light"] .invoice_modal_input {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0f172a;
}

[data-theme="light"] .invoice_modal_btn--muted,
[data-theme="light"] .invoice_modal_btn--ghost {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

[data-theme="light"] #activity_log_tbody td {
    color: #1e293b !important;
}

[data-theme="light"] #activity_log_tbody td:nth-child(3),
[data-theme="light"] #activity_log_tbody td:nth-child(4) {
    color: #334155 !important;
}

[data-theme="light"] #activity_log_tbody td:nth-child(5) {
    color: #0f172a !important;
    font-weight: 500;
}

.project-table tbody td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 1024px) and (min-width: 641px) {
    .stats .card {
        flex: 1 1 calc(33.333% - 14px);
        min-width: 140px;
    }
    .dashboard_main {
        padding: 16px 14px !important;
    }
}

/* ─── Photo AI modal (desktop + mobile đồng bộ) ─── */
.photo_extract_modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
}

.photo_extract_dialog {
    background: var(--bg-card, #1a1a2e);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    color: var(--text-main, #e5e7eb);
    box-sizing: border-box;
}

.photo_modal_hint,
.photo_results_hint,
.photo_status_line {
    color: var(--text-muted, #9aa4b2);
    font-size: 13px;
    line-height: 1.5;
}

.photo_modal_hint {
    margin: 0 0 12px;
}

.photo_results_block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border, rgba(255, 255, 255, 0.12));
}

.photo_results_title {
    margin: 0 0 8px;
    font-size: 15px;
}

.photo_results_hint {
    margin: 0 0 10px;
    font-size: 12px;
}

.photo_status_line {
    margin-top: 12px;
}

.photo_result_table_wrap {
    overflow-x: auto;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    background: var(--bg-well, rgba(0, 0, 0, 0.2));
}

.photo_result_table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.photo_result_table col.col-name {
    width: 40%;
}

.photo_result_table col.col-num {
    width: 20%;
}

.photo_result_table thead th {
    padding: 8px 10px;
    font-weight: 600;
    color: var(--text-muted, #9aa4b2);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.12));
    white-space: nowrap;
}

.photo_result_table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    word-break: break-word;
}

.photo_result_table .col-name,
.photo_result_table th.col-name {
    text-align: left;
}

.photo_result_table .col-num,
.photo_result_table th.col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.photo_import_actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

[data-theme="light"] .photo_extract_dialog {
    background: var(--bg-card, #fff);
    color: var(--text-main, #0f172a);
}

[data-theme="light"] .photo_result_table_wrap {
    background: #f8fafc;
}

.photo_source_btn {
    flex: 1 1 140px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main, #e5e7eb);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

[data-theme="light"] .photo_source_btn {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.review_fab {
    position: fixed;
    right: 10px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: 480;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, #4da3ff, #6366f1);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.review_fab:hover {
    filter: brightness(1.06);
}

.review_modal_overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.review_modal_overlay.show {
    display: flex;
}

.review_modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow: visible;
    padding: 22px 22px 20px;
    border-radius: 16px;
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.review_modal .custom_dropdown__menu {
    z-index: 2500;
}

.review_modal_close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main, #e5e7eb);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.review_modal_close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.review_modal_title {
    margin: 0 36px 14px 0;
    font-size: 18px;
    color: var(--text-main, #fff);
}

.testimonial .testimonial_author {
    color: var(--primary, #4da3ff);
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

.fade-in{
opacity:0;
transform:translateY(30px);
transition:all 0.6s ease;
}

.fade-in.show{
opacity:1;
transform:translateY(0);
}

.pricing_toggle{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
margin-top:20px;
}

/* switch */
.switch{
position:relative;
width:50px;
height:24px;
}

.switch input{
display:none;
}

.slider{
position:absolute;
cursor:pointer;
background:#444;
border-radius:20px;
top:0;
left:0;
right:0;
bottom:0;
transition:0.3s;
}

.slider::before{
content:"";
position:absolute;
width:18px;
height:18px;
left:3px;
top:3px;
background:white;
border-radius:50%;
transition:0.3s;
}

input:checked + .slider{
background:#4da3ff;
}

input:checked + .slider::before{
transform:translateX(26px);
}


#policy-container{
    display: block;
    position: fixed;
    top: 100%;
    left: 10px;
    right: 10px;
    width: auto;
    margin: 0;
    padding: 15px;
    z-index: 1001;
    height: 0px;
    overflow: hidden;
    opacity: 0;
    background:rgba(11, 15, 19, 0.7);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    transition: all 0.4s;
    box-sizing: border-box;

}

#policy-container.show{
    top: 10px;
    opacity: 1;
    height: calc(100vh - 20px);
}

#close_policy{
    position: absolute; /* Thay relative bằng absolute */
    top: 10px;          /* Khoảng cách từ mép trên */
    right: 15px;        /* Khoảng cách từ mép phải */
    z-index: 1005;      /* Đảm bảo nó nằm trên nội dung text */
    /* Thêm chút cho đẹp */
    cursor: pointer;
    border: none;
    color: white;
    font-size: 20px;
    transition: all 0.2s;
}
#close_policy:hover{
    transform: scale(1.5) rotate(90deg);
}

#policy-content{
    display: block;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
    height: 100%;
}
/* Giảm size tiêu đề chính (h1) */
#policy-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #4da3ff; /* Cho nó cái màu xanh cho cùng tông Nesting.Click */
}

/* Giảm size tiêu đề mục (h2) */
#policy-content h2 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1px solid #333; /* Thêm cái gạch chân nhẹ cho sang */
    padding-bottom: 5px;
}

/* Chỉnh lại size chữ nội dung cho dễ đọc */
#policy-content p, #policy-content li {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
}

[data-theme="light"] #policy-container {
    background: linear-gradient(
        168deg,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(240, 247, 255, 0.96) 45%,
        rgba(228, 238, 252, 0.98) 100%
    );
    border: 1px solid rgba(77, 141, 235, 0.22);
    box-shadow: 0 16px 48px rgba(45, 95, 160, 0.14);
}

[data-theme="light"] #close_policy {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] #policy-content h1 {
    color: var(--primary);
}

[data-theme="light"] #policy-content h2 {
    color: var(--text-main);
    border-bottom-color: var(--border);
}

[data-theme="light"] #policy-content p,
[data-theme="light"] #policy-content li {
    color: var(--text-muted);
}

/* DASHBOARD PAGE =========================================================*/
.dashboard{
display:flex;
height:100vh;
min-height: 0;
overflow: hidden;
background:var(--bg-main);
}

/* SIDEBAR */
.sidebar{
overflow: hidden;
width:240px;
background:var(--bg-card);
padding:20px;
display:flex;
flex-direction:column;
justify-content:space-between;
border-right:1px solid var(--border);
}

.sidebar h2{
font-size:18px;
margin-bottom:20px;
}

.sidebar_top {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.sidebar_bottom {
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.sidebar_brand_row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.sidebar_brand_link {
    flex: 1;
    min-width: 0;
}

.sidebar_logout_compact {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(77, 163, 255, 0.45);
    background: rgba(77, 163, 255, 0.12);
    color: var(--text-main, #e5e7eb);
    cursor: pointer;
    white-space: nowrap;
}

.sidebar_bottom .footer-app-version--sidebar {
    margin: 8px 0 0;
    text-align: center;
}

.sidebar_menu_toggle {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    cursor: pointer;
}

.sidebar_nav_collapsible {
    width: 100%;
}

@media (min-width: 901px) {
    .sidebar_menu_toggle {
        display: none !important;
    }
    .sidebar_nav_collapsible {
        display: block !important;
    }
    .nav{
        position: -webkit-sticky; /* Hỗ trợ cho Safari */
        position: sticky;         /* Kích hoạt tính năng dính */
        top: 0;
    }
    /* Thanh công cụ fixed: đẩy xuống dưới nav sticky (60px) để không bị che */
  
    
}

@media (max-width: 900px) {
    .sidebar_menu_toggle {
        display: inline-flex;
    }
    .sidebar_nav_collapsible:not(.is-open) {
        display: none;
    }
    .sidebar_nav_collapsible.is-open {
        display: block;
    }
    .sidebar .menu {
        flex-direction: column !important;
    }
    .sidebar .menu_item {
        text-align: left !important;
    }
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BUTTON UPGRADE */
.upgrade_btn{
margin-top:20px;
}

/* MAIN */
.dashboard_main{
position: relative;
overflow: hidden;
flex:1;
min-height: 0;
flex-direction: column;
height: auto;
max-height: 100%;
display: flex; 
padding:20px;

}

/* HEADER */
.dashboard_header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:12px;
}

/* STATS */
.stats{
display:flex;
flex-wrap: wrap;
gap:20px;
margin-bottom:20px;
}

.card{
    flex: 1 1 160px;
    min-width: 0;
    min-height: 120px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}
#section_overview{
    overflow: hidden;
}
/* PROJECT */
.projects{
background:var(--bg-card);
margin-top: 0;
padding:20px;
border-radius:16px;
border:1px solid var(--border);
display: flex;
flex-direction: column;
min-height: 0;          /* Quan trọng! cho phép flex child co lại */
flex: 1;                /* Chiếm hết phần còn lại của dashboard_main */
overflow: hidden;

}

#overview_project_container {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
}

/* Dashboard: cuộn toàn bộ cột nội dung trên màn hình nhỏ (Tổng quan + bảng dự án). */
@media (max-width: 900px) {
    .dashboard {
        height: 100dvh;
        min-height: 0;
    }
    .dashboard_main {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
    }
    #section_overview {
        overflow: visible;
    }
    #section_overview .projects {
        display: none !important;
    }
    .projects {
        flex: 0 1 auto;
        min-height: 0;
        overflow: visible;
    }
    #overview_project_container {
        overflow: visible;
        max-height: none;
    }
}

.projects_tab_toolrail {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    min-height: 44px;
    flex-shrink: 0;
}

.dashboard_project_search {
    width: min(100%, 260px);
    max-width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-well);
    color: var(--text-main);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.14);
}

.dashboard_project_search:focus {
    outline: none;
    border-color: rgba(77, 163, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.2);
}

[data-theme="light"] .dashboard_project_search {
    background: #fff;
    border-color: rgba(45, 85, 140, 0.32);
    box-shadow: 0 2px 6px rgba(30, 55, 90, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.95);
    color: var(--text-main);
}

.dashboard_theme_dd {
    position: relative;
    z-index: 25;
}

.dashboard_theme_dd .custom_dropdown__menu {
    z-index: 100;
}

.project-table-status {
    text-align: center;
    padding: 28px 16px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.project-table-status--error {
    color: #f87171;
}

[data-theme="light"] .project-table-status--error {
    color: #dc2626;
}

#section_projects {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;

}

/* Tab có nội dung dài: cuộn trong section, không nới cao cả dashboard */
#section_billing,
#section_info {
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
}

.projects .h3 {
    flex-shrink: 0;
}

#all_projects_list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
    width: 100% !important;
    max-width: none;
}


#stat_plan{
color:#4da3ff;
font-weight:bold;
}



#the_google{
    display: block;
}

.g_id_signin img{
    margin: 0;
    padding: 0;
}


.login_combo{
    display: flex;
}
.g_id_signin {
    padding: 0;
    margin-top: 10px;
    margin-right: 10px;
    width: 100%;
    box-sizing: border-box;
}

.nsm7Bb-HzV7m-LgbsSe{
    height: 38px !important;
    border-radius: 6px !important;
    background-color: #0f172a !important;
    border: 1px solid var(--primary)!important;
    display: grid !important;
    place-items: center !important;
    color: var(--primary)!important;
}

.user_table select{
    background:#1b2530;
    color:white;
    border:1px solid rgba(255,255,255,0.1);
    padding:5px;
    border-radius:6px;
    
}



.user_dropdown{
position:relative;
display:inline-block;
}

.user_btn{
background:#111;
color:white;
border:none;
padding:8px 14px;
border-radius:6px;
cursor:pointer;
}

#user_plan.user-plan-free {
    text-transform: capitalize;
    font-weight: 600;
}

[data-theme="dark"] #userbar #user_plan.user-plan-free,
html:not([data-theme="light"]) #userbar #user_plan.user-plan-free {
    color: rgba(255, 255, 255, 0.92);
}

#user_plan.user-plan-pro {
    color: #ffd700;
    font-weight: bold;
    text-transform: uppercase;
}

[data-theme="light"] #userbar #user_plan.user-plan-free {
    color: var(--text-main, #1a3352);
}

.dropdown_menu{
position:absolute;
right:0;
top:40px;
background:rgba(11, 15, 19, 0.396);
box-shadow:0 5px 20px rgba(0,0,0,0.15);
border-radius:8px;
overflow:hidden;
display:none;
min-width:170px;
z-index:999;
}

.dropdown_menu div{
padding:10px;
cursor:pointer;
border-bottom:3px solid transparent;
}

span{
    margin-right: 5px;
}
.dropdown_menu div:hover{
background:var(--primary-hover);
border-radius: 8px;
}

/* mobile */
@media (max-width:768px){

.user_btn{
padding:6px 10px;
font-size:14px;
}

.dropdown_menu{
right:-10px;
min-width:160px;
}

}

/* phone */
@media (max-width:480px){

.user_btn span{
display:none;
margin-right: 5px;
}

}

.contact_box{
    display: flex;
    flex-direction: column;
    width: 250px;

}

.change_pass_box,
.admin_box{
background:#111;
padding:20px;
border-radius:10px;
margin-top:20px;
}

.change_pass_box input,
.admin_box input{
display:block;
width:250px;
margin:10px 0;
padding:8px;
}

.change_pass_box{
    display: none;
}
.admin_box{
    display: block;
}

.change_pass_box.show{
    display: flex;
}

#info_box {
    opacity: 0;
    position: fixed; /* Nên dùng fixed để nó luôn ở giữa màn hình kể cả khi cuộn trang */
    top: 100%;
    left: 50%; /* Dùng left cho thuận mắt hơn right */
    transform: translate(-50%, -50%); /* Bí kíp để căn giữa chuẩn 100% */ 
    background: #1a252f;
    border-radius: 15px;
    padding: 25px;
    width: 300px; /* Nên đặt chiều rộng cố định để nhìn cân đối hơn */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--primary-hover);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Hiệu ứng mượt hơn ease-out */
    
}
#info_box input{
    width: 100%;
}

#info_box.show {
    opacity: 1;
    top: 50%;
    visibility: visible;
}



#tool_bar select{
    background: #1b2530;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 10px 0 10px 0;


}

#tool_bar option{

    background: #243649c3;
    border-radius: 8px;
    padding: 10px;
    border: 0;
}

#tool_bar .tool_button {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
}

.tool_seg {
    display: inline-flex;
    border-radius: 11px;
    padding: 3px;
    background: rgba(15, 23, 32, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    gap: 2px;
}

.tool_seg .seg_btn {
    border: none;
    margin: 0;
    background: transparent !important;
    color: #94a3b8;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    box-shadow: none;
}

.tool_seg .seg_btn:hover {
    color: #e2e8f0;
}

.tool_seg .seg_btn.active {
    background: linear-gradient(135deg, #4da3ff, #3b82f6) !important;
    color: #fff;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.35);
}

[data-theme="light"] .tool_seg {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .tool_seg .seg_btn {
    color: var(--text-muted);
}

[data-theme="light"] .tool_seg .seg_btn.active {
    color: #fff;
}

/* Toolbar: dropdown gọn (thay segment) */
#tool_bar .tool_dd {
    width: auto;
    min-width: 108px;
    max-width: 152px;
    overflow: visible;
}

#tool_bar .tool_dd .custom_dropdown__trigger {
    font-size: 14px;
    font-weight: 600;
    padding: 0 28px 0 10px;
    height: 38px;
    min-height: 38px;
    box-sizing: border-box;
    background: rgba(15, 23, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tool_bar .tool_button > .run_btn{
    background: #2ecc71;
}
#tool_bar .tool_button > .run_btn,
#tool_bar .tool_button > .more_btn,
#tool_bar .tool_button .export_dropdown .export_btn {
    height: 38px;
    min-height: 38px;
    padding: 0 14px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    margin: 0;
}

#tool_bar .tool_dd .custom_dropdown__menu {
    z-index: 2500;
    min-width: 100%;
}

[data-theme="light"] #tool_bar .tool_dd .custom_dropdown__trigger {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

.input-extra {
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out; /* Tạo hiệu ứng trượt */
    transform: translateY(-10px);
    width: 100%;
    align-items: center;
}

.input-extra.show {
    max-height: 100px;
    opacity: 1;
    transform: translateY(0);
}
.canvas-wallpaper{
    height: 100%;
    overflow: hidden;
}

.ai_extract_btn{
    font-size: 14px;
}

/* Từng khung chứa 1 tấm ván */
.sheet-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.sheet-label {
    color: #ff5c8a;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.right_panel{

flex:1;
background:var(--bg-card);
border-radius:10px;
display:flex;
flex-direction:column;
overflow: hidden;

}

canvas {
    transition: opacity 0.2s ease;
}

/* 3. Thanh Loading Bar xịn */
.loading-box {
    display: none; /* Ẩn mặc định */
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #1b2530;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4da3ff, #ff5c8a, #4da3ff);
    background-size: 200% 100%;
    animation: loadingMove 2s linear infinite;
    transition: width 0.3s ease;
}

@keyframes loadingMove {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}

/* 4. Trạng thái nút bị Disable */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.canvas-list-wrapper {
    scroll-behavior: smooth; /* Cuộn mượt */
}

/* Thanh bar xịn hơn */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(27, 33, 44, 0.537);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px); /* Blur nhẹ phần nền thanh bar */
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4da3ff, #ff5c8a);
    box-shadow: 0 0 10px rgba(77, 163, 255, 0.733);
    transition: width 0.3s ease;
}

/* 1. Căn giữa dòng thông báo nhập liệu */
#canvas_container {
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    gap: 30px;
    padding: 20px;
    min-height: 400px; /* Đảm bảo có chiều cao để căn giữa */
    scroll-behavior: auto; /* Tắt smooth của CSS để JS xử lý cuộn ngang không bị giật */
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
}

.empty-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.2rem;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* 2. Loading zone căn giữa tuyệt đối */
#loading_zone {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 300px;
    text-align: center;
}

/* 3. Hiệu ứng Blur mượt hơn */
.is-loading #canvas_container {
    filter: blur(8px);
    transition: filter 0.3s ease;
}

/* Modal lưu dự án (JS đặt display: flex khi mở) */
#saveProjectModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

#saveProjectModal > div,
#saveProjectModal .save-project-dialog {
    position: relative;
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--primary);
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#saveProjectModal .save-project-title {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-main);
}

#saveProjectModal .save-project-input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    box-sizing: border-box;
    border-radius: 6px;
}

#saveProjectModal .save-project-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

#saveProjectModal .save-project-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
}

#saveProjectModal .save-project-actions button[type="button"]:last-child:not(.save-project-cancel) {
    padding: 8px 15px;
}

/* Ẩn Dropdown Menu */
#dropdownMenu {
    display: none; /* Mặc định ẩn */
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 180px;
    z-index: 1000;
}

.export_dropdown, .user_dropdown {
    position: relative;
    display: inline-block;
}

.project-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin-top: 0;
}

.project-table th, .project-table td {
    padding: 12px;
    text-align: left;
    border: none;
}

.project-table tbody tr td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.project-table tbody tr td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.project-table th {
    background: transparent;
    color: #ffffff;
    font-size: 0.9em;
    text-transform: capitalize;
}

.project-table tbody td {
    color: #e5e7eb;
}

.project-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.03);
}

.project-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.065);
}

.open_btn {
    cursor: pointer;
}

.project-table .open_btn,
.project-table .del_btn {
    min-width: 5.5rem;
    width: 5.5rem;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border: none;
}

.project-table .open_btn {
    background: #4da3ff;
    color: #fff;
}

.project-table .del_btn {
    background:  #ff5c8a;
    color: white;
    cursor: pointer;
}
.input-row:focus-within {
    outline: 2px solid #ff5c8a; /* Màu hồng viền như hình mày gửi */
    background: rgba(255, 77, 148, 0.1);
}

/* Chặn bôi đen toàn bộ vùng bảng để ưu tiên cho việc quét chọn */

#tool_container {
    pointer-events: auto !important;
}

.project-table tbody tr:focus-within {
    outline: 2px solid var(--primary); /* Viền hồng bao quanh cả dòng */
    transition: all 0.2s ease;
}



/* Viết lặp lại class 2 lần để tăng độ ưu tiên lên cực cao */
.close.close {
    background: transparent ;
    border: 1px solid var(--primary) ;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Hiệu ứng khi hover */
.close.close:hover {
    border-color: var(--primary-hover);
    color: var(--text-main);
    background-color:var(--primary-hover); /* Hồng nhạt xuyên thấu */
}

.btn_group { 
    padding: 0; 
    font-weight: 450;
    cursor: pointer;
    box-sizing: border-box; /* QUAN TRỌNG: Để border không làm tăng kích thước nút */
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cloud_save_btn{
    color: #4da3ff;
    font-weight: bold;
}
.cloud_save_btn:hover{
    color: white;
}

.toast-msg {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    min-height: 44px;
    max-width: min(400px, 92vw);
    width: max-content;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    z-index: 10000;
    white-space: pre-line;
    line-height: 1.4;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.modal-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8); display:flex; align-items:center; justify-content:center; z-index: 9999;
}
.btn-pro { background: #ffd700; color: #000; border:none; padding: 10px 20px; font-weight:bold; cursor:pointer; border-radius:5px; }
.btn-secondary { background: #444; color: #fff; border:none; padding: 10px 20px; cursor:pointer; border-radius:5px; }

/* Layout tổng thể */
.footer {
    background-color: #0f172a; /* Màu nền tối sâu hơn xíu */
    color: #cbd5e1;
    padding: 60px 0 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Inter', sans-serif;
}

.footer_container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr; /* Chia tỉ lệ cột */
    gap: 40px;
    padding: 0 20px;
}

/* Cột giới thiệu */
.sidebar .footer_logo {
    margin-top: 15;
    width: 100%;
    text-align: center;
}
.footer_logo {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.footer_logo span { color: #3b82f6; } /* Màu xanh chủ đạo của mày */

.footer_info p {
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.95;
    color: #e8eef5;
}

/* Cột Links */
.footer_links h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.footer_links ul { list-style: none; padding: 0; }
.footer_links li { margin-bottom: 12px; }
.footer_links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9rem;
    cursor: pointer;
}
.footer_links a:hover { color: #3b82f6; padding-left: 5px; pointer-events: auto;}

/* Contact Card (Phần quan trọng nhất) */
.contact_card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact_card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
}

.input_group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.contact_card input, .contact_card textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
}

.contact_card textarea {
    height: 100px;
    resize: none;
    margin-bottom: 15px;
}

.contact_card input:focus, .contact_card textarea:focus {
    border-color: #3b82f6;
    outline: none;
    background: rgba(0, 0, 0, 0.3);
}

.btn_send {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    width: 100%;
    justify-content: center;
}

.btn_send:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Bottom Bar */
.footer_bottom {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.85rem;
}

/* Nhỏ gọn — đối chiếu với STATIC_ASSETS_V / ?v= trên static */
.footer-app-version {
    margin: 8px 0 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.32);
    user-select: text;
}

.footer-app-version--sidebar {
    margin-top: 18px;
    text-align: left;
    padding: 0 4px;
}

.footer-app-version--pricing,
.footer-app-version--admin {
    margin-top: 28px;
    margin-bottom: 16px;
    text-align: center;
}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .footer_container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .input_group { grid-template-columns: 1fr; }
}

.social_links {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.social_links a {
    color: #fff;
    font-size: 24px;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    width: auto;
    height: auto;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
}

.social_links a:hover {
    transform: scale(1.1);
    opacity: 0.9;
    filter: brightness(1.05);
}

/* Icon social trắng trên footer, không khung nền */
.social_links a.social_fb {
    color: #fff !important;
}
.social_links a.social_ig {
    color: #fff !important;
}
.social_links a.social_tiktok {
    color: #fff !important;
}
.social_links a.social_youtube {
    color: #fff !important;
}
.social_links a.social_messenger {
    color: #fff !important;
}

.footer_zalo_badge {
    background: transparent !important;
    color: #fff !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    font-size: 22px;
    font-weight: 800;
    padding: 0;
}

#register_review {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    margin-top: 6px;
    padding: 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
}

/* Tắt mọi loại viền/bóng mặc định của trình duyệt */
#parts_body input {
    border: none;
    outline: none !important;
    background: transparent !important;
    width: 100%;
    height: 100%;
    display: block;
    padding: 0 5px;
    color: var(--text-main);
    box-shadow:none;
    border-radius: 0;  
}

#parts_body input:focus {
    border: 2px solid var(--primary);  
}

.selection-rect {
    border: 2px solid var(--primary);
    background: rgba(76, 161, 253, 0.182);
    pointer-events: none; /* Quan trọng: để không ngăn cản việc click vào input */
    position: absolute;
    z-index: 100;
    box-shadow:none;
}

.hide-focus #parts_body input:focus {
    border: 0;
}

/* Ẩn con mắt mặc định của Chrome, Edge */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    display: none !important;
}

/* Container cho input password để chứa icon con mắt */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.password-wrapper i {
    position: absolute;
    right: 10px;
    cursor: pointer;
    color: var(--primary); /* Đổi màu con mắt ở đây theo ý mày */
}

#info_box span{
    display: block;
    font-weight: 600;
    margin: 20px 10px 10px 10px;
}
#info_box h3{
    display: block;
    width: 100%;
    text-align: center;
}


/* Nút tạo mới */
.new_project {
    position: absolute;
    top: 30px;
    right: 25px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2ecc71;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    font-size: 30px;
}
.new_project_large{
    background: #2ecc71;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    
}

.new_project:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Đảm bảo tất cả các tab đều có khoảng cách lề đồng nhất */
.content_section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
    padding: 0;
    animation: fadeIn 0.3s ease; /* Thêm hiệu ứng hiện ra cho mượt */
    z-index: 3;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Các card lớn trong mỗi section */

/* Card lớn duy nhất bao quanh nội dung của mỗi Section */
.main_display_card {
    padding: 20px 0;

}


/* Container bọc ngoài để căn giữa form */
.info_form_container {
    
    padding: 20px 0;
}
.info_form_card{
    display: flex;
    gap: 20px;
}

/* Tiêu đề trong form */
.content_section h3 {
    margin-bottom: 25px;
    margin-top: 0;
    font-size: 1.2rem;
    color: #fff;
    padding-bottom: 10px;

}
.content_section .h3{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding-bottom: 8px;
}

/* Từng cụm Label + Input */
.form_group {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column; /* Đẩy label lên trên input */
}

.info_form_container label {
    margin-bottom: 8px;
    color: #8a94a6;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Style cho các ô nhập liệu */
.info_form_container input {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #fff;
    transition: 0.3s;
    font-weight: 300;
}

.info_form_container input:focus {
    outline: none;
    border-color: #4da3ff; /* Màu xanh của mày */
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.2);
}

/* Nút Lưu thay đổi */
.update_btn_new {
    background: #4da3ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.update_btn_new:hover {
    background: #3d8bdb;
    transform: translateY(-1px);
}

/* Thông báo thành công/lỗi */
#pass_msg {
    text-align: center;
    margin-top: 8px;
    font-size: 0.9rem;
}

.dashboard_settings_footer #pass_msg {
    text-align: left;
}


/* Định dạng hoa văn tròn màu chìm */
/* Container hoa văn */
.pattern-circle {
    color: #1f3a5f;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    right: -450px; /* Đẩy ra để chỉ thấy 1/3 vòng tròn ở rìa phải */
    width: 900px;  /* Kích thước hoa văn */
    height: 900px;
    background-image: url('/static/image/pattern.png'); /* Nhớ đúng đường dẫn */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1; /* Để mờ chìm xuống nền tối */
    z-index: 0;
    pointer-events: none;

    filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(160deg) brightness(118%) contrast(119%);
    
    /* Bước 2: Tạo bóng màu xanh Cyan và xóa cái ảnh gốc (trick: bóng offset 0, blur 0) */
    /* filter: drop-shadow(0 0 0px #00ffff) drop-shadow(0 0 0px #00ffff) opacity(0.2);  */
    
    /* Hiệu ứng xoay mượt mà (chỉ xoay, không translateY) */
    transition: transform 0.3s linear, opacity 0.2s ease;
    visibility: hidden;
    
}


/* ======================== BILLING CARD - DARK MODE ======================== */

.billing-card {
  background: #1b2530b4;
  border-radius: var(--border-radius-lg, 12px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* ─── Header Section ─── */
.billing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-left: 4px solid #ffd700;
  padding-left: 1rem;
}

.billing-plan-info {
  flex: 1;
}

.billing-label {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.billing-plan-name {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 500;
  color: #ffd700;
}

/* FREE: không dùng màu trắng inline — tránh chìm trên nền sáng ở light theme */
.billing-card .billing-plan-name.billing-plan-name--tier-free {
  color: #e5e7eb;
  font-weight: 700;
}

.billing-card .billing-plan-name.billing-plan-name--tier-pro {
  color: #ffd700;
}

.billing-expire-info {
  text-align: right;
}

.billing-days {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 500;
  color: #e5e7eb;
}

.billing-date {
  margin: 4px 0 0;
  font-size: 12px;
  color: #6b7280;
}

/* ─── Stats Grid ─── */
.billing-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.billing-stat-box {
  background: #243142;
  border-radius: var(--border-radius-md, 8px);
  border: 0.5px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
}

.billing-stat-label {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.billing-stat-value, .billing-stat-value-2 {
  margin: 12px 0;
  font-size: 20px;
  font-weight: 500;
  color: #e5e7eb;
}

/* ─── Progress Section ─── */
.billing-progress-section {
  margin-bottom: 1.5rem;
}

.billing-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.billing-progress-label {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

.billing-progress-percent {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
}

.billing-progress-container {
  background: #16202a;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.06);
}

.billing-progress-bar {
  background: linear-gradient(90deg, #4da3ff, #ff5c8a);
  height: 100%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(77, 163, 255, 0.4);
}

/* ─── Benefits Section ─── */
.billing-benefits {
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.billing-benefits-title {
  margin: 0 0 8px;
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.billing-benefits-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: #d1d5db;
}

.billing-benefits-list li {
  margin: 4px 0;
}

/* ======================== RESPONSIVE ======================== */

@media (max-width: 640px) {
  .billing-card {
    padding: 1.25rem;
  }

  .billing-header {
    flex-direction: column;
    gap: 12px;
    border-left: none;
    border-top: 4px solid #ffd700;
    padding-left: 0;
    padding-top: 12px;
  }

  .billing-expire-info {
    text-align: left;
  }

  .billing-stats {
    grid-template-columns: 1fr;
  }
}

.settings_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    flex: 1;
}
 
.form_column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
 
.form_column .form_group:last-child {
    margin-bottom: 0;
}

.form_group_two_col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form_group_two_col > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form_group_two_col > div > label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 8px;
    line-height: 1.35;
}

/* Căn hàng Theme + Language ngang hàng ô Xác nhận mật khẩu (cột trái) */
.settings_grid > .form_column {
    align-self: stretch;
}

.form_theme_lang_row .dashboard_theme_dd .custom_dropdown__trigger {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 13px;
    line-height: 1.35;
    box-sizing: border-box;
}

.form_title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 
 
.form_group label {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}
 
.form_group input {
    padding: 10px 12px;
    background: #16202a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s ease;
}
 
.form_group input:focus {
    outline: none;
    border-color: #4da3ff;
    background: #1a2a38;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}
 
.form_group input:disabled {
    background: #16202a;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}
 
.form_group input::placeholder {
    color: #6b7280;
}

.form_group select {
    padding: 10px 12px;
    background: #16202a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s ease;
}

.form_group select:focus {
    outline: none;
    border-color: #4da3ff;
    background: #1a2a38;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}
 
.form_divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 0 15px 0;
}
 
.form_actions {
    display: flex;
    height: 36px;
    gap: 10px;
    margin-top: 6px;
}

/* Custom dropdown (thay select native) */
.custom_dropdown {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.custom_dropdown__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #161b22;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom_dropdown__trigger::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(148, 163, 184, 0.9);
    flex-shrink: 0;
    margin-left: 6px;
}

.custom_dropdown.is-open .custom_dropdown__trigger {
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.15);
}

.custom_dropdown__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1b2530;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 80;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.custom_dropdown.is-open .custom_dropdown__menu {
    display: block;
}

.custom_dropdown__menu li {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
    transition: background 0.15s ease;
}

.custom_dropdown__menu li:hover {
    background: rgba(77, 163, 255, 0.18);
    color: #fff;
}

.dashboard_settings_footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 8px;
}

.dashboard_settings_footer #pass_msg {
    flex: 1;
    min-width: 200px;
    margin: 0;
    text-align: left;
}
 
.btn_primary {
    background: linear-gradient(135deg, #4da3ff, #2586fd);
    color: white;
}
 
.btn_primary:hover {
    background: linear-gradient(135deg, #3d8bdb, #1a6dd8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 163, 255, 0.3);
}
 
.btn_secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
 
.btn_secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
 
.form_message {
    margin-top: 15px;
    font-size: 13px;
    color: #9ca3af;
    text-align: left;
}
 
.form_message[style*="color: green"] {
    color: #4caf50 !important;
}
 
.form_message[style*="color: red"] {
    color: #ff5c5c !important;
}
 
/* RESPONSIVE */
@media (max-width: 768px) {
    .settings_grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form_group_two_col {
        grid-template-columns: 1fr;
    }
    
    .form_actions {
        flex-direction: column;
    }
    
    .btn_save {
        width: 100%;
    }
}

/* ADMIN PAGE ==========================================================*/

/* ======================== ADMIN PANEL STYLES ======================== */

/* Tổng quát */
.admin {
    display: flex;
    height: 100vh;
    background: var(--bg-main, #0f1720);
}

/* SIDEBAR */
.admin_sidebar {
    width: 240px;
    background: var(--bg-card, #1b2530);
    padding: 25px 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.admin_sidebar h2 {
    margin: 0 0 25px 0;
    font-size: 18px;
    color: #fff;
}

.menu_item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #9ca3af;
    border-left: 3px solid transparent;
}

.menu_item:hover {
    background: rgba(77, 163, 255, 0.1);
    color: #4da3ff;
    border-left-color: #4da3ff;
}

.menu_item.active {
    background: #4da3ff;
    color: #fff;
    border-left-color: #4da3ff;
    box-shadow: 0 4px 12px rgba(77, 163, 255, 0.3);
}

.admin_badge {
    display: inline-block;
    margin-left: 6px;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.admin_pending_box {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
}

[data-theme="light"] .admin_pending_box {
    background: var(--bg-card);
    border-color: var(--border);
}

.admin_pending_reload,
.btn_secondary {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 13px;
}

.admin_pending_reload:hover,
.btn_secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-theme="light"] .admin_pending_reload,
[data-theme="light"] .btn_secondary {
    background: var(--bg-elevated);
    color: var(--text-main);
    border-color: var(--border);
}

.btn_eye {
    margin-left: 6px;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #9ca3af;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn_eye:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .btn_eye {
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme="light"] .btn_eye:hover {
    color: var(--text-main);
    background: var(--bg-elevated);
}

#payment_config_result {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

[data-theme="light"] #payment_config_result {
    background: #f1f5f9;
    border-color: var(--border);
    color: #0f172a;
}

.sidebar_btn {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: #4da3ff;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.sidebar_btn:hover {
    background: #3d8bdb;
}

.logout_btn {
    background: #ff5c5c;
}

.logout_btn:hover {
    background: #e63946;
}

/* MAIN AREA */
.admin_main {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: var(--bg-main, #0f1720);
    scrollbar-width: thin;
    scrollbar-color: #4da3ff33 transparent;
}

.admin_main h2 {
    margin: 0 0 25px 0;
    font-size: 28px;
    color: #fff;
}

/* TABS */
.admin_tab {
    display: none;
}

.admin_tab.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── STATS GRID ─── */
.admin_stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat_card {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat_card:hover {
    border-color: #4da3ff;
    box-shadow: 0 8px 24px rgba(77, 163, 255, 0.15);
    transform: translateY(-2px);
}

.stat_icon {
    font-size: 32px;
}

.stat_content {
    flex: 1;
}

.stat_label {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat_value {
    margin: 6px 0 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.stat_sublabel {
    margin: 6px 0 0;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.35;
}

/* ─── INFO BOXES ─── */
.info_grid {
    margin-bottom: 30px;
}

.info_box {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.info_box h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #fff;
}

.info_item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info_item:last-child {
    border-bottom: none;
}

.info_item span {
    color: #9ca3af;
}

.info_item strong {
    color: #4da3ff;
}

/* ─── SEARCH BAR ─── */
.search_bar {
    margin-bottom: 20px;
}

.search_bar input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: 0.3s;
}

.search_bar input:focus {
    outline: none;
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

/* ─── USER TABLE ─── */
.user_table {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.user_table h3 {
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
}

.user_table table {
    width: 100%;
    border-collapse: collapse;
}

.user_table thead {
    background: rgba(77, 163, 255, 0.08);
}

.user_table th {
    padding: 12px 16px;
    text-align: left;
    color: #9ca3af;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.user_table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.user_table tbody tr:hover {
    background: rgba(77, 163, 255, 0.05);
}

.user_table button {
    padding: 6px 12px;
    margin-right: 8px;
    background: #4da3ff;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: 0.3s;
}

.user_table button:hover {
    background: #3d8bdb;
}

/* ─── SETTINGS ─── */
.settings_section {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.settings_section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #fff;
}



.setting_group {
    display: flex;
    flex-direction: column;
}

.setting_group label {
    margin-bottom: 8px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.setting_group input {
    padding: 10px 12px;
    background: #16202a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: 0.3s;
}

.setting_group input:focus {
    outline: none;
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.1);
}

.admin_social_intro {
    margin: -8px 0 16px 0;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

.admin_social_grid.admin_social_grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin_social_field .admin_social_input_row {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.admin_social_field .admin_social_input_row input {
    flex: 1;
    min-width: 0;
}

.admin_toggle {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.admin_toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin_toggle_track {
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2a3544 0%, #1a222e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: block;
    position: relative;
}

.admin_toggle_knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f4f4f5 0%, #d4d4d8 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, background 0.25s ease;
}

.admin_toggle input:checked + .admin_toggle_track {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.admin_toggle input:checked + .admin_toggle_track .admin_toggle_knob {
    transform: translateX(20px);
    background: linear-gradient(180deg, #fff 0%, #e4e4e7 100%);
}

.admin_toggle input:focus-visible + .admin_toggle_track {
    outline: 2px solid #4da3ff;
    outline-offset: 2px;
}



.btn_save:hover {
    background: #3d8bdb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 163, 255, 0.3);
}

#settings_msg {
    color: #4da3ff;
}

/* ─── REVENUE ─── */
.revenue_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.revenue_card {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.revenue_label {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.revenue_value {
    margin: 10px 0 0;
    font-size: 22px;
    font-weight: 600;
    color: #4da3ff;
}

/* ─── SECURITY ─── */
.security_section {
    background: var(--bg-card, #1b2530);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.security_section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #fff;
}

.security_group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.security_group input {
    padding: 10px 12px;
    background: #16202a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.security_group input:focus {
    outline: none;
    border-color: #4da3ff;
}

.security_group button {
    padding: 10px 20px;
    background: #4da3ff;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.security_group button:hover {
    background: #3d8bdb;
}

/* Scrollbar admin dùng chung global (xem block * ở đầu file) — không override thêm. */

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .admin_sidebar {
        width: 200px;
    }

    .admin_main {
        padding: 20px;
    }

    .settings_grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin {
        flex-direction: column;
    }

    .admin_sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        flex-direction: row;
        overflow-x: auto;
        padding: 15px;
    }

    .admin_sidebar h2 {
        margin-right: 20px;
    }

    .menu_item {
        margin-bottom: 0;
        margin-right: 10px;
        white-space: nowrap;
    }

    .admin_stats,
    .revenue_grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Light theme: pastel (single block, last wins) ========== */
[data-theme="light"] {
    --bg-main: #dce8f8;
    --bg-card: #f4f7fe;
    --bg-elevated: #ffffff;
    --bg-soft: #e3ecf9;
    --bg-well: #e8f0fc;
    --text-main: #1a3352;
    --text-muted: #5a6f86;
    --primary: #4d8deb;
    --primary2: #e86a9a;
    --primary-hover: #3a78d4;
    --border: rgba(45, 85, 140, 0.14);
    --shadow-soft: 0 8px 28px rgba(45, 95, 160, 0.09);
}

[data-theme="light"] body {
    background:
        radial-gradient(ellipse 100% 80% at 0% 0%, rgba(200, 220, 255, 0.55), transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 10%, rgba(255, 210, 225, 0.45), transparent 45%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(200, 240, 230, 0.35), transparent 55%),
        linear-gradient(168deg, #d8e6fb 0%, #eef4ff 42%, #e5edf8 100%);
    color: var(--text-main);
}

[data-theme="light"] * {
    scrollbar-color: #4d8deb55 transparent;
}
[data-theme="light"] *::-webkit-scrollbar-thumb {
    background: #4d8deb55;
}
[data-theme="light"] *::-webkit-scrollbar-thumb:hover {
    background: #4d8deb99;
}

[data-theme="light"] .nav {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(236, 244, 255, 0.92) 100%);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

[data-theme="light"] .nav h4 {
    color: var(--text-main);
}

[data-theme="light"] .nav .footer_logo {
    color: var(--text-main);
}

[data-theme="light"] .nav .footer_logo span {
    color: #1d4ed8;
    font-weight: 700;
}

[data-theme="light"] .btn-login-main {
    background: rgba(77, 141, 235, 0.12);
    color: var(--primary);
    border: 1px solid rgba(77, 141, 235, 0.35);
}

[data-theme="light"] .btn-login-main:hover {
    background: rgba(77, 141, 235, 0.2);
}

[data-theme="light"] .user_btn {
    background: linear-gradient(135deg, #f0f5ff, #e5ebfa);
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] #userbar .user_btn {
    border: 2px solid var(--primary);
}

[data-theme="light"] .dropdown_menu {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .dropdown_menu div {
    color: var(--text-muted);
}

[data-theme="light"] .dropdown_menu div:hover {
    background: rgba(77, 141, 235, 0.12);
    color: var(--primary);
}

[data-theme="light"] #dropdownMenu {
    background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] #tool_bar select {
    background: var(--bg-well);
    color: var(--text-main);
    border: 1px solid var(--border);
}

[data-theme="light"] #tool_bar option {
    background: var(--bg-elevated);
    color: var(--text-main);
}

[data-theme="light"] .tool_info {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .main_layout {
    background: transparent;
}

[data-theme="light"] #table {
    background: var(--bg-well);
}

[data-theme="light"] .left_panel,
[data-theme="light"] .right_panel {
    background: var(--bg-card);
    border: none;
    outline: none;
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] #table_container {
    background: var(--bg-well);
    border: 1px solid var(--border);
}

[data-theme="light"] #parts_table {
    color: var(--text-main);
}

[data-theme="light"] #parts_table thead th {
    background: linear-gradient(180deg, #dfeaf9 0%, #d4e3f5 100%);
    color: #1f3555;
    border-color: var(--border);
}

[data-theme="light"] #parts_table tbody tr:nth-child(odd) {
    background: #f8faff;
}

[data-theme="light"] #parts_table tbody tr:nth-child(even) {
    background: #eef3fb;
}

[data-theme="light"] #parts_table tbody td {
    border-color: rgba(45, 85, 140, 0.1);
}

[data-theme="light"] .canvas-wallpaper {
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-well) 100%);
}

[data-theme="light"] #canvas_container {
    background: linear-gradient(145deg, rgba(232, 242, 255, 0.9) 0%, rgba(240, 248, 252, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}

[data-theme="light"] .sheet-label {
    color: #c94d7d;
}

[data-theme="light"] #part_info {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .progress-container {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
}

[data-theme="light"] .hero {
    background:
        radial-gradient(circle at 18% 28%, rgba(140, 180, 255, 0.35), transparent 42%),
        radial-gradient(circle at 82% 18%, rgba(255, 190, 210, 0.3), transparent 38%),
        linear-gradient(155deg, #e2ebfb 0%, #f2f6ff 38%, #e8effc 100%);
}

[data-theme="light"] .hero h1 {
    color: var(--text-main);
}

[data-theme="light"] .pricing h2,
[data-theme="light"] .testimonials h2 {
    color: var(--text-main);
    font-weight: 700;
}


[data-theme="light"] .review_modal {
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    border-color: rgba(77, 141, 235, 0.25);
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

[data-theme="light"] .review_modal_close {
    background: var(--bg-well);
    color: var(--text-main);
}

[data-theme="light"] .review_modal_title {
    color: var(--text-main);
}

[data-theme="light"] .review_modal .public_review_hint,
[data-theme="light"] .review_modal .public_review_done {
    color: var(--text-main);
}

[data-theme="light"] .public_review_hint,
[data-theme="light"] .public_review_done {
    color: var(--text-main);
}

[data-theme="light"] .public_review_form label {
    color: var(--text-muted);
}

[data-theme="light"] .public_review_msg {
    color: var(--text-main);
}

[data-theme="light"] .public_review_form textarea,
[data-theme="light"] .public_review_form select,
[data-theme="light"] .public_review_form .custom_dropdown__trigger {
    background: var(--bg-well);
    color: var(--text-main);
    border-color: var(--border);
}

[data-theme="light"] #userbar .user_btn,
[data-theme="light"] #userbar .user_btn span:not(#user_plan) {
    color: var(--text-main);
}

[data-theme="light"] #userbar .user_btn #user_plan.user-plan-free {
    color: var(--text-main, #1a3352);
}

[data-theme="light"] select option,
[data-theme="light"] select optgroup {
    background-color: #ffffff;
    color: #1a3352;
}

[data-theme="light"] .footer {
    background: linear-gradient(180deg, #7d9eba 0%, #6889a8 45%, #5c7a96 100%);
    border-top: 1px solid rgba(45, 75, 110, 0.28);
    color: var(--text-main);
}

[data-theme="light"] .footer_logo {
    color: #f8fafc;
}

[data-theme="light"] .footer_logo span {
    color: #1d4ed8;
    font-weight: 700;
}

[data-theme="light"] .footer_links h3 {
    color: #f8fafc;
}

[data-theme="light"] .footer p,
[data-theme="light"] .footer a,
[data-theme="light"] .footer li {
    color: rgba(248, 250, 252, 0.88);
}

[data-theme="light"] .footer .footer_info > p {
    color: rgba(255, 255, 255, 0.97);
}

[data-theme="light"] .footer .footer-app-version {
    color: rgba(248, 250, 252, 0.55);
}

[data-theme="light"] .footer-app-version--sidebar,
[data-theme="light"] .footer-app-version--pricing,
[data-theme="light"] .footer-app-version--admin {
    color: var(--text-muted);
    opacity: 0.8;
}

[data-theme="light"] .contact_card {
    background: linear-gradient(145deg, #ffffff 0%, #f2f6fd 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .contact_card h3 {
    color: var(--text-main);
}

[data-theme="light"] .contact_card input,
[data-theme="light"] .contact_card textarea {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="light"] .contact_card input:focus,
[data-theme="light"] .contact_card textarea:focus {
    background: var(--bg-elevated);
    border-color: var(--primary);
}
[data-theme="light"] .pricing,
[data-theme="light"] .testimonials {
    background: transparent;
    color: var(--text-main);
}

[data-theme="light"] .feature,
[data-theme="light"] .plan,
[data-theme="light"] .testimonial {
    background: linear-gradient(145deg, #ffffff 0%, #f3f7fe 100%);
    border-color: rgba(77, 141, 235, 0.2);
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .feature h3,
[data-theme="light"] .plan h3 {
    color: #1a3352;
}

[data-theme="light"] .feature p,
[data-theme="light"] .plan li,
[data-theme="light"] .plan p,
[data-theme="light"] .testimonial p,
[data-theme="light"] .testimonial span:not(.testimonial_author) {
    color: var(--text-muted);
}

[data-theme="light"] .testimonial .testimonial_author {
    color: var(--primary);
}

[data-theme="light"] .feature:hover,
[data-theme="light"] .plan:hover,
[data-theme="light"] .testimonial:hover {
    box-shadow: 0 12px 32px rgba(45, 95, 160, 0.12);
}

[data-theme="light"] .plan.pro {
    border-color: var(--primary);
}

[data-theme="light"] .slider {
    background: #b8c8dc;
}

[data-theme="light"] #login_panel {
    background: linear-gradient(180deg, #f2f6ff 0%, #e6eef9 100%);
    box-shadow: -8px 0 28px rgba(45, 95, 160, 0.12);
}

[data-theme="light"] .auth-google-host {
    background: linear-gradient(155deg, #ffffff 0%, #eef4ff 100%);
    border-color: rgba(77, 141, 235, 0.28);
    box-shadow: 0 8px 26px rgba(45, 95, 160, 0.12);
}

[data-theme="light"] .auth-google-label,
[data-theme="light"] .auth-or-line {
    color: var(--text-muted);
}

[data-theme="light"] .auth-verify-banner {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--text-main);
}

[data-theme="light"] .auth-verify-banner__resend {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="light"] #login_card h3 {
    color: var(--text-main);
}

[data-theme="light"] #login_card span {
    color: var(--text-muted);
}

[data-theme="light"] .auth-back-login {
    color: var(--text-muted);
}

[data-theme="light"] .nsm7Bb-HzV7m-LgbsSe {
    background-color: #f5f8ff !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

[data-theme="light"] #saveProjectModal {
    background-color: rgba(30, 50, 80, 0.35) !important;
}

[data-theme="light"] #saveProjectModal > div {
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] #saveProjectModal h3 {
    color: var(--text-main);
}

[data-theme="light"] #saveProjectModal #projectNameInput {
    background: var(--bg-well);
    border: 1px solid var(--border);
    color: var(--text-main);
}

[data-theme="light"] #saveProjectModal .save-project-actions button.save-project-cancel {
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid var(--border);
}

[data-theme="light"] #overlay {
    background: rgba(35, 55, 90, 0.35);
}

[data-theme="light"] .modal-overlay {
    background: rgba(35, 55, 90, 0.45);
}

[data-theme="light"] .btn-secondary {
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid var(--border);
}

[data-theme="light"] .loading-overlay {
    background-color: rgba(230, 240, 252, 0.92);
}

[data-theme="light"] .spinner {
    border-color: #dde8f5;
    border-top-color: var(--primary);
}

[data-theme="light"] .dashboard {
    background: linear-gradient(180deg, #d8e4f5 0%, #e8f0fa 50%, #dfeaf7 100%);
}

[data-theme="light"] .pattern-circle {
    opacity: 0.22;
    filter: invert(34%) sepia(95%) saturate(2200%) hue-rotate(195deg) brightness(90%) contrast(108%);
}

[data-theme="light"] .admin {
    background: linear-gradient(180deg, #d8e4f5 0%, #e8f0fa 100%);
}

[data-theme="light"] .sidebar,
[data-theme="light"] .admin_sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f0f5fd 100%);
    border-right-color: var(--border);
}

[data-theme="light"] .sidebar h2,
[data-theme="light"] .admin_sidebar h2 {
    color: var(--text-main);
}

[data-theme="light"] .dashboard_main,
[data-theme="light"] .admin_main {
    background: transparent;
}

[data-theme="light"] .menu_item {
    color: var(--text-muted);
}

[data-theme="light"] .menu_item:hover {
    background: rgba(77, 141, 235, 0.12);
    color: var(--primary);
}

[data-theme="light"] .menu_item.active {
    background: #2563eb;
    color: #fff;
    border-left-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

[data-theme="light"] .menu_item.active:hover {
    background: #1d4ed8;
    color: #fff;
    border-left-color: #1e3a8a;
}

[data-theme="light"] .sidebar .footer_logo {
    color: var(--text-main);
}

[data-theme="light"] .sidebar .footer_logo span {
    color: #1d4ed8;
    font-weight: 700;
}

[data-theme="light"] .card,
[data-theme="light"] .projects {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.66) 0%, rgba(242, 246, 253, 0.72) 100%);
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .dashboard_header h3,
[data-theme="light"] .admin_main h2,
[data-theme="light"] .content_section h3 {
    color: var(--text-main);
}

[data-theme="light"] .info_form_container label,
[data-theme="light"] .form_title,
[data-theme="light"] .form_group label,
[data-theme="light"] .form_group_two_col > div > label,
[data-theme="light"] .setting_group label,
[data-theme="light"] .stat_label,
[data-theme="light"] .revenue_label,
[data-theme="light"] .empty-msg,
[data-theme="light"] .billing-label {
    color: var(--text-muted);
}

[data-theme="light"] .info_form_container input {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="light"] .form_group input,
[data-theme="light"] .form_group select,
[data-theme="light"] .setting_group input,
[data-theme="light"] .security_group input {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="light"] .custom_dropdown__trigger {
    background: var(--bg-well);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="light"] .custom_dropdown__menu {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .custom_dropdown__menu li {
    color: var(--text-main);
}

[data-theme="light"] .custom_dropdown__menu li:hover {
    background: rgba(77, 141, 235, 0.12);
    color: var(--primary);
}

.admin_plan_badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin_plan_badge--pro {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #422006;
}

.admin_plan_badge--free {
    background: rgba(100, 116, 139, 0.35);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

[data-theme="light"] .admin_plan_badge--free {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

[data-theme="light"] .user_table {
    border-color: var(--border);
}

[data-theme="light"] .user_table th {
    color: var(--text-muted);
    border-color: var(--border);
}

[data-theme="light"] .user_table td {
    color: var(--text-main);
    border-color: var(--border);
}

[data-theme="light"] .user_table select {
    background: var(--bg-well);
    color: var(--text-main);
    border-color: var(--border);
}

[data-theme="light"] .settings_section,
[data-theme="light"] .security_section,
[data-theme="light"] .info_box,
[data-theme="light"] .stat_card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="light"] .settings_section h3,
[data-theme="light"] .security_section h3,
[data-theme="light"] .info_box h3 {
    color: var(--text-main);
}

[data-theme="light"] .info_item {
    border-color: var(--border);
}

[data-theme="light"] .info_item span {
    color: var(--text-muted);
}

[data-theme="light"] .stat_remaining--pro {
    color: #9a3412 !important;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .stat_value {
    color: var(--text-main);
}

[data-theme="light"] .billing-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f5fc 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] #section_projects #all_projects_list.billing-card {
    /* Chỉ nền mờ (~75–82% đục), không blur — hoa văn nhìn xuyên qua */
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.76) 0%,
        rgba(236, 244, 252, 0.82) 100%
    );
}

/* Khoảng giữa các dòng: trong suốt → thấy nền container + hoa văn; ô vẫn dùng style .project-table mặc định */
[data-theme="light"] #section_projects #all_projects_list .project-table {
    background: transparent;
    border-collapse: separate;
    border-spacing: 0 6px;
}

[data-theme="light"] .billing-stat-box {
    background: var(--bg-well);
    border-color: var(--border);
}

[data-theme="light"] .billing-progress-container {
    background: rgba(77, 141, 235, 0.15);
    border-color: var(--border);
}

[data-theme="light"] .billing-days,
[data-theme="light"] .billing-stat-value,
[data-theme="light"] .billing-stat-value-2,
[data-theme="light"] .billing-benefits-list {
    color: var(--text-main);
}

[data-theme="light"] .billing-card .billing-plan-name.billing-plan-name--tier-free {
    color: var(--text-main, #1a3352);
}

[data-theme="light"] .revenue_card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="light"] .search_bar input {
    background: var(--bg-well);
    color: var(--text-main);
    border-color: var(--border);
}

[data-theme="light"] .pricing_nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .pricing_hero {
    background: linear-gradient(135deg, #e2ebfb 0%, #f2f6ff 100%);
}

[data-theme="light"] .price_header h2,
[data-theme="light"] .faq_section h2 {
    color: var(--text-main);
}

[data-theme="light"] .price_card,
[data-theme="light"] .faq_item {
    background: linear-gradient(145deg, #ffffff 0%, #f3f7fe 100%);
    border-color: rgba(77, 141, 235, 0.2);
}

[data-theme="light"] .pro_card {
    border-color: var(--primary);
    box-shadow: 0 12px 36px rgba(77, 141, 235, 0.15);
}

[data-theme="light"] .plan_btn {
    border-color: var(--border);
    color: var(--text-muted);
}

[data-theme="light"] .plan_btn.active {
    color: #fff;
}

[data-theme="light"] .modal_content {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .monthly_options label {
    color: var(--text-muted);
}

[data-theme="light"] .monthly_options select {
    background: var(--bg-well);
    color: var(--text-main);
    border-color: var(--border);
}

[data-theme="light"] .project-table th {
    color: var(--text-main);
    background: transparent;
}

[data-theme="light"] .project-table tbody td {
    color: var(--text-main);
}

[data-theme="light"] .project-table tbody tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.045);
}

[data-theme="light"] .project-table tbody tr:nth-child(even) td {
    background: rgba(15, 23, 42, 0.085);
}

[data-theme="light"] .project-table th,
[data-theme="light"] .project-table td {
    border: none;
}

[data-theme="light"] .toast-msg {
    background: rgba(45, 75, 110, 0.92);
    color: #fff;
}

[data-theme="light"] .cloud_save_btn:hover {
    color: var(--primary);
}

[data-theme="light"] .price_current,
[data-theme="light"] .price_monthly {
    color: var(--primary);
}

[data-theme="light"] .free_card .price_current {
    color: var(--text-main);
}

[data-theme="light"] .faq_item h4 {
    color: var(--text-main);
}

[data-theme="light"] .testimonial_car_ctrl {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border, rgba(45, 85, 140, 0.2));
    color: var(--text-main, #1a3352);
}

[data-theme="light"] #login_panel #register_review {
    background: var(--bg-well);
    border: 1px solid var(--border);
    color: var(--text-main);
}

@media (max-width: 768px) {
    [data-theme="light"] .billing-header {
        border-top-color: #e6b325;
    }

    [data-theme="light"] .admin_sidebar {
        border-bottom: 1px solid var(--border);
    }
}


/* ════════════════════════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE PATCH (smartphone < 640px)
   Mục tiêu: trải nghiệm như app — không hở mép, không overflow ngang,
   button/input touch-friendly (min 44px), modal full screen, sidebar
   collapse, font/padding compact.
   ════════════════════════════════════════════════════════════════════ */

/* Chống overflow ngang trên mobile/tablet; desktop để visible để .nav sticky hoạt động đúng. */
@media (max-width: 900px) {
    html, body {
        max-width: 100vw;
        overflow-x: clip;
    }
}
@supports not (overflow: clip) {
    @media (max-width: 900px) {
        html, body {
            overflow-x: hidden;
        }
    }
}

/* ─── Tablet / phone: công cụ full-width, thanh công cụ đáy, canvas sau khi chạy ─── */
@media (max-width: 900px) {
    #tool {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    #tool .main_layout {
        flex-direction: column;
        height: calc(100dvh - 60px - 80px - env(safe-area-inset-bottom, 0px));
        padding: 10px !important;
        box-sizing: border-box;
        gap: 8px;
        overflow: hidden;
    }

    #tool:not(.show-canvas) .right_panel {
        display: none !important;
    }

    #tool.show-canvas .main_layout {
        height: auto;
        min-height: calc(100dvh - 60px - 80px - env(safe-area-inset-bottom, 0px));
        max-height: none;
        overflow: visible;
    }

    #tool.show-canvas .left_panel {
        flex: 0 0 min(42vh, 380px);
        max-height: min(42vh, 380px);
    }

    #tool.show-canvas .right_panel {
        display: flex !important;
        flex: 1 1 auto;
        min-height: min(48vh, 520px);
    }

    #tool .left_panel {
        width: 100% !important;
        flex: 1 1 auto;
        min-height: 0;
    }

    #canvas_container {
        min-height: 0;
    }

    #tool_bar {
        top: auto !important;
        bottom: 0;
        left: 0px;
        right: 0px;
        width: auto;
        max-width: calc(100vw - 16px);
        box-sizing: border-box;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        align-self: stretch;
        max-height: min(64dvh, 480px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        background: rgba(15, 23, 32, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
        z-index: 520;
    }

    #tool_bar.show {
        top: auto !important;
    }

    #tool_bar .tool_button {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
        align-items: stretch;
        box-sizing: border-box;
    }

    #tool_bar .tool_button > .run_btn {
        flex: 1 1 42%;
        min-width: 0;
        max-width: 100%;
    }
    #tool_bar .tool_button > .ai_extract_btn {
        flex: 1 1 30%;
        min-width: 0;
        max-width: 100%;
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 13px !important;
    }
    #tool_bar .tool_button > .export_dropdown {
        flex: 1 1 26%;
        min-width: 0;
        max-width: 100%;
    }
    #tool_bar .tool_button > .more_btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 52px;
        max-width: 72px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #tool_bar #tool_rotate_dd {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        max-width: calc(50% - 4px);
    }
    #tool_bar #tool_machine_dd {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        max-width: calc(50% - 4px);
    }

    #tool_bar .tool_dd .custom_dropdown__trigger,
    #tool_bar .export_btn,
    #tool_bar .run_btn,
    #tool_bar .ai_extract_btn,
    #tool_bar .more_btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #tool_bar .export_btn {
        font-size: 13px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        white-space: nowrap;
    }

    #tool_bar .tool_info.show {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px 8px;
        max-height: none !important;
        opacity: 1 !important;
        padding: 10px !important;
        align-items: center;
    }

    #tool_bar .export_dropdown {
        position: relative;
    }
    #tool_bar .export_dropdown .dropdown_menu {
        top: auto !important;
        bottom: calc(100% + 6px);
        right: 0;
        left: 0;
        min-width: 0;
        width: 100%;
        max-height: min(42dvh, 300px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #tool_bar .tool_info.show .kvL,
    #tool_bar .tool_info.show .kvS {
        width: 100%;
    }
}

@media (max-width: 640px) {
    /* === GLOBAL TYPOGRAPHY / SPACING === */
    body { font-size: 14px; }
    h1 { font-size: 22px !important; line-height: 1.2; }
    h2 { font-size: 19px !important; line-height: 1.25; }
    h3 { font-size: 17px !important; }
    h4 { font-size: 15px !important; }

    /* Touch target: tất cả button mặc định >= 44px chiều cao */
    button, .btn, input[type="submit"], input[type="button"] {
        font-size: 15px;
    }
    input, select, textarea {
        font-size: 16px;  /* ngăn iOS zoom khi focus */
       /*  min-height: 44px; */
        box-sizing: border-box;
    }
    textarea { min-height: 80px; }

    /* === NAV === */
    .nav, #header {
        flex-wrap: wrap !important;
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    .nav .title h2,
    .nav .title h3 { font-size: 18px !important; }
    .nav h4 { font-size: 11px !important; }
    #userbar { gap: 6px; }

    /* === DASHBOARD === */
    .dashboard {
        flex-direction: column !important;
    }
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        position: sticky !important;
        top: 0;
        z-index: 50;
        flex-direction: column !important;
        align-items: stretch;
        flex-wrap: nowrap;
        padding: 10px 12px !important;
        gap: 8px;
    }
    .sidebar_brand_row {
        margin-bottom: 0;
    }
    .sidebar_bottom {
        border-top: none;
        padding-top: 8px;
        margin-top: 0;
    }
    .sidebar_logout_compact {
        min-height: 36px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        width: 100%;
    }
    .sidebar .menu {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
        width: 100%;
        order: 0;
    }
    .sidebar .menu_item {
        padding: 8px 10px !important;
        font-size: 13px !important;
        flex: 0 0 auto;
        width: 100%;
        text-align: left !important;
    }
    .footer-app-version--sidebar { display: none; }
    .dashboard_main {
        padding: 14px 12px !important;
        width: 100% !important;
    }
    .dashboard_header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 6px;
    }

    #section_info .billing-card,
    #section_billing .billing-card,
    #section_activity .main_display_card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .content_section {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .sidebar_logout_compact,
    .sidebar_menu_toggle {
        min-height: 38px !important;
    }

    #photoExtractModal.photo_extract_modal {
        padding: 10px !important;
    }
    .photo_extract_dialog {
        max-height: 96vh;
        padding: 16px !important;
    }
    .photo_result_table {
        font-size: 12px;
    }
    .photo_result_table thead th,
    .photo_result_table tbody td {
        padding: 7px 8px;
    }

    /* === ADMIN === */
    .admin_layout, .admin_wrap {
        flex-direction: column !important;
    }
    .admin_sidebar {
        width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        padding: 10px !important;
        gap: 6px;
        overflow-x: auto;
    }
    .admin_sidebar .menu_item,
    .admin_sidebar .nav_item {
        flex: 1 1 auto;
        font-size: 13px !important;
        padding: 8px 10px !important;
    }
    .admin_main { padding: 14px 12px !important; }

    /* === PRICING === */
    .pricing_page, .pricing_container {
        padding: 12px 10px !important;
    }
    .pricing_container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    /* Trang chủ: card gần mép 10px, căn giữa */
    .pricing:not(.pricing_page) {
        padding: 48px 10px !important;
    }
    .pricing:not(.pricing_page) .pricing_container {
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
    }
    .pricing:not(.pricing_page) .plan {
        width: 100% !important;
        max-width: 440px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .pricing_nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px !important;
    }
    .plan_selector {
        flex-direction: column;
        gap: 8px;
    }
    .plan_btn { width: 100%; }
    .price_card {
        padding: 18px 14px !important;
    }

    /* === MODAL — full screen trên mobile === */
    .modal, .modal_box, .pay_modal, .invoice_modal,
    .auth_modal, .price_modal, .billing_modal {
        width: 100% !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 16px !important;
    }
    .modal_overlay { padding: 0 !important; }

    .review_modal_overlay {
        padding: 10px !important;
    }
    .review_modal {
        max-width: calc(100vw - 20px) !important;
    }

    /* === TOOLBAR (trang chủ): dock mobile — xem @media (max-width:900px) === */

    /* === TABLE === */
    table { font-size: 12px; }
    table th, table td { padding: 6px 4px !important; }
    .table_wrap, .data_table_wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* === FORM === */
    .form_row, .form_group {
        flex-direction: column !important;
        gap: 6px;
    }
    .form_row > * { width: 100% !important; }

    /* === SECTION CONTAINERS === */
    section, .section, .content_section {
        padding: 12px 10px !important;
    }

    .hero {
        padding: 96px 10px 48px !important;
    }
    .features {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 32px 10px !important;
        gap: 16px !important;
    }
    .feature {
        width: 100% !important;
        max-width: none !important;
    }
    .testimonials {
        padding: 24px 10px !important;
    }
    .testimonial_container {
        margin-top: 20px !important;
        padding: 10px !important;
        max-width: none !important;
    }
    .testimonial_carousel {
        padding: 10px !important;
    }
    .card, .stat_card {
        padding: 14px !important;
        border-radius: 12px;
    }
    .admin_stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* === FOOTER === */
    footer, .footer {
        padding: 40px 10px 12px !important;
        text-align: center;
    }
    .footer_container {
        padding: 0 10px !important;
    }
    .footer_grid, .footer_cols {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* Tablet portrait */
@media (max-width: 900px) and (min-width: 641px) {
    .pricing_container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    }
}
