﻿/* ============================= */
/* 全域預設樣式與顏色變數 20260122 claire */
/* ============================= */
:root {
    /* 主色系 */
    --color-green: #1fae8a;
    --color-green400: #5fd1b3;
    --color-green200: #ace66f;
    --color-blue: #1f4e7a;
    --color-red: #ff4346;
    --color-pink: #d63384;
    --color-gray-100: #f9fafc;
    --color-gray-200: #e9ecef;
    --color-gray-300: #dee2e6;
    --color-gray-400: #ced4da;
    --color-gray-500: #adb5bd;
    --color-gray-600: #6c757d;
    --color-gray-700: #495057;
    --color-gray-800: #343a40;
    --color-gray-900: #2d3648;
    --color-black: #0c0c0c;
    --color-white: #fff;
    /* 字型 */
    --font-sans: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    /* 字體大小 */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.5rem;
    --font-size-h4: 1.25rem;
    --font-size-h5: 1rem;
    --font-size-h6: 0.875rem;
    /* 邊框圓角 */
    --border-radius: 0.25rem;
    /* 常用間距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    /* Font weight system */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
}

/* ============================= */
/* 全域元素重置 css reset 20260122 claire */
/* ============================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================= */
/* 全站設定 20260122 claire */
/* ============================= */
body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.5;
    background-color: var(--color-white);
}

a,
button {
    color: var(--color-blue);
    text-decoration: none;
    transition: all 0.5s;
    display: inline-block;
}

    /* ============================= */
    /* 無障礙用樣式 20260122 claire */
    /* ============================= */
    a:focus,
    button:focus {
        outline: 0.125rem dashed var(--color-pink);
        outline-offset: 0.0625rem; /*1px*/
    }

.visually-hidden {
    position: absolute;
    width: 0.0625rem; /*1px*/
    height: 0.0625rem; /*1px*/
    padding: 0;
    margin: -0.0625rem; /*1px*/
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* 無障礙導盲磚設計(直接佔位) */
.accesskey {
    padding: 0.25rem;
    color: var(--color-blue);
    font-size: 1rem;
    display: inline-block;
}

/* 無障礙導盲磚設計(父元素要設定position:relative) */
.accesskey_absolute {
    position: absolute;
    top: 0.3125rem;
    left: 0.3125rem;
    z-index: 9;
    color: var(--color-blue);
    font-size: 1rem;
}
/* ============================= */
/* 按鈕連結 20260122 claire */
/* ============================= */
.btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-width: 0.125rem; /*2px*/
    border-radius: 0.5rem;
    /* font-weight: 500; */
    cursor: pointer;
}

.btn-sm {
    padding: 0.25rem;
    padding: 0 0.5rem;
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius);
}

.btn-primary {
    background-color: var(--color-green);
    border: 0.0625rem solid var(--color-green);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-blue);
    border: 0.0625rem solid var(--color-blue);
    color: var(--color-white);
}

.btn-outline-primary {
    background-color: var(--color-white);
    border: 0.0625rem solid var(--color-green);
    color: var(--color-green);
}

.btn-outline-secondary {
    background-color: var(--color-white);
    border: 0.0625rem solid var(--color-blue);
    color: var(--color-blue);
}

.btn-outline-danger {
    background-color: var(--color-white);
    border: 0.0625rem solid var(--color-red);
    color: var(--color-red);
}

.cardBtn {
    flex: 0 1 18.75rem; /* 修改：固定基礎寬度為 300px */
    min-width: 0; /* 重要：允許 flex 項目縮小到比內容小 */
    max-width: 18.75rem; /* 300px */
    aspect-ratio: 1 / 1; /* 鎖定正方形比例 */

    border: none;
    cursor: pointer;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    /* 關鍵設定：確保背景圖片完整顯示並隨容器縮放 */
    background-size: contain;
    padding: 0;
}

.btn-apply {
    background-image: url("./bigBtn_apply.png");
}

.btn-manage {
    background-image: url("./bigBtn_manage.png");
}

.iconLink {
    padding: 0.5rem;
    cursor: pointer;
    background-color: var(--white);
    border-radius: 0.5rem;
    border: 0.0625rem solid var(--color-gray-100);
    box-shadow: rgba(60, 64, 67, 0.3) 0px 0.0625rem 0.125rem 0px, rgba(60, 64, 67, 0.15) 0px 0.0625rem 0.1875rem 0.0625rem;
}
/* ============================= */
/* utilitis 20260122 claire */
/* ============================= */
.text-primary {
    color: var(--color-green);
}

