/* ================================================
   居�???ERP ??Global Stylesheet
   iOS Glassmorphism Light Theme
   ================================================ */

:root {
    --bg-app: #f4f7fb;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #2563eb;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

/* ?�?�?� Base ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
body {
    background-color: var(--bg-app);
    background-image:
        radial-gradient(at 0% 0%, hsla(217,100%,92%,1) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(199,100%,94%,1) 0, transparent 50%);
    background-attachment: fixed;
    font-family: 'Inter', 'Noto Sans HK', 'Noto Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'PingFang TC', 'Apple LiGothic Medium', sans-serif;
    color: var(--text-main);
    margin: 0;
    overflow: hidden;
}

/* Force Traditional Chinese font for SweetAlert2 popups */
.swal2-container {
    z-index: 99999 !important;
}
.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-content {
    font-family: 'Inter', 'Noto Sans HK', 'Noto Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'PingFang TC', 'Apple LiGothic Medium', sans-serif !important;
}

/* ?�?�?� Loading Overlay ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
#loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.spinner-border { color: var(--accent) !important; width: 4rem; height: 4rem; border-width: 0.35rem; }
@keyframes scaleUp { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
#loadingState {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

/* ?�?�?� Login ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
/* ?�?�?� Login Page Wrapper ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-page-wrapper {
    position: fixed; inset: 0;
    background: linear-gradient(-45deg, #f8f9fa, #eef2f5, #e0eaf5, #f8f9fa) !important;
    background-size: 400% 400% !important;
    animation: auroraBreathe 15s ease infinite !important;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px;
    width: 100%;
    z-index: 9999; transition: opacity 0.4s ease;
    padding: env(safe-area-inset-top) 1.25rem env(safe-area-inset-bottom);
}
@keyframes auroraBreathe {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ?�?�?� Staggered Fade-Up Entry ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
@keyframes elegantFadeUp {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.stagger-1 {
    opacity: 0;
    animation: elegantFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}
.stagger-2 {
    opacity: 0;
    animation: elegantFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.25s;
}
.stagger-3 {
    opacity: 0;
    animation: elegantFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

/* ?�?�?� Login Card (極簡?��?) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 20px 15px !important;
    width: 100%;
    max-width: 420px !important;
}

/* ?�?�?� Login Heading ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-heading {
    color: var(--text-main);
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    text-align: center;
}
.login-sub {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

/* ?�?�?� Login Inputs (毛玻?? ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-card .form-control {
    background-color: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    color: #2c3e50 !important;
    font-size: 1rem; font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
}
.login-card .form-control::placeholder { color: var(--text-muted) !important; font-weight: 500; }
.login-card .form-control:focus {
    background-color: #ffffff !important;
    border-color: #0d6efd !important;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.12) !important;
    transform: translateY(-2px);
    outline: none;
}

/* ?�?�?� Password Toggle ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-pw-wrap { position: relative; }
.login-eye-btn {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer; padding: 4px;
    font-size: 1.1rem; line-height: 1;
    transition: color 0.2s;
}
.login-eye-btn:hover { color: var(--text-main); }

/* ?�?�?� Forgot Password ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-forgot-btn {
    background: none; border: none; padding: 0;
    color: var(--accent);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: opacity 0.2s;
}
.login-forgot-btn:hover { opacity: 0.7; text-decoration: underline; }

/* ?�?�?� Login Button ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-card .btn-login {
    background: var(--accent) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-size: 1rem;
    font-weight: 700 !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2) !important;
    letter-spacing: 0.3px;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.login-card .btn-login:hover {
    transform: translateY(-2px);
    background: #1d4ed8 !important;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3) !important;
}
.login-card .btn-login:active {
    transform: scale(0.97) translateY(0) !important;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.2) !important;
}
/* 流�??��??��? */
.login-card .btn-login::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: buttonShimmer 3.5s infinite;
}
@keyframes buttonShimmer {
    0%   { left: -100%; }
    20%  { left: 200%; }
    100% { left: 200%; }
}

/* ?�?�?� Login Copyright ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.login-copyright {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    margin: 0;
}

/* ?�?�?� App Shell ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
#appContainer {
    width: 100vw; height: 100vh;
    display: none; flex-direction: row;
    animation: fadeIn 0.6s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ?�?�?� Sidebar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.sidebar {
    width: 280px;
    /* Warm Neutral Frosted Glass - Apple Vision Pro style */
    background: rgba(248, 246, 243, 0.28);
    backdrop-filter: blur(60px) saturate(160%) brightness(1.04);
    -webkit-backdrop-filter: blur(60px) saturate(160%) brightness(1.04);
    border-right: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        inset 1px 0 0 rgba(255,255,255,0.7),
        4px 0 40px rgba(0,0,0,0.04);
    display: flex; flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0; z-index: 20;
}
.brand-title {
    font-weight: 900; font-size: 1.15rem;
    color: #1a1a2e;
    margin-bottom: 2rem;
    padding-left: 18px;
    letter-spacing: -0.2px;
}
/* ?????? Brand Logo ?????????????????????????????????????????????????????????????????????? */
.brand-title .brand-logo,
.navbar-brand .brand-logo,
.sidebar-brand .brand-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
}
.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.login-logo-container .brand-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}
.nav-menu { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px; border-radius: 12px; cursor: pointer;
    color: rgba(30, 30, 50, 0.65);
    font-weight: 600; transition: all 0.22s; font-size: 0.92rem;
}
.nav-item:hover {
    background: rgba(255,255,255,0.52);
    color: #1a1a2e;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
}
.nav-item.active {
    background: rgba(255,255,255,0.85);
    color: var(--accent);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07), inset 0 1px 0 rgba(255,255,255,1);
}
.nav-item i { font-size: 1rem; width: 22px; text-align: center; }
.user-profile {
    margin-top: auto; padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex; align-items: center; justify-content: space-between;
}
.user-info { display: flex; flex-direction: column; padding-left: 5px; }
.u-name { font-weight: 800; font-size: 0.95rem; color: #1a1a2e; }
.u-role { font-size: 0.7rem; color: rgba(30,30,50,0.5); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.btn-logout {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    color: rgba(30,30,50,0.55); border-radius: 12px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.22s;
}
.btn-logout:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.25); }

/* ?�?�?� Main Content Area ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.topbar {
    border-bottom: 1px solid var(--glass-border);
    display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0;
    background: rgba(255,255,255,0.4); backdrop-filter: blur(20px); z-index: 10;
    position: sticky; top: 0;
}
/* 主�?：漢?��???+ 標�? + ?��??� */
.topbar-main-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 3rem;
    padding-top: max(0px, env(safe-area-inset-top));
    min-height: 80px;
    position: relative; /* anchor for .page-title absolute on mobile */
}
.page-title {
    font-size: 1.4rem; font-weight: 900; color: var(--text-main);
    letter-spacing: -0.5px; margin: 0; display: flex; align-items: center; gap: 15px;
}
.btn-back {
    background: transparent; border: none; color: var(--text-main);
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.18s, transform 0.18s;
    opacity: 0.75;
}
.btn-back:hover { background: rgba(0,0,0,0.06); transform: scale(1.08); opacity: 1; }
.router-view { flex-grow: 1; overflow-y: auto; padding: 3rem; scroll-behavior: smooth; }

