        :root {
            --primary-color: #2563eb;
            --primary-hover: #1d4ed8;
            --bg-color: #f1f5f9;
            --card-bg: #ffffff;
            --text-color: #0f172a;
            --text-secondary: #475569;
            --border-color: #cbd5e1;
            --success-bg: #f0fdf4;
            --success-border: #16a34a;
            --success-text: #166534;
            --zalo-color: #0068ff;
            --zalo-hover: #0056d6;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.5;
            padding: 16px;
        }

        .container {
            display: flex;
            flex-direction: column; 
            width: 100%;            
            margin-bottom: 10px;    
        }

        .container h1 {
            font-size: 28px;        
            font-weight: 800;
            align-items: center;    
            text-align: center;     
            justify-content: center;
            margin: 0 0 5px 0;      
        }

        .container p {
            font-size: 20px;        
            color: #64748b;         
            margin: 0;
            align-items: center;    
            text-align: center;     
            justify-content: center;
            font-weight: 500;
            margin: 0 0 15px 0; 
        }

        h1 {
            text-align: center;
            color: var(--primary-color);
            margin: 15px 0 25px 0;
            font-size: 1.8rem;
            font-weight: 800;
        }

        .grid-layout {
            display: grid;
            grid-template-columns: 1.2fr 1fr;
            gap: 20px;
            align-items: start;
        }

        .card {
            background: var(--card-bg);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(226, 232, 240, 0.8);
        }

        .sticky-card {
            position: -webkit-sticky;
            position: sticky;
            top: 20px;
        }

        .card h2 {
            margin-top: 0;
            margin-bottom: 18px;
            font-size: 1.2rem;
            color: #1e293b;
            border-bottom: 2px solid #f1f5f9;
            padding-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .form-group {
            margin-bottom: 16px;
        }

        label {
            display: block;
            font-weight: 600;
            margin-bottom: 6px;
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        input, select, textarea {
            width: 100%;
            padding: 11px 14px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 0.95rem;
            color: var(--text-color);
            background-color: #fff;
            transition: all 0.2s ease;
            -webkit-appearance: none;
        }

        select {
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            padding-right: 40px;
        }

        input:disabled, select:disabled {
            background-color: #f1f5f9;
            color: #94a3b8;
            cursor: not-allowed;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }

        textarea {
            resize: vertical;
            min-height: 76px;
            font-family: inherit;
        }

        .grid-2col {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .hidden {
            display: none !important;
        }

        .result-list {
            margin-bottom: 15px;
        }

        .result-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.95rem;
        }

        .result-item:last-of-type {
            border-bottom: none;
        }

        .result-label {
            color: var(--text-secondary);
        }

        .result-value {
            font-weight: 700;
            color: var(--text-color);
            text-align: right;
        }

        #lblTemTrenTo {
            color: var(--primary-color);
            font-size: 1.2rem;
        }

        .discount-badge {
            background-color: #fef3c7;
            color: #92400e;
            font-size: 0.8rem;
            padding: 2px 8px;
            border-radius: 9999px;
            font-weight: 600;
            display: inline-block;
            margin-top: 4px;
        }

        .total-box {
            background: #fdf2f2;
            border: 1px solid #fecaca;
            padding: 15px;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            margin-top: 10px;
        }

        .total-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .total-price {
            font-size: 1.4rem;
            color: #dc2626;
            font-weight: 800;
        }

        .btn-calc {
            width: 100%;
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 14px;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s ease;
            margin-top: 5px;
            box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
        }

        .btn-calc:hover {
            background: var(--primary-hover);
        }

        /* CSS Nút Sao chép & Gửi Zalo */
        .btn-zalo-order {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            background: var(--zalo-color);
            color: white;
            border: none;
            padding: 14px;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 12px;
            box-shadow: 0 4px 6px rgba(0, 104, 255, 0.2);
            text-align: center;
            position: relative;
        }

        .btn-zalo-order:hover {
            background: var(--zalo-hover);
        }

        .btn-zalo-order svg {
            width: 22px;
            height: 22px;
            fill: white;
        }

        /* Toast thông báo nhanh khi đã copy thành công */
        .toast-msg {
            position: fixed;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(15, 23, 42, 0.9);
            color: white;
            padding: 10px 20px;
            border-radius: 30px;
            font-size: 0.9rem;
            font-weight: 600;
            z-index: 10000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .toast-msg.show {
            opacity: 1;
        }

        .note {
            font-size: 0.8rem;
            color: #64748b;
            margin-top: 4px;
            display: block;
        }

        .info-box {
            margin-top: 20px;
            padding: 12px 15px;
            background: var(--success-bg);
            border-left: 4px solid var(--success-border);
            border-radius: 0 8px 8px 0;
            font-size: 0.85rem;
            color: var(--success-text);            
        }

        .section-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
        }

        .btn-manage {
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1d4ed8;
            border-radius: 8px;
            padding: 7px 10px;
            font-size: 0.78rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
        }

        .btn-manage:hover {
            background: #dbeafe;
        }

        .policy-title {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 6px;
        }

        .policy-line {
            display: flex;
            gap: 7px;
            align-items: flex-start;
            margin-top: 5px;
        }

        .policy-line::before {
            content: "•";
            font-weight: 900;
        }

        .manager-modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 20000;
            background: rgba(15, 23, 42, 0.68);
            padding: 20px;
            align-items: center;
            justify-content: center;
        }

        .manager-modal.show {
            display: flex;
        }

        .manager-panel {
            width: min(980px, 100%);
            max-height: 92vh;
            overflow: auto;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
            padding: 22px;
        }

        .manager-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
            padding-bottom: 14px;
            border-bottom: 1px solid #e2e8f0;
            margin-bottom: 18px;
        }

        .manager-header h2 {
            margin: 0;
            padding: 0;
            border: 0;
        }

        .manager-close {
            border: 0;
            background: #f1f5f9;
            color: #334155;
            width: 38px;
            height: 38px;
            border-radius: 10px;
            font-size: 21px;
            cursor: pointer;
        }

        .manager-section {
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 16px;
            background: #f8fafc;
        }

        .manager-section h3 {
            font-size: 1rem;
            margin-bottom: 5px;
        }

        .manager-help {
            color: #64748b;
            font-size: 0.82rem;
            margin-bottom: 12px;
        }

        .manager-list {
            display: grid;
            gap: 10px;
        }

        .manager-row {
            display: grid;
            grid-template-columns: auto 1.45fr 0.85fr 0.75fr 0.9fr 1.15fr auto;
            gap: 8px;
            align-items: end;
            padding: 10px;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            transition: opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .manager-row.policy-admin-row {
            grid-template-columns: auto 1fr auto;
            align-items: center;
        }

        .sortable-chosen {
            border-color: var(--primary-color);
            box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
        }

        .sortable-ghost {
            opacity: 0.3;
            border: 2px dashed var(--primary-color);
            background: #dbeafe;
        }

        .sortable-drag {
            opacity: 0.95;
            border-color: var(--primary-color);
            box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
        }

        .drag-handle {
            width: 38px;
            min-height: 42px;
            align-self: stretch;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px dashed #94a3b8;
            border-radius: 8px;
            background: #f8fafc;
            color: #475569;
            font-size: 1.15rem;
            font-weight: 900;
            cursor: grab;
            user-select: none;
            touch-action: none;
        }

        .drag-handle:hover,
        .drag-handle:focus {
            outline: none;
            color: var(--primary-color);
            border-color: var(--primary-color);
            background: #eff6ff;
        }

        .drag-handle:active {
            cursor: grabbing;
        }

        body.is-sorting,
        body.is-sorting * {
            cursor: grabbing !important;
        }

        .sort-help {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 9px;
            margin-bottom: 10px;
            border-radius: 8px;
            background: #fff7ed;
            border: 1px solid #fed7aa;
            color: #9a3412;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .mini-label {
            display: block;
            color: #64748b;
            font-size: 0.72rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .material-size-inputs {
            display: grid;
            grid-template-columns: minmax(62px, 1fr) auto minmax(62px, 1fr);
            gap: 5px;
            align-items: center;
        }

        .material-size-inputs > span {
            color: #64748b;
            font-weight: 800;
        }

        .material-size-editor > select {
            margin-bottom: 5px;
        }

        .material-size-editor.is-disabled {
            opacity: 0.55;
        }

        .default-size-note {
            display: block;
            margin-top: 7px;
            padding: 7px 9px;
            color: #1d4ed8;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 7px;
            font-weight: 700;
        }

        .default-size-note.hidden {
            display: none;
        }

        .btn-remove {
            border: 1px solid #fecaca;
            background: #fef2f2;
            color: #b91c1c;
            border-radius: 8px;
            padding: 10px 12px;
            font-weight: 700;
            cursor: pointer;
        }

        .manager-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-top: 14px;
        }

        .manager-actions-left,
        .manager-actions-right {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .btn-admin-action {
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #334155;
            border-radius: 9px;
            padding: 10px 14px;
            font-weight: 700;
            cursor: pointer;
        }

        .btn-admin-save {
            border-color: var(--primary-color);
            background: var(--primary-color);
            color: #fff;
        }

        .manager-message {
            display: none;
            padding: 10px 12px;
            margin-bottom: 12px;
            border-radius: 9px;
            font-size: 0.86rem;
            font-weight: 700;
        }

        .manager-message.error {
            display: block;
            color: #991b1b;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        .manager-message.success {
            display: block;
            color: #166534;
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
        }

        .admin-toolbar {
            position: fixed;
            left: 16px;
            bottom: 16px;
            z-index: 15000;
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 9px 11px;
            border-radius: 12px;
            background: #0f172a;
            color: #fff;
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
            font-size: 0.82rem;
            font-weight: 700;
        }

        .admin-toolbar form {
            margin: 0;
        }

        .admin-toolbar button {
            border: 1px solid #475569;
            background: #1e293b;
            color: #fff;
            border-radius: 8px;
            padding: 7px 10px;
            cursor: pointer;
            font-weight: 700;
        }

        .admin-login-overlay {
            position: fixed;
            inset: 0;
            z-index: 30000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(15, 23, 42, 0.72);
            backdrop-filter: blur(6px);
        }

        .admin-login-card {
            width: min(420px, 100%);
            padding: 24px;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
        }

        .admin-login-card h2 {
            font-size: 1.3rem;
            margin-bottom: 8px;
            color: #0f172a;
        }

        .admin-login-card p {
            margin-bottom: 18px;
            color: #64748b;
            font-size: 0.9rem;
        }

        .admin-login-card label {
            margin-bottom: 6px;
        }

        .admin-login-actions {
            display: flex;
            gap: 9px;
            margin-top: 14px;
        }

        .admin-login-actions button,
        .admin-login-actions a {
            flex: 1;
            border-radius: 9px;
            padding: 11px 13px;
            text-align: center;
            font-weight: 700;
            cursor: pointer;
        }

        .admin-login-actions button {
            border: 1px solid var(--primary-color);
            background: var(--primary-color);
            color: #fff;
        }

        .admin-login-actions a {
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #334155;
        }

        .admin-login-error {
            padding: 10px 12px;
            margin-bottom: 13px;
            border-radius: 9px;
            color: #991b1b;
            background: #fef2f2;
            border: 1px solid #fecaca;
            font-size: 0.86rem;
            font-weight: 700;
        }

        .html-help {
            margin-top: 7px;
            padding: 9px 10px;
            border-radius: 8px;
            background: #eff6ff;
            color: #1e40af;
            font-size: 0.78rem;
            line-height: 1.45;
        }

        .html-help code {
            padding: 1px 4px;
            border-radius: 4px;
            background: #dbeafe;
            color: #1e3a8a;
        }

        /* Bong bóng Zalo nổi */
        .zalo-float {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 60px;
            height: 60px;
            background-color: var(--zalo-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
            z-index: 9999;
            transition: transform 0.3s ease;
        }

        .zalo-float:hover {
            transform: scale(1.1);
            background-color: var(--zalo-hover);
        }

        .zalo-float svg {
            width: 36px;
            height: 36px;
            fill: white;
        }

        .zalo-float::before {
            content: "";
            position: absolute;
            border: 1px solid var(--zalo-color);
            width: 100%;
            height: 100%;
            border-radius: 50%;
            z-index: -1;
            animation: zalo-wave 1.5s infinite ease-out;
        }

        @keyframes zalo-wave {
            0% { transform: scale(1); opacity: 1; }
            100% { transform: scale(1.6); opacity: 0; }
        }

        @media (max-width: 768px) {
            body { padding: 10px; }
            h1 { font-size: 1.4rem; margin: 10px 0 15px 0; }
            .grid-layout { grid-template-columns: 1fr; gap: 15px; }
            .card { padding: 15px; }
            .sticky-card { position: static; }
            .grid-2col { grid-template-columns: 1fr; gap: 0; }
            input, select, textarea { padding: 12px; font-size: 1rem; }
            .total-price { font-size: 1.25rem; }
            .zalo-float { bottom: 16px; right: 16px; width: 50px; height: 50px; }
            .zalo-float svg { width: 30px; height: 30px; }
            .manager-row,
            .manager-row.policy-admin-row {
                grid-template-columns: auto 1fr;
                align-items: start;
            }
            .manager-row > :not(.drag-handle) { grid-column: 2; }
            .drag-handle { grid-column: 1; grid-row: 1 / span 7; min-height: 52px; }
            .btn-remove { width: 100%; }
            .section-title-row { align-items: flex-start; }
        }
