* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* กรอบนอก (จำลองจอมือถือ) */
.app {
    width: 100%;
    max-width: 400px;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(196, 208, 249, 0.9) 20%, rgba(34, 116, 223, 0.8) 100%);
    padding-bottom: 20px;
    border-radius: 10px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 15px;
}

.logo {
    width: 100px;
    display: flex;
    padding: 3px;
}

.menu-btn {
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;     
  gap: 5px;                
  cursor: pointer;
  padding: 0;
}

.menu-btn span {
  display: block;
  width: 25px;             
  height: 2.5px;             
  background: #000;
  border-radius: 2px;     
  transition: 0.3s;       
}
   
/* Card */
.card {
    margin: 0px 15px;
    padding: 16px 14px 24px;
    background: linear-gradient(179.29deg, #ffffffea 16.35%);
    border-radius: 26px;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.12);
}

/* Icon*/
.label-icon{
    width: 38px; 
    height: 38px;
    object-fit: contain;
    margin-right: 6px;
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 16px;
}

.label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.label-icon {
    font-size: 20px;
}

.form-label {
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.form-label.center {
    text-align: center;
    width: 100%;
    display: block;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 8px 0 14px;
}

/* Text input */
.text-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 12px;
    border-radius: 12px;
    border: 1px solid #dddddd;
    background: #ffffff;

}

.text-input::placeholder {
    color: #b8b8b8;
    font-size: 10px;
}

/* Inline input + unit */
.inline-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.inline-group > div:first-child {
    flex: 1 1 auto;
}

.inline-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 45%;
}

.inline-input-wrapper .text-input {
    flex: 1;
}

.unit {
    font-size: 12px;
    color: #555;
}

/* Toggle buttons (Yes/No, Male/Female, ECOG ฯลฯ) */
.toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ซ่อน radio จริง */
.toggle-group input[type="radio"] {
    display: none;
}

/* ปุ่ม */
.toggle-option {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 12px;
    background: #f7f7f7;
    border: 1px solid #dddddd;
    cursor: pointer;
    user-select: none;
}

.ecog-group .toggle-option.small {
    flex: 0 0 22%;
}

/* ตอน checked */
.toggle-group input[type="radio"]:checked + .toggle-option {
    background:#6794e7;
    border-color: #6794e7;
    color: #ffffff;
}

/* Dropdown */
.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-select {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    background: #f7f7f7;
    border: 1px solid #dddddd;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #000000;
}

.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #555;
    pointer-events: none;
}

/* Focus */
.text-input:focus,
.dropdown-select:focus {
    outline: none;
    box-shadow: 0 0 0 1px #6794e7;
}

/* Buttons */
.btn-group {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
}

.btn-primary {
    width: 50%;
    padding: 12px 16px;
    border-radius: 20px;
    border: none;
    background: #3258de;
    color: #fff;
    font-size: 16px;
    font-weight: 450;
    cursor: pointer;
    
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-reset {
    margin-top: 4px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

/* สไตล์สำหรับดอกจันสีแดง */
.required-asterisk {
    color: #e63946;
    margin-left: 4px;
    font-weight: bold;
    font-size: 20px;
    display: none;
}

/* เมื่อมีการ Error (ใส่ class .has-error ที่ตัวครอบ) ให้แสดงดอกจัน */
.form-group.has-error .required-asterisk {
    display: inline;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
      body {
        padding: 0;
      }
      .app {
        border-radius: 0;
        box-shadow: none;
      }
    }