/* 업무 현황 — PGRR 초록(#134B3B) · 금색(#CFA25C)을 바탕으로. 720px 이하: 아래 탭 메뉴 + 표는 카드 목록. 밝은/어두운 모드. */
:root {
    --brand: #134b3b;
    --brand-2: #1d6a53;
    --brand-3: #2f8a6c;
    --brand-soft: #e7f1ed;
    --gold: #cfa25c;
    --gold-2: #b98a3e;
    --gold-soft: #fbf3e4;
    --bg: #f3f5f2;
    --surface: #ffffff;
    --surface-2: #f7f8f6;
    --surface-3: #eceeea;
    --line: #e3e7e2;
    --line-strong: #cdd4cc;
    --text: #0f1a16;
    --text-2: #2e3d37;
    --muted: #5d6b65;
    --faint: #8d9893;
    --accent: var(--brand-2);
    --accent-soft: var(--brand-soft);
    --ok: #138a52;
    --ok-soft: #e2f4ea;
    --warn: #b86b00;
    --warn-soft: #fdf0dc;
    --crit: #cf2f3a;
    --crit-soft: #fce8ea;
    --info: #2563c9;
    --info-soft: #e6eefc;
    --violet: #7444c9;
    --violet-soft: #f0e9fc;
    --unkn: #66746e;
    --unkn-soft: #eceeec;
    --shadow: 0 1px 2px rgba(15, 30, 24, .05);
    --shadow-md: 0 1px 2px rgba(15, 30, 24, .05), 0 6px 18px rgba(15, 30, 24, .06);
    --shadow-lg: 0 2px 4px rgba(15, 30, 24, .05), 0 16px 40px rgba(15, 30, 24, .10);
    --radius: 16px;
    --radius-sm: 11px;
    --header-h: 64px;
    --tabbar-h: 62px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand: #0e3b2e;
        --brand-2: #4fbf95;
        --brand-3: #63d1a7;
        --brand-soft: #12271f;
        --gold: #ddb46e;
        --gold-2: #e8c17d;
        --gold-soft: #2b2212;
        --bg: #0a0f0d;
        --surface: #121a17;
        --surface-2: #17211d;
        --surface-3: #1e2a25;
        --line: #24312b;
        --line-strong: #34443d;
        --text: #eef3f0;
        --text-2: #c8d3ce;
        --muted: #8fa199;
        --faint: #687a72;
        --ok: #40cf87;
        --ok-soft: #10281c;
        --warn: #f2b04c;
        --warn-soft: #2e2311;
        --crit: #ff6e74;
        --crit-soft: #351619;
        --info: #80aefc;
        --info-soft: #14213a;
        --violet: #b89cff;
        --violet-soft: #241a3a;
        --unkn: #8c9c95;
        --unkn-soft: #1b2421;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px rgba(0, 0, 0, .3);
        --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--brand-2); font-weight: 600; }
a.link:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.xs { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }
.inline { display: inline; margin: 0; }

/* ---------- 머리 — 초록 띠 + 두 회사 로고 ---------- */
.app-header {
    position: sticky; top: 0; z-index: 20; height: var(--header-h); color: #fff;
    background: linear-gradient(100deg, #0d3a2d 0%, var(--brand) 45%, #1a5d49 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05), 0 6px 20px rgba(10, 40, 30, .18);
}
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--gold), transparent 60%); opacity: .8; }
.app-header .inner { height: 100%; padding: 0 28px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-logos { display: flex; align-items: center; gap: 10px; }
.brand-logos img { display: block; width: auto; }
.brand-logos .lg-nextai { height: 28px; }
.brand-logos .lg-pgrr { height: 19px; }
.brand-logos .lg-pgrr, .login-card .mob-logos .lg-pgrr { transform: translateY(-20%); } /* 깃발 몫만큼 올려 NEXT 로고와 가운데 맞춤 */
.brand-logos .x { width: 1px; height: 18px; background: rgba(255, 255, 255, .3); flex: none; }
.brand-sub { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
    display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 10px;
    color: rgba(255, 255, 255, .72); font-weight: 500; font-size: 14.5px; white-space: nowrap; flex-shrink: 0;
}
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .15); font-weight: 650; }
.nav a.on svg { color: var(--gold); }
.nav .sep { width: 1px; background: rgba(255, 255, 255, .15); margin: 8px 6px; flex-shrink: 0; }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.me-chip:hover { background: rgba(255, 255, 255, .14); }
.me-chip .avatar { width: 28px; height: 28px; font-size: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.lang-sw { display: inline-flex; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; overflow: hidden; }
.lang-sw button { border: 0; background: none; color: rgba(255, 255, 255, .7); padding: 5px 10px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.lang-sw button.on { background: rgba(255, 255, 255, .16); color: #fff; }
.lang-sw.light { border-color: var(--line-strong); }
.lang-sw.light button { color: var(--muted); }
.lang-sw.light button.on { background: var(--brand); color: #fff; }
.icon-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
    display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.icon-btn svg { width: 17px; height: 17px; }
.app-header .icon-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .75); }
.app-header .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .14); }

