:root {
    --dose-primary: #0891b2; /* Cyan đậm */
    --dose-accent: #06b6d4;
    --dose-bg: #ecfeff;
    --dose-text: #164e63;
    --dose-border: #cffafe;
    --dose-radius: 12px;
}

#kth-dosing-app {
    font-family: 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: 40px auto;
    color: #334155;
}

[v-cloak] { display: none; }

/* CARD */
.dose-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(8, 145, 178, 0.1);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

/* HEADER */
.dose-header {
    background: linear-gradient(135deg, #0e7490, #0891b2);
    color: white;
    padding: 30px;
    text-align: center;
}
.tool-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dose-header h2 { margin: 10px 0; color: white; font-size: 28px; }
.dose-header p { color: #cffafe; font-size: 15px; margin: 0; }

/* BODY LAYOUT */
.dose-body {
    display: flex;
    flex-wrap: wrap;
}

.dose-form {
    flex: 1.2;
    padding: 30px;
    border-right: 1px solid #f1f5f9;
}

.dose-result {
    flex: 0.8;
    background: #f8fafc;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FORM ELEMENTS */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* --- FIX LỖI SELECT BOX & INPUT --- */
.input-wrap input, 
.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.2s;
    outline: none;
    height: 48px; /* Cố định chiều cao */
    box-sizing: border-box;
}

/* Custom Select Container */
.select-container {
    position: relative;
    width: 100%;
}

/* Style riêng cho Select Dropdown */
.custom-select {
    width: 100%;
    height: 48px; /* Cố định chiều cao để không bị bẹp */
    padding: 10px 40px 10px 15px; /* Padding phải chừa chỗ cho mũi tên */
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #334155;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    appearance: none; /* Xóa style mặc định của trình duyệt */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* Mũi tên custom bằng SVG */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.input-wrap input:focus, 
.form-group input:focus,
.custom-select:focus {
    border-color: var(--dose-accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-wrap .unit {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    font-weight: 600;
}

/* Radio Cards */
.radio-group { display: flex; gap: 10px; }
.radio-card {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}
.radio-card input { display: none; }
.radio-card .icon { font-size: 20px; margin-bottom: 5px; }
.radio-card:hover { background: #f0f9ff; }
.radio-card.active {
    border-color: var(--dose-accent);
    background: var(--dose-bg);
    color: var(--dose-text);
}

.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.chem-desc { display: block; margin-top: 5px; color: #64748b; font-size: 13px; font-style: italic; }

.btn-calc {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b, #d97706); /* Màu Cam nổi bật */
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.2s;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(245, 158, 11, 0.4); }

.error-msg { color: #ef4444; font-weight: 600; margin-bottom: 15px; font-size: 14px; }

/* RESULT AREA */
.result-placeholder { text-align: center; color: #94a3b8; }
.result-placeholder img { width: 100px; opacity: 0.5; margin-bottom: 15px; }

.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.result-header-box {
    background: #f0fdf4;
    padding: 20px;
    text-align: center;
    border-bottom: 1px dashed #bbf7d0;
}
.result-header-box h4 { margin: 0; color: #166534; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.result-main-value { font-size: 18px; margin: 10px 0; color: #1e293b; }
.result-main-value strong { font-size: 28px; color: #dc2626; display: block; margin-top: 5px; }
.chem-name { margin: 0; font-weight: 600; color: #334155; }

.instruction-box { padding: 20px; }
.instruction-box h5 { margin: 0 0 10px 0; color: #475569; font-size: 14px; }
.instruction-box ul { padding-left: 20px; margin: 0; color: #334155; font-size: 14px; }
.instruction-box li { margin-bottom: 5px; }

/* PRODUCT CTA */
.product-cta {
    background: #fff7ed;
    padding: 20px;
    border-top: 2px solid #ffedd5;
    text-align: center;
}
.product-cta p { margin: 0 0 10px 0; font-size: 13px; color: #9a3412; font-weight: 600; text-transform: uppercase; }

.product-mini {
    background: white;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}
.prod-info { margin-bottom: 10px; text-align: left; }
.prod-info strong { display: block; color: #1e293b; font-size: 15px; margin-bottom: 4px; }
.stock-status { font-size: 12px; color: #16a34a; background: #dcfce7; padding: 2px 6px; border-radius: 4px; }

.btn-buy {
    display: block;
    background: #ea580c;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
}
.btn-buy:hover { background: #c2410c; }

.support-contact { font-size: 13px; color: #64748b; margin-top: 10px; }
.support-contact a { color: #0891b2; font-weight: 700; text-decoration: none; }

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

/* MOBILE */
@media (max-width: 768px) {
    .dose-body { flex-direction: column; }
    .dose-form { border-right: none; border-bottom: 1px solid #f1f5f9; }
    .radio-group { flex-direction: column; }
    .radio-card { flex-direction: row; justify-content: center; gap: 10px; }
    .params-grid { grid-template-columns: 1fr; }
}