html, body {
    font-family: "Helvetica Neue",Arial,"Heiti TC","LiHei Pro","微軟正黑體","Microsoft Jhenghei",sans-serif;
    height: 100%;
    min-height: 100%;
    height: auto !important;
    position: relative; /* For scrollyspy */
    /*padding-top: 40px; *//* Account for fixed navbar */
}

h1 {
    color: #393939;
}

.errormessage {
    background-color: hotpink;
    color: #ffffff;
    padding: 10px ;
    text-shadow: none;
    -webkit-border-radius: 5px;
}

.payment_radio {
    margin-top: 0px;
    margin-bottom: 0px;
}

.navbar {
    margin-bottom: 0;
    border-bottom: none
}

.footer-links li {
    margin-right: 30px;
}


.cover-wrap {
    width: 100%;
    min-width: 980px;
    min-height:551px;
}


.cover {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-repeat: no-repeat;
    background-position:center;
    -moz-background-size:cover;
    -webkit-background-size:cover;
    -o-background-size:cover;
    background-size:cover;
}

#cover {
    background-image: url("https://cdn3.ecloudlife.com/landing/ecloudbox_banner.png");
    margin-top: 50px;
}

.index-lower-part {
    position: relative;
    margin: 0 auto;
    max-width: 1206px;
}



#container {
    margin-top: 60px;
    padding: 20px;
    background-color: white;
    min-height: 768px;
}

#container .datatable {
    background-color: #f8f8f8;
    color: #7e6b5a;
}

#container .datatable a {
    color: #7e6b5a;
}

.invoice-detail-table-header {
    background-color: #f7f4e0;
}

.invoice-detail-table-body tr {
    background-color: #ece8d4;
}

.invoice-table {
    color: #333333;
}

.invoice-table .lottery {
    background-color: #f2c43d;
}

.btn-select {
    color: white;
    background-color: #b5b4a9;
}

#loginbox {
    width:300px;
    height:200px;
    maring:auto;
    position: relative;
}

.input-group {
    margin: 5px auto;
}

.form-signin {
    max-width: 380px;
    padding: 15px;
    margin: 0 auto;
}

.form-resetpassword {
    max-width: 380px;
    padding: 15px;
    margin: 0 auto;
}

.form-change-password {
    max-width: 380px;
    padding: 15px;
    margin: 0 auto;
}

.form-change-username {
    max-width: 380px;
    padding: 15px;
    margin: 0 auto;
}

.form-register {
    max-width: 380px;
    padding: 15px;
    margin: 0 auto;
}

.lotterypanel {
    max-width: 600px;
    margin: 20px auto;
}

p.lotterynumber {
    font-size: 150%;
    color: #e0564c;
    font-weight:bold;
}

.hiddenRow {
    padding: 0 !important;
}

.footer {
    width: 100%;
    margin-top: 100px;
    margin-bottom: 20px;

}

.footer ul{
    list-style: none;
    margin: 0 auto;
    bottom: 0;
    padding-left: 0;
}

.footer ul li {
    color: #bbbbbb;
    font-size: 13px;
    display: inline;
}

.footer ul li a {
    text-decoration:none;
    color: #bbbbbb;
}

.footer ul .right {
    float: right;
    margin-left: 20px;
}

.profilebox {
    margin: 50px auto;
    max-width: 800px;
}

.carrierbox {
    margin: 50px auto;
    max-width: 800px;
}

.profilebox #barcode {
}

.bs-callout-info {
    background-color: #f4f8fa;
    border-color: #bce8f1;
}

.bs-callout {
    margin: 20px 0;
    padding: 20px;
    border-left: 3px solid #eee;
}

.paragraphbox {
    margin: 50px auto;
    max-width: 600px;
}

.form-middle {
    max-width: 600px;
    margin: 0px auto;
}

.form-large {
    max-width: 970px;
    margin: 0px auto;
}

.table-tools {
    float: left;
}

.table-length-select {
    float: right;
}

div.DTTT { margin-bottom: 0.5em; float: right; }
div.dataTables_wrapper { clear: both; }

