@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Poppins:wght@400;600&family=Playfair+Display:wght@400;700&family=Lora:wght@400;700&display=swap');
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #E6CCE2, #D8B6FF);
    font-size: 16px;
    color: #3c3c3c;
    margin: 0;
    padding: 0;
}

.table-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    max-width: 2200px;
    margin-left: auto;
    margin-right: auto;
}

.table-container {
    width: 30%;
    padding: 15px;
    background: linear-gradient(145deg, #e1c3f0, #d4aadf);
    border-radius: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: center;
    margin: 15px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f1e3fb;
}

caption {
    font-size: 24px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    margin: 15px;
    color: #5f4b8b;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

td, th {
    border: 1px solid #d1a7e2;
    padding: 12px;
    width: 25%;
    background-color: #f7efff;
    color: #5f4b8b;
}
td.count_input,th.count_input{
    border: 1px solid #d1a7e2;
    padding: 12px;
    width: 50%;
    background-color: #f7efff;
    color: #5f4b8b;
}
.low-pt {
    color: red !important;
    background-color: rgb(255, 200, 200) !important;
}

.input-container {
    position: relative;
    display: inline-block;
}

input[type="text"] {
    width: 50px;
    padding: 8px;
    border: 2px solid #d1a7e2;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #3c3c3c;
    background-color: #f7efff;
    text-align: center;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: #8a4dff;
    background-color: #f0e0fb;
    outline: none;
}

.caption {
    font-size: 24px;
    color: #4e148c;
    background: #bfa6e8;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.1);
}

.table-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
    padding: 20px;
    max-width: 2200px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.15);
}
select {
    width: 160px;
    padding: 10px 12px;
    border: 2px solid #d1a7e2;
    border-radius: 8px;
    background-color: #f7efff;
    color: #5f4b8b;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0px 3px 6px rgba(0,0,0,0.1);
}

select:hover {
    border-color: #b583f7;
    background-color: #f0e4ff;
}

select:focus {
    border-color: #8a4dff;
    box-shadow: 0px 0px 8px rgba(138, 77, 255, 0.4);
}

select option {
    background-color: #f7efff;
    color: #5f4b8b;
    font-family: 'Poppins', sans-serif;
}
p.role-caption {
    font-size: 26px;  
    margin: 20px 0;  
    color: #4e148c;    
    letter-spacing: 1px;
} 
button {
    margin: 10px;
    font-size: large;
    width: 40px;
    height: 40px;
    text-align: center;
    border: 2px solid #d1a7e2;
    font-family: 'Poppins', sans-serif;
    background-color: #f7efff;
    border-radius: 12px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #d1a7e2;
    border-color: #9d75b3;
    transform: scale(1.2);
}
button:active {
    transform: scale(0.8);
}
/* 保留你原本給非 Select2 的樣式（這段你已經有了） */
select:not(.select2-hidden-accessible) {
  width: 160px;
  padding: 10px 12px;
  border: 2px solid #d1a7e2;
  border-radius: 8px;
  background-color: #f7efff;
  color: #5f4b8b;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0px 3px 6px rgba(0,0,0,0.1);
}
select:not(.select2-hidden-accessible):hover {
  border-color: #b583f7;
  background-color: #f0e4ff;
}
select:not(.select2-hidden-accessible):focus {
  border-color: #8a4dff;
  box-shadow: 0 0 8px rgba(138, 77, 255, 0.4);
}

/* 你的原生 select 仍保持這段（你已經有了） */
select:not(.select2-hidden-accessible) {
  width: 160px;
  padding: 10px 12px;
  border: 2px solid #d1a7e2;
  border-radius: 8px;
  background-color: #f7efff;
  color: #5f4b8b;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0px 3px 6px rgba(0,0,0,0.1);
}
select:not(.select2-hidden-accessible):hover {
  border-color: #b583f7;
  background-color: #f0e4ff;
}
select:not(.select2-hidden-accessible):focus {
  border-color: #8a4dff;
  box-shadow: 0 0 8px rgba(138, 77, 255, 0.4);
}

/* === Select2（單選）精準置中、不歪 === */
.select2-container { 
  width: 160px !important; 
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
}

/* 外框固定高度；不要在這層加 padding */
.select2-container--default .select2-selection--single {
  height: 44px;                     /* 與下方 line-height 完全一致 */
  border: 2px solid #d1a7e2;
  border-radius: 8px;
  background-color: #f7efff;
  box-shadow: 0px 3px 6px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

/* 文字容器：用 line-height 置中，左右內距放這層 */
select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #5f4b8b;
  line-height: 44px;
  text-align: center;      /* 讓文字置中 */
  padding: 0;              /* 清除左右 padding，讓居中準確 */
  margin: 0;
  width: 100%;             /* 確保文字橫向置中有效 */
}

/* 箭頭高度對齊選框高度 */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 8px;
}

/* hover / focus 效果維持你的風格 */
.select2-container--default .select2-selection--single:hover {
  border-color: #b583f7;
  background-color: #f0e4ff;
}
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #8a4dff;
  box-shadow: 0 0 8px rgba(138, 77, 255, 0.4);
}

/* 下拉清單維持原風格 */
.select2-dropdown { border: 2px solid #d1a7e2; background-color: #f7efff; }
.select2-results__option { color: #5f4b8b; font-family: 'Poppins', sans-serif; }
.select2-results__option--highlighted[aria-selected] { background-color: #f0e4ff; color: #4e148c; }
.select2-results__option[aria-selected="true"] { background-color: #d1a7e2; color: #4e148c; }
#instruction{
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #4e148c;
}