/* ---------- 아바타 ---------- */
.avatar {
    width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
    font-size: 12.5px; font-weight: 800; letter-spacing: -0.02em; color: #fff; background: var(--brand-2);
}
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.av-0 { background: linear-gradient(135deg, #1d6a53, #2f8a6c); }
.av-1 { background: linear-gradient(135deg, #2563c9, #4b82e0); }
.av-2 { background: linear-gradient(135deg, #b8742b, #d49a4e); }
.av-3 { background: linear-gradient(135deg, #7444c9, #9466e0); }
.av-4 { background: linear-gradient(135deg, #c23c5b, #e0617d); }
.av-5 { background: linear-gradient(135deg, #0f7f8f, #2aa3b3); }
.av-6 { background: linear-gradient(135deg, #5b6b2a, #80923f); }
.av-7 { background: linear-gradient(135deg, #3d4a6b, #5c6b91); }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 본문 ---------- */
.page { padding: 28px 28px 72px; }
.page.narrow { max-width: 860px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 25px; margin: 0; letter-spacing: -0.03em; font-weight: 800; }
.page-head p { margin: 4px 0 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-2); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 16.5px; margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; font-weight: 750; }
.section-head h2 .ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; }
.section-head h2 .ico svg { width: 16px; height: 16px; }
.ico.brand { background: var(--brand-soft); color: var(--brand-2); }
.ico.crit { background: var(--crit-soft); color: var(--crit); }
.ico.warn { background: var(--warn-soft); color: var(--warn); }
.ico.info { background: var(--info-soft); color: var(--info); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.card-pad { padding: 20px 22px; }
.count-pill {
    font-size: 12px; font-weight: 750; padding: 1px 9px; border-radius: 99px; line-height: 1.65;
    background: var(--surface-3); color: var(--muted); font-variant-numeric: tabular-nums;
}
.count-pill.crit { background: var(--crit); color: #fff; }
.count-pill.warn { background: var(--warn); color: #fff; }

/* ---------- 버튼 · 입력 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 17px;
    border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
    font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--muted); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(19, 75, 59, .25); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.gold { background: linear-gradient(180deg, #ddb46e, var(--gold-2)); border-color: var(--gold-2); color: #2a1d06; box-shadow: 0 2px 10px rgba(185, 138, 62, .35); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
.btn.danger:hover { background: var(--crit-soft); }
.btn.sm { height: 33px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.ghost { border-color: transparent; background: none; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: default; }

.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-sec { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 15px; font-weight: 750; }
.form-sec .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.form-sec .ico svg { width: 16px; height: 16px; }
.form-sec small { font-weight: 500; color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.field > span .req { color: var(--crit); margin-left: 2px; font-style: normal; }
.field .help { font-size: 12.5px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
    width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line-strong);
    background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 100px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-3) 22%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
.form-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.form-foot .right { display: flex; gap: 8px; margin-left: auto; }
.radio-row { display: flex; gap: 6px; flex-wrap: wrap; }
.radio-row label {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-strong);
    border-radius: 11px; cursor: pointer; font-size: 14px; background: var(--surface); transition: all .15s;
}
.radio-row label:hover { border-color: var(--brand-3); }
.radio-row label:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-2); font-weight: 700; }
.radio-row input { margin: 0; accent-color: var(--brand-2); }

/* ---------- 알림 ---------- */
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 550; margin-bottom: 16px; border: 1px solid transparent; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-top: 7px; flex: none; }
.toast.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.toast.crit { background: var(--crit-soft); color: var(--crit); border-color: color-mix(in srgb, var(--crit) 20%, transparent); }
.toast.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 20%, transparent); }
.toast.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.toast code { font-size: 15px; font-weight: 800; padding: 2px 9px; border-radius: 7px; background: var(--surface); color: var(--text); user-select: all; }

/* ---------- 배지 ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px;
    font-weight: 700; white-space: nowrap; line-height: 1.5; background: var(--unkn-soft); color: var(--unkn);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-W004_WT { background: var(--unkn-soft); color: var(--unkn); }
.st-W004_IP { background: var(--info-soft); color: var(--info); }
.st-W004_RV { background: var(--violet-soft); color: var(--violet); }
.st-W004_DN { background: var(--ok-soft); color: var(--ok); }
.st-W004_HD { background: var(--warn-soft); color: var(--warn); }
.st-W004_CN { background: var(--surface-3); color: var(--faint); }
.pr-W003_HG { color: var(--crit); }
.pr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pr-dot.W003_HG { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-soft); }
.pr-dot.W003_NR { background: var(--line-strong); }
.pr-dot.W003_LW { background: transparent; border: 1.5px solid var(--line-strong); }
.dday { display: inline-flex; align-items: center; font-size: 12px; font-weight: 750; white-space: nowrap; padding: 2px 8px; border-radius: 7px; }
.dday.over { color: var(--crit); background: var(--crit-soft); }
.dday.near { color: var(--warn); background: var(--warn-soft); }
.dday.far { color: var(--muted); background: var(--surface-3); font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 9px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; font-weight: 600; }
.tag.gold { background: var(--gold-soft); color: var(--gold-2); }
.cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.cat i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.cat-W002_BZ i { background: #1d6a53; }
.cat-W002_CT i { background: #2563c9; }
.cat-W002_LC i { background: #7444c9; }
.cat-W002_TX i { background: #cfa25c; }
.cat-W002_ET i { background: #8d9893; }
.role-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.role-ADMIN, .role-OWNER { background: var(--gold-soft); color: var(--gold-2); }
.role-COLLAB { background: var(--info-soft); color: var(--info); }
.role-VIEWER { background: var(--surface-3); color: var(--muted); }

/* ---------- 진행률 ---------- */
.bar { display: flex; align-items: center; gap: 9px; min-width: 100px; }
.bar i { flex: 1; height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.bar i b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--brand-2), var(--brand-3)); border-radius: 99px; }
.bar.done i b { background: linear-gradient(90deg, var(--ok), #34b874); }
.bar span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; font-weight: 650; }
.bar.big i { height: 10px; }

/* ---------- 홈 ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 22px; padding: 28px 30px; color: #fff;
    background: radial-gradient(1200px 300px at 100% 0%, rgba(207, 162, 92, .28), transparent 60%),
                linear-gradient(120deg, #0d3a2d 0%, var(--brand) 50%, #1e6d55 100%);
    box-shadow: var(--shadow-lg); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.hero::after {
    content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; border-radius: 50%;
    border: 46px solid rgba(255, 255, 255, .045); pointer-events: none;
}
.hero .flag { position: absolute; right: 26px; top: 22px; width: 0; height: 0; border-left: 22px solid var(--gold); border-top: 12px solid transparent; border-bottom: 12px solid transparent; opacity: .9; }
.hero h1 { margin: 6px 0 6px; font-size: 27px; font-weight: 800; letter-spacing: -0.03em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 14.5px; }
.hero .eyebrow { color: var(--gold); }
.hero .acts { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn.ghost-w { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.hero .btn.ghost-w:hover { background: rgba(255, 255, 255, .18); }
.hero-kpis { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; position: relative; z-index: 1; }
.hero-kpi { display: block; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(4px); }
.hero-kpi:hover { background: rgba(255, 255, 255, .15); }
.hero-kpi .k { font-size: 12.5px; color: rgba(255, 255, 255, .72); font-weight: 600; }
.hero-kpi .v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero-kpi.crit .v { color: #ffb3b6; }
.hero-kpi.warn .v { color: #ffd690; }

.stat-strip { margin-top: 18px; padding: 16px 18px; }
.stat-strip .dist { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; margin-bottom: 14px; }
.stat-strip .dist i { display: block; height: 100%; }
.sdot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.dist .st-W004_WT, .sdot.st-W004_WT { background: #a7b2ac; }
.dist .st-W004_IP, .sdot.st-W004_IP { background: #4b82e0; }
.dist .st-W004_RV, .sdot.st-W004_RV { background: #9466e0; }
.dist .st-W004_DN, .sdot.st-W004_DN { background: #2fb36f; }
.dist .st-W004_HD, .sdot.st-W004_HD { background: #e2a03a; }
.dist .st-W004_CN, .sdot.st-W004_CN { background: #d3d9d5; }
.stat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.stat:hover { background: var(--surface-2); }
.stat .k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.home-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 13px 18px; transition: background .12s; }
.mini-list a:hover { background: var(--surface-2); }
.mini-list .t { flex: 1; min-width: 0; }
.mini-list .t b { display: flex; align-items: center; gap: 7px; font-weight: 650; }
.mini-list .t b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .t small { color: var(--muted); font-size: 12.5px; display: block; margin-top: 1px; }
.mini-list .r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ill { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); }
.empty .ill svg { width: 22px; height: 22px; }
.more { display: block; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--brand-2); font-weight: 700; text-align: center; }
.more:hover { background: var(--surface-2); }
.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: flex; gap: 11px; padding: 11px 18px; position: relative; }
.feed li + li::before { content: ""; position: absolute; left: 34px; top: -6px; height: 12px; border-left: 2px solid var(--line); }
.feed .body { min-width: 0; flex: 1; font-size: 13.5px; }
.feed .body a { font-weight: 650; }
.feed .body a:hover { color: var(--brand-2); }
.feed .snip { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

/* ---------- 목록 ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.filters .search { position: relative; }
.filters .search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); }
.filters input[type=search] { width: 250px; height: 38px; padding-left: 34px; }
.filters select { width: auto; height: 38px; padding-right: 30px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--surface); color: var(--brand-2); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; font-weight: 750; color: var(--faint); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; transition: background .12s; }
table.list tbody tr:hover td { background: var(--surface-2); }
table.list tr.closed td { color: var(--faint); }
table.list tr.closed .title-cell b { text-decoration: line-through; text-decoration-color: var(--line-strong); }
table.list tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
table.list .title-cell { min-width: 280px; }
table.list .title-cell .tt { display: flex; align-items: center; gap: 8px; }
table.list .title-cell b { font-weight: 650; }
table.list .title-cell .no { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 600; display: block; margin-top: 1px; }
table.list.plain tbody tr { cursor: default; }
.pager { display: flex; justify-content: center; gap: 4px; padding: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.pager a:hover { background: var(--surface-3); }
.pager .on { background: var(--brand); color: #fff; }

/* ---------- 상세 ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 22px; align-items: start; }
.task-head { overflow: hidden; }
.task-head .band { height: 6px; background: var(--unkn-soft); }
.task-head .band.st-W004_IP { background: linear-gradient(90deg, var(--info), #7aa6f0); }
.task-head .band.st-W004_RV { background: linear-gradient(90deg, var(--violet), #a888ea); }
.task-head .band.st-W004_DN { background: linear-gradient(90deg, var(--ok), #5bcf93); }
.task-head .band.st-W004_HD { background: linear-gradient(90deg, var(--warn), #f0bf6a); }
.task-head .band.st-W004_WT, .task-head .band.st-W004_CN { background: linear-gradient(90deg, #a7b2ac, #d3d9d5); }
.detail-title { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.detail-title h1 { font-size: 24px; margin: 0; letter-spacing: -0.03em; flex: 1; min-width: 240px; font-weight: 800; line-height: 1.3; }
.detail-title .no { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; display: block; margin-bottom: 4px; font-weight: 700; letter-spacing: .02em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
/* 정보 칸 — 마지막 줄 칸 수가 모자라도 빈 칸 없이 늘어나게 */
.facts { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border-top: 1px solid var(--line); margin: 18px -22px -20px; }
.fact { background: var(--surface); padding: 13px 18px; min-width: 0; flex: 1 1 calc(25% - 1px); }
.fact .k { font-size: 12px; color: var(--faint); font-weight: 650; margin-bottom: 4px; }
.fact .v { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 9px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.kv dd { margin: 0; min-width: 0; }
.desc { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; line-height: 1.7; }
.side-card + .side-card { margin-top: 16px; }
.side-card h3 { font-size: 14.5px; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 750; }
.side-card h3 .l { display: flex; align-items: center; gap: 8px; }
.side-card h3 .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.side-card h3 .ico svg { width: 14px; height: 14px; }
.mbr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.mbr-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.mbr-list .kind { font-size: 11.5px; color: var(--faint); margin-left: 2px; }
.mbr-list .grp { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.mbr-list .grp svg { width: 16px; height: 16px; }
.chk-prog { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: -4px 0 10px; }
.chk-prog b { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #5bcf93); border-radius: 99px; }
.chk-list { list-style: none; margin: 0; padding: 0; }
.chk-list li { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.chk-list li:first-child { border-top: 0; }
.chk-list .done-text { text-decoration: line-through; color: var(--faint); }
.chk-list form { margin: 0; }
.chk-box {
    width: 21px; height: 21px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface);
    display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; margin-top: 1px; transition: all .15s;
}
.chk-box:hover { border-color: var(--ok); }
.chk-box.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.chk-box svg { width: 13px; height: 13px; }
.chk-list .x { margin-left: auto; opacity: .4; }
.chk-list li:hover .x { opacity: 1; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 8px 10px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.file-list .fi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--crit-soft); color: var(--crit); font-size: 9.5px; font-weight: 800; letter-spacing: .02em; }
.file-list .fi.img { background: var(--info-soft); color: var(--info); }
.file-list .fi.doc { background: var(--brand-soft); color: var(--brand-2); }
.file-list a.f { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-list a.f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list a.f:hover span { color: var(--brand-2); }
.file-list a.f small { color: var(--faint); font-size: 11.5px; }
.file-list .x { margin-left: auto; }
.mini-x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 3px 6px; border-radius: 7px; font-size: 12.5px; }
.mini-x:hover { color: var(--crit); background: var(--crit-soft); }

.composer { padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: var(--radius) var(--radius) 0 0; }
.composer .tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.composer .tabs button { border: 0; background: none; padding: 7px 13px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.composer .tabs button.on { background: var(--brand-soft); color: var(--brand-2); }
.composer .wrap { display: flex; gap: 12px; }
.composer .wrap .avatar { margin-top: 4px; }
.composer .wrap > div { flex: 1; min-width: 0; }
.composer textarea { min-height: 88px; background: var(--surface); }
.composer .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.composer .row .grow { flex: 1; }
.composer input[type=number] { width: 84px; height: 36px; }
.file-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); cursor: pointer; font-weight: 600; }
.file-pick:hover { color: var(--brand-2); }
.file-pick input { display: none; }
.file-pick svg { width: 16px; height: 16px; }
.file-names { font-size: 12.5px; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 10px 0; position: relative; }
.timeline > li { display: flex; gap: 12px; padding: 12px 20px; position: relative; }
.timeline > li + li::before { content: ""; position: absolute; left: 37px; top: -12px; height: 24px; border-left: 2px solid var(--line); }
.timeline .av-wrap { position: relative; flex: none; height: 36px; }
.timeline .av-wrap .avatar { width: 36px; height: 36px; font-size: 13px; }
.timeline .ic {
    position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); color: var(--muted); box-shadow: 0 0 0 2px var(--surface);
}
.timeline .ic svg { width: 11px; height: 11px; }
.timeline .ic.pr { background: var(--brand-2); color: #fff; }
.timeline .ic.cm { background: var(--surface-3); color: var(--muted); }
.timeline .ic.st { background: var(--info); color: #fff; }
.timeline .ic.as { background: var(--violet); color: #fff; }
.timeline .ic.rp { background: var(--gold-2); color: #fff; }
.timeline .ic.ed { background: var(--surface-3); color: var(--text-2); }
.edit-list { list-style: none; margin: 6px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.edit-list li { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; color: var(--text-2); }
.edit-list b { min-width: 64px; color: var(--muted); font-weight: 600; }
.edit-list s { color: var(--faint); }
.timeline .main { flex: 1; min-width: 0; }
.timeline .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; min-height: 22px; }
.timeline .head b { font-weight: 750; }
.timeline .head .when { color: var(--faint); font-size: 12.5px; }
.timeline .head form { margin-left: auto; }
.timeline .what { font-size: 13.5px; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.timeline .body { margin-top: 7px; font-size: 14.5px; line-height: 1.65; padding: 11px 14px; border-radius: 4px 14px 14px 14px; background: var(--brand-soft); color: var(--text); }
.timeline .body.comment { background: var(--surface-2); border: 1px solid var(--line); }
.timeline .file-list { margin-top: 8px; max-width: 460px; }

/* ---------- 참여자 고르기 ---------- */
.picker { border: 1px solid var(--line-strong); border-radius: 13px; overflow: hidden; }
.picker-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.picker-head input { height: 36px; flex: 1; min-width: 160px; }
.picker-head .sum { font-size: 12.5px; color: var(--brand-2); font-weight: 700; }
.picker-body { max-height: 360px; overflow-y: auto; }
.picker-group { padding: 9px 14px 5px; font-size: 11.5px; font-weight: 800; color: var(--faint); background: var(--surface); position: sticky; top: 0; z-index: 1; text-transform: uppercase; letter-spacing: .04em; }
.picker-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); transition: background .12s; }
.picker-row .nm { flex: 1; min-width: 0; font-size: 14px; display: flex; align-items: center; gap: 9px; }
.picker-row .nm small { color: var(--faint); font-size: 12px; }
.picker-row .grp { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.picker-row .grp svg { width: 15px; height: 15px; }
.picker-row .seg label { padding: 4px 11px; font-size: 12.5px; border-radius: 8px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.picker-row .seg input { display: none; }
.picker-row .seg label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.picker-row .seg label.cl:has(input:checked) { color: var(--info); }
.picker-row .seg label.rf:has(input:checked) { color: var(--brand-2); }
.picker-row.sel { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
label.picker-row { cursor: pointer; }
label.picker-row input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand-2); }

/* ---------- 확인창 ---------- */
dialog.confirm { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(420px, calc(100vw - 32px)); }
dialog.confirm::backdrop { background: rgba(6, 20, 15, .5); backdrop-filter: blur(2px); }
dialog.confirm .msg { padding: 24px 24px 6px; font-size: 15.5px; font-weight: 650; line-height: 1.55; }
dialog.confirm .btns { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }

/* ---------- 로그인 ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface); }
.login-brand {
    position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(900px 420px at 110% -10%, rgba(207, 162, 92, .35), transparent 60%),
                radial-gradient(700px 500px at -20% 120%, rgba(47, 138, 108, .45), transparent 60%),
                linear-gradient(140deg, #0b3226 0%, var(--brand) 55%, #1a5e4a 100%);
}
.login-brand::before { content: ""; position: absolute; right: -120px; top: 30%; width: 460px; height: 460px; border-radius: 50%; border: 70px solid rgba(255, 255, 255, .04); }
.login-brand > * { position: relative; }
.login-brand .logos { display: flex; align-items: center; gap: 18px; }
.login-brand .logos .lg-nextai { height: 40px; }
.login-brand .logos .lg-pgrr { height: 30px; }
.login-brand .logos .brand-logos { gap: 18px; }
.login-brand .logos .x { height: 28px; }
.login-brand h2 { font-size: 36px; line-height: 1.25; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 800; max-width: 520px; }
.login-brand h2 em { font-style: normal; color: var(--gold); }
.login-brand p.lead { font-size: 16px; color: rgba(255, 255, 255, .75); margin: 0 0 28px; max-width: 480px; }
.login-brand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-brand li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255, 255, 255, .88); }
.login-brand li i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); flex: none; }
.login-brand li i svg { width: 18px; height: 18px; color: var(--gold); }
.login-brand .foot { font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.login-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: min(420px, 100%); padding: 34px 32px; display: flex; flex-direction: column; gap: 16px; }
.login-card .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.login-card h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; font-weight: 800; }
.login-card .btn.primary { height: 46px; font-size: 15px; }
.login-card .mob-logos { display: none; align-items: center; gap: 10px; }
.login-card .mob-logos img { height: 24px; }
.login-card .mob-logos .lg-pgrr { height: 17px; }
.login-card .mob-logos .x { width: 1px; height: 16px; background: var(--line); flex: none; }

/* ---------- 아래 탭 (휴대폰) ---------- */
.tabbar { display: none; }

/* 넓은 노트북 — 덜 중요한 열을 뺀다 */
@media (max-width: 1280px) {
    table.list .hide-l { display: none; }
}

/* 태블릿 이하 — 위 메뉴 대신 아래 탭, 표는 줄마다 카드 */
@media (max-width: 1100px) {
    .app-header .nav { display: none; }
    .page { padding-bottom: calc(var(--tabbar-h) + 40px); }
    .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-cols, .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .hero { grid-template-columns: minmax(0, 1fr); }
    .fact { flex-basis: calc(50% - 1px); }
    .login-page { grid-template-columns: minmax(0, 1fr); }
    .login-brand { display: none; }
    .login-card .mob-logos { display: flex; }
    table.list thead { display: none; }
    table.list, table.list tbody { display: block; width: 100%; }
    table.list tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
    table.list tr:last-child { border-bottom: 0; }
    table.list td { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; width: auto; }
    table.list td[data-k]::before { content: attr(data-k); color: var(--faint); font-size: 12px; font-weight: 600; }
    table.list td.hide-m, table.list td:empty { display: none; }
    table.list .title-cell { flex: 1 1 100%; min-width: 0; display: block; }
    table.list tbody tr:hover td { background: none; }
    table.list tbody tr:hover { background: var(--surface-2); }
    table.list tr.overdue td:first-child { box-shadow: none; }
    table.list tr.overdue { box-shadow: inset 3px 0 0 var(--crit); }
    table.list .bar { min-width: 140px; }
    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tabbar-h);
        padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
        box-shadow: 0 -4px 16px rgba(15, 30, 24, .06);
    }
    .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--faint); }
    .tabbar a svg { width: 21px; height: 21px; }
    .tabbar a.on { color: var(--brand-2); }
}

@media (max-width: 720px) {
    :root { --header-h: 56px; }
    .app-header .inner { padding: 0 14px; gap: 10px; }
    .me-chip .nm, .brand-sub { display: none; }
    table.list tr { gap: 6px 14px; padding: 13px 16px; }
    .me-chip { padding: 2px; background: none; }
    .brand-logos .lg-nextai { height: 24px; }
    .brand-logos .lg-pgrr { height: 15px; }
    .page { padding: 16px 14px calc(var(--tabbar-h) + 32px); }
    .page-head h1 { font-size: 21px; }
    .hero { padding: 22px 20px; border-radius: 18px; }
    .hero h1 { font-size: 22px; }
    .hero-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .hero-kpi { padding: 10px 12px; }
    .hero-kpi .v { font-size: 22px; }
    .hero .flag { display: none; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .stat { padding: 8px; }
    .stat .v { font-size: 20px; }
    .filters input[type=search], .filters .search { width: 100%; }
    .filters select { flex: 1; min-width: 0; }
    .facts { margin: 16px -22px -20px; }
    .kv { grid-template-columns: 84px minmax(0, 1fr); }
    .login-card { padding: 26px 22px; }
}

/* 로딩바 (fams 와 같은 방식, 색만 PGRR 금색) */
#wh-loading-overlay { position: fixed; inset: 0; background: transparent; cursor: progress; z-index: 99999; visibility: hidden; }
#wh-loading-overlay.active { visibility: visible; }
.wh-loading-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2; }
.wh-loading-bar.top { position: fixed; top: 0; bottom: auto; z-index: 100000; }
.wh-loading-bar.active { opacity: 1; background: rgba(207, 162, 92, .25); transition: opacity .1s; }
.wh-loading-bar.active::after { content: ""; display: block; width: 40%; height: 100%; background: var(--gold); border-radius: 2px; animation: wh-load-sweep .9s ease-in-out infinite; }
@keyframes wh-load-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* 첨부 미리보기 */
dialog.preview { width: min(1100px, 94vw); height: min(88vh, 1000px); padding: 0; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.3)); display: none; flex-direction: column; overflow: hidden; }
dialog.preview[open] { display: flex; }
dialog.preview::backdrop { background: rgba(8, 25, 20, .55); }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.pv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.pv-body { flex: 1; min-height: 0; background: var(--surface-2); display: grid; place-items: center; }
.pv-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 720px) { dialog.preview { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; } }


/* 홈 — 회사별 · 담당자별 현황 */
.co-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-bottom: 8px; }
.co-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.co-head b { font-size: 15px; }
.co-sum { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.co-sum .crit { color: var(--crit); }
.stat-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stat-table th { text-align: right; font-weight: 600; font-size: 12px; color: var(--muted); padding: 9px 14px; background: var(--surface-2); white-space: nowrap; }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }
.stat-table td { text-align: right; padding: 9px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.stat-table td a { color: inherit; }
.stat-table td:nth-child(2) a { font-weight: 700; color: var(--brand-2); }
.stat-table .num { font-weight: 600; }
.stat-table .num.zero { color: var(--faint); font-weight: 400; }
.stat-table .num.crit { color: var(--crit); }
.stat-table .num.warn { color: var(--warn); }
.stat-table tr:hover td { background: var(--surface-2); }

/* 업무 등록 — 템플릿 불러오기 */
.tmplt-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; border: 1px dashed var(--gold); background: var(--gold-soft); }
.tmplt-pick label { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.tmplt-pick label b { font-size: 14px; white-space: nowrap; }
.tmplt-pick select { min-width: 240px; max-width: 100%; }
.tmplt-pick .ico { flex: none; }

/* 달력 */
.cal-card { overflow: hidden; }
.cal-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-bar h2 { margin: 0; font-size: 18px; min-width: 120px; text-align: center; letter-spacing: -0.02em; }
.cal-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .lg { width: 10px; height: 10px; border-radius: 3px; }
.lg.ddln, .ev.ddln { --ev: var(--info); --ev-soft: var(--info-soft); }
.lg.expry, .ev.expry { --ev: var(--gold-2); --ev-soft: var(--gold-soft); }
.cal-legend .lg { background: var(--ev); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-dow.sun, .cal-day.sun .dn { color: var(--crit); }
.cal-dow.sat, .cal-day.sat .dn { color: var(--info); }
.cal-day { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n+7) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .dn, .cal-day.out .ev { opacity: .45; }
.cal-day .dn { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 2px; }
.cal-day.today .dn { background: var(--brand); color: #fff; }
.ev { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: var(--ev-soft); color: var(--text); border-left: 3px solid var(--ev); min-width: 0; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev:hover { filter: brightness(.97); text-decoration: none; }
.ev.closed span { text-decoration: line-through; color: var(--faint); }
.ev .pr-dot { flex: none; }
.ev-more { font-size: 11.5px; color: var(--muted); padding: 0 6px; font-weight: 600; }
.cal-agenda { padding: 0 18px; }
.cal-agenda .ag-day { display: none; }
.cal-agenda .ag-day.many { display: flex; }
.cal-agenda > .empty { display: none; }
.ag-day { gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.ag-date { width: 40px; flex: none; text-align: center; }
.ag-date b { display: block; font-size: 20px; line-height: 1.1; }
.ag-date span { font-size: 12px; color: var(--muted); }
.ag-day.today .ag-date b { color: var(--brand-2); }
.ag-day ul { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ag-day li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: inherit; }
.ag-day li a:hover { text-decoration: none; border-color: var(--line-strong); }
.ag-day li a.closed b { text-decoration: line-through; color: var(--faint); }
.ag-day .kind { flex: none; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.ag-day .kind.ddln { background: var(--info-soft); color: var(--info); }
.ag-day .kind.expry { background: var(--gold-soft); color: var(--gold-2); }
.ag-day .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-day .t b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-day .t small { font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
    .co-stats { grid-template-columns: 1fr; }
    .stat-table th, .stat-table td { padding: 8px 10px; }
    .stat-table th { font-size: 11px; white-space: normal; }
    .cal-grid { display: none; }
    .cal-agenda { padding: 0 14px 4px; }
    .cal-agenda .ag-day { display: flex; }
    .cal-agenda > .empty { display: flex; }
    .cal-bar { padding: 12px 14px; }
    .cal-bar h2 { min-width: 0; font-size: 16px; }
    .cal-legend { display: none; }
    .btn .hide-m { display: none; }
    .tmplt-pick select { min-width: 0; width: 100%; }
}

/* ---------- 알림 (머리글 종 · 알림 화면) ---------- */
.icon-btn.bell { position: relative; }
.app-header .icon-btn.bell.on { color: var(--gold); background: rgba(255, 255, 255, .15); }
.n-badge {
    position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
    background: var(--crit); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--brand); font-style: normal;
}
.n-badge[hidden] { display: none; }
.ntcn-sec + .ntcn-sec { margin-top: 26px; }
.ntcn-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.ntcn-list li + li { border-top: 1px solid var(--line); }
.ntcn-list a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; color: inherit; }
.ntcn-list a:hover { background: var(--surface-2); }
.ntcn-list li.unread a { background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.ntcn-list li.unread a:hover { background: var(--brand-soft); }
.n-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.n-ic svg { width: 17px; height: 17px; }
.n-ic.n-AS, .n-ic.n-MB { background: var(--violet-soft); color: var(--violet); }
.n-ic.n-PR { background: var(--brand-soft); color: var(--brand-2); }
.n-ic.n-ST { background: var(--info-soft); color: var(--info); }
.n-ic.n-RV, .n-ic.n-MT { background: var(--gold-soft); color: var(--gold-2); }
.n-ic.n-DD, .n-ic.n-EX { background: var(--crit-soft); color: var(--crit); }
.n-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.n-msg { font-size: 14.5px; font-weight: 600; color: var(--text); }
li.unread .n-msg { font-weight: 750; }
.n-task { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-task .no { color: var(--faint); font-weight: 650; margin-right: 2px; }
.n-snip { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.n-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.n-side .when { font-size: 12px; color: var(--faint); white-space: nowrap; }
.n-side .more { font-size: 11.5px; font-weight: 700; color: var(--brand-2); background: var(--brand-soft); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
li.unread .n-side .when::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); margin-right: 6px; vertical-align: 1px; }

/* ---------- @지정 ---------- */
.mention { color: var(--brand-2); font-weight: 750; background: color-mix(in srgb, var(--brand-2) 10%, transparent); border-radius: 5px; padding: 0 3px; }
.timeline .acks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.timeline .ack { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 2px 9px; border-radius: 99px; }
.timeline .ack svg { width: 11px; height: 11px; }
.timeline .ack.wait { color: var(--muted); background: var(--surface-3); }
.mention-help { margin: 6px 2px 0; }
.mention-pop {
    position: absolute; z-index: 60; min-width: 220px; max-width: 320px; max-height: 240px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.mention-pop li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mention-pop li small { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; }
.mention-pop li.on, .mention-pop li:hover { background: var(--brand-soft); }
.mention-pop li.none { color: var(--muted); cursor: default; background: none; }

/* ---------- 담당자 넘기기 ---------- */
.handover-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.handover-form select { flex: 1; min-width: 200px; max-width: 420px; }

@media (max-width: 720px) {
    .ntcn-list a { padding: 13px 14px; gap: 10px; }
    .n-side .when { font-size: 11.5px; }
    .app-header .icon-btn.bell { width: 34px; height: 34px; }
}
.timeline > li { transition: background-color .6s; }
.timeline > li.flash { background: var(--gold-soft); }
.timeline > li[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.lang-sw button { white-space: nowrap; }
@media (max-width: 720px) {
    .header-right { gap: 6px; }
    .lang-sw button { padding: 5px 7px; }
}
@media (max-width: 380px) {
    .brand-logos .lg-pgrr { height: 13px; }
    .brand-logos { gap: 7px; }
    .app-header .inner { gap: 8px; }
}