/* ?�?�?� Page Modules ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.page-module { display: none; animation: slideUp 0.4s ease; }
.page-module.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* ?�?�?� Shared Components ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.glass-card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 24px;
    padding: 2rem; box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}
.dark-label { color: var(--text-muted); font-size: 0.8rem; font-weight: 800; margin-bottom: 8px; display: block; text-transform: uppercase; }
.dark-input {
    background: #ffffff; border: 1px solid #cbd5e1;
    color: var(--text-main); border-radius: 14px;
    padding: 14px 18px; width: 100%; transition: 0.3s;
    font-size: 1rem; font-weight: 600;
    box-sizing: border-box;
}
.dark-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }

/* ?�?� ?�工?��?：Flatpickr Input Group ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.commence-date-group .input-group-text {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 14px 0 0 14px;
    padding: 12px 16px;
    color: var(--accent);
    font-size: 1.1rem;
    transition: 0.3s;
}
.commence-date-group .commence-date-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: none;
    border-radius: 0 14px 14px 0;
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: none;
    transition: 0.3s;
}
.commence-date-group .commence-date-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
    outline: none;
}
/* ?��?：輸?��??�焦?�左?��?示�?步�?亮�?�?*/
.commence-date-group:focus-within .input-group-text {
    border-color: var(--accent);
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   Flatpickr ?��? ??主�?覆寫（�??�系統�??�色�?
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.flatpickr-calendar {
    font-family: 'Inter', 'Noto Sans HK', 'Noto Sans TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'PingFang TC', 'Apple LiGothic Medium', sans-serif !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.13) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
}
/* ?�部?�份導航 */
.flatpickr-months {
    background: var(--accent);
    border-radius: 0;
    padding: 6px 0;
}
.flatpickr-months .flatpickr-month { background: transparent; }
.flatpickr-current-month {
    color: #fff !important;
    font-weight: 800;
    font-size: 1rem;
}
.flatpickr-current-month input.cur-year { color: #fff !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--accent) !important;
    color: #fff !important;
}
.flatpickr-prev-month,
.flatpickr-next-month { color: #fff !important; fill: #fff !important; }
.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg { fill: rgba(255,255,255,0.7) !important; }
/* ?��?標�???*/
.flatpickr-weekdays { background: #eff6ff; }
span.flatpickr-weekday { color: var(--accent) !important; font-weight: 800; background: #eff6ff; }
/* ?��???*/
.flatpickr-day { border-radius: 10px !important; font-weight: 600; }
.flatpickr-day:hover { background: #eff6ff !important; color: var(--accent) !important; border-color: transparent !important; }
.flatpickr-day.today { border-color: var(--accent) !important; color: var(--accent) !important; font-weight: 900; }
.flatpickr-day.today:hover { background: var(--accent) !important; color: #fff !important; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover { color: #cbd5e1 !important; cursor: not-allowed; background: transparent !important; }
.btn-primary-dark {
    background: var(--accent); color: #fff; border: none;
    border-radius: 14px; padding: 0 20px; font-weight: 800;
    font-size: 1.05rem; width: 100%; transition: 0.3s;
    box-shadow: 0 10px 20px rgba(37,99,235,0.2); cursor: pointer;
    /* ?��?高度 + flex 確�? spinner ?��??��??��??��?變形 */
    display: flex; align-items: center; justify-content: center;
    gap: 6px; height: 56px; overflow: hidden;
}
.btn-primary-dark:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(37,99,235,0.3); }
.btn-primary-dark:disabled { opacity: 0.5; cursor: not-allowed; }

/* ?�?�?� Toolbar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.dash-toolbar { display: flex; gap: 15px; margin-bottom: 2rem; flex-wrap: wrap; align-items: center; }
.dash-input-group {
    display: flex; align-items: center; background: #ffffff;
    border: 1px solid #cbd5e1; border-radius: 14px; padding: 0 15px;
    flex-grow: 1; max-width: 350px; transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.dash-input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.dash-input-group input {
    background: transparent; border: none; color: var(--text-main);
    padding: 14px 0 14px 10px; font-size: 0.95rem; width: 100%;
    outline: none; font-weight: 600;
}
.dash-select {
    appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem top 50%;
    background-size: 0.65rem auto;
    padding: 14px 3rem 14px 20px;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
    border-radius: 14px;
    font-size: 0.95rem; font-weight: 600;
    outline: none; cursor: pointer; transition: 0.3s;
}
.dash-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.btn-refresh {
    background: #ffffff; border: 1px solid #cbd5e1; color: var(--text-muted);
    padding: 14px 24px; border-radius: 14px; font-weight: 700;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 8px;
}
.btn-refresh:hover { color: var(--text-main); border-color: #94a3b8; }

/* ?�?�?� Stat Cards (KPI) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 2rem; }
.stat-card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 1.5rem; display: flex; align-items: center; gap: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.02); cursor: pointer; transition: 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.stat-card.active { border-color: var(--accent); background: #ffffff; box-shadow: 0 10px 30px rgba(37,99,235,0.15); }
.stat-card.active-alert { border-color: var(--danger); background: #ffffff; box-shadow: 0 10px 30px rgba(239,68,68,0.15); }
.stat-icon {
    width: 50px; height: 50px; border-radius: 14px; background: #f8fafc;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--text-muted); border: 1px solid #e2e8f0;
}
.stat-info .label { font-size: 0.75rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; margin-bottom: 5px; }
.stat-info .value { font-size: 2rem; font-weight: 900; color: var(--text-main); line-height: 1; }

/* ?�?�?� Project List (Dashboard / Commission) ?�?�?�?�?�?�?� */
.project-list { display: flex; flex-direction: column; gap: 15px; }
.project-row {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 1.2rem 1.8rem;
    display: flex; align-items: center; gap: 25px;
    transition: 0.3s; box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    cursor: pointer;
}
.project-row:hover { border-color: #cbd5e1; transform: translateX(5px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); background: #ffffff; }
.project-row.alert-row { border-color: rgba(239,68,68,0.4); background: linear-gradient(90deg, rgba(239,68,68,0.05) 0%, var(--glass-bg) 15%); }
.project-row.alert-row:hover { border-color: var(--danger); background: #ffffff; }
.col-id   { width: 140px; flex-shrink: 0; }
.col-info { flex-grow: 1; min-width: 200px; }
.col-progress { width: 300px; flex-shrink: 0; }
.p-id { font-size: 1.2rem; font-weight: 900; color: var(--text-main); letter-spacing: -0.5px; }
.p-status { font-size: 0.75rem; font-weight: 800; padding: 5px 10px; border-radius: 8px; display: inline-block; margin-top: 6px; background: #f1f5f9; color: var(--text-muted); border: 1px solid #e2e8f0; }
.alert-row .p-status { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.p-addr { font-size: 1.05rem; color: var(--text-main); font-weight: 800; margin-bottom: 6px; }
.p-meta { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.p-meta span { color: var(--text-main); font-weight: 800; }
.prog-group { margin-bottom: 10px; }
.prog-header { display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 800; margin-bottom: 5px; color: var(--text-muted); }
.prog-track { height: 8px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 10px; transition: width 1s ease; }
.fill-pay  { background-color: var(--success) !important; }
.fill-eng  { background-color: var(--accent) !important; }
.alert-row .fill-eng { background-color: var(--danger) !important; }
/* ?�?�?� File Upload Area ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.upload-area {
    border: 2px dashed #cbd5e1; border-radius: 16px; padding: 2rem;
    text-align: center; cursor: pointer; transition: 0.3s; background: #fbfcfd;
}
.upload-area:hover { border-color: var(--accent); background: #eff6ff; }
.file-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; background: #ffffff; border: 1px solid #e2e8f0;
    border-radius: 12px; margin-bottom: 8px; font-size: 0.95rem; font-weight: 600;
}
.remove-file { color: var(--danger); cursor: pointer; font-size: 1.2rem; transition: 0.2s; }

/* ?�?�?� Allowance Box (Create Form) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.allowance-box {
    background: #eff6ff; border: 1.5px solid #bfdbfe;
    border-radius: 16px; padding: 1.2rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}

/* ── Project Detail: Compact Single-Row Header Bar ── */
.pd-header-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 0;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.pd-hb-id {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.8px;
    color: var(--text-main);
    line-height: 1;
    flex-shrink: 0;
    padding-right: 16px;
    margin-right: 4px;
    border-right: 2px solid var(--glass-border);
    align-self: center;
}
.pd-hb-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    padding-left: 4px;
}
.pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    white-space: nowrap;
    position: relative;
}
.pd-chip + .pd-chip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 14px;
    background: rgba(100,116,139,0.22);
}
.pd-chip-icon    { color: var(--accent); font-size: 0.72rem; opacity: 0.75; flex-shrink: 0; }
.pd-chip-lbl     { font-size: 0.7rem; color: #94a3b8; font-weight: 600; }
.pd-chip-val     { font-size: 0.88rem; font-weight: 700; color: var(--text-main); }
.pd-chip-designer{ color: var(--accent); }
.pd-chip-amount  { color: var(--success); font-size: 0.95rem; font-weight: 900; }
/* keep legacy class refs working */
.val-designer    { color: var(--accent); }
.val-client      { color: var(--text-main); }
.val-amount      { color: var(--success); }
.stage-track-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.track-col { background: #ffffff; border-radius: 20px; padding: 25px; border: 1px solid var(--glass-border); box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
.track-title { font-size: 1.1rem; font-weight: 900; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--text-main); }
.stage-row {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 14px; padding: 15px; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: space-between; transition: 0.3s;
}
.stage-row:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.stage-info { display: flex; align-items: center; gap: 12px; }
.stage-num {
    width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; border: 1px solid rgba(0,0,0,0.05); flex-shrink: 0;
}
.stage-name { font-weight: 700; font-size: 0.9rem; color: var(--text-main); }
.eng-select {
    background: #fff; color: var(--text-main); border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px; padding: 10px 15px; font-weight: 800; outline: none; transition: 0.2s; cursor: pointer;
}
.eng-select:disabled { opacity: 0.7; cursor: not-allowed; }
.pay-status-badge { padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 800; }
.pay-btn {
    background: #fff; color: var(--text-main); border: 1.5px solid #cbd5e1;
    padding: 8px 15px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; transition: 0.2s; cursor: pointer;
}
.pay-btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-supplement {
    background: #fffbeb; color: var(--warning); border: 1.5px solid #fde68a;
    padding: 8px 15px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; transition: 0.2s; cursor: pointer;
}
.btn-supplement:hover { background: var(--warning); color: #fff; }
.btn-view-proof {
    background: #eff6ff; color: var(--accent); border: 1.5px solid #bfdbfe;
    padding: 8px 15px; border-radius: 10px; font-weight: 800; font-size: 0.85rem; transition: 0.2s; cursor: pointer; margin-right: 5px;
}
.btn-view-proof:hover { background: var(--accent); color: #fff; }

/* ?�?�?� Modal Cancel Button (consistent height with btn-primary-dark) ?�?� */
.modal-btn-cancel {
    background: #f1f5f9; color: var(--text-main); border: 1.5px solid #e2e8f0;
    border-radius: 14px; font-weight: 800; font-size: 1rem; cursor: pointer;
    height: 56px; display: flex; align-items: center; justify-content: center;
    transition: 0.2s; padding: 0 20px;
}
.modal-btn-cancel:hover { background: #e2e8f0; }

/* ?�?�?� Pay Upload Modal Adjusters ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.adj-btn-group { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.btn-adj {
    flex: 1; padding: 12px; border: 1.5px solid #e2e8f0; border-radius: 12px;
    background: #f8fafc; font-weight: 800; font-size: 0.9rem; cursor: pointer; transition: 0.2s; color: var(--text-muted);
}
.btn-adj.active-plus  { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.btn-adj.active-minus { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.mismatch-area {
    display: none; padding: 1.2rem; border-radius: 14px;
    border: 1.5px solid #e2e8f0; margin-bottom: 1.5rem; transition: 0.3s;
}

/* ?�?�?� Accounting Pay Method Cards ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pay-method-card {
    border: 2px solid #e2e8f0; border-radius: 16px; padding: 1.5rem;
    text-align: center; cursor: pointer; transition: 0.3s; color: var(--text-muted); font-weight: 700;
}
.pay-method-card:hover { border-color: var(--accent); color: var(--accent); background: #eff6ff; }
.pay-method-card.active { border-color: var(--accent); background: #eff6ff; color: var(--accent); }

/* ?�?�?� Commission Center ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.comm-rate-bar { background: rgba(0,0,0,0.04); padding: 6px; border-radius: 16px; display: inline-flex; gap: 8px; }
.rate-btn { border: none; padding: 10px 24px; border-radius: 12px; font-weight: 800; color: #64748b; background: transparent; transition: 0.3s; font-size: 0.95rem; cursor: pointer; }
.rate-btn.active { background: #fff; color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.comm-stage-card {
    background: #fff; border-radius: 24px; padding: 2rem; height: 100%;
    display: flex; flex-direction: column; border: 1px solid #e2e8f0; transition: 0.3s; position: relative;
}
.comm-stage-card.locked { opacity: 0.6; filter: grayscale(1); cursor: not-allowed; }
.comm-task-box { background: #f8fafc; border-radius: 16px; padding: 15px; margin-bottom: 1.5rem; font-size: 0.85rem; font-weight: 700; flex-grow: 1; border: 1px solid #f1f5f9; }
.comm-task-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; color: var(--text-main); }
.status-badge { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 12px; font-size: 0.8rem; font-weight: 800; }
.status-badge.submitted  { background: #dcfce7; color: #15803d; }
.status-badge.processing { background: #fef3c7; color: #b45309; }
.status-badge.rejected   { background: #fee2e2; color: #b91c1c; }

/* ?�?�?� Accounting Tabs ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.acct-tabs { display: flex; justify-content: center; margin-bottom: 2rem; }
.acct-tab-group {
    background: var(--glass-bg); padding: 6px; border-radius: 50px;
    border: 1px solid var(--glass-border); display: inline-flex;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.acct-tab-btn { background: transparent; border: none; padding: 12px 30px; border-radius: 40px; font-weight: 800; color: var(--text-muted); transition: 0.3s; cursor: pointer; }
.acct-tab-btn.active { background: var(--text-main); color: #ffffff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* ?�?�?� Accounting Payment Cards ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.recv-card {
    background: #ffffff; border-radius: 20px; border: 1px solid var(--glass-border);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); margin-bottom: 1.5rem;
    padding: 1.5rem 2rem; display: flex; flex-direction: column;
    gap: 0; transition: 0.3s;
}
.recv-card.anomaly { border-left: 6px solid var(--danger); background: linear-gradient(90deg, rgba(239,68,68,0.05) 0%, #ffffff 10%); }
.recv-card-body { width: 100%; }
.recv-card-footer {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding-top: 1.2rem; border-top: 1px solid #f1f5f9; margin-top: 1.2rem;
}
.recv-card-footer .btn-proof {
    background: #fff; color: var(--text-muted); border: 1.5px solid #e2e8f0;
    padding: 9px 18px; border-radius: 12px; font-weight: 700;
    font-size: 0.85rem; cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.recv-card-footer .btn-proof:hover { border-color: var(--accent); color: var(--accent); }

/* ?�?�?� Accounting Commission Layout ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.comm-layout { display: flex; gap: 30px; align-items: flex-start; }
.designer-sidebar { width: 260px; flex-shrink: 0; }
.designer-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-radius: 12px; cursor: pointer;
    font-weight: 700; transition: 0.2s; margin-bottom: 6px; color: var(--text-muted);
}
.designer-item:hover { background: rgba(255,255,255,0.8); color: var(--text-main); }
.designer-item.active { background: #ffffff; color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid var(--glass-border); }
.designer-name { font-weight: 800; font-size: 0.95rem; }
.badge-group { display: flex; gap: 6px; }
.badge-pipe   { background: #fef3c7; color: #b45309; border-radius: 20px; padding: 2px 10px; font-size: 0.75rem; font-weight: 800; }
.badge-unpaid { background: #dcfce7; color: #15803d; border-radius: 20px; padding: 2px 10px; font-size: 0.75rem; font-weight: 800; }

/* ?�?�?� Data Table ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.data-table { border-collapse: collapse; font-size: 0.9rem; }
.data-table th { padding: 12px 16px; font-weight: 800; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; border-bottom: 2px solid #f1f5f9; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ?�?�?� Management Audit Cards ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.audit-card {
    background: #ffffff; border-radius: 24px; border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); margin-bottom: 2rem;
    overflow: hidden; transition: 0.3s;
}
.audit-card:hover { box-shadow: 0 15px 40px rgba(0,0,0,0.06); transform: translateY(-3px); border-color: #cbd5e1; }
.audit-header { padding: 30px 35px 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.audit-amt-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 16px; padding: 15px 25px; text-align: center; }
.audit-amt-lbl { font-size: 0.75rem; color: #166534; font-weight: 800; text-transform: uppercase; margin-bottom: 4px; }
.audit-amt-val { font-size: 1.8rem; font-weight: 900; color: #15803d; line-height: 1; }
.audit-client-bar { background: #f0fdf4; border: 1px solid #bbf7d0; padding: 15px 25px; border-radius: 16px; margin: 0 35px 20px; display: flex; gap: 40px; align-items: center; }
.audit-body   { padding: 0 35px 25px; }
.audit-footer { padding: 25px 35px; border-top: 1px solid #f1f5f9; }
/* .contract-id font size now defined at end of file (1.05rem) */
.client-data-group { display: flex; flex-direction: column; }
.client-data-label { font-size: 0.7rem; font-weight: 800; color: #166534; text-transform: uppercase; margin-bottom: 3px; }
.client-data-value { font-size: 1rem; font-weight: 800; color: #166534; }
.preset-comments { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.btn-preset { background: #ffffff; border: 1px solid #cbd5e1; color: var(--text-muted); font-size: 0.9rem; font-weight: 700; border-radius: 50px; padding: 8px 20px; transition: 0.2s; cursor: pointer; }
.btn-preset.active { background: var(--text-main); color: white; border-color: var(--text-main); }
.btn-act { font-weight: 800; border-radius: 12px; padding: 14px 20px; border: none; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s; width: 100%; font-size: 1rem; cursor: pointer; }
.btn-approve { background: var(--success); color: white; }
.btn-reject  { background: #ffffff; color: var(--danger); border: 2px solid #fecaca !important; }
.btn-hold    { background: var(--warning); color: white; }
.btn-drive-full {
    background: #ffffff; color: var(--accent); border: 2px solid #bfdbfe;
    padding: 12px; border-radius: 50px; font-weight: 800; transition: 0.3s;
    width: 100%; display: block; text-align: center; text-decoration: none;
}
.btn-drive-full:hover { background: #eff6ff; color: var(--accent); }
.gm-adjust-area {
    background: #fafafa; border: 1.5px dashed #cbd5e1;
    border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem;
}
.gm-badge { display: inline-block; background: var(--text-main); color: #fff; font-size: 0.7rem; font-weight: 900; padding: 4px 14px; border-radius: 20px; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }

/* ?�?�?� Modals ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.modal-custom {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    z-index: 10000; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-custom.show { display: flex; opacity: 1; }
.modal-content-custom {
    background: #fff; width: 100%; max-width: 500px; border-radius: 24px;
    padding: 2.5rem; box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    transform: translateY(20px); transition: transform 0.3s;
    max-height: 90vh; overflow-y: auto;
}
.modal-custom.show .modal-content-custom { transform: translateY(0); }

/* ?�?�?� Detail Page: Phone / Date Mini Labels ?�?�?�?�?�?�?� */
.pd-meta-mini { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); line-height: 1.6; }

/* ?�?�?� Detail Page: Edit Contract Amount Button ?�?�?�?�?� */
.btn-edit-amt {
    background: #fff; border: 1.5px solid #e2e8f0; color: var(--text-muted);
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-size: 0.72rem; padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.btn-edit-amt:hover {
    border-color: var(--accent); color: var(--accent);
    background: #eff6ff; transform: scale(1.1);
}

/* ?�?�?� Commission Pipeline Tracker ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.comm-pipeline { display: flex; align-items: flex-start; margin: 10px 0 6px; }
.pipe-step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.pipe-connector {
    flex: 1; height: 2px; background: #e2e8f0;
    margin-top: 11px; min-width: 6px; transition: background 0.4s;
}
.pipe-connector.active { background: var(--success); }
.pipe-dot {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #e2e8f0; background: #f8fafc; color: #cbd5e1;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; position: relative; z-index: 1;
}
.pipe-dot.passed   { background: var(--success); border-color: var(--success); color: #fff; }
.pipe-dot.current  { background: var(--warning); border-color: var(--warning); color: #fff; animation: pulseDot 2s infinite; }
.pipe-dot.rejected { background: var(--danger);  border-color: var(--danger);  color: #fff; }
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
.pipe-label { font-size: 0.58rem; font-weight: 800; color: #94a3b8; margin-top: 3px; white-space: nowrap; }
.pipe-dot.passed   + .pipe-label { color: var(--success); }
.pipe-dot.current  + .pipe-label { color: var(--warning); }
.pipe-dot.rejected + .pipe-label { color: var(--danger);  }

/* ?�?�?� Filter Pills (Commission List) ?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: center; }
.filter-pill {
    border: 1.5px solid #e2e8f0; border-radius: 50px;
    padding: 7px 16px; font-size: 0.82rem; font-weight: 800;
    cursor: pointer; background: #fff; color: var(--text-muted);
    transition: 0.2s; white-space: nowrap; line-height: 1.2;
}
.filter-pill:hover         { border-color: #94a3b8; color: var(--text-main); }
.filter-pill.active-all    { background: var(--text-main); color: #fff; border-color: var(--text-main); }
.filter-pill.active-green  { background: var(--success);   color: #fff; border-color: var(--success);   }
.filter-pill.active-red    { background: var(--danger);    color: #fff; border-color: var(--danger);    }
.filter-pill.active-yellow { background: var(--warning);   color: #fff; border-color: var(--warning);   }
.filter-pill.active-grey   { background: #64748b;          color: #fff; border-color: #64748b;          }

/* ?�?�?� Commission Stage Cards v2 ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.comm-stage-card-v2 {
    background: #fff; border-radius: 20px; border: 1.5px solid #e2e8f0;
    overflow: hidden; transition: 0.3s; height: 100%;
    display: flex; flex-direction: column;
}
.comm-stage-card-v2.locked { opacity: 0.45; filter: grayscale(0.6); pointer-events: none; }
.comm-stage-card-v2:not(.locked):hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.07);
    transform: translateY(-3px); border-color: #cbd5e1;
}
.cscard-header {
    padding: 16px 18px 12px; display: flex; justify-content: space-between;
    align-items: flex-start; border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}
.cscard-period     { font-size: 0.9rem; font-weight: 900; color: var(--text-main); margin-bottom: 2px; }
.cscard-rate-label { font-size: 0.65rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.cscard-amount     { text-align: right; }
.cscard-amount-val { font-size: 1.15rem; font-weight: 900; color: var(--accent); line-height: 1; }
.cscard-amount-sub { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); margin-top: 2px; }
.cscard-body  { padding: 12px 18px; flex-grow: 1; display: flex; flex-direction: column; gap: 8px; }
.cscard-req   {
    font-size: 0.75rem; font-weight: 700;
    background: #f8fafc; border-radius: 8px;
    padding: 6px 10px; border: 1px solid #f1f5f9;
    display: flex; align-items: center; gap: 6px;
}
.cscard-tasks { display: flex; flex-direction: column; gap: 5px; flex-grow: 1; }
.cscard-task-item {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.78rem; font-weight: 600; line-height: 1.4;
}
.cscard-task-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.cscard-breakdown {
    display: flex; gap: 6px; flex-wrap: wrap;
    padding-top: 8px; border-top: 1px dashed #e2e8f0; margin-top: 4px;
}
.cscard-breakdown-item {
    font-size: 0.7rem; font-weight: 800; color: var(--text-muted);
    background: #f8fafc; border-radius: 6px; padding: 3px 8px;
}
.cscard-breakdown-item.transport { color: var(--accent); background: #eff6ff; }
.cscard-footer       { padding: 12px 18px; border-top: 1px solid #f1f5f9; background: #fafafa; }
.cscard-upload-count { font-size: 0.78rem; font-weight: 800; color: var(--accent); text-align: center; min-height: 18px; margin-bottom: 6px; }
.cscard-proof-btn {
    display: block; width: 100%; padding: 9px; border-radius: 10px;
    font-weight: 800; font-size: 0.82rem; text-align: center;
    border: 1px solid transparent; cursor: pointer; transition: 0.2s;
}
.cscard-proof-btn.paid   { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.cscard-proof-btn.cheque { background: #eff6ff; color: var(--accent); border-color: #bfdbfe; }

/* ?�?�?� Commission Detail: Payment Progress Bar ?�?�?�?�?�?� */
.comm-detail-pay-bar {
    display: flex; align-items: center; gap: 20px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1.5px solid #bbf7d0; border-radius: 16px; padding: 16px 24px;
}
.comm-detail-pay-label { font-size: 0.72rem; font-weight: 800; color: #166534; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.comm-detail-pay-pct   { font-size: 1.8rem; font-weight: 900; color: #15803d; line-height: 1; }
.comm-pay-track { flex-grow: 1; height: 10px; background: rgba(0,0,0,0.08); border-radius: 10px; overflow: hidden; }
.comm-pay-fill  { height: 100%; background: var(--success); border-radius: 10px; transition: width 1s ease; }

/* ?�?�?� Commission Status Section in Detail Page ?�?�?�?�?� */
.comm-section-title { font-size: 1.05rem; font-weight: 900; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 10px; }
.comm-status-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.comm-status-item   {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 12px 14px; transition: 0.2s;
}
.comm-status-item:hover { background: #fff; border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.csi-period { font-size: 0.68rem; font-weight: 900; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.csi-status { font-size: 0.78rem; font-weight: 800; margin-top: 2px; }

/* ?�?�?� Sticky Batch Action Bar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.sticky-batch-bar {
    position: fixed; bottom: 0; left: 280px; right: 0;
    background: var(--text-main);
    padding: 14px 2.5rem;
    display: flex; align-items: center; gap: 20px;
    z-index: 8000;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
}
.sticky-batch-bar.visible { transform: translateY(0); }
.sticky-batch-info { flex-grow: 1; }
.sticky-batch-label  { font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 700; margin-bottom: 2px; }
.sticky-batch-amount { font-size: 1.3rem; font-weight: 900; color: #fff; line-height: 1; }
.sticky-batch-amount .amt-highlight { color: var(--warning); }

/* ?�?�?� Receipt Verification: Action Buttons ?�?�?�?�?�?�?�?� */
.recv-action-group { display: flex; flex-direction: column; gap: 8px; min-width: 150px; flex-shrink: 0; }
.btn-verify {
    background: var(--accent); color: #fff; border: none;
    padding: 10px 16px; border-radius: 12px; font-weight: 800;
    font-size: 0.88rem; cursor: pointer; transition: 0.2s; white-space: nowrap; text-align: center;
}
.btn-verify:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-reject-recv {
    background: #fff; color: var(--danger); border: 1.5px solid #fecaca;
    padding: 9px 16px; border-radius: 12px; font-weight: 800;
    font-size: 0.88rem; cursor: pointer; transition: 0.2s; white-space: nowrap; text-align: center;
}
.btn-reject-recv:hover { background: #fef2f2; border-color: var(--danger); }
.btn-contract-adj {
    background: #f8fafc; color: var(--text-muted); border: 1.5px solid #e2e8f0;
    padding: 8px 14px; border-radius: 12px; font-weight: 700;
    font-size: 0.82rem; cursor: pointer; transition: 0.2s; white-space: nowrap; text-align: center;
}
.btn-contract-adj:hover { border-color: var(--accent); color: var(--accent); background: #eff6ff; }
.recv-submit-date { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }

/* ?�?�?� Copy to Clipboard ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.copy-icon { cursor: pointer; opacity: 0.45; transition: 0.2s; margin-left: 6px; }
.copy-icon:hover { opacity: 1; color: var(--accent); }
.copy-toast {
    position: fixed; bottom: 90px; right: 2rem;
    background: var(--text-main); color: #fff;
    padding: 10px 20px; border-radius: 12px;
    font-weight: 700; font-size: 0.85rem;
    z-index: 99999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s; box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.copy-toast.show { opacity: 1; }

/* ?�?�?� Dashboard: Progress Stage Hint ?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.prog-stage-hint {
    font-size: 0.62rem; font-weight: 800; color: #b0bec5;
    letter-spacing: 0.3px; margin-left: 5px; vertical-align: middle;
}

/* ?�?�?� Management Card: Contract ID (larger) ?�?�?�?�?�?�?� */
.contract-id {
    font-size: 1.05rem; font-weight: 900; color: var(--accent);
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px;
}

/* ?�?�?� Management Card: Meta Info Row ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.audit-meta-row {
    display: flex; justify-content: space-between;
    align-items: flex-start; flex-wrap: wrap; gap: 12px;
    margin-bottom: 1rem;
}
.audit-meta-chips {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1;
}
.audit-meta-chip {
    font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 20px; padding: 5px 12px;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}

/* ?�?�?� Management Card: Drive Pill Button ?�?�?�?�?�?�?�?�?�?�?� */
.audit-drive-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: #eff6ff; color: var(--accent);
    border: 1.5px solid #bfdbfe; border-radius: 50px;
    padding: 5px 14px; font-weight: 800; font-size: 0.8rem;
    text-decoration: none; transition: 0.2s; white-space: nowrap;
    flex-shrink: 0;
}
.audit-drive-pill:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

/* ?�?�?� Management Card: Remarks Box ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.audit-remarks-box {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 10px 16px; margin-top: 0.75rem;
    font-size: 0.85rem; font-weight: 700; color: var(--text-muted);
    line-height: 1.5;
}

/* ?�?�?� Management Card: Phone Link ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.phone-link {
    color: var(--text-main); font-weight: 800;
    text-decoration: none; transition: color 0.2s;
}
.phone-link:hover { color: var(--accent); }

/* ?�?�?� Detail: Phone/Date Label ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pd-info-group { text-align: right; }
.pd-info-label {
    font-size: 0.65rem; font-weight: 900; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1px;
    display: block; margin-bottom: 2px;
}

/* ?�?�?� Detail: Receipt Download Button ?�?�?�?�?�?�?�?�?�?�?�?�?� */
.btn-download-receipt {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(16,185,129,0.08); color: #059669;
    border: 1.5px solid rgba(16,185,129,0.35); border-radius: 8px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 800;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    margin-top: 4px;
}
.btn-download-receipt:hover {
    background: #059669; color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

/* ?�?�?� Detail: Commission Summary Panel ?�?�?�?�?�?�?�?�?�?�?�?� */
.comm-summary-panel {
    flex-shrink: 0; width: 220px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 16px; padding: 18px 20px;
    backdrop-filter: blur(10px);
}
.comm-sum-title {
    font-size: 0.75rem; font-weight: 900; color: var(--text-main);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px;
}
.comm-sum-row { display: flex; flex-direction: column; gap: 2px; }
.comm-sum-lbl {
    font-size: 0.65rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.comm-sum-val { font-size: 1.1rem; font-weight: 900; color: var(--text-main); }

/* ?�?�?� Detail: Commission Stage Amount ?�?�?�?�?�?�?�?�?�?�?�?�?� */
.csi-amount {
    font-size: 0.72rem; font-weight: 800; color: var(--text-muted);
    margin-top: 3px; letter-spacing: 0.3px;
}
.comm-status-item:hover { transform: translateY(-1px); }

/* ?�?�?� Procurement System ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.proc-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; margin-top: 1.5rem;
}
.proc-module-card {
    background: #ffffff; border: 1.5px solid #e2e8f0;
    border-radius: 20px; padding: 1.5rem;
    cursor: pointer; transition: 0.3s; position: relative; overflow: hidden;
}
.proc-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--accent);
}
.proc-module-card.proc-module-coming {
    opacity: 0.5; cursor: default;
}
.proc-module-card.proc-module-coming:hover { transform: none; box-shadow: none; border-color: #e2e8f0; }

.reimb-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.08) !important; }

.proc-module-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; border: 1.5px solid; margin-bottom: 14px;
}
.proc-module-name { font-size: 1.1rem; font-weight: 900; color: var(--text-main); margin-bottom: 4px; }
.proc-module-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 800;
    background: #f1f5f9; color: var(--text-muted);
    padding: 3px 10px; border-radius: 20px; margin-bottom: 10px;
}
.proc-module-desc { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; line-height: 1.5; }
.proc-module-arrow {
    position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%);
    color: #cbd5e1; font-size: 1rem; transition: 0.3s;
}
.proc-module-card:hover .proc-module-arrow { color: var(--accent); transform: translateY(-50%) translateX(3px); }

.proc-step-card {
    background: #fff; border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 1.5rem 2rem; margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.proc-step-title {
    font-size: 0.72rem; font-weight: 900; color: var(--accent);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 1.25rem; display: flex; align-items: center; gap: 8px;
}
.proc-step-title::before {
    content: ''; width: 3px; height: 14px;
    background: var(--accent); border-radius: 2px; display: inline-block;
}

.proc-autofill-badge {
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 12px; padding: 10px 16px; font-size: 0.88rem;
    font-weight: 700; color: #166534; margin-top: 10px;
}

.proc-form-row {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 1rem; align-items: flex-end;
}
.proc-form-item { flex: 1; min-width: 150px; }
.proc-form-item.sm { flex: 0 0 110px; min-width: 110px; }
.proc-form-item label {
    display: block; font-size: 0.72rem; font-weight: 800;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 7px;
}
.proc-form-input,
.proc-form-select,
.proc-form-textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid #e2e8f0;
    border-radius: 12px; font-size: 0.93rem; font-weight: 600;
    background: #f8fafc; color: var(--text-main); transition: 0.2s;
    box-sizing: border-box;
}
.proc-form-input:focus,
.proc-form-select:focus,
.proc-form-textarea:focus {
    border-color: var(--accent); background: #fff; outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.proc-form-input[readonly] { background: #f1f5f9; color: var(--accent); cursor: default; }
.proc-form-textarea { resize: vertical; min-height: 80px; }

.proc-same-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eff6ff; color: var(--accent);
    border: 1.5px solid #bfdbfe; border-radius: 50px;
    padding: 7px 16px; font-size: 0.82rem; font-weight: 800;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
}
.proc-same-btn:hover { background: var(--accent); color: #fff; }
.proc-same-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.proc-lookup-btn {
    background: var(--accent); color: #fff; border: none;
    border-radius: 12px; padding: 11px 20px; font-weight: 800;
    font-size: 0.9rem; cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.proc-lookup-btn:hover { background: #1d4ed8; }

.proc-add-btn {
    background: var(--accent); color: #fff; border: none;
    border-radius: 12px; padding: 12px 20px; font-weight: 800;
    cursor: pointer; transition: 0.2s; width: 100%; margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem;
}
.proc-add-btn:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(37,99,235,0.25); }

.proc-tile-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 12px; }
.proc-tile-table th {
    background: #f8fafc; padding: 10px 8px; font-weight: 800;
    color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0; text-align: center; white-space: nowrap;
}
.proc-tile-table td {
    padding: 9px 7px; border-bottom: 1px solid #f1f5f9;
    vertical-align: middle; background: #fff;
}
.proc-tile-table tr:last-child td { border-bottom: none; }
.proc-tile-table tr:hover td { background: #f8fafc; }
.proc-table-input {
    width: 100%; padding: 6px 9px; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 0.82rem; font-weight: 700;
    background: #f8fafc; min-width: 80px;
}
.proc-table-input:focus { border-color: var(--accent); outline: none; background: #fff; }
.proc-table-select {
    padding: 6px 8px; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 0.82rem; font-weight: 700;
    background: #f8fafc; max-width: 90px;
}
.proc-waste-input {
    width: 56px; padding: 6px 8px; text-align: center;
    border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 0.82rem; font-weight: 700; background: #f8fafc;
}
.proc-row-btn {
    background: transparent; border: 1px solid #e2e8f0;
    border-radius: 7px; padding: 4px 8px; cursor: pointer;
    transition: 0.2s; font-size: 0.75rem; margin: 0 2px;
}
.proc-btn-copy { color: var(--accent); }
.proc-btn-copy:hover { background: #eff6ff; border-color: var(--accent); }
.proc-btn-del  { color: var(--danger); }
.proc-btn-del:hover  { background: #fef2f2; border-color: var(--danger); }

.proc-summary-box {
    background: var(--text-main); border-radius: 16px;
    padding: 1.5rem 2rem; margin-top: 1.5rem; color: #fff;
}
.proc-sum-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 1rem; font-weight: 700; opacity: 0.88; margin-bottom: 8px;
}
.proc-sum-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 1.5rem; font-weight: 900;
    border-top: 1px solid rgba(255,255,255,0.2); padding-top: 12px; margin-top: 8px;
}

.proc-pdf-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #1e3a8a; color: #fff; border: none;
    border-radius: 12px; padding: 14px 20px; font-weight: 800;
    font-size: 0.95rem; cursor: pointer; width: 100%; margin-bottom: 10px;
    transition: 0.2s;
}
.proc-pdf-btn:hover { background: #1e40af; transform: translateY(-1px); }

.proc-history-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; transition: 0.2s;
}
.proc-history-item:hover { background: #fff; border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.proc-history-id { font-size: 0.78rem; font-weight: 900; color: var(--accent); margin-bottom: 2px; }
.proc-history-meta { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.proc-history-amt { font-size: 1rem; font-weight: 900; color: var(--text-main); }
.proc-history-diff { font-size: 0.75rem; font-weight: 800; color: var(--danger); margin-top: 2px; text-align: right; }
.proc-type-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 800;
    padding: 2px 8px; border-radius: 20px; margin-left: 6px;
}

/* ?�?�?� Mobile Sidebar Backdrop ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
    z-index: 190;
}
.sidebar-backdrop.show { display: block; }

/* ?�?�?� Mobile Sidebar Slide-in Animation ?�?�?�?�?�?�?�?�?�?�?� */
@keyframes mobileSidebarIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

/* ?�?�?� Hamburger Button (hidden on desktop) ?�?�?�?�?�?�?�?� */
.mobile-menu-btn {
    display: none;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 12px;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s;
    font-size: 1rem; flex-shrink: 0;
    margin-right: 10px; padding: 0;
}
.mobile-menu-btn:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   RESPONSIVE ??Mobile (??768px)
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/
@media (max-width: 768px) {

    /* ?�?� Sidebar ??completely hidden, full-screen overlay when open ?�?� */
    .sidebar {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 280px; height: 100vh;
        z-index: 200;
        overflow-y: auto;
        /* no transform: browser renders directly at final position */
        /* ??Push user-profile above iPhone Safari bottom bar (??0px) + home indicator (??4px) */
        padding-bottom: max(90px, env(safe-area-inset-bottom) + 70px);
    }
    .sidebar.mobile-open {
        display: flex;
        animation: mobileSidebarIn 0.26s ease;
        box-shadow: 20px 0 60px rgba(37,99,235,0.18), 6px 0 48px rgba(0,0,0,0.12);
    }

    /* ?�?� App Container: stays flex-row, sidebar is out of flow ?�?�?� */
    #appContainer { flex-direction: row; }

    /* ?�?� Main Content: full width (sidebar removed from flow) ?�?�?�?� */
    .main-content { width: 100%; min-width: 0; }

    /* ?�?� Hamburger ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .mobile-menu-btn { display: flex; }

    /* ?�?� Topbar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .topbar {
        /* fixed instead of sticky: prevents topbar from disappearing after iOS double-tap zoom */
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 100;
    }
    .topbar-main-row {
        padding-left: 1rem;
        padding-right: 1rem;
        /* safe-area on mobile: accounts for Dynamic Island / notch */
        padding-top: max(1rem, env(safe-area-inset-top)) !important;
        padding-bottom: 1rem;
        min-height: calc(60px + max(0px, env(safe-area-inset-top)));
        height: auto;
    }
    #globalProjectTabs { padding: 0 1rem; }
    #globalProjectTabs .det-seg-btn { font-size: 0.78rem; padding: 8px 0; }
    /* compensate for fixed topbar (now has top+bottom 1rem padding ??~76px) */
    .main-content {
        padding-top: calc(76px + max(0px, env(safe-area-inset-top)));
    }
    /* detail-mode: topbar taller (main-row ~76px + tab row ~42px) */
    body.detail-mode .main-content {
        padding-top: calc(118px + max(0px, env(safe-area-inset-top)));
    }
    /* Page title: span full width and truly center the text */
    .page-title {
        position: absolute;
        left: 0;
        right: 0;
        transform: none;
        font-size: 1rem;
        gap: 0;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        pointer-events: none;
    }
    /* Back button: float between hamburger and centered title */
    .page-title .btn-back {
        position: absolute;
        left: 72px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: auto;
    }
    .btn-back { width: 30px; height: 30px; }
    #topbarActions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
    #topbarActions .btn,
    #topbarActions button { font-size: 0.78rem; padding: 7px 10px; }

    /* ?�?� Router View ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .router-view { padding: 1.25rem 1rem 2rem; }

    /* ?�?� Login Card ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .login-card {
        padding: 2.2rem 1.5rem !important;
        border-radius: 22px !important;
        max-width: calc(100vw - 2rem) !important;
    }
    .login-heading { font-size: 1.45rem; }

    /* ?�?� Glass Card ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .glass-card { padding: 1.25rem 1rem; border-radius: 18px; }

    /* ?�?� Dashboard Toolbar ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .dash-toolbar { gap: 10px; flex-wrap: wrap; }
    .dash-input-group { max-width: 100%; flex-basis: 100%; }
    .dash-select { flex: 1; }
    .btn-refresh { padding: 12px 16px; }

    /* ?�?� KPI Stat Cards ??2?2 grid ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 1.25rem;
    }
    .stat-card { padding: 1rem 0.9rem; gap: 10px; }
    .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 10px; flex-shrink: 0; }
    .stat-info .value { font-size: 1.55rem; }
    .stat-info .label { font-size: 0.68rem; }

    /* ?�?� Project List Rows ??Stack ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .project-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 1rem;
    }
    .project-row:hover { transform: none; }
    .col-id      { width: 100%; }
    .col-info    { width: 100%; min-width: unset; }
    .col-progress { width: 100%; flex-shrink: 1; }
    .p-id { font-size: 1.05rem; }
    .p-addr { font-size: 0.95rem; }
    
    /* ── Detail Page: mobile compact header ── */
    .pd-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }
    .pd-hb-id {
        font-size: 1.45rem;
        border-right: none;
        padding-right: 0;
        margin-right: 0;
    }
    .pd-hb-chips { padding-left: 0; row-gap: 6px; }
    .pd-chip {
        padding: 4px 10px;
        background: rgba(100,116,139,0.06);
        border-radius: 8px;
        margin: 2px;
    }
    .pd-chip + .pd-chip::before { display: none; }
    .pd-chip-val  { font-size: 0.82rem; }
    .pd-chip-amount { font-size: 0.88rem; }

    /* keep legacy ref (unused but harmless) */
    .pd-meta-item {
        align-items: flex-start;
        text-align: left;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 10px 10px 8px;
    }
    .pd-meta-lbl { font-size: 0.68rem; margin-bottom: 4px; letter-spacing: 0.2px; }
    .pd-meta-val {
        font-size: 0.95rem;
        margin-top: 0 !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    /* Stage Track ??single column, tighter */
    .stage-track-container { grid-template-columns: 1fr; gap: 10px; }
    .track-col { padding: 14px 12px; border-radius: 16px; }
    .track-title { font-size: 0.95rem; margin-bottom: 12px; gap: 7px; }

    /* Stage rows ??compact iOS-style list */
    .stage-row {
        padding: 10px 12px;
        border-radius: 11px;
        margin-bottom: 7px;
        gap: 0;
    }
    .stage-row:hover { box-shadow: none; }
    .stage-num {
        width: 28px; height: 28px;
        border-radius: 8px;
        font-size: 0.78rem;
        flex-shrink: 0;
    }
    .stage-info { gap: 9px; min-width: 0; flex: 1; }
    .stage-name { font-size: 0.82rem; line-height: 1.35; word-break: keep-all; }

    /* Payment badges ??smaller on mobile */
    .pay-status-badge {
        font-size: 0.67rem;
        padding: 3px 8px;
        border-radius: 6px;
        display: inline-block;
        margin-top: 4px;
    }

    /* Action buttons in pay rows ??compact */
    .pay-btn, .btn-supplement {
        padding: 6px 10px;
        font-size: 0.73rem;
        border-radius: 8px;
        white-space: nowrap;
    }
    .btn-view-proof {
        padding: 6px 8px;
        font-size: 0.73rem;
        border-radius: 8px;
        margin-right: 4px;
    }

    /* Pay action area ??column stack on very narrow, row on wider mobile */
    .stage-row > div:last-child {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        flex-shrink: 0;
        margin-left: 8px;
    }

    /* Eng select ??shorter on mobile */
    .eng-select {
        font-size: 0.78rem;
        padding: 7px 8px;
        border-radius: 8px;
        max-width: 120px;
    }
    #pd_eng_status { max-width: 130px; font-size: 0.78rem; }

    /* Save + History buttons */
    .track-col .btn-primary-dark { font-size: 0.85rem; padding: 12px 0; }
    .track-col .btn.btn-outline-secondary { font-size: 0.82rem; padding: 12px 0; }

    /* Download receipt button */
    .btn-download-receipt {
        font-size: 0.72rem !important;
        padding: 5px 8px !important;
        border-radius: 7px !important;
    }

    /* Commission status in detail ??2 col */
    .comm-status-grid { grid-template-columns: 1fr 1fr; }
    .comm-summary-panel { width: 100%; }

    /* ?�?� Commission Center ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .comm-rate-bar { flex-wrap: wrap; }
    .rate-btn { padding: 9px 16px; font-size: 0.88rem; }
    .comm-layout { flex-direction: column; gap: 16px; }
    .designer-sidebar { width: 100%; }

    /* Filter pills: horizontal scroll */
    .filter-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .filter-pill { flex-shrink: 0; }

    /* ?�?� Accounting ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .acct-tab-group { overflow-x: auto; }
    .acct-tab-btn { padding: 10px 18px; font-size: 0.83rem; white-space: nowrap; }
    .recv-card { padding: 1rem; border-radius: 16px; }
    .recv-card-footer { flex-wrap: wrap; }
    .recv-action-group { flex-direction: row; flex-wrap: wrap; min-width: unset; width: 100%; }
    .recv-action-group button { flex: 1; min-width: 120px; }

    /* ?�?� Audit Cards (Management) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .audit-card { border-radius: 18px; }
    .audit-header {
        padding: 18px 16px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .audit-amt-box { align-self: stretch; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
    .audit-amt-val { font-size: 1.4rem; }
    .audit-client-bar { margin: 0 16px 14px; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
    .audit-body { padding: 0 16px 16px; }
    .audit-footer { padding: 16px; }

    /* ?�?� Procurement ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .proc-step-card { padding: 1rem; border-radius: 16px; }
    .proc-form-row { gap: 10px; }
    .proc-form-item { min-width: 100%; flex-basis: 100%; }
    .proc-form-item.sm { min-width: unset; flex: 1; }
    .proc-tile-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .proc-module-grid { grid-template-columns: 1fr; gap: 14px; }
    .proc-module-card { padding: 1.2rem; }

    /* ?�?� Modals ??Bottom Sheet ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .modal-custom { align-items: flex-end; }
    .modal-content-custom {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 1.75rem 1.25rem 2rem;
        max-height: 93dvh;
    }
    .modal-custom.show .modal-content-custom { transform: translateY(0); }

    /* ?�?� Sticky Batch Bar ??full width ?�?�?�?�?�?�?�?�?�?�?�?� */
    .sticky-batch-bar { left: 0; padding: 12px 1rem; gap: 12px; }
    .sticky-batch-bar .btn { font-size: 0.85rem; padding: 10px 16px; }
    .sticky-batch-amount { font-size: 1.1rem; }

    /* ?�?� Tables ??horizontal scroll ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .data-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 560px; }

    /* ?�?� Copy Toast ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
    .copy-toast { right: 1rem; bottom: 5rem; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   RESPONSIVE ??Tablet / iPad (769px ??1023px)
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/
@media (min-width: 769px) and (max-width: 1023px) {

    /* Narrower sidebar */
    .sidebar { width: 220px; padding: 1.5rem 1rem; }
    .brand-title { font-size: 1.1rem; gap: 8px; }
    .nav-item { font-size: 0.85rem; padding: 12px 14px; gap: 10px; }

    /* Topbar */
    .topbar-main-row { padding-left: 1.5rem; padding-right: 1.5rem; }
    #globalProjectTabs { padding: 0 1.5rem; }
    .router-view { padding: 2rem 1.5rem; }

    /* Stage track: single column on smaller iPads */
    .stage-track-container { gap: 16px; }

    /* Accounting commission layout ??stack */
    .comm-layout { flex-direction: column; gap: 16px; }
    .designer-sidebar { width: 100%; }

    /* Sticky batch bar: offset for narrower sidebar */
    .sticky-batch-bar { left: 220px; }

    /* Stat values slightly smaller */
    .stat-info .value { font-size: 1.7rem; }

    /* Audit cards */
    .audit-header { padding: 22px 24px 16px; }
    .audit-client-bar { margin: 0 24px 16px; }
    .audit-body { padding: 0 24px 20px; }
    .audit-footer { padding: 20px 24px; }

    /* Procurement form items can be wider */
    .proc-form-item { min-width: 140px; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   RESPONSIVE ??Engineering History Modal
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/
.eng-history-list { display: flex; flex-direction: column; gap: 8px; }
.eng-history-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: 12px 16px;
}
.eng-history-left { flex: 1; }
.eng-history-stage { font-size: 0.88rem; font-weight: 800; color: var(--text-main); }
.eng-history-time  { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.eng-history-badge {
    font-size: 0.8rem; font-weight: 800;
    padding: 5px 12px; border-radius: 8px;
    border: 1px solid; flex-shrink: 0; margin-left: 12px;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Management Dashboard
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/

/* ?�?� Tab Scroll Row ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-tabs-row {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem; padding-bottom: 2px;
}
.pm-tab-panel          { display: none; }
.pm-tab-panel.active   { display: block; }

/* ?�?� Project Card ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-project-card {
    background: #ffffff; border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 1.5rem 2rem;
    display: block;
    margin-bottom: 1rem; transition: 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}
.pm-project-card:hover {
    border-color: #cbd5e1; transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}
/* Info section ??fills full width */
.pm-card-info { width: 100%; min-width: 0; }

/* Footer: countdown + amount LEFT, assign button RIGHT */
.pm-card-footer {
    display: flex; justify-content: space-between;
    align-items: center; gap: 12px;
    padding-top: 0.875rem; margin-top: 0.875rem;
    border-top: 1px solid #f1f5f9; flex-wrap: wrap;
}
.pm-footer-left {
    display: flex; align-items: center;
    gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0;
}
.pm-amt-block  { display: flex; flex-direction: column; }

/* Legacy: keep old classes for any unchanged code */
.pm-card-left  { flex: 1; min-width: 0; }
.pm-card-right { text-align: right; flex-shrink: 0; }

/* Meta separator: space before each meta item on mobile */
.pm-meta-sep { margin-left: 0.75rem; }

.pm-contract-id {
    font-size: 1.25rem; font-weight: 900; color: var(--accent);
    letter-spacing: 0.5px; margin-bottom: 5px;
    display: flex; align-items: center; gap: 10px;
}
.pm-status-badge {
    font-size: 0.65rem; font-weight: 800; padding: 3px 10px;
    border-radius: 20px; background: #fffbeb; color: #b45309;
    border: 1px solid #fde68a; letter-spacing: 0.3px;
}
.pm-addr {
    font-size: 1rem; font-weight: 700; color: var(--text-main);
    margin-bottom: 8px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 100%;
}
.pm-meta { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.pm-amt  { font-size: 1.55rem; font-weight: 900; color: var(--success); line-height: 1; }
.pm-amt-label {
    font-size: 0.65rem; font-weight: 800; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 3px 0 12px;
}
.pm-assign-btn {
    background: var(--accent); color: #fff; border: none;
    border-radius: 12px; padding: 10px 20px; font-weight: 800;
    font-size: 0.88rem; cursor: pointer; transition: 0.2s;
    display: inline-flex; align-items: center; white-space: nowrap;
}
.pm-assign-btn:hover {
    background: #1d4ed8; transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37,99,235,0.3);
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   Detail Page ??Designer Action Cards
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/

/* ?�?� Card Header ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.detail-action-card { }
.detail-ac-header {
    display: flex; align-items: center; gap: 14px;
}
.detail-ac-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; flex-shrink: 0;
}
.detail-ac-title {
    font-size: 1rem; font-weight: 900; color: var(--text-main);
}
.detail-ac-sub {
    font-size: 0.73rem; font-weight: 600; color: var(--text-muted); margin-top: 2px;
}

/* ?�?� PM Verify Stage List ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.detail-verify-row {
    display: flex; align-items: center; gap: 12px;
    background: #f8fafc; border: 1.5px solid var(--glass-border);
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 8px; transition: 0.2s;
}
.detail-verify-row:hover { background: #f0f6ff; border-color: #bfdbfe; }
.detail-verify-done { opacity: 0.5; }
.detail-verify-done:hover { opacity: 0.7; }
.detail-verify-na  { opacity: 0.4; }

.detail-verify-num {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-size: 0.78rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.detail-verify-done .detail-verify-num { background: var(--success); }
.detail-verify-na   .detail-verify-num { background: #94a3b8; }

.detail-verify-desc {
    flex: 1; font-size: 0.85rem; font-weight: 700; color: var(--text-main);
    line-height: 1.4;
}

.detail-verify-btn {
    background: #f0fdf4; color: var(--success);
    border: 1.5px solid #bbf7d0; border-radius: 8px;
    padding: 5px 12px; font-weight: 800; font-size: 0.78rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
}
.detail-verify-btn:hover {
    background: var(--success); color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

/* ?�?� Copy Server Path Button ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.btn-copy-path {
    background: #f8fafc; color: var(--text-muted);
    border: 1.5px solid #e2e8f0; border-radius: 7px;
    padding: 3px 10px; font-weight: 800; font-size: 0.72rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
    vertical-align: middle;
}
.btn-copy-path:hover {
    background: var(--accent); color: #fff; border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(37,99,235,0.22);
}

@media (max-width: 768px) {
    .detail-verify-row  { flex-wrap: wrap; gap: 8px; }
    .detail-verify-desc { font-size: 0.8rem; }
}

/* ?�?� Contractor Info Panel (PM 派單 Modal) ?�?�?�?�?�?�?�?�?� */
.pm-contractor-info {
    display: flex; gap: 20px; flex-wrap: wrap;
    background: #f0f6ff; border: 1.5px solid #bfdbfe;
    border-radius: 10px; padding: 10px 14px; margin-top: 8px;
}
.pm-ci-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 700; color: var(--text-main);
}
.pm-ci-row i { font-size: 0.75rem; flex-shrink: 0; }
.pm-ci-tel {
    text-decoration: none; color: var(--accent);
}
.pm-ci-tel:hover { text-decoration: underline; }

/* ?�?� Socket Cost Display ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-socket-display {
    font-size: 0.85rem; font-weight: 800; color: var(--accent);
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 8px; padding: 6px 14px; white-space: nowrap;
}

/* ?�?� P&L Calculator Box ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-pl-box {
    background: var(--text-main); border-radius: 16px;
    padding: 1.25rem 1.5rem; margin-top: 1rem; color: #fff;
}
.pm-pl-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.92rem; font-weight: 700; opacity: 0.82; margin-bottom: 8px;
}
.pm-pl-divider { border-top: 1px solid rgba(255,255,255,0.12); margin: 10px 0; }
.pm-pl-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 1.1rem; font-weight: 900;
}
.pm-gross-warn {
    align-items: center; gap: 8px;
    background: rgba(239,68,68,0.18); border: 1px solid rgba(239,68,68,0.35);
    border-radius: 8px; padding: 9px 14px; margin-top: 12px;
    font-size: 0.82rem; font-weight: 800; color: #fca5a5;
}

/* ?�?� Placeholder (tabs 2-4) ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-placeholder {
    text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.pm-placeholder i {
    font-size: 3rem; opacity: 0.2; margin-bottom: 1rem; display: block;
}

/* ?�?� Mobile ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
@media (max-width: 767px) {
    .pm-project-card   { padding: 1rem; }
    .pm-amt            { font-size: 1.3rem; }
    .pm-addr           { white-space: normal; }
    .pm-contract-id    { font-size: 1.05rem; flex-wrap: wrap; }
    .pm-meta           { display: flex; flex-direction: column; gap: 4px; }
    .pm-meta-sep       { margin-left: 0; }
    /* Assign button: full width on mobile */
    .pm-assign-btn-responsive {
        width: 100%; justify-content: center;
    }
    /* Filter dropdowns: stack full width */
    .pm-filter-ig      { width: 100% !important; min-width: unset !important; max-width: unset !important; }
    /* Search bar: full width on mobile */
    .pm-search-full-mobile { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Payout Accordion (Tab 2)
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/

.pm-payout-count-label {
    font-size: 0.85rem; font-weight: 800; color: var(--text-muted);
    display: flex; align-items: center;
}

/* ?�?� Accordion Shell ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-accordion {
    background: #fff;
    border: 1.5px solid var(--glass-border);
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}
.pm-accordion:hover { box-shadow: 0 8px 25px rgba(0,0,0,0.05); }
.pm-accordion.open  {
    border-color: var(--accent);
    box-shadow: 0 8px 28px rgba(37,99,235,0.09);
}

/* ?�?� Header ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-accordion-header {
    display: flex; align-items: center; gap: 0;
    padding: 1.1rem 1.4rem; cursor: pointer;
    user-select: none; transition: background 0.2s;
}
.pm-accordion-header > .container-fluid { flex: 1; min-width: 0; }
.pm-accordion-header:hover { background: #f8fafc; }

.pm-accordion-title {
    display: flex; flex-direction: column; flex: 1; min-width: 0;
}
.pm-contract-id-sm {
    font-size: 1.05rem; font-weight: 900; color: var(--accent);
    letter-spacing: 0.5px; line-height: 1.2;
}
.pm-pm-name {
    font-size: 0.77rem; font-weight: 700; color: var(--text-muted); margin-top: 2px;
}
.pm-accordion-meta {
    display: flex; gap: 10px; align-items: center; flex-shrink: 0; flex-wrap: wrap;
}
.pm-stage-progress {
    font-size: 0.75rem; font-weight: 800; color: var(--text-muted);
    background: #f1f5f9; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
.pm-payout-total {
    font-size: 1rem; font-weight: 900; color: var(--text-main); white-space: nowrap;
}
.pm-pending-warn {
    font-size: 0.73rem; font-weight: 800; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a;
    padding: 4px 10px; border-radius: 20px; white-space: nowrap;
}
/* 待批?��?額警示�??��? A：已驗收 + 確�?已收款�?*/
.pm-pending-approve {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    animation: pm-pulse-warn 2s ease-in-out infinite;
}
/* 待�?計出款�?籤�??��? E�?/
.pm-pending-acct {
    color: #0e7490 !important;
    background: #ecfeff !important;
    border-color: #a5f3fc !important;
}
@keyframes pm-pulse-warn {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

/* ?��? E 行�???*/
.pm-row-acct { background: #f0f9ff !important; }

/* ?��?付款?��? */
.pm-acct-pay-btn {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: 8px; border: none;
    background: #16a34a; color: #fff;
    font-size: 0.78rem; font-weight: 800; cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
}
.pm-acct-pay-btn:hover  { background: #15803d; }
.pm-acct-pay-btn:active { transform: scale(0.97); }

/* Tab 1 ?��??�工?��?標籤 */
.pm-start-date-badge {
    font-size: 0.78rem; font-weight: 700;
    color: #0891b2; white-space: nowrap;
}
.pm-start-date-line {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   Tab 4 ??工�??�支系統
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.exp-section {
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.exp-section-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 900;
    gap: 4px;
}
.exp-section-desc {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.7;
    margin-left: 6px;
}
/* 顏色變�? */
.exp-header-gm   { background: #eff6ff; color: #1d4ed8; border-bottom: 1px solid #bfdbfe; }
.exp-header-acct { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; }
.exp-header-paid { background: #f0fdf4; color: #166534; border-bottom: 1px solid #bbf7d0; }
.pm-chevron {
    color: #cbd5e1; transition: transform 0.3s; flex-shrink: 0; font-size: 0.9rem;
}
.pm-accordion.open .pm-chevron { transform: rotate(180deg); color: var(--accent); }

/* ?�?� Body Slide ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-accordion-body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.pm-accordion.open .pm-accordion-body { max-height: 640px; }

/* ?�?� Progress Strip ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-payout-progress-bar  { height: 3px; background: #f1f5f9; width: 100%; }
.pm-payout-progress-fill {
    height: 100%; background: var(--success);
    border-radius: 0 3px 3px 0; transition: width 0.6s ease;
}

/* ?�?� Stage Table ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-stage-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pm-stage-table { width: 100%; border-collapse: collapse; }
.pm-stage-table th {
    background: #f8fafc; padding: 10px 14px;
    font-weight: 800; font-size: 0.7rem; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 2px solid #f1f5f9;
    white-space: nowrap; text-align: left;
}
.pm-stage-table td {
    padding: 12px 14px; border-bottom: 1px solid #f8fafc;
    vertical-align: middle; font-size: 0.86rem;
}
.pm-stage-table tr:last-child td { border-bottom: none; }
.pm-stage-table tr:hover td { background: #fafbfc; }
.pm-row-done td { opacity: 0.55; }
.pm-row-done:hover td { opacity: 0.72; }

.pm-stage-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; background: #f1f5f9;
    color: var(--text-muted); font-weight: 900; font-size: 0.73rem;
    border-radius: 6px; margin-right: 8px; flex-shrink: 0;
    vertical-align: middle;
}
.pm-stage-name-text { font-weight: 700; }
.pm-stage-amt { font-weight: 900; color: var(--success); font-size: 0.95rem; }
.pm-badge-sm  {
    font-size: 0.7rem !important; padding: 4px 9px !important;
    font-weight: 800 !important; white-space: nowrap;
}

/* ?�?� Action Buttons ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */

/* ?�色：批?�出款�?GM�?/
.pm-approve-btn {
    background: #f0f9ff; color: var(--accent);
    border: 1.5px solid #bfdbfe; border-radius: 8px;
    padding: 5px 12px; font-weight: 800; font-size: 0.78rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
}
.pm-approve-btn:not([disabled]):hover {
    background: var(--accent); color: #fff;
    box-shadow: 0 4px 12px rgba(37,99,235,0.28);
}
.pm-approve-btn[disabled] { opacity: 0.38; cursor: not-allowed; }

/* 橙色：確認�???*/
.pm-verify-btn {
    background: #fffbeb; color: #b45309;
    border: 1.5px solid #fde68a; border-radius: 8px;
    padding: 5px 12px; font-weight: 800; font-size: 0.78rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
}
.pm-verify-btn:hover {
    background: #f59e0b; color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,0.35);
}

/* 綠色：客款確�?*/
.pm-client-btn {
    background: #f0fdf4; color: #059669;
    border: 1.5px solid #bbf7d0; border-radius: 8px;
    padding: 5px 12px; font-weight: 800; font-size: 0.78rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
}
.pm-client-btn:hover {
    background: #059669; color: #fff;
    box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}

/* 已�??��?�?*/
.pm-done-label {
    color: var(--success); font-weight: 800; font-size: 0.78rem;
    display: inline-flex; align-items: center;
}

/* ?�?� Mobile ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
@media (max-width: 768px) {
    .pm-accordion-header { padding: .85rem 1rem; }
    .pm-accordion-header .col-md-5 { justify-content: flex-start !important; }
    .pm-accordion-meta   { gap: 8px; }
    .pm-accordion.open .pm-accordion-body { max-height: 1200px; }
    .pm-stage-table th,
    .pm-stage-table td   { padding: 8px 10px; font-size: 0.76rem; }
    .pm-contract-id-sm   { font-size: 1rem; }
    .pm-payout-total     { font-size: 0.9rem; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Tab 3: ?�俬?�批??
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/

/* ?�?� KPI ?��????�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.fur-kpi-row {
    display: flex; align-items: center; gap: 0;
    background: #fff; border: 1.5px solid var(--glass-border);
    border-radius: 16px; padding: 14px 20px;
    overflow: hidden;
}
.fur-kpi-item {
    display: flex; flex-direction: column; align-items: center;
    flex: 1; gap: 3px;
}
.fur-kpi-num {
    font-size: 1.5rem; font-weight: 900; color: var(--text-main);
    line-height: 1;
}
.fur-kpi-lbl {
    font-size: 0.68rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.fur-kpi-divider { width: 1px; height: 40px; background: var(--glass-border); flex-shrink: 0; }

/* ?�?� Status Filter Dots ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.fur-dot {
    display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; margin-right: 5px; flex-shrink: 0;
}
.fur-dot-pending  { background: #f59e0b; }
.fur-dot-approved { background: #10b981; }
.fur-dot-rejected { background: #ef4444; }

/* ?�?� Order Card ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.fur-order-card {
    background: #fff;
    border: 1.5px solid var(--glass-border);
    border-radius: 18px; padding: 1.2rem 1.5rem;
    margin-bottom: 10px;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.fur-order-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}
.fur-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 10px;
}
.fur-card-id-block { display: flex; flex-direction: column; gap: 3px; }
.fur-order-id {
    font-size: 0.85rem; font-weight: 900; color: var(--accent);
    letter-spacing: 0.5px;
}
.fur-contract-ref {
    font-size: 0.73rem; font-weight: 700; color: var(--text-muted);
}
.fur-card-body { }
.fur-item-desc {
    font-size: 1rem; font-weight: 800; color: var(--text-main);
    margin-bottom: 6px;
}
.fur-card-meta {
    font-size: 0.78rem; color: var(--text-muted); font-weight: 600;
    margin-bottom: 6px;
}
.fur-unit-price { color: var(--text-main); font-weight: 700; }
.fur-total-amt {
    font-size: 0.85rem; color: var(--text-muted); font-weight: 700;
}
.fur-total-amt strong {
    font-size: 1.1rem; font-weight: 900; color: var(--success);
}
.fur-card-extra {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

/* ?�?� Reject Button ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.fur-reject-btn {
    background: #fef2f2; color: var(--danger);
    border: 1.5px solid #fecaca; border-radius: 8px;
    padding: 5px 12px; font-weight: 800; font-size: 0.78rem;
    cursor: pointer; transition: 0.2s; white-space: nowrap;
    display: inline-flex; align-items: center;
}
.fur-reject-btn:hover {
    background: var(--danger); color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.28);
}

@media (max-width: 768px) {
    .fur-kpi-row { padding: 12px 14px; }
    .fur-kpi-num { font-size: 1.25rem; }
    .fur-order-card { padding: 1rem; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Tab 4: ?��?流�?�?
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???*/

/* ?�?� Section Title ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.cf-section-title {
    font-size: 0.72rem; font-weight: 900; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 10px; display: flex; align-items: center;
}

/* ?�?� Cash Flow Item Row ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.cf-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; border: 1.5px solid var(--glass-border);
    border-radius: 14px; padding: 12px 16px;
    margin-bottom: 8px; transition: 0.2s;
}
.cf-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.05); }
.cf-item-urgent { border-left: 3px solid #ef4444; }
.cf-item-left   { display: flex; flex-direction: column; gap: 3px; }
.cf-item-right  { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.cf-item-contract {
    font-size: 0.72rem; font-weight: 900; color: var(--accent);
    letter-spacing: 0.5px;
}
.cf-item-desc {
    font-size: 0.88rem; font-weight: 800; color: var(--text-main);
}
.cf-item-meta  { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.cf-item-amt   { font-size: 1rem; font-weight: 900; color: var(--danger); }

/* ?�?� Month Summary Cards ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.cf-month-card {
    background: #fff; border: 1.5px solid var(--glass-border);
    border-radius: 18px; padding: 1.2rem 1.5rem;
    margin-bottom: 10px; transition: 0.2s;
}
.cf-month-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.cf-month-current { border-color: var(--accent); background: #f0f6ff; }
.cf-month-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.cf-month-label {
    font-size: 0.95rem; font-weight: 900; color: var(--text-main);
}
.cf-now-badge {
    font-size: 0.65rem; font-weight: 900; background: var(--accent);
    color: #fff; padding: 2px 8px; border-radius: 20px;
    vertical-align: middle; margin-left: 6px;
}
.cf-month-total { font-size: 1.1rem; font-weight: 900; color: var(--danger); }
.cf-bar-track { margin-bottom: 10px; }
.cf-bar-fill {
    height: 8px; border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1); min-width: 2%;
}
.cf-bar-pm  { background: linear-gradient(90deg, #ef4444, #f87171); }
.cf-bar-fur { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cf-month-breakdown {
    display: flex; gap: 16px; flex-wrap: wrap;
}
.cf-bd-item { font-size: 0.73rem; font-weight: 700; }
.cf-bd-pm   { color: #ef4444; }
.cf-bd-fur  { color: #f59e0b; }

@media (max-width: 768px) {
    .cf-month-card { padding: 1rem; }
    .cf-item { flex-wrap: wrap; gap: 8px; }
    .cf-item-right { align-items: flex-start; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   Tab 2 ??一體�?工具??& ?��??��?保�??�用�?
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */

/* Unified Toolbar card */
#pmPayoutToolbar {
    background: #ffffff;
    border-radius: 16px !important;
}
#pmPayoutToolbar .input-group-text {
    background: #fff;
    border-right: none;
}
#pmPayoutToolbar .form-control,
#pmPayoutToolbar .form-select {
    border-left: none;
    box-shadow: none;
}
#pmPayoutToolbar .form-control:focus,
#pmPayoutToolbar .form-select:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

/* ?��??��??�用，�?衝�?�?/
.pm-pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-pill-btn {
    display: inline-flex; align-items: center;
    padding: 5px 14px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700;
    border: 1.5px solid transparent; cursor: pointer;
    transition: all 0.18s ease; white-space: nowrap;
    background: #f1f5f9; color: #64748b;
}
.pm-pill-btn:hover { filter: brightness(0.95); }
.pm-pill-btn.pm-pill-all           { border-color: #cbd5e1; }
.pm-pill-btn.pm-pill-all.active    { background: var(--accent,#3b82f6); color:#fff; border-color: var(--accent,#3b82f6); }
.pm-pill-btn.pm-pill-primary       { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.pm-pill-btn.pm-pill-primary.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.pm-pill-btn.pm-pill-acct          { border-color: #fcd34d; color: #b45309; background: #fffbeb; }
.pm-pill-btn.pm-pill-acct.active   { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.pm-pill-btn.pm-pill-success       { border-color: #86efac; color: #16a34a; background: #f0fdf4; }
.pm-pill-btn.pm-pill-success.active { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   ?�工?��??��? ??Checklist + 三�??�?��?�?
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */

/* ?�?� 清單容器 ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.commence-checklist {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}
.commence-checklist-title {
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--accent, #3b82f6);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.commence-check-item {
    padding: 7px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.commence-check-item:last-child { border-bottom: none; }
.commence-check-item .form-check-input {
    width: 1.1em; height: 1.1em;
    border: 2px solid #94a3b8;
    cursor: pointer;
    margin-top: 0.2em;
}
.commence-check-item .form-check-input:checked {
    background-color: var(--accent, #3b82f6);
    border-color: var(--accent, #3b82f6);
}
.commence-check-item .form-check-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    cursor: pointer;
    padding-left: 4px;
}
.commence-check-item .form-check-input:checked + .form-check-label {
    color: var(--accent, #3b82f6);
    text-decoration: line-through;
    opacity: 0.75;
}

/* ?�?� ?�?��?塊�?B / C）�??�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.apply-status-box {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1.5px solid transparent;
}
/* ?�??-1：財?��?定�?紅色警�?�?/
.apply-status-locked {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
/* ?�??B：�?待審?��?橙色警示�?/
.apply-status-pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
/* ?�??C：已?�派 PM（�??��??��?*/
.apply-status-assigned {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}
.apply-status-title {
    font-size: 0.92rem;
    font-weight: 900;
}
.apply-status-sub {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.75;
    margin-top: 3px;
}
.apply-pm-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #166534;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   Tab 1 ??Unified Toolbar
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */

/* ?�?� 外容???�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-unified-toolbar {
    border-color: #e2e8f0 !important;
}

/* ?��?�?*/
.pm-toolbar-divider {
    margin: 0 0 0.75rem;
    border-color: #e9ecef;
}

/* ?�?� ?��?框�?�?40% 彈性寬）�??�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-toolbar-search {
    flex: 1 1 220px;
    max-width: 420px;
}
.pm-tb-icon {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #dee2e6;
    font-size: 0.85rem;
}
.pm-tb-input {
    background: #f8fafc;
    border-color: #dee2e6;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
}
.pm-tb-input:focus {
    background: #fff;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
}

/* ?�?� ?�新?��? ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-tb-refresh { color: #475569; }
.pm-tb-refresh:hover { background: #f1f5f9; }

/* ?�?� 篩選 Input Group ?��?�?? ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-filter-icon {
    background: #f8fafc;
    color: #64748b;
    border-color: #dee2e6;
    font-size: 0.82rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pm-filter-sel {
    background: #f8fafc;
    border-color: #dee2e6;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pm-filter-sel:focus {
    background: #fff;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    outline: none;
}

/* ?�?� 篩選?�用高亮（�??�部?��??��??�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-filter-ig.pm-filter-active .pm-filter-icon {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
.pm-filter-ig.pm-filter-active .pm-filter-sel {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

/* ?�?� 計數?��? ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.pm-item-count {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��?
   Tab 1 ???�工?�數標籤
   ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.pm-countdown-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    border: 1.5px solid transparent;
}

/* ?�單（≤14?��???紅色警示 */
.pm-countdown-urgent {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fca5a5;
    animation: pm-urgent-pulse 2s ease-in-out infinite;
}
@keyframes pm-urgent-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

/* 已延誤�?days < 0）�?深�?強調 */
.pm-countdown-overdue {
    color: #991b1b;
    background: #fee2e2;
    border-color: #f87171;
    font-weight: 800;
}

/* 常�?安�?�?14?��????��? */
.pm-countdown-normal {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ?�設?��? */
.pm-countdown-none {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    font-style: italic;
}

/* ?�?�?� PM Stat Cards as Filters ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.cursor-pointer { cursor: pointer; }
.pm-stat-filter {
    user-select: none; cursor: pointer;
    border: 2.5px solid transparent !important;
    transition: border-color .2s, box-shadow .2s, opacity .2s, transform .18s !important;
}
/* ?�任一?��?被選中�??��??��??��??�淡�??�—Icon ?�不�?影響 */
.pm-stat-filter-group-active .pm-stat-filter:not(.pm-stat-active) .stat-info {
    opacity: 0.45;
}
.pm-stat-filter-group-active .pm-stat-filter:not(.pm-stat-active) .stat-icon {
    /* Icon 保�?�?��，�?輕微?�亮 */
    opacity: 0.6;
    filter: none;
}
/* ?�中?��?：�??��??��??��? */
#pmStatCard_approve.pm-stat-active   { border-color: #2563eb !important; box-shadow: 0 4px 16px rgba(37,99,235,.18) !important; }
#pmStatCard_clientWait.pm-stat-active { border-color: #dc2626 !important; box-shadow: 0 4px 16px rgba(220,38,38,.18) !important; }
#pmStatCard_acct.pm-stat-active      { border-color: #f59e0b !important; box-shadow: 0 4px 16px rgba(245,158,11,.18) !important; }
#pmStatCard_closed.pm-stat-active    { border-color: #16a34a !important; box-shadow: 0 4px 16px rgba(22,163,74,.18) !important; }
/* Hover on inactive restores both icon and text */
.pm-stat-filter:hover:not(.pm-stat-active) .stat-info { opacity: 1 !important; }
.pm-stat-filter:hover:not(.pm-stat-active) .stat-icon  { opacity: 1 !important; }
.pm-stat-filter:hover:not(.pm-stat-active) { transform: translateY(-3px); }

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Tab Nav ???��??�軸?�支?�觸?�橫�?
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.pm-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
}
.pm-tabs-scroll::-webkit-scrollbar { display: none; }

.pm-tab-group-nowrap {
    flex-wrap: nowrap;
    white-space: nowrap;
}
/* Keep desktop acct-tabs centered; on mobile left-align & scroll */
@media (max-width: 767px) {
    .pm-tabs-scroll { justify-content: flex-start; }
    .pm-tab-group-nowrap { width: max-content; }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   PM Filter ??.pm-filter-ig 桌面寬度
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.pm-filter-ig {
    width: auto;
    min-width: 185px;
    max-width: 220px;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   Reimbursement Table ??Cards (Mobile)
   ?��??��? table 轉�??�逐�??��?視�?
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
@media (max-width: 767px) {
    /* 移除 table-responsive ?�橫?�捲�?*/
    .reimb-table-wrap { overflow-x: visible !important; }

    /* ?��?表頭 */
    .reimb-table thead { display: none !important; }

    /* 每�??��??�獨立卡??*/
    .reimb-table tbody tr {
        display: block;
        margin-bottom: 0.875rem;
        border: 1px solid #dee2e6 !important;
        border-radius: 0.75rem;
        padding: 0.875rem 1rem;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    /* 每個儲存格轉為 flex �?*/
    .reimb-table tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        padding: 0.45rem 0 !important;
        font-size: 0.88rem;
    }
    .reimb-table tbody td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    /* 左側?��?標籤 */
    .reimb-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.78rem;
        flex-shrink: 0;
        margin-right: 0.5rem;
        white-space: nowrap;
    }
    /* colspan 空�??��?不�??��? */
    .reimb-table tbody tr td[colspan] {
        border: none !important;
        background: transparent;
        box-shadow: none;
        justify-content: center;
    }
    .reimb-table tbody tr td[colspan]::before { content: none; }

    /* ?�?� 主�??��?：移?��??��?角�?讓進度條�?緊貼?��? ?�?� */
    .reimb-table tbody tr.reimb-main-row {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-bottom-color: transparent !important;
        margin-bottom: 0 !important;
    }

    /* ?�?� ?�度條�?行�?移除?�部?��?，拼?�到主�?下方 ?�?� */
    .reimb-table tbody tr.reimb-timeline-row {
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
        border-top: none !important;
        margin-top: 0 !important;
        margin-bottom: 0.875rem !important;
        padding: 0 !important;
    }
    /* 覆�? td ??block + 置中，隱??data-label ?��?�?*/
    .reimb-table tbody tr.reimb-timeline-row td.reimb-timeline-cell {
        display: block !important;
        border-top: 1px dashed #e2e8f0 !important;
        border-bottom: none !important;
        padding: 6px 12px 10px !important;
        background: #f8fafc;
        border-radius: 0 0 0.75rem 0.75rem;
    }
    .reimb-table tbody tr.reimb-timeline-row td.reimb-timeline-cell::before {
        display: none !important;
    }
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   Reimbursement History ???�度?��?�?(Timeline Row)
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */

/* ?�度管�?容器：置中、�?寬�??�援 2�?3�??��??��? */
.reimb-pipeline {
    display: flex;
    align-items: flex-start;
    max-width: 360px;
    margin: 4px auto 2px;
    padding: 0 4px;
}

/* Desktop: 子�?�?? */
.reimb-timeline-row > td.reimb-timeline-cell {
    background: #f8fafc;
    padding: 6px 20px !important;
    border-top: 1px dashed #e2e8f0;
}

/* 主�??��?：bottom border ?�用?��?，�?覺�??��??�度�?*/
.reimb-main-row > td:last-child {
    border-bottom: none !important;
}

/* ?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��???
   Reimbursement History ???��?篩選?��?
?��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��??��? */
.reimb-pill {
    display: inline-flex; align-items: center;
    padding: 6px 14px; border-radius: 999px;
    font-size: 0.8rem; font-weight: 700;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc; color: #64748b;
    cursor: pointer; transition: all 0.18s ease;
    white-space: nowrap; gap: 4px;
}
.reimb-pill:hover { filter: brightness(0.96); transform: translateY(-1px); }

/* ?��? badge */
.reimb-pill-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; font-size: 0.7rem; font-weight: 800;
    background: rgba(0,0,0,0.08); color: inherit;
}

/* ?�部 ???�中 */
.reimb-pill.reimb-pill-active {
    background: var(--accent, #2563eb); color: #fff;
    border-color: var(--accent, #2563eb);
}
.reimb-pill.reimb-pill-active .reimb-pill-badge {
    background: rgba(255,255,255,0.25);
}

/* ?�支付�?紅�? */
.reimb-pill.reimb-pill-danger {
    border-color: #fca5a5; color: #dc2626; background: #fef2f2;
}
.reimb-pill.reimb-pill-danger.reimb-pill-active {
    background: #dc2626; color: #fff; border-color: #dc2626;
}

/* 已支付�?綠�? */
.reimb-pill.reimb-pill-success {
    border-color: #86efac; color: #16a34a; background: #f0fdf4;
}
.reimb-pill.reimb-pill-success.reimb-pill-active {
    background: #16a34a; color: #fff; border-color: #16a34a;
}

/* ?�?�?� Contract search dropdown ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.reimb-contract-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1050;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.reimb-contract-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    line-height: 1.4;
}
.reimb-contract-item:last-child { border-bottom: none; }
.reimb-contract-item:hover { background: #eff6ff; color: #1d4ed8; }
.reimb-contract-item strong { color: #1e293b; }

/* ?�?�?� Material Tracking Module ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.mat-remarks-cell {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* SweetAlert2 must appear above all glass-card backdrop-filter stacking contexts */
.swal2-container { z-index: 20000 !important; }

/* ?�?�?� Global Project Tabs（�???Topbar ?��?線風??Tab ?��? ?�?�?�?� */
#globalProjectTabs {
    border-top: 1px solid #e9ecef;
    padding: 0 3rem;
}
#globalProjectTabs .det-seg-track {
    background: transparent;
    border-radius: 0;
    padding: 0;
    gap: 0;
}
#globalProjectTabs .det-seg-btn {
    border-radius: 0;
    padding: 10px 0;
    font-size: 0.88rem;
    background: transparent;
    border-bottom: 3px solid transparent;
    overflow: visible;
    transition: color 0.2s ease, border-color 0.2s ease;
}
#globalProjectTabs .det-seg-btn:hover:not(.active) {
    background: transparent;
    color: var(--text-main);
    border-bottom-color: #dee2e6;
}
#globalProjectTabs .det-seg-btn.active {
    background: transparent;
    color: var(--accent);
    border-bottom: 3px solid var(--accent);
    box-shadow: none;
}

/* iOS Segmented Control 軌�?容器（�??��??�於?��??�景�?*/
.det-seg-track {
    display: flex;
    align-items: stretch;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

/* ??Tab ?��?：平?��?佈�??��?�?*/
.det-seg-btn {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 8px 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.det-seg-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
}
/* ?�中?�?��??��??��? + 主�???+ 輕陰�?*/
.det-seg-btn.active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12), 0 0.5px 1.5px rgba(0, 0, 0, 0.06);
}


/* ?�?�?� QC Accordion: ?��??�畫 ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.qc-cat-header {
    cursor: pointer;
    user-select: none;
}
.qc-cat-header:active { opacity: 0.8; }

.qc-cat-chevron {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

/* ?��??�?��?max-height ?�畫�?display:none ?�平�?*/
.qc-item-list {
    overflow: hidden;
    max-height: 99999px;
    transition: max-height 0.3s ease;
    padding: 8px 0 6px;
}
.qc-item-list.qc-collapsed {
    max-height: 0;
}

/* ?�?�?� QC �???��??��??�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.qc-comm-section {
    border: 1.5px solid #e0e7ff;
    border-radius: 14px;
    padding: 18px 16px;
    background: #f5f7ff;
}

/* ?�?�?� QC 驗收系統 ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */

/* ?�度�?*/
.qc-progress-bar-wrap {
    height: 12px;
    border-radius: 50rem;
    overflow: hidden;
    background: #edf2f7;
}
.qc-progress-bar-wrap .progress-bar {
    border-radius: 50rem;
    transition: width 0.6s ease;
}

/* ?�?�?� 工�?驗收：Stage Accordion ?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?� */
.qc-stage-accordion { display: flex; flex-direction: column; gap: 10px; }

.qc-stage-block {
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}
.qc-stage-block.qc-stage-open {
    border-color: var(--accent);
    box-shadow: 0 4px 18px rgba(37,99,235,0.10);
}

.qc-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    background: #fff;
    transition: background 0.15s ease;
    gap: 12px;
}
.qc-stage-header:hover { background: #f8faff; }
.qc-stage-block.qc-stage-open .qc-stage-header { background: #f0f6ff; }

.qc-stage-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.qc-stage-icon {
    width: 38px; height: 38px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--accent);
    transition: background 0.2s ease;
}
.qc-stage-block.qc-stage-open .qc-stage-icon {
    background: var(--accent);
    color: #fff;
}
.qc-stage-title {
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--text-main);
    letter-spacing: -0.2px;
}
.qc-stage-sub {
    font-size: 0.74rem;
    color: #6c757d;
    margin-top: 1px;
}
.qc-stage-chevron {
    font-size: 0.9rem;
    color: #94a3b8;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.qc-stage-mini-bar {
    display: flex;
    align-items: center;
}
.qc-stage-panel {
    border-top: 1px solid #e2e8f0;
}
.qc-stage-inner {
    padding: 20px;
}
@media (max-width: 1023px) {
    .qc-stage-header { padding: 12px 14px; }
    .qc-stage-inner  { padding: 14px; }
    .qc-stage-title  { font-size: 0.88rem; }
    .qc-stage-icon   { width: 34px; height: 34px; font-size: 1rem; }
}

/* ?�?� ?��??�塊�??�除?�中?��??�用底�??��? ?�?� */
.qc-category-block {
    border: none;
    border-bottom: 1px solid #f1f3f5;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    margin-bottom: 4px;
}
.qc-category-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}
.qc-cat-header {
    display: flex;
    align-items: center;
    padding: 10px 2px;
    background: transparent;
    border-bottom: none;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent);
}
.qc-cat-header i { color: var(--accent); }

/* ?�?� ?�目?��?輕�?微卡???�?� */
.qc-item-row {
    background: #fafafa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 11px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.qc-item-row:last-child { margin-bottom: 2px; }
.qc-item-row:hover {
    background: #ffffff;
    border-color: #dee2e6;
}

/* 題目?��? */
.qc-item-text {
    flex: 1;
    min-width: 180px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

/* ?�側?�制群�? */
.qc-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ?�?�選??*/
.qc-status-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    min-width: 76px;
    text-align: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.qc-s-pending {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}
.qc-s-pass {
    background: #f0fdf4;
    color: #059669;
    border-color: #a7f3d0;
}
.qc-s-issue {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}
.qc-s-na {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* ?�註?��? */
.qc-remark-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.qc-remark-btn:hover { background: #eff6ff; color: var(--accent); border-color: var(--accent); }
.qc-remark-btn.qc-remark-active {
    background: #eff6ff;
    color: var(--accent);
    border-color: var(--accent);
}

/* ?�註展�??� */
.qc-remark-area {
    width: 100%;
    padding-top: 4px;
}
.qc-remark-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-main);
    resize: vertical;
    min-height: 56px;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.15s;
    font-family: inherit;
}
.qc-remark-input:focus {
    border-color: var(--accent);
    background: #fff;
}

/* 空�??��?�?*/
.qc-item-list:empty::after {
    content: '此�?類無?�目';
    display: block;
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
}
