﻿
#menu-control {
    display: none;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
}

/* 手機 */
@media screen and (max-width: 767px) {
    .default-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .default-container > .area1 {
        width: 100%;
        height: 64px;
        background-color: #1a222b;
        border-bottom: 1px solid #333c45;
        color: #b6b8ba;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    /* < 上一頁 */
    .default-container > .area1 > i.back-page-btn {
        font-size: 24px;
        font-weight: 900;
        position: absolute;
        top: 20px;
        left: 20px;
        z-index: 4;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .default-container > .area1 > .up {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
    
    .default-container > .area1 > .up > img {
        width: 32px;
        height: 32px;
    }
    
    .default-container > .area1 > .up > .logo {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 3px;
    }
    
    .default-container > .area1 > .up > .logo > h1 {
        color: #dedede;
        font-size: 20px;
        font-weight: 700;
    }
    
    .default-container > .area1 > .up > .logo > p {
        color: #787c81;
        font-size: 12px;
        font-weight: 700;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */

    .default-container > .area1 > .menu-btn {
        width: 32px;
        height: 20px;
        display: block;
        position: fixed;
        top: 22px;
        right: 20px;
        z-index: 4;
    }
    
    .default-container > .area1 > .menu-btn > span {
        width: 32px;
        height: 3px;
        background-color: #999999;
        display: block;
        pointer-events: none;
        position: absolute;
        left: 0;
        transition: 0.4s;
    }

    .default-container > .area1 > .menu-btn > span:nth-child(1) {
        top: 0px;
    }

    .default-container > .area1 > .menu-btn > span:nth-child(2) {
        top: 8.5px;
    }

    .default-container > .area1 > .menu-btn > span:nth-child(3) {
        top: 17px;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    #menu-control:checked + .area1 > .menu-btn > span:nth-child(1) {
        width: 30px;
        top: 12px;
        left: 0px;
        transform: translateY(-6px) rotate(45deg);
    }

    #menu-control:checked + .area1 > .menu-btn > span:nth-child(2) {
        transform: scaleX(0);
    }

    #menu-control:checked + .area1 > .menu-btn > span:nth-child(3) {
        width: 30px;
        top: 0px;
        left: 0px;
        transform: translateY(6px) rotate(-45deg);
    }

    #menu-control:checked + .area1 > .down {
        right: 0;
    }

    /* ---------------------------------------------------------------------------------------------------- */

    .default-container > .area1 > .down {
        width: 100%;
        height: calc(100% - 64px);
        background-color: #1a222b;
        overflow-x: hidden;
        overflow-y: auto;
        position: fixed;
        top: 64px;
        right: -100%;
        transition: right 0.5s;
        z-index: 3;

        -webkit-overflow-scrolling: touch; /* 為了在 iOS 上讓滑動更順暢 */
        scrollbar-width: none; /* 適用於 Firefox */
    }
    
    .default-container > .area1 > .down::-webkit-scrollbar {
        display: none;
    }

    .default-container > .area1 > .down > nav {
        width: 100%;
        height: 100%;
        margin-top: 20px;
    }
    
    .default-container > .area1 > .down > nav > ul {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        overflow-y: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li {
        width: calc(100% - 20px);
        box-sizing: border-box;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 1px;
        position: relative;
        pointer-events: none;
        -webkit-tap-highlight-color: transparent; /* 防止 li 閃爍 */
    }
    
    .default-container > .area1 > .down > nav > ul > li.active > div > img:nth-of-type(1),
    .default-container > .area1 > .down > nav > ul > li:hover > div > img:nth-of-type(1) {
        display: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li.active > div > img:nth-of-type(2),
    .default-container > .area1 > .down > nav > ul > li:hover > div > img:nth-of-type(2) {
        display: block;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-title {
        width: 100%;
        height: 36px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0px 10px 0px 10px;
        position: relative;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-title > span {
        pointer-events: none;
    }

    .default-container > .area1 > .down > nav > ul > li > .collapse-title::after {
        content: "\f078";
        width: 16px;
        height: 16px;
        font-family: "Font Awesome 6 Free";
        font-size: 16px;
        font-weight: 900;
        pointer-events: none;
        position: absolute;
        top: 13px;
        right: 20px;
    }
    .default-container > .area1 > .down > nav > ul > li > .collapse-open::after {
        transform: rotate(180deg);
        top: 13px;
        right: 20px;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .title {
        width: 100%;
        height: 36px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0px 10px 0px 10px;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .title > span {
        pointer-events: none;
    }

    .default-container > .area1 > .down > nav > ul > li.menu:not(.active):hover {
        background-color: #2f3c4a;
        border-radius: 6px;
    }
    
    .default-container > .area1 > .down > nav > ul > li.menu:not(.active):hover > span {
        color: #d8d7d9;
    }
    
    .default-container > .area1 > .down > nav > ul > li.menu.active {
        background-color: #00a5a6;
        border-radius: 6px;
        color: #ffffff;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu {
        width: calc(100% - 20px);
        max-height: 0px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li {
        flex-shrink: 0;
        width: 100%;
        height: 36px;
        box-sizing: border-box;
        cursor: pointer;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 0px 10px 0px 16px;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li > .icon {
        width: 16px;
        height: 16px;
        pointer-events: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li > span {
        pointer-events: none;
        white-space: nowrap;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li:not(.active):hover {
        background-color: #2f3c4a;
        border-radius: 6px;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li:not(.active):hover > span {
        color: #d8d7d9;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li.active {
        background-color: #00a5a6;
        border-radius: 6px;
        color: #ffffff;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area2 {
        width: 100%;
        height: calc(100% - 64px);
        background-color: #f1f2f3;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    
    .default-container > .area2 > .item1 {
        flex-shrink: 0;
        width: 100%;
        /*height: 64px;*/
        background-color: #00a5a6;
        /*border-bottom: 2px solid #dddddd;*/
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0px 28.5px;
    }
    
    .default-container > .area2 > .item1 > .page-detail {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }
    
    .default-container > .area2 > .item1 > .page-detail > .page-name {
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
    }
    
    .default-container > .area2 > .item1 > .page-detail > .page-detail {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        font-weight: 700;
    }
    
    #menu-control:checked ~ .area2 > .item1 > .top-menu {
        right: 50%;
    }

    .default-container > .area2 > .item1 > .top-menu {
        width: calc(100vw - 40px);
        display: flex;
        justify-content: space-between;
        align-items: center;

        position: fixed;
        bottom: 28px;
        right: -50%;
        transform: translateX(50%);
        z-index: 4;
        transition: right 0.5s;
    }
    
    .default-container > .area2 > .item1 > .top-menu > .username {
        color: #ffffff;
        font-size: 18px;
        font-weight: 700;
        margin-right: 10px;
        white-space: nowrap;
    }
    
    .default-container > .area2 > .item1 > .top-menu > .logout {
        width: 60px;
        height: 35px;
        background-image: linear-gradient(to top, #f89a8b, #f89a8b);
        border: none;
        border-radius: 20px;
        color: #ffffff;
        cursor: pointer;
        font-size: 15px;
        font-weight: 700;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area2 > .item2 {
        width: 100%;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: auto;
    }
}

/* PC */
@media screen and (min-width: 768px) {
    .default-container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
    }
    
    .default-container > .area1 {
        width: 240px;
        height: 100%;
        background-color: #1a222b;
        color: #b6b8ba;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        /* 不能反白 */
        -webkit-user-select: none;
        -moz-user-select: none;
        -o-user-select: none;
        user-select: none;
    }
    
    /* < 上一頁 */
    .default-container > .area1 > i.back-page-btn {
        display: none;
    }

    .default-container > .area1 > .up {
        width: 100%;
        height: 64px;
        border-bottom: 1px solid #333c45;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
    
    .default-container > .area1 > .up > img {
        width: 32px;
        height: 32px;
    }
    
    .default-container > .area1 > .up > .logo {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 3px;
    }
    
    .default-container > .area1 > .up > .logo > h1 {
        color: #dedede;
        font-size: 20px;
        font-weight: 700;
    }
    
    .default-container > .area1 > .up > .logo > p {
        color: #787c81;
        font-size: 12px;
        font-weight: 700;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */

    .default-container > .area1 > .menu-btn {
        display: none;
    }

    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area1 > .down {
        width: 100%;
        height: calc(100% - 64px);
    }
    
    .default-container > .area1 > .down > nav {
        width: 100%;
        height: 100%;
        margin-top: 20px;
    }
    
    .default-container > .area1 > .down > nav > ul {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        overflow-y: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li {
        width: calc(100% - 20px);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 1px;
        position: relative;
        pointer-events: none;
        -webkit-tap-highlight-color: transparent; /* 防止 li 閃爍 */
    }
    
    .default-container > .area1 > .down > nav > ul > li.active > div > img:nth-of-type(1),
    .default-container > .area1 > .down > nav > ul > li:hover > div > img:nth-of-type(1) {
        display: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li.active > div > img:nth-of-type(2),
    .default-container > .area1 > .down > nav > ul > li:hover > div > img:nth-of-type(2) {
        display: block;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-title {
        width: 100%;
        height: 36px;
        background-color: rgba(255, 255, 255, 0);
        cursor: pointer;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0px 10px 0px 10px;
        position: relative;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-title > span {
        pointer-events: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-title::after {
        content: "\f078";
        width: 16px;
        height: 16px;
        font-family: "Font Awesome 6 Free";
        font-size: 16px;
        font-weight: 900;
        pointer-events: none;
        position: absolute;
        top: 13px;
        right: 20px;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .collapse-open::after {
        transform: rotate(180deg);
        top: 13px;
        right: 20px;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .title {
        width: 100%;
        height: 36px;
        cursor: pointer;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 0px 10px 0px 10px;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .title > span {
        pointer-events: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li.menu:not(.active):hover {
        background-color: #2f3c4a;
        border-radius: 6px;
    }
    
    .default-container > .area1 > .down > nav > ul > li.menu:not(.active):hover > span {
        color: #d8d7d9;
    }
    
    .default-container > .area1 > .down > nav > ul > li.menu.active {
        background-color: #00a5a6;
        border-radius: 6px;
        color: #ffffff;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu {
        width: calc(100% - 20px);
        max-height: 0px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li {
        flex-shrink: 0;
        width: 100%;
        height: 36px;
        box-sizing: border-box;
        cursor: pointer;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        padding: 0px 10px 0px 16px;
        pointer-events: auto;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li > .icon {
        width: 16px;
        height: 16px;
        pointer-events: none;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li > span {
        pointer-events: none;
        white-space: nowrap;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li:not(.active):hover {
        background-color: #2f3c4a;
        border-radius: 6px;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li:not(.active):hover > span {
        color: #d8d7d9;
    }
    
    .default-container > .area1 > .down > nav > ul > li > .sub-menu > li.active {
        background-color: #00a5a6;
        border-radius: 6px;
        color: #ffffff;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area2 {
        width: calc(100% - 240px);
        height: 100%;
        background-color: #f1f2f3;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
    
    .default-container > .area2 > .item1 {
        flex-shrink: 0;
        width: 100%;
        height: 64px;
        background-color: #00a5a6;
        border-bottom: 2px solid #dddddd;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0px 28.5px;
    }
    
    .default-container > .area2 > .item1 > .page-detail {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }
    
    .default-container > .area2 > .item1 > .page-detail > .page-name {
        color: #ffffff;
        font-size: 20px;
        font-weight: 700;
    }
    
    .default-container > .area2 > .item1 > .page-detail > .page-detail {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        font-weight: 700;
    }
    
    .default-container > .area2 > .item1 > .top-menu {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    
    .default-container > .area2 > .item1 > .top-menu > .username {
        color: #ffffff;
        font-size: 18px;
        font-weight: 700;
        margin-right: 10px;
    }
    
    .default-container > .area2 > .item1 > .top-menu > .logout {
        width: 60px;
        height: 35px;
        background-image: linear-gradient(to top, #f89a8b, #f89a8b);
        border: none;
        border-radius: 20px;
        color: #ffffff;
        cursor: pointer;
        font-size: 15px;
        font-weight: 700;
    }
    
    /* ---------------------------------------------------------------------------------------------------- */
    
    .default-container > .area2 > .item2 {
        width: 100%;
        min-height: calc(100% - 64px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: auto;
    }
}
