:root {
    --navy: #101a2e;
    --blue: #2863df;
    --blue-dark: #173d82;
    --line: #dce5ef;
    --muted: #6d7b90;
    --surface: #ffffff;
    --background: #eef3f8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: #152238; background: var(--background); font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #8cb5ff; outline-offset: 2px; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #fff; color: #111; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

.login-view { display: grid; min-height: 100dvh; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 10%, #3c76ef 0, #16366f 35%, #0c172b 75%); }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.25); border-radius: 22px; background: rgba(255,255,255,.98); box-shadow: 0 28px 70px rgba(2,8,23,.38); }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #4b86ff, #2458d3); font-weight: 900; box-shadow: 0 8px 20px rgba(37,99,235,.3); }
.eyebrow { margin: 0 0 5px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.login-card h1 { margin: 10px 0 6px; font-size: 30px; }
.login-copy { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
.demo-account { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; padding: 13px; border: 1px solid #cbdcff; border-radius: 12px; background: #f1f6ff; font-size: 13px; }
.demo-account span { width: 100%; color: var(--muted); }
.demo-account strong { padding: 5px 9px; border-radius: 7px; background: #fff; }
.login-card form { display: grid; gap: 8px; }
.login-card label, .form-card label { color: #334155; font-size: 13px; font-weight: 800; }
input, textarea { width: 100%; border: 1px solid #cbd6e4; border-radius: 9px; background: #fff; }
input { min-height: 46px; padding: 0 12px; }
textarea { padding: 12px; resize: vertical; line-height: 1.6; }
.primary-button, .secondary-button { min-height: 44px; border: 0; border-radius: 9px; font-weight: 900; }
.primary-button { margin-top: 10px; color: #fff; background: var(--blue); }
.secondary-button { padding: 0 16px; border: 1px solid #cbd6e4; color: #28436b; background: #fff; }
.form-error { margin: 0; color: #c12626; font-size: 12px; }
.security-note { margin: 14px 0 0; color: #8a96a7; font-size: 11px; text-align: center; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 66px; align-items: center; gap: 20px; padding: 0 max(18px, calc((100% - 1280px) / 2)); color: #fff; background: var(--navy); box-shadow: 0 5px 20px rgba(15,23,42,.18); }
.brand { display: flex; min-width: 190px; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand span:last-child strong, .brand span:last-child small { display: block; }
.brand small { margin-top: 2px; color: #9eacc0; font-size: 10px; }
.desktop-nav { display: flex; flex: 1; justify-content: center; gap: 4px; }
.desktop-nav button, .account-button { min-height: 38px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; color: #cbd5e1; background: transparent; font-size: 12px; font-weight: 800; }
.desktop-nav button:hover, .desktop-nav button.active { border-color: rgba(255,255,255,.14); color: #fff; background: rgba(255,255,255,.09); }
.account-button { border-color: rgba(255,255,255,.14); }
.demo-banner { display: flex; justify-content: center; gap: 10px; padding: 9px 16px; color: #684313; background: #fff5d8; font-size: 12px; }
.page-shell { width: min(1280px, calc(100% - 32px)); margin: 26px auto 60px; }
.page { display: none; }
.page.active { display: block; }
.hero { display: flex; min-height: 180px; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 36px; border-radius: 20px; color: #fff; background: linear-gradient(125deg, #18335e, #2459b3 70%, #2f6ce1); box-shadow: 0 18px 42px rgba(30,64,175,.18); }
.hero .eyebrow { color: #bcd5ff; }
.hero h1 { margin: 4px 0 10px; font-size: clamp(25px, 3vw, 36px); }
.hero p:last-child { margin: 0; color: #d8e7ff; font-size: 13px; }
.hero-action { min-width: 230px; padding: 18px; border: 0; border-radius: 14px; color: var(--blue-dark); background: #fff; text-align: left; }
.hero-action b, .hero-action small { display: block; }
.hero-action small { margin-top: 5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stats article { min-height: 80px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgba(15,23,42,.04); }
.stats span, .stats b { display: block; }
.stats span { color: var(--muted); font-size: 11px; }
.stats b { margin-top: 4px; font-size: 22px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .85fr); gap: 18px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 4px 14px rgba(15,23,42,.05); }
.panel > header { min-height: 67px; padding: 15px 19px; border-bottom: 1px solid #e8edf3; }
.panel h2 { margin: 0; font-size: 18px; }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #e5ebf2; }
.service-grid button { min-height: 92px; padding: 17px 19px; border: 0; background: #fff; text-align: left; }
.service-grid button:hover { background: #f5f8ff; }
.service-grid b, .service-grid small { display: block; }
.service-grid small { margin-top: 5px; color: var(--muted); }
.clean-list, .task-list { margin: 0; padding: 0; list-style: none; }
.clean-list li, .task-list li { display: flex; min-height: 65px; align-items: center; gap: 13px; padding: 12px 18px; border-bottom: 1px solid #edf1f6; }
.clean-list li:last-child, .task-list li:last-child { border-bottom: 0; }
.clean-list span { width: 44px; color: var(--blue); font-size: 11px; font-weight: 900; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-heading h1 { margin: 3px 0 6px; font-size: 28px; }
.page-heading p:last-child { margin: 0; color: var(--muted); }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: 18px; }
.form-card { display: grid; gap: 15px; padding: 22px; }
.form-card label { display: grid; gap: 7px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex !important; align-items: center; }
.check-row input, .weekend-box input { width: 17px; min-height: 17px; }
.weekend-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px; border: 1px solid #bfd3fb; border-radius: 10px; background: #f2f7ff; }
.weekend-box b { width: 100%; }
.weekend-box label { display: flex; align-items: center; gap: 6px; }
.weekend-box small { width: 100%; color: var(--muted); }
.editor-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-label button { padding: 8px 10px; border: 1px solid #cbd6e4; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 800; }
.task-list time { width: 50px; color: var(--blue); font-size: 12px; font-weight: 900; }
.task-list div { min-width: 0; flex: 1; }
.task-list b, .task-list small { display: block; }
.task-list small { margin-top: 4px; color: var(--muted); }
.report-sheet { padding: 24px; border: 1px solid #cbd6e4; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.08); }
.report-sheet > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid var(--blue); }
.report-sheet h2 { margin: 0; }
.report-sheet > header span { color: var(--muted); font-size: 12px; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.report-columns > section { padding: 15px; border: 1px solid #d7e0eb; border-radius: 10px; background: #f8fafc; }
.report-columns h3 { margin: 0 0 12px; padding: 11px; border-radius: 8px; color: #fff; background: var(--blue); text-align: center; }
.report-columns h3.plan { background: #d67a18; }
.report-columns h3 small { font-weight: 500; }
.report-item { margin-bottom: 10px; padding: 13px; border-left: 5px solid #4b82ed; border-radius: 8px; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.05); }
.report-item p { margin: 7px 0 0; line-height: 1.6; }
.status-tabs { display: flex; gap: 8px; padding: 15px; overflow-x: auto; }
.status-tabs button { min-height: 38px; padding: 0 13px; border: 1px solid #cbd6e4; border-radius: 8px; background: #fff; white-space: nowrap; }
.status-tabs button.active { color: #fff; background: var(--blue); }
.status { width: auto; padding: 5px 9px; border-radius: 99px; color: #4b5563; background: #edf1f5; font-size: 11px; font-weight: 900; }
.status.pending { color: #9a5b00; background: #fff1cf; }
.status.done { color: #08734e; background: #dff8ef; }
.status.notice { color: #fff; background: #d9394d; }
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.person-card { display: flex; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.person-card > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: #fff; background: var(--blue); font-weight: 900; }
.person-card b, .person-card small, .person-card a { display: block; }
.person-card small { margin: 4px 0 8px; color: var(--muted); }
.person-card a { color: var(--blue); font-size: 12px; }
.mobile-nav { display: none; }

body.presentation-mode .topbar,
body.presentation-mode .demo-banner,
body.presentation-mode .page-heading,
body.presentation-mode .mobile-nav { display: none; }
body.presentation-mode { background: #111827; }
body.presentation-mode .page-shell { width: 100%; margin: 0; padding: 20px; }
body.presentation-mode .report-sheet { min-height: calc(100dvh - 40px); }

@media (max-width: 900px) {
    .desktop-nav { overflow-x: auto; justify-content: flex-start; }
    .desktop-nav button { flex: 0 0 auto; }
    .stats { grid-template-columns: 1fr 1fr; }
    .dashboard-grid, .two-column { grid-template-columns: 1fr; }
    .people-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .topbar { min-height: 60px; padding: 8px 12px; }
    .brand { min-width: 0; flex: 1; }
    .brand .brand-mark { width: 38px; height: 38px; }
    .desktop-nav { display: none; }
    .demo-banner { align-items: flex-start; flex-direction: column; gap: 2px; }
    .page-shell { width: calc(100% - 24px); margin: 16px auto 88px; }
    .hero { min-height: 0; align-items: stretch; flex-direction: column; padding: 24px 20px; border-radius: 16px; }
    .hero-action { min-width: 0; width: 100%; }
    .stats { gap: 8px; margin: 12px 0; }
    .stats article { min-height: 70px; padding: 13px; }
    .service-grid { grid-template-columns: 1fr; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 24px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 16px; }
    .report-sheet { padding: 12px; }
    .report-sheet > header { align-items: flex-start; flex-direction: column; }
    .report-columns { grid-template-columns: 1fr; }
    .people-grid { grid-template-columns: 1fr; }
    .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 62px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #d7e0ea; background: rgba(255,255,255,.97); box-shadow: 0 -8px 25px rgba(15,23,42,.12); }
    .mobile-nav button { border: 0; color: #68778d; background: transparent; font-size: 11px; font-weight: 800; }
    .mobile-nav button.active { color: var(--blue); background: #edf4ff; }
    .login-card { padding: 25px 20px; }
}

@media print {
    .topbar, .demo-banner, .page-heading, .mobile-nav { display: none !important; }
    body { background: #fff; }
    .page-shell { width: 100%; margin: 0; }
    .page:not([data-page="weekly"]) { display: none !important; }
    .page[data-page="weekly"] { display: block !important; }
    .report-sheet { border: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
