:root { --ink:#17312b; --muted:#6c7d78; --paper:#f4f6f1; --card:#fff; --line:#dfe6df; --green:#176b55; --green-dark:#10513f; --mint:#e3f2e9; --orange:#d96d3b; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:Arial,"Noto Sans TC",sans-serif; }
button,a { font:inherit; }
button { cursor:pointer; }
.app-shell { min-height:100vh; }
.topbar { height:74px; padding:0 clamp(24px,5vw,76px); display:flex; align-items:center; gap:48px; background:#fff; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; color:var(--ink); text-decoration:none; font-weight:800; font-size:18px; white-space:nowrap; }
.brand-mark { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; color:#fff; background:var(--green); font-size:16px; box-shadow:0 7px 18px #176b5530; }
nav { display:flex; align-self:stretch; gap:30px; }
nav a { display:flex; align-items:center; color:var(--muted); text-decoration:none; font-size:14px; font-weight:700; border-bottom:2px solid transparent; }
nav a.active { color:var(--green); border-color:var(--green); }
.profile { margin-left:auto; display:flex; align-items:center; gap:10px; }
.avatar { width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:#dcebe3; color:var(--green-dark); font-weight:800; }
.avatar-photo { object-fit:cover; }
.profile-copy { display:flex; flex-direction:column; min-width:82px; }
.profile-copy strong { font-size:13px; }
.profile-copy small { color:var(--muted); margin-top:2px; }
.signout { color:var(--muted); font-size:12px; text-decoration:none; padding-left:10px; border-left:1px solid var(--line); }
.signout-button { border:0; background:transparent; cursor:pointer; }
.workspace { width:min(1120px,calc(100% - 40px)); margin:0 auto; padding:54px 0 32px; }
.intro { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:30px; }
.eyebrow { margin:0 0 7px; color:var(--green); font-size:12px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.intro h1 { margin:0 0 10px; font-family:inherit; font-size:clamp(30px,4vw,44px); font-weight:900; letter-spacing:-.025em; }
.intro>div>p:last-child { margin:0; color:var(--muted); font-size:14px; }
.status { display:flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--line); border-radius:999px; background:#fff; font-size:13px; font-weight:800; }
.status i { width:8px; height:8px; border-radius:50%; background:#9aaba5; }
.status.working { background:var(--mint); border-color:#b9dbc9; color:var(--green-dark); }
.status.working i { background:#24a274; box-shadow:0 0 0 4px #24a27420; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr); gap:22px; }
.clock-card,.summary-card,.records-card { background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:0 8px 28px #17312b0b; }
.clock-card { padding:32px; }
.clock-heading { display:flex; align-items:center; gap:14px; }
.sun-icon { width:45px; height:45px; display:grid; place-items:center; border-radius:13px; background:#fff0d8; color:#dc8b26; font-size:22px; }
.clock-heading p { margin:0 0 3px; color:var(--muted); font-size:13px; }
.clock-heading strong { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:34px; letter-spacing:-.04em; }
.clock-button { width:100%; margin-top:30px; padding:20px; display:flex; justify-content:center; align-items:center; gap:12px; border:0; border-radius:13px; color:#fff; background:var(--green); font-weight:900; font-size:18px; box-shadow:0 10px 22px #176b5530; transition:transform .15s,background .15s; }
.clock-button:hover { transform:translateY(-1px); background:var(--green-dark); }
.clock-button:focus-visible { outline:3px solid #8bc7b5; outline-offset:3px; }
.clock-button span { font-size:22px; }
.clock-button.clock-out { background:var(--orange); box-shadow:0 10px 22px #d96d3b25; }
.security-note { margin:16px 0 0; text-align:center; color:var(--muted); font-size:12px; }
.notice { margin-top:16px; padding:12px 14px; border-radius:10px; background:#edf6f0; color:var(--green-dark); font-size:13px; font-weight:700; }
.summary-card { padding:28px; }
.summary-title { display:flex; justify-content:space-between; align-items:flex-end; color:var(--muted); font-size:13px; }
.summary-title b { color:var(--ink); font-family:inherit; font-size:24px; font-weight:900; }
.progress { height:9px; margin:23px 0 11px; border-radius:99px; overflow:hidden; background:#e6ebe6; }
.progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2b8b69,#66b486); transition:width .4s; }
.limit { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; }
.limit strong { color:var(--green); }
.safe { margin-top:31px; padding:17px; display:flex; gap:12px; align-items:center; border-radius:12px; background:#f0f7f2; }
.safe>span { width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:var(--mint); color:var(--green); font-weight:900; }
.safe strong { font-size:13px; }
.safe p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.records-card { margin-top:22px; padding:29px 30px 10px; }
.page-card { margin-top:0; min-height:420px; }
.admin-card { scroll-margin-top:18px; }
.section-heading { display:flex; justify-content:space-between; align-items:center; }
.section-heading h2 { margin:0; font-family:inherit; font-size:23px; font-weight:900; }
.text-button { border:0; background:transparent; color:var(--green); font-size:13px; font-weight:800; }
.table-wrap { overflow-x:auto; }
table { width:100%; margin-top:23px; border-collapse:collapse; font-size:13px; }
th { padding:11px 10px; color:var(--muted); text-align:left; font-size:11px; border-bottom:1px solid var(--line); }
td { padding:18px 10px; border-bottom:1px solid #edf0ed; white-space:nowrap; }
tbody tr:last-child td { border-bottom:0; }
.empty-row { padding:34px 10px; color:var(--muted); text-align:center; }
.segment-number { width:27px; height:27px; margin-right:9px; display:inline-grid; place-items:center; border-radius:8px; background:#edf2ee; color:var(--green); font-weight:900; }
.tag { display:inline-flex; padding:6px 9px; border-radius:999px; font-size:11px; font-weight:800; }
.tag.complete { background:#eff2ef; color:#64736e; }
.tag.live { background:var(--mint); color:var(--green-dark); }
.tag.inactive { background:#fff0eb; color:#9a4529; }
.tag.warning { background:#fff2df; color:#9a5a18; }
.admin-badge { padding:7px 10px; border-radius:999px; background:var(--mint); color:var(--green-dark); font-size:11px; font-weight:800; }
.admin-filters { margin-top:22px; padding:17px; display:grid; grid-template-columns:repeat(2,minmax(140px,.7fr)) minmax(220px,1.3fr) auto; gap:14px; align-items:end; border-radius:13px; background:#f3f7f4; }
.admin-filters label { display:grid; gap:7px; color:var(--muted); font-size:11px; font-weight:800; }
.admin-filters input,.admin-filters select { width:100%; min-height:42px; padding:9px 11px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); font-size:13px; }
.filter-button { min-height:42px; padding:0 18px; border:0; border-radius:9px; background:var(--green); color:#fff; font-size:13px; font-weight:800; }
.filter-button:disabled { opacity:.65; cursor:wait; }
.history-filters { margin-top:22px; padding:17px; display:grid; grid-template-columns:repeat(2,minmax(160px,1fr)) auto; gap:14px; align-items:end; border-radius:13px; background:#f3f7f4; }
.history-filters label { display:grid; gap:7px; color:var(--muted); font-size:11px; font-weight:800; }
.history-filters input { min-height:42px; padding:9px 11px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); }
.export-actions { display:flex; gap:8px; flex-wrap:wrap; }
.admin-export { margin-top:13px; justify-content:flex-end; }
.employee-card { scroll-margin-top:18px; }
.employee-count { color:var(--muted); font-size:12px; font-weight:800; }
.section-description { margin:10px 0 0; color:var(--muted); font-size:13px; }
.account-button { min-height:34px; padding:0 12px; border:1px solid #b9d6c8; border-radius:8px; background:#f0f8f3; color:var(--green-dark); font-size:12px; font-weight:800; }
.account-button.danger { border-color:#edc8ba; background:#fff5f1; color:#9a4529; }
.account-button:disabled { opacity:.5; cursor:not-allowed; }
.invite-help { margin:18px 0 10px; padding:15px 16px; display:flex; gap:12px; align-items:center; border-radius:11px; background:#f3f7f4; color:var(--muted); font-size:12px; }
.invite-help strong { color:var(--ink); white-space:nowrap; }
.invite-form { margin:22px 0 10px; padding:18px; display:grid; grid-template-columns:1.1fr 1fr 1.3fr .9fr auto; gap:14px; align-items:end; border-radius:13px; background:#f3f7f4; }
.invite-form strong { font-size:14px; }
.invite-form p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.invite-form label { display:grid; gap:7px; color:var(--muted); font-size:11px; font-weight:800; }
.invite-form input { min-height:42px; padding:9px 11px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); }
.login-status { margin-top:5px; }
.attendance-start-form { margin-top:20px; padding:16px; display:grid; grid-template-columns:1.2fr minmax(160px,.7fr) minmax(220px,1fr) auto; gap:13px; align-items:end; border:1px solid #d7e4dc; border-radius:12px; background:#eef6f1; }
.attendance-start-form strong { font-size:14px; }
.attendance-start-form p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.attendance-start-form label { display:grid; gap:7px; color:var(--muted); font-size:11px; font-weight:800; }
.attendance-start-form input { width:100%; min-height:42px; padding:9px 11px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); font:inherit; }
.anomaly-card { scroll-margin-top:18px; }
.anomaly-summary { display:flex; align-items:baseline; gap:6px; color:var(--muted); font-size:11px; }
.anomaly-summary strong { color:var(--orange); font-family:inherit; font-size:26px; font-weight:900; }
.filter-tabs { margin-top:20px; display:flex; width:max-content; padding:4px; border-radius:10px; background:#eef2ee; }
.filter-tabs button { padding:8px 13px; border:0; border-radius:7px; background:transparent; color:var(--muted); font-size:12px; font-weight:800; }
.filter-tabs button.selected { background:#fff; color:var(--green-dark); box-shadow:0 2px 8px #17312b12; }
.anomaly-kind { display:inline-flex; padding:6px 9px; border-radius:8px; background:#f0f2ef; font-size:11px; font-weight:800; }
.anomaly-kind.overtime { background:#fff0e8; color:#a54c28; }
.anomaly-kind.missing_punch { background:#fff4dc; color:#8a621a; }
.anomaly-kind.modified { background:#edf0f7; color:#4b5d88; }
.anomaly-kind.country_change { background:#eeeafa; color:#65519a; }
.resolved-time { color:var(--muted); font-size:11px; }
.my-anomalies-card { scroll-margin-top:18px; }
.personal-alert-count { padding:7px 10px; border-radius:999px; background:#fff2df; color:#925617; font-size:11px; font-weight:800; }
.personal-clear { margin:22px 0 10px; padding:20px; display:flex; align-items:center; gap:14px; border-radius:13px; background:#f0f7f2; }
.personal-clear>span { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; background:var(--mint); color:var(--green); font-weight:900; }
.personal-clear strong { font-size:14px; }
.personal-clear p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.personal-anomaly-list { margin-top:20px; display:grid; gap:10px; }
.personal-anomaly { padding:16px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:13px; border:1px solid #f0dacb; border-radius:12px; background:#fffaf6; }
.personal-anomaly.resolved { border-color:var(--line); background:#f7f9f7; opacity:.78; }
.anomaly-icon { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:#fff0e4; color:var(--orange); font-weight:900; }
.personal-anomaly-title { display:flex; align-items:center; gap:10px; }
.personal-anomaly-title strong { font-size:13px; }
.personal-anomaly-title small { color:var(--muted); font-size:10px; }
.personal-anomaly p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.personal-privacy { margin:16px 0 8px; color:var(--muted); font-size:11px; }
.autofill-form { margin-top:22px; padding:18px; border:1px solid #d7e4dc; border-radius:13px; background:#f5f9f6; }
.autofill-form h3 { margin:0 0 15px; font-size:15px; }
.autofill-form>p { margin:12px 0 0; color:var(--muted); font-size:11px; }
.autofill-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; align-items:end; }
.autofill-grid label { display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:800; }
.autofill-grid input,.autofill-grid select { min-height:42px; padding:9px 10px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); }
.other-reason { grid-column:span 2; }
.confirm-button { margin-top:8px; padding:7px 10px; border:0; border-radius:7px; background:var(--green); color:#fff; font-size:11px; font-weight:800; }
.overtime-form { margin-top:12px; display:grid; gap:10px; max-width:430px; }
.overtime-form label { display:grid; gap:5px; color:var(--ink); font-size:11px; font-weight:800; }
.overtime-form input, .overtime-form textarea, .overtime-form select { width:100%; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); font:inherit; }
.overtime-form input[readonly] { background:#eef3ef; color:var(--muted); cursor:not-allowed; }
.overtime-form .confirm-button { margin-top:0; }
.review-waiting { display:inline-block; margin-top:9px; color:#8a621a; font-size:11px; font-weight:800; }
.leave-card { margin-top:24px; }
.leave-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; gap:13px; align-items:end; }
.leave-grid label { display:grid; gap:6px; color:var(--muted); font-size:11px; font-weight:800; }
.leave-grid input,.leave-grid select { min-height:42px; padding:9px 10px; border:1px solid #ccd8d1; border-radius:9px; background:#fff; color:var(--ink); }
.leave-admin { margin:24px 0; padding:18px; border:1px solid #d7e4dc; border-radius:13px; background:#f7faf8; }
.leave-admin h3 { margin:0 0 4px; font-size:15px; }
.review-actions { display:flex; gap:7px; }
.inline-reject { display:grid; gap:7px; min-width:210px; }
.inline-reject input { width:100%; padding:8px 9px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--ink); font:inherit; }
.anomaly-detail { display:block; margin-top:7px; max-width:360px; color:var(--muted); font-size:10px; line-height:1.55; white-space:normal; }
.admin-edit-attendance { margin-top:18px; padding:18px; border:1px solid var(--line); border-radius:12px; background:#f7faf8; }
.profile-page { max-width:850px; margin-inline:auto; }
.profile-form { margin-top:24px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; align-items:end; }
.profile-form label { display:grid; gap:7px; color:var(--muted); font-size:12px; font-weight:800; }
.field-help { color:var(--muted); font-size:10px; font-weight:600; }
.profile-form input,.profile-form textarea { width:100%; min-height:43px; padding:10px 12px; border:1px solid #cbd8d0; border-radius:9px; background:#fff; color:var(--ink); font:inherit; resize:vertical; }
.photo-field { grid-row:span 2; align-self:start; }
.profile-preview { width:112px; height:112px; margin-top:5px; border-radius:50%; object-fit:cover; border:4px solid #edf4ef; }
.address-field { grid-column:span 2; }
.profile-save { width:max-content; min-width:170px; }
.admin-profile-form { margin:20px 0; padding:20px; border:1px solid #cfe0d6; border-radius:13px; background:#f7faf8; }
.admin-profile-form h3 { margin:0; font-size:17px; }
.profile-form.compact { grid-template-columns:repeat(4,minmax(0,1fr)); }
.profile-status { color:var(--muted); font-size:10px; }
.admin-profile-detail { margin:22px 0; padding:22px; border:1px solid #cfe0d6; border-radius:14px; background:#f7faf8; scroll-margin-top:18px; }
.admin-profile-detail h3 { margin:0; font-family:inherit; font-size:22px; font-weight:900; }
.employee-profile-view { margin-top:20px; display:grid; grid-template-columns:130px 1fr; gap:24px; align-items:start; }
.employee-detail-photo { width:120px; height:120px; display:grid; place-items:center; border-radius:50%; object-fit:cover; background:#dcebe3; color:var(--green-dark); font-size:36px; font-weight:900; border:4px solid #fff; box-shadow:0 6px 20px #17312b16; }
.employee-profile-view dl { margin:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.employee-profile-view dl>div { padding:13px 15px; border-radius:10px; background:#fff; border:1px solid #e1e8e3; }
.employee-profile-view dt { margin-bottom:5px; color:var(--muted); font-size:10px; font-weight:900; }
.employee-profile-view dd { margin:0; color:var(--ink); font-size:13px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
.employee-profile-view .detail-address { grid-column:span 2; }
.detail-actions { margin-top:18px; display:flex; align-items:center; gap:10px; }
@media (max-width:700px) { .autofill-grid { grid-template-columns:1fr; } .other-reason { grid-column:auto; } }
@media (max-width:900px) { .leave-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) { .invite-form { grid-template-columns:1fr 1fr; } }
@media (max-width:900px) { .attendance-start-form { grid-template-columns:1fr 1fr; } }
@media (max-width:900px) { .profile-form.compact { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .leave-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .invite-form { grid-template-columns:1fr; } }
@media (max-width:560px) { .attendance-start-form { grid-template-columns:1fr; } }
@media (max-width:560px) { .profile-form,.profile-form.compact { grid-template-columns:1fr; } .address-field { grid-column:auto; } }
@media (max-width:650px) { .employee-profile-view { grid-template-columns:1fr; } .employee-profile-view dl { grid-template-columns:1fr; } .employee-profile-view .detail-address { grid-column:auto; } }
footer { display:flex; justify-content:space-between; padding:25px 2px 0; color:#88948f; font-size:11px; }
@media (max-width:760px) { .topbar { height:auto; padding:14px 20px; gap:18px; flex-wrap:wrap; } nav { order:3; width:100%; height:38px; gap:22px; overflow-x:auto; } nav a { flex:none; } .profile-copy { display:none; } .profile { gap:7px; } .signout-button { display:inline-flex; align-items:center; min-height:36px; padding:0 13px; border:1px solid var(--line); border-radius:999px; background:#f5f7f4; color:var(--green-dark); font-size:13px; font-weight:800; } .workspace { width:min(100% - 28px,1120px); padding-top:36px; } .intro { align-items:flex-start; gap:16px; } .status { margin-top:4px; } .dashboard-grid { grid-template-columns:1fr; } .clock-card,.summary-card { padding:23px; } .records-card { padding:23px 18px 8px; } .admin-filters { grid-template-columns:1fr; } footer { gap:15px; flex-direction:column; } }
@media (max-width:620px) { .history-filters { grid-template-columns:1fr; } .section-heading { align-items:flex-start; gap:12px; flex-wrap:wrap; } }
@media (max-width:460px) { .intro { flex-direction:column; } .intro h1 { font-size:30px; } .clock-heading strong { font-size:29px; } }
@media (max-width:560px) { .personal-anomaly { grid-template-columns:auto 1fr; } .personal-anomaly>.tag { grid-column:2; width:max-content; } .personal-anomaly-title { align-items:flex-start; flex-direction:column; gap:3px; } }
.auth-page { min-height:100vh; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at top left,#e3f2e9,transparent 42%),var(--paper); }
.auth-panel { width:min(100%,470px); padding:40px; border:1px solid var(--line); border-radius:20px; background:#fff; box-shadow:0 20px 55px #17312b18; }
.auth-brand { width:max-content; margin-bottom:38px; }
.auth-panel h1 { margin:0 0 28px; font-family:inherit; font-size:32px; font-weight:900; }
.auth-panel form { display:grid; gap:18px; }
.auth-panel label { display:grid; gap:8px; color:var(--ink); font-size:13px; font-weight:800; }
.auth-panel input { width:100%; padding:13px 14px; border:1px solid #cdd7d1; border-radius:10px; color:var(--ink); background:#fff; font-size:16px; outline:none; }
.auth-panel input:focus { border-color:var(--green); box-shadow:0 0 0 3px #176b5518; }
.auth-panel .clock-button { margin-top:4px; }
.auth-panel .clock-button:disabled { opacity:.65; cursor:wait; }
.auth-link-button { width:max-content; justify-self:center; padding:4px 8px; border:0; background:transparent; color:var(--green); font-size:13px; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.auth-link-button:hover { color:var(--green-dark); }
.auth-link-button:focus-visible { outline:3px solid #8bc7b5; outline-offset:2px; border-radius:5px; }
.auth-message,.auth-help { color:var(--muted); font-size:13px; line-height:1.65; }
.auth-help { margin:24px 0 0; }
.auth-error,.auth-success { margin:0 0 18px; padding:13px 14px; border-radius:10px; font-size:13px; line-height:1.5; }
.auth-error { background:#fff1ed; color:#9a3d22; }
.auth-success { background:#edf7f1; color:var(--green-dark); }
@media (max-width:520px) { .auth-panel { padding:28px 22px; } .auth-panel h1 { font-size:27px; } }
