/* PCCES 視覺增補 */
button:hover {
    filter: brightness(.97)
}

.brand {
    padding: 0 18px;
    font-size: var(--fs-sm);
    line-height: 1.35;
    text-decoration: none
}

.brand small {
    display: block;
    color: #1e7058;
    font-size: var(--fs-xs);
    letter-spacing: .12em
}

.pcces-mark {
    font-size: var(--fs-2xl);
    font-weight: 700
}

.fixed-header {
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px #1e374010
}

.search-card {
    overflow: visible
}

.primary-button,
.secondary-button,
.delete,
.edit,
.nav-item,
.editor-actions button,
.complete-button {
    transition: background .18s, color .18s, border-color .18s
}

.secondary-button:hover {
    background: #edf3f6;
    color: var(--brand)
}

.delete:hover {
    background: #fff0f1
}

.edit:hover {
    background: #fff1d9
}

.modal-backdrop {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    background: #14223680;
    padding: 22px
}

.project-modal {
    width: min(780px, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 34px;
    box-shadow: 0 18px 55px #0005
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand)
}

.modal-title h2 {
    margin: 0;
    font-size: 23px
}

.modal-title b {
    padding: 4px 11px;
    border: 1px solid #bce5c9;
    background: #ecfaf0;
    border-radius: 5px;
    color: #24854d;
    font-size: var(--fs-sm)
}

.close-modal {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text-4);
    font-size: 30px;
    cursor: pointer
}

.modal-intro {
    margin: 30px 0 15px;
    font-size: var(--fs-lg);
    color: var(--text-3)
}

.project-options {
    display: grid;
    gap: 13px
}

.project-option {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: 1px solid #dfe5e9;
    border-radius: 10px;
    padding: 19px 22px;
    cursor: pointer;
    transition: .18s
}

.project-option:hover {
    border-color: #74ad95;
    background: #f5fbf7
}

.project-option.selected {
    border: 2px solid #4e9175;
    background: #effbf4;
    box-shadow: 0 0 0 3px #d9eee1
}

.project-option input {
    margin: 5px 0 0;
    accent-color: #1e7058;
    width: 18px;
    height: 18px
}

.project-option strong,
.project-option small {
    display: block
}

.project-option strong {
    font-size: var(--fs-xl);
    color: var(--text-1)
}

.project-option small {
    color: var(--text-4);
    margin-top: 4px;
    font-size: var(--fs-base)
}

.modal-actions {
    border-top: 1px solid #e3e8ec;
    margin-top: 30px;
    padding-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px
}

.login-page {
    min-height: 100vh;
    background: #f4f7f5
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.25fr .75fr
}

.login-hero {
    position: relative;
    padding: 46px 7vw;
    color: #fff;
    background: linear-gradient(135deg, #164b3c, #218060 58%, #67aa83);
    overflow: hidden
}

.login-hero:after {
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    border: 1px solid #ffffff38;
    border-radius: 50%;
    right: -260px;
    bottom: -260px;
    box-shadow: 0 0 0 75px #ffffff0d, 0 0 0 150px #ffffff0b
}

.login-brand {
    display: flex;
    gap: 12px;
    align-items: center
}

.login-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff;
    color: #1e7058;
    font-size: 27px;
    font-weight: 700
}

.login-brand b,
.login-brand span {
    display: block
}

.login-brand b {
    font-size: var(--fs-xl);
    letter-spacing: .12em
}

.login-brand span {
    font-size: var(--fs-xs);
    opacity: .8
}

.hero-copy {
    position: absolute;
    top: 36%;
    max-width: 550px
}

.hero-copy p {
    color: var(--text-4);
    font-size: var(--fs-lg);
    letter-spacing: .1em
}

.hero-copy h1 {
    font-size: 42px;
    line-height: 1.35;
    margin: 10px 0 18px
}

.hero-copy span {
    font-size: var(--fs-lg);
    opacity: .85
}

.hero-dots {
    position: absolute;
    bottom: 43px;
    color: var(--text-4)
}

.login-panel {
    display: grid;
    place-items: center;
    background: #fff;
    padding: 35px
}

.login-card {
    width: min(390px, 100%)
}

.login-card h2 {
    font-size: 28px;
    color: var(--brand);
    margin: 3px 0
}

.login-card>p:not(.eyebrow) {
    color: var(--text-4);
    margin: 0 0 28px
}

.login-card>label {
    display: block;
    margin: 17px 0;
    color: var(--text-3);
    font-size: var(--fs-sm)
}

.login-card input:not([type=checkbox]) {
    display: block;
    width: 100%;
    height: 43px;
    margin-top: 7px;
    padding: 0 12px;
    border: 1px solid #cfdae1;
    border-radius: 6px;
    font: 14px inherit
}

.login-options {
    display: flex;
    justify-content: space-between;
    margin: 18px 0 24px;
    font-size: var(--fs-sm)
}

.login-options label {
    color: var(--text-4)
}

.login-options a {
    color: #267455
}

.login-button {
    width: 100%;
    height: 44px;
    font-size: var(--fs-base)
}

.login-help {
    display: block;
    text-align: center;
    color: var(--text-4);
    margin-top: 21px
}

.editor-page {
    background: #f5f7f6;
    color: var(--text-1);
    font: 13px/1.5 "Noto Sans TC", Arial, sans-serif
}

.editor-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 59px;
    padding: 10px 19px;
    background: #fff;
    border-bottom: 1px solid #dce5e4
}