.text-secondary {
    color: var(--color-blue);
}

.text-danger {
    color: var(--color-red);
}

.text-muted {
    color: var(--color-gray-600);
}

.text-dark {
    color: var(--color-gray-900);
}

.textLinkPrimary {
    color: var(--color-green);
    text-decoration: underline;
}

    .textLinkPrimary:hover {
        color: var(--color-pink);
    }

.textLinkSecondary {
    color: var(--color-blue);
    text-decoration: underline;
}

    .textLinkSecondary:hover {
        color: var(--color-pink);
    }

.textLinkDanger {
    color: var(--color-red);
    text-decoration: underline;
}

    .textLinkDanger:hover {
        color: var(--color-pink);
    }

.postion-relative {
    position: relative;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.me-1 {
    margin-right: 0.25rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.ms-1 {
    margin-left: 0.25rem;
}

.ms-4 {
    margin-left: 1rem;
}

.p-7 {
    padding: 2.5rem;
}

.p-4 {
    padding: 1rem;
}

.ps-1 {
    padding-left: 0.25rem;
}

.ps-4 {
    padding-left: 1rem;
}

.ps-5 {
    padding-left: 1.5rem;
}

.min-h-80vh {
    min-height: 80vh;
}

.width100 {
    width: 6.25rem;
}

.width120 {
    width: 7.5rem;
}

.width150 {
    width: 9.375rem;
}

.width180 {
    width: 11.25rem;
}

.width200 {
    width: 12.5rem;
}
/* .min-width250 {
  min-width: 250px;
} */
.d-flex {
    display: flex;
}

.d-inline-block {
    display: inline-block;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.text-align-center {
    text-align: center;
}

.text-align-end {
    text-align: right;
}

.font-size-sm {
    font-size: var(--font-size-sm);
}

.font-size-lg {
    font-size: var(--font-size-lg);
}
/*shadow*/
.shadowXs {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 0.0625rem 0.25rem;
}

.shadowSm {
    box-shadow: rgba(67, 71, 85, 0.27) 0px 0px 0.25em, rgba(90, 125, 188, 0.05) 0px 0.25em 1em;
}

.shadowMd {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 0.5rem 1.5rem;
}
/* 元件樣式 */
.form-check-input {
    color: var(--color-white);
    background-color: var(--color-green);
}

    .form-check-input input[type="checkbox"]:checked + label::before {
        border-color: var(--color-green);
        background-color: var(--color-green);
    }

    .form-check-input:focus {
        outline: 0.125rem dashed var(--color-pink);
        outline-offset: 0.0625rem;
    }

.form-control {
    display: block;
    width: 100%;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-gray-800);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--color-white);
    background-clip: padding-box;
    border: 0.0625rem solid var(--color-gray-500);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        outline: 0.125rem dashed var(--color-pink);
        outline-offset: 0.0625rem;
    }

.form-control-fixed {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-gray-800);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--color-white);
    background-clip: padding-box;
    border: 0.0625rem solid var(--color-gray-500);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control-fixed:focus {
        outline: 0.125rem dashed var(--color-pink);
        outline-offset: 1px;
    }

.form-select-fixed {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-gray-800);
    border: 0.0625rem solid var(--color-gray-500);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-select-fixed:focus {
        outline: 0.125rem dashed var(--color-pink);
        outline-offset: 0.0625rem;
    }
/* ===== 標題樣式（不只靠顏色） ===== */
h2 {
    font-size: 1.75rem;
    margin: 0 0 1.5rem;
    padding-left: 0.75rem;
    color: var(--color-green);
    border-left: 0.375rem solid var(--color-green);
}

h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-gray-800);
}

h4 {
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--color-gray-700);
}

/* ============================= */
/* header區塊 20260122 claire */
/* ============================= */
header {
    background-color: var(--color-white);
}

.logo {
    width: 100%;
    max-width: 29.5625rem; /* 圖片原始寬度473 */
    display: block;
    padding: 1rem 0 1rem 1rem;
}

    .logo a {
        display: block;
        width: 100%;
    }

    .logo img {
        display: block;
        width: 100%; /* 寬度隨容器縮放 */
        height: auto; /* 高度自動依比例縮放 */
        border: 0;
    }