.global-floating-button {
    --global-floating-button-offset: 16px;
    --global-floating-button-tab-width: 66px;
    position: fixed;
    right: var(--global-floating-button-offset);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100;
    width: var(--global-floating-button-tab-width);
    height: 210px;
    overflow: visible;
}

.global-floating-button__tab {
    border: 0;
    cursor: pointer;
    outline: none;
}

.global-floating-button__panel {
    position: absolute;
    display: flex;
    align-items: stretch;
    top: 50%;
    right: 0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    overflow: hidden;
    width: min(375px, calc(100vw - 98px));
    height: 210px;
    pointer-events: none;
    will-change: width, opacity, transform;

    /* 以 tab 左緣為錨點，由右往左展開 */
    /* transform: translateY(-50%);
    transform-origin: right center;

    transition:
        width .28s ease,
        transform .28s ease,
        opacity .2s ease; */

}

.global-floating-button.is-open .global-floating-button__panel {
    opacity: 1;
    /* width: min(375px, calc(100vw - 98px)); */
    transform: translateY(-50%);
    pointer-events: auto;
}

.global-floating-button__content {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    padding: 24px;

    width: 0;
    opacity: 0;
    overflow: hidden;

    transform: scaleX(0);
    transform-origin: right center;

    transition:
        width .28s ease,
        opacity .18s ease,
        transform .28s ease;
}

.global-floating-button.is-open .global-floating-button__content {
    width: calc(100% - 86px);
    opacity: 1;
    transform: scaleX(1);
}

.global-floating-button__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-floating-button-logo-icon {
    width: 35px;
    height: 24px;
    display: block;
}

.global-floating-button-logo-wordmark {
    width: 78px;
    height: 20px;
    display: block;
}

.global-floating-button__logo-image {
    display: block;
    width: 70px;
    height: auto;
}

.global-floating-button__text {
    min-width: 0;
}

.global-floating-button__headline {
    display: block;
    margin: 0;
    color: #148985;
    font-size: 16px;
    font-family: 'PingFangTC-Medium';
}

.global-floating-button__subheadline {
    display: block;
    color: #5e5e5e;
    font-size: 14px;
    line-height: 24px;
    margin: 0;
    font-family: 'PingFangTC-Medium';
}

.global-floating-button__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 86px;
    padding: 10px 16px;
    border: none;
    border-radius: 0;
    background-color: #148985;
    cursor: pointer;
    color: #ffffff;
    opacity: 0;
}

.global-floating-button.is-open .global-floating-button__cta {
    opacity: 1;
}

.global-floating-button__cta-icon-image {
    display: block;
    width: 32px;
    height: 32px;
}

.global-floating-button__cta-label {
    display: block;
    font-size: 18px;
    font-family: 'PingFangTC-Medium';
    line-height: 1;
}

.global-floating-button__tab {
    width: var(--global-floating-button-tab-width);
    height: 210px;
    padding: 16px 12px;
    border-radius: 14px;
    background-color: #148985;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    will-change: opacity, transform;
    transition: opacity 0.28s ease, transform 0.2s ease;
}

.global-floating-button.is-open .global-floating-button__tab {
    opacity: 0;
    pointer-events: none;
}

.global-floating-button__tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
}

.global-floating-button__tab-icon-image {
    display: flex;
    width: 36px;
    height: 36px;
}

.global-floating-button__tab-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'PingFangTC-Medium';
    font-size: 14px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

.global-floating-button__tab-arrow-image {
    display: block;
    width: 32px;
    height: 32px
}

.global-floating-button.is-loading .global-floating-button__panel,
.global-floating-button.is-loading .global-floating-button__tab,
.global-floating-button.is-loading .global-floating-button__cta {
    cursor: wait;
}

.global-floating-button.is-loading .global-floating-button__cta-label {
    opacity: 0.65;
}

/* 開立折讓單頁首：預設與左側表單同欄寬（col-md-6），KAiO 小卡有資料時才展開成整頁寬。
   按鈕比欄位寬，靠左會往右溢出，靠右才會與下方表單的右緣切齊。 */
.kaio-page-header__action {
    text-align: right;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .kaio-page-header.has-insight {
        width: 100%;
    }
}