.editor-brand {
    color: #1e7058;
    font-size: var(--fs-lg);
    font-weight: 700;
    text-decoration: none
}

.editor-brand span {
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: #fff;
    background: #1e7058;
    border-radius: 6px
}

.editor-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0
}

.editor-title b {
    font-size: var(--fs-lg);
    color: var(--brand)
}

.editor-title i {
    color: var(--text-4)
}

.editor-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.editor-title em {
    font-style: normal;
    font-family: Consolas;
    color: var(--brand-accent)
}

.editor-title mark {
    padding: 3px 8px;
    border-radius: 4px;
    background: #ebfaee;
    color: #25854d
}

.back-link {
    margin-left: auto;
    color: var(--brand-accent);
    text-decoration: none
}

.editor-actions {
    position: sticky;
    top: 59px;
    z-index: 9;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 18px;
    background: #fff;
    border-bottom: 1px solid #dce5e4
}

.action-group {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.editor-actions button,
.complete-button {
    height: 32px;
    border: 1px solid #cbd9db;
    border-radius: 5px;
    background: #fff;
    color: var(--text-2);
    padding: 0 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center
}

.editor-actions button:hover {
    background: #edf7f0;
    border-color: #88b99d
}

.editor-actions .action-group:last-child button:nth-child(2),
.complete-button {
    color: #fff;
    background: #1e7058;
    border-color: #1e7058
}

.complete-button:hover {
    background: #175a47
}

.editor-tip {
    padding: 7px 19px;
    background: #eff8ee;
    color: #395734
}

.editor-body {
    display: grid;
    grid-template-columns: 215px 1fr;
    min-height: calc(100vh - 140px)
}

.edit-side {
    padding: 19px 12px;
    background: #fff;
    border-right: 1px solid #dce5e4
}

.edit-side b {
    display: block;
    margin: 0 10px 9px;
    color: var(--text-3)
}

.edit-side button {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-2);
    padding: 9px 10px;
    cursor: pointer
}

.edit-side button:hover,
.edit-side .tree-active {
    background: #e9f5ed;
    color: var(--text-2)
}

.edit-side hr {
    border: 0;
    border-top: 1px solid #e2e9e8;
    margin: 15px 4px
}

.estimate-wrap {
    overflow: auto;
    padding: 15px
}

.estimate-toolbar {
    min-width: 960px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 11px 14px;
    background: #fff;
    border: 1px solid #dce5e4;
    border-bottom: 0;
    border-radius: 8px 8px 0 0
}

.estimate-toolbar b {
    font-size: var(--fs-base);
    color: var(--brand)
}

.estimate-toolbar span {
    color: var(--text-4)
}

.estimate-toolbar strong {
    color: #1e7058
}

.estimate-toolbar input {
    margin-left: auto;
    width: 180px;
    height: 31px;
    border: 1px solid #cfdbdf;
    border-radius: 5px;
    padding: 0 9px
}

.estimate-table {
    min-width: 1060px;
    background: #fff;
    border: 1px solid #dce5e4;
    border-collapse: collapse
}

.estimate-table th {
    height: 39px;
    background: #246d55;
    color: #fff;
    border-right: 1px solid #ffffff54;
    text-align: center
}

.estimate-table td {
    height: 46px;
    border: 1px solid #e0e8e7;
    padding: 0 9px;
    color: var(--text-2)
}

.estimate-table td:nth-child(1),
.estimate-table td:nth-child(3),
.estimate-table td:nth-child(4),
.estimate-table td:nth-child(5),
.estimate-table td:nth-child(9),
.estimate-table td:nth-child(10),
.estimate-table td:last-child {
    text-align: center
}

.estimate-table tr:hover:not(.group):not(.subtotal) {
    background: #f4faf6
}

.estimate-table .group td {
    background: #e8f5e9;
    color: var(--text-2);
    font-weight: 700
}

.estimate-table .sub td {
    background: #f0f8f0
}

.estimate-table .subtotal td {
    background: #fff6dc;
    font-style: italic;
    color: #8b702e
}

.estimate-table td[contenteditable] {
    outline: 0
}

.estimate-table td[contenteditable]:focus {
    box-shadow: inset 0 0 0 2px #78ad90
}

.estimate-table button {
    border: 1px solid #ffffff;
    color: var(--text-2);
}

.estimate-table button:hover {
    background: #dff2cd
}

@media(max-width:900px) {
    .login-layout {
        grid-template-columns: 1fr
    }

    .login-hero {
        min-height: 330px
    }

    .login-panel {
        padding: 50px 26px
    }

    .editor-body {
        grid-template-columns: 1fr
    }

    .edit-side {
        display: none
    }

    .editor-actions {
        align-items: flex-start;
        flex-direction: column
    }

    .editor-title em {
        display: none
    }
}

@media(max-width:600px) {
    .login-hero {
        padding: 30px
    }

    .hero-copy {
        top: 32%
    }

    .hero-copy h1 {
        font-size: 31px
    }

    .editor-title span {
        display: none
    }

    .editor-header {
        padding: 8px
    }

    .editor-actions {
        top: 55px;
        padding: 8px
    }

    .editor-tip {
        padding: 7px 10px
    }

    .estimate-wrap {
        padding: 8px
    }

    .project-modal {
        padding: 22px
    }

    .project-option {
        padding: 14px
    }

    .project-option strong {
        font-size: var(--fs-base)
    }
}