/* 使用範例 */
header::after {
    content: "";
    display: block;
    width: 100%;
    height: 0.3125rem;
    background: linear-gradient( 90deg, rgba(172, 230, 111, 1) 0%, rgba(95, 209, 179, 1) 50%, rgba(31, 174, 138, 1) 100% );
}

.hr-gradient {
    width: 100%;
    height: 0.3125rem;
    background: #ace66f;
    background: linear-gradient( 90deg, rgba(172, 230, 111, 1) 0%, rgba(95, 209, 179, 1) 50%, rgba(31, 174, 138, 1) 100% );
    border: none;
    /* 上下間距 */
}
/* ============================= */
/* 置中區塊 20260122 claire */
/* ============================= */
.bodyImg {
    background: url(./images/bg4.jpg) no-repeat center center;
    background-size: cover;
}

.layout-center {
    display: flex;
    justify-content: center;
    align-items: center; /* 置中更穩 */
    width: 100%;
    min-height: 80vh; /* ✅ 不要用 height:80vh */
    padding: clamp(1rem, 4vh, 3.75rem) clamp(1rem, 4vw, 2.5rem);
    box-sizing: border-box;
}

.layout-centerInner {
    display: flex;
    flex-direction: row; /* 預設併排 */
    justify-content: center;
    gap: 1.25rem; /* 按鈕間距 */
    width: 100%;
    max-width: 53.75rem; /* 420px * 2 + gap */
    align-items: center;
    min-height: 18.75rem;
}
/* logoin區塊 */
.loginWrapper {
    background-color: var(--color-white);
    width: 100%;
    max-width: 30rem;
    border-collapse: separate;
    border-spacing: 0;
    /* background: var(--color-gray-200); */
    border-radius: 0.5rem;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
    font-size: 1rem;
}

    .loginWrapper .title {
        padding: 1rem;
        /* background: var(--color-gray-300); */
        color: var(--color-white);
        text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.15);
        font-size: 1.25rem;
        letter-spacing: 0.05rem;
        font-weight: 600;
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0;
        background: linear-gradient( 90deg, rgba(172, 230, 111, 1) 0%, rgba(95, 209, 179, 1) 50%, rgba(31, 174, 138, 1) 100% );
        /* border-bottom: 1px solid #dcdcdc; */
    }

    .loginWrapper td {
        padding: 0.875rem 1rem;
        vertical-align: top;
    }

    .loginWrapper label {
        width: 5.625rem;
        display: inline-block;
        font-weight: 500;
        color: var(--color-gray-700);
    }
    /* 驗證碼 */
    .loginWrapper img {
        width: 6.25rem;
        display: inline-block;
        vertical-align: middle;
        margin-right: 0.5rem;
        border: 0.0625rem solid var(--color-gray-300);
    }

    .loginWrapper tfoot td {
        padding: 1rem;
        text-align: right;
        border-top: 0.0625rem solid var(--color-gray-200);
    }
/* 置中區塊Md */
.centerBoxMd {
    background-color: var(--color-white);
    width: 100%;
    max-width: 32.5rem;
    border-collapse: separate;
    border-spacing: 0;
    /* background: var(--color-gray-200); */
    border-radius: 0.5rem;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
    font-size: 1rem;
}

    .centerBoxMd thead th {
        padding: 1rem;
        color: var(--color-white);
        text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.15);
        font-size: 1.25rem;
        letter-spacing: 0.05rem;
        font-weight: 600;
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0;
        background: linear-gradient( 90deg, rgba(172, 230, 111, 1) 0%, rgba(95, 209, 179, 1) 50%, rgba(31, 174, 138, 1) 100% );
        /* border-bottom: 1px solid #dcdcdc; */
    }

    .centerBoxMd td {
        padding: 0.875rem 1rem;
        vertical-align: top;
    }

        .centerBoxMd td:nth-child(1) {
            width: 11.25rem;
        }

        .centerBoxMd td:nth-child(2) {
            width: calc(100% - 180px);
        }

    .centerBoxMd label {
        display: inline-block;
        font-weight: 500;
        color: var(--color-gray-700);
    }

    .centerBoxMd tfoot td {
        padding: 1rem;
        text-align: right;
        border-top: 0.0625rem solid var(--color-gray-200);
    }