/* 近期銷售洞察卡片 (KAiO) */
.sales-insight-card {
    border: 1px solid #e3e8ee;
    border-radius: 4px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 20px;
}

.sales-insight-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sales-insight-card__header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.sales-insight-card__title {
    margin: 0;
    font-size: 16px;
    color: #222222;
    font-family: 'PingFangTC';
    font-weight: 600;
}

.sales-insight-card__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #5e5e5e;
    font-family: 'PingFangTC';
    font-weight: 500;
}

.sales-insight-card__logo {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.sales-insight-card__logo-image {
    display: block;
    width: 84px;
    height: 16px;
}

.sales-insight-card__metrics {
    display: flex;
    align-items: stretch;
    margin-top: 20px;
    gap: 16px;
}

.sales-insight-card__metric {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 8px;
}

.sales-insight-card_divider {
    width: 1px;
    background-color: #e3e8ee;
    margin: 13px 0 13px;
}

.sales-insight-card__metric-icon {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto;
}

.sales-insight-card__metric-label {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #222222;
    font-family: 'PingFangTC';
    font-weight: 500;
}

.sales-insight-card__metric-value {
    margin: 8px 0 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: #148985;
    word-break: break-word;
    font-family: 'Noto Sans TC';
}

.sales-insight-card__metric-value--two-lines {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* 交易筆數小卡（點數儲值頁）的灰底摘要區 */
.sales-insight-card__summary {
    margin-top: 12px;
    padding: 16px 24px;
    border-radius: 8px;
    background-color: #f7f7f7;
    gap: 8px;
}

.sales-insight-card__summary-label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans TC';
    color: #222222;
}

.sales-insight-card__summary-value {
    margin: 8px 0 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    font-family: 'Noto Sans TC';
    color: #148985;
}

.sales-insight-card__summary-compare {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.sales-insight-card__summary-compare-label {
    font-size: 14px;
    color: #5e5e5e;
    font-family: 'Noto Sans TC';
    font-weight: 500;
}

.sales-insight-card__summary-diff {
    font-size: 14px;
    font-weight: 500;
    color: #0DD445;
    font-family: 'Noto Sans TC';
}

.sales-insight-card__summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background-color: #ecf3ec;
    color: #0DD445;
}

/* 成長率為負：紅色；無基期可比較：灰色 */
.sales-insight-card__summary-diff.is-down,
.sales-insight-card__summary-badge.is-down {
    color: #d9534f;
}

.sales-insight-card__summary-badge.is-down {
    background-color: #fdeded;
}

.sales-insight-card__trend {
    display: block;
    width: 14px;
    height: 14px;
}

.sales-insight-card__hint {
    margin: 24px 0 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #26729E;
    font-family: 'PingFangTC';
}

.sales-insight-card__actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* 不吃 bootstrap 的漸層與邊框，改為設計稿的平面樣式 */
.sales-insight-card .sales-insight-card__cta {
    flex: 1 1 0;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans TC';
    border-radius: 6px;
    background-image: none;
    box-shadow: none;
    text-shadow: none;
}

.sales-insight-card .sales-insight-card__cta--primary,
.sales-insight-card .sales-insight-card__cta--primary:focus {
    border: 1px solid #188ACC;
    background-color: #4BB0E9;
    color: #ffffff;
}

.sales-insight-card .sales-insight-card__cta--primary:hover,
.sales-insight-card .sales-insight-card__cta--primary:active {
    border-color: #188ACC;
    background-color: #4BB0E9;
    color: #ffffff;
}

.sales-insight-card .sales-insight-card__cta--ghost,
.sales-insight-card .sales-insight-card__cta--ghost:focus {
    border: 1px solid #222222;
    background-color: #ffffff;
    color: #222222;
    font-weight: 500;
    font-family: 'Noto Sans TC';
}

.sales-insight-card .sales-insight-card__cta--ghost:hover,
.sales-insight-card .sales-insight-card__cta--ghost:active {
    border-color: #222222;
    background-color: #f5f7fa;
    color: #222222;
}

.sales-insight-card.is-loading .sales-insight-card__cta {
    cursor: wait;
    opacity: 0.65;
}