/* 置中區塊Lg */
.centerBoxLg {
    width: 100%;
    background-color: var(--color-white);
    max-width: 37.5rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin: 0 auto;
}

    .centerBoxLg .title {
        padding: 1rem;
        color: var(--color-white);
        text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.15);
        font-size: 1.25rem;
        letter-spacing: 0.05rem;
        font-weight: 600;
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0;
        background: linear-gradient( 90deg, rgba(172, 230, 111, 1) 0%, rgba(95, 209, 179, 1) 50%, rgba(31, 174, 138, 1) 100% );
        /* border-bottom: 1px solid #dcdcdc; */
    }

    .centerBoxLg td {
        padding: 1rem 1.25rem;
    }

    .centerBoxLg tr td:first-child {
        width: 9.375rem;
        /* background: #ace66f; */
    }

.agreeArea {
    font-size: var(--font-size-sm);
    outline: none;
    border: none;
}
/* ============================= */
/* 置底footer區塊 20260122 claire */
/* ============================= */
footer {
    position: static;
    bottom: 0;
    right: 0;
    padding: 1rem;
    width: 100%;
    background-color: var(--color-white);
    border-top: 0.0625rem solid var(--color-gray-200);
}

.footerInner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .logo {
        max-width: 85%; /* 手機版縮小一點，避免貼到兩邊邊緣 */
        margin-bottom: 1.5rem;
    }

    .layout-centerInner {
        gap: 0.625rem;
        padding: 0 0.625rem; /* 增加邊距避免手機版按鈕太貼牆 */
    }

    .cardBtn {
        width: 100%; /* 在手機版佔據螢幕 80% 寬度 */
        max-width: 17.5rem; /* 但依然不超過 280px */
    }
}

/* checkbox樣式 */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    accent-color: var(--color-green);
}

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    cursor: pointer;
    color: var(--color-white);
}
    /* 對於勾勾是白色，背景綠色 */
    .form-check-input:checked {
        background-color: var(--color-green);
        border-color: var(--color-green);
        accent-color: var(--color-green);
    }

    /* disabled 樣式 */
    .form-check-input:disabled {
        cursor: not-allowed;
    }

.form-check-label {
    cursor: pointer;
}

/* focus 樣式（無障礙重點） */
.form-check-input:focus-visible {
    outline: 0.125rem dashed var(--color-pink);
    outline-offset: 0.0625rem;
}
/* 驗證碼區塊 Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

    .modal-overlay.is-open {
        display: flex;
    }

.modal-content {
    background: #fff;
    max-width: 37.5rem;
    width: 90%;
    max-height: 80vh;
    padding: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: auto;
    text-align: start;
    margin: 1rem 0;
}

button:focus,
.modal-content:focus {
    outline: 0.125rem dashed var(--color-pink);
    outline-offset: 0.0625rem;
}

/*20260130 add claire toast提示視窗*/
/* Toast 位置 */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 22.5rem;
    z-index: 1055;
}

/* 內容 */
.toast-inner {
    display: flex;
    align-items: center;
    background-color: #212529;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
}

/* 文字 */
.toast-body {
    flex: 1;
    line-height: 1.5;
}

/* 關閉按鈕 */
.toast-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

    .toast-close:focus {
        outline: 0.1875rem solid #ffc107; /* 無障礙焦點 */
        outline-offset: 0.125rem;
    }

@media (max-width: 576px) {
    .layout-center {
        padding: 2.5rem 1.25rem;
    }

    .layout-centerInner {
        flex-direction: column;
    }

    .centerBoxLg td {
        padding: 0.5rem;
    }

    .centerBoxLg tr td:first-child {
        font-size: var(--font-size-sm);
        width: 100px;
        /* background: #ace66f; */
    }

    footer {
        position: static;
    }

    .footerInner {
        flex-direction: column;
    }

    .loginWrapper td {
        padding: 0.5rem;
        vertical-align: top;
    }

    .centerBoxMd td {
        padding: 0.325rem;
    }

        .centerBoxMd td:nth-child(1) {
            font-size: var(--font-size-sm);
            width: 8.75rem;
        }
}
