:root {
    --ink: #304333;
    --muted: #70796e;
    --green: #4a6846;
    --border: #e5e9e0;
    --canvas: #f8faf6;
    --day-bg: #fff1d5;
    --day-ink: #85601b;
    --night-bg: #eeeafa;
    --night-ink: #65518f;
    --off-bg: #edf3e8;
    --off-ink: #476642;
}
* { box-sizing: border-box; }
body { background: var(--canvas); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; }
a { color: var(--green); }
a:hover { color: #2c4929; }
button, input, select { font: inherit; }
button, a, select, input { touch-action: manipulation; }
:focus-visible { outline: 3px solid #729165 !important; outline-offset: 4px; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.app-container { max-width: 1180px; padding-right: 28px; padding-left: 28px; }
.site-header { background: rgba(255, 255, 255, .85); border-bottom: 1px solid var(--border); }
.header-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 21px; letter-spacing: -.5px; line-height: 1.3; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand strong { font-weight: 700; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .15px; margin-top: 5px; }
.brand-mark { width: 55px; height: 55px; background: #eef3e9; border-radius: 18px; overflow: hidden; flex-shrink: 0; }
.brand-mark .rabbit { width: 64px; height: 60px; margin: -1px -4px; }
.header-nav { display: flex; align-items: center; gap: 12px; }
.nav-link { font-size: 13px; padding: 8px 0; display: inline-flex; align-items: center; gap: 7px; }
.btn { border-radius: 9px; font-weight: 600; font-size: 13px; padding: 11px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn-sm { padding: 8px 12px; font-size: 12px; }
.btn-soft { background: #f1f4ed; color: #4b6145; border: 1px solid #e4e9dc; }
.btn-soft:hover { background: #e5ecdd; color: #304333; border-color: #c9d5bf; }
.btn-primary { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 3px 7px #3043330c; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: #385334 !important; border-color: #385334 !important; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; padding: 36px 5px 26px; min-height: 195px; }
.eyebrow { font-size: 10px; color: #728067; font-weight: 700; letter-spacing: 1.65px; display: block; }
.little-dot { background: #9aaf82; width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
h1 { font-size: clamp(25px, 3.2vw, 34px); letter-spacing: -1.1px; font-weight: 650; line-height: 1.3; margin: 11px 0 10px; }
.welcome-row p { color: var(--muted); font-size: 14px; margin: 0; }
.welcome-rabbit { width: 190px; height: 145px; position: relative; flex-shrink: 0; margin-right: 29px; }
.welcome-rabbit .rabbit { position: absolute; width: 160px; bottom: 0; left: 15px; }
.rabbit-orbit { position: absolute; height: 130px; width: 130px; border-radius: 50%; background: #edf2e5; top: 6px; left: 31px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 27px; }
.summary-card { background: #fff; display: flex; align-items: center; gap: 15px; padding: 20px 23px; border: 1px solid var(--border); border-radius: 14px; }
.summary-icon { display: flex; width: 49px; height: 49px; align-items: center; justify-content: center; border-radius: 13px; flex-shrink: 0; }
.summary-icon .icon { width: 24px; height: 24px; }
.summary-icon.day, .legend-dot.day { background: var(--day-bg); color: var(--day-ink); }
.summary-icon.night, .legend-dot.night { background: var(--night-bg); color: var(--night-ink); }
.summary-icon.off, .legend-dot.off { background: var(--off-bg); color: var(--off-ink); }
.summary-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.summary-card strong { font-size: 27px; font-weight: 650; line-height: 1.25; }
.summary-card small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.calendar-card { background: white; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 7px 32px #24352103; overflow: clip; }
.calendar-toolbar { padding: 24px 27px 19px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.month-heading .eyebrow { font-size: 9px; letter-spacing: 1.7px; }
h2 { font-size: 26px; font-weight: 650; letter-spacing: -.7px; line-height: 1.25; margin: 7px 0 0; }
h2 span { color: #8a9385; font-weight: 400; margin-left: 3px; }
.month-navigation { display: flex; gap: 7px; align-items: center; }
.btn-icon { padding: 0; width: 38px; height: 38px; border: 1px solid var(--border); color: #68745e; background: white; }
.btn-icon:hover, .btn-today:hover { background: #edf2e8; color: var(--green); }
.btn-today { height: 38px; font-size: 12px; color: #596650; border: 1px solid var(--border); background: #f8faf5; padding: 8px 14px; }
.calendar-options { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 0 27px 19px; }
.legend { display: flex; gap: 17px; flex-wrap: wrap; align-items: center; font-size: 11px; color: #6d7766; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.legend-dot.day { background: #edc66b; }
.legend-dot.night { background: #a797d2; }
.legend-dot.off { background: #b1c49e; }
.legend-dot.holiday { background: #deafa0; }
.legend-dot.weekend { background: #e8ece2; border: 1px solid #c2c9bb; }
.month-picker { display: flex; align-items: center; gap: 6px; }
.month-picker input { font-size: 12px; width: 152px; height: 34px; border-color: var(--border); border-radius: 7px; padding: 4px 7px; }
.month-picker .btn { padding: 7px 11px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.calendar-weekday { font-size: 10px; font-weight: 600; color: #858d7f; text-align: center; padding: 13px 4px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .65px; }
.weekend-label { color: #809271; background: #f6f8f2; }
.weekday-short { display: none; }
.calendar-day, .calendar-empty { min-height: 125px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 11px 12px 9px; }
.calendar-day:nth-child(7n), .calendar-empty:nth-child(7n) { border-right: 0; }
.calendar-empty { background: #fcfdfb; background-image: repeating-linear-gradient(-45deg, transparent, transparent 6px, #f3f5ef66 6px, #f3f5ef66 7px); }
.calendar-day { display: flex; flex-direction: column; position: relative; }
.calendar-day.is-weekend { background: #f8faf5; }
.calendar-day.is-holiday { background: #fff9f5; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px #7f986b; background: #f5f9ef; z-index: 1; }
.day-heading { display: flex; align-items: center; justify-content: space-between; min-height: 27px; margin-bottom: 7px; gap: 2px; }
.day-number { font-size: 14px; font-weight: 600; color: #63705b; }
.is-holiday .day-number { color: #9f6756; }
.is-today .day-number { background: var(--green); color: white; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.today-label { color: #4f6b43; font-size: 9px; font-weight: 700; }
.mobile-weekday { display: none; }
.day-shift { margin-bottom: 6px; }
.shift-badge { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; min-height: 27px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.shift-badge .icon { width: 13px; height: 13px; }
.shift-day { background: var(--day-bg); color: var(--day-ink); }
.shift-night { background: var(--night-bg); color: var(--night-ink); }
.shift-off { background: var(--off-bg); color: var(--off-ink); }
.day-note { font-size: 10px; line-height: 1.45; color: #9b6858; overflow-wrap: anywhere; }
.holiday-name { display: block; }
.holiday-name::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #c18e78; margin: 0 4px 2px 0; }
.calendar-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 25px; font-size: 11px; color: #7a8373; background: #fcfdfb; }
.calendar-bottom .icon { width: 15px; height: 15px; margin-right: 6px; }
.timezone-note { white-space: nowrap; color: #8c9387; font-size: 10px; }
.calendar-footnote { font-size: 11px; color: #7a8373; text-align: center; margin: 17px 0 28px; }
.shift-select { padding: 4px 5px; font-size: 11px; height: 32px; width: 100%; border: 1px solid #dbe3d2; border-radius: 6px; cursor: pointer; font-weight: 600; }
.shift-select option { color: var(--ink); background: white; }
.shift-toggle { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; padding: 5px 7px; border: 1px solid #dbe3d2; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; }
.shift-toggle > span { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.shift-toggle .icon { width: 14px; height: 14px; }
.shift-toggle:hover { filter: brightness(.97); }
.shift-toggle[hidden], .shift-select[hidden], .shift-toggle > [hidden] { display: none; }
.note-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 5px 3px; color: #65775b; background: transparent; border: 0; border-radius: 6px; font-size: 11px; cursor: pointer; }
.note-toggle .icon { width: 13px; height: 13px; }
.note-toggle:hover, .note-toggle.has-note { color: #37572e; background: #eaf0e3; }
.personal-note { color: #53624c; background: #f0f4eb; padding: 7px; border-radius: 5px; margin: 5px 0 0; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-field { margin-top: 6px; }
.note-input { min-height: 56px; padding: 6px; font-size: 11px; resize: vertical; }
.note-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; padding: 0; border: 1px solid var(--border); border-radius: 16px; color: var(--ink); box-shadow: 0 12px 60px #21301d33; }
.note-dialog::backdrop { background: #1e2b2359; }
.note-dialog-content { padding: 24px; }
.note-dialog h3 { font-size: 20px; font-weight: 650; margin: 0 0 4px; }
.note-dialog-date { color: var(--muted); font-size: 13px; margin-bottom: 19px; }
.note-dialog label { font-size: 13px; font-weight: 600; }
.note-dialog textarea { font-size: 16px; resize: vertical; min-height: 140px; border-radius: 8px; }
.note-editor-meta { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0 20px; font-size: 11px; color: var(--muted); }
.note-editor-meta > span:last-child { white-space: nowrap; }
.note-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.form-control:focus { border-color: #8ea17e; box-shadow: 0 0 0 .2rem #8fa67a24; }
.save-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 25px; background: #fcfdfb; border-top: 1px solid var(--border); position: sticky; bottom: 0; z-index: 3; }
.save-status { color: var(--muted); font-size: 12px; }
.save-status.has-changes { color: #835c1e; font-weight: 600; }
.has-pending-change::after { content: ''; position: absolute; width: 5px; height: 5px; background: #b58335; border-radius: 50%; top: 8px; right: 8px; }
.status-alert { margin: 20px 0 0; }
.alert { border-radius: 10px; font-size: 13px; }
.alert-success { background: #ecf3e7; border-color: #d4e3c9; color: #3e6636; }
.login-card { width: min(100%, 450px); text-align: center; margin: 55px auto 70px; background: white; border: 1px solid var(--border); padding: 28px 38px 32px; border-radius: 20px; box-shadow: 0 10px 50px #30433305; }
.login-rabbit { width: 140px; height: 130px; display: block; margin: 0 auto 20px; }
.login-card h1 { font-size: 29px; margin-top: 12px; }
.login-card p { font-size: 13px; color: var(--muted); margin: 10px 0 27px; }
.login-card label { font-size: 12px; font-weight: 600; }
.login-card input { height: 46px; border-radius: 8px; border-color: #dbe2d4; padding-right: 65px; }
.password-input { position: relative; }
.password-toggle { position: absolute; right: 10px; top: 10px; padding: 3px; border: 0; background: transparent; color: var(--green); font-size: 12px; }
.password-toggle[hidden] { display: none; }
.login-card .is-invalid { background-image: none; }
.back-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; margin-top: 25px; }
.back-link .icon { width: 15px; height: 15px; }
.skip-link { position: absolute; top: -100px; left: 15px; padding: 10px; background: white; color: var(--ink); z-index: 10; }
.skip-link:focus { top: 10px; }
@media (max-width: 991.98px) {
    .app-container { padding-right: 20px; padding-left: 20px; }
    .calendar-toolbar, .calendar-options { padding-left: 20px; padding-right: 20px; }
    .weekday-full { display: none; }
    .weekday-short { display: inline; }
    .calendar-day, .calendar-empty { padding: 9px 8px; min-height: 117px; }
    .welcome-rabbit { margin-right: 0; width: 160px; }
    .welcome-rabbit .rabbit { left: 0; }
    .rabbit-orbit { left: 16px; }
    .summary-card { padding: 18px; gap: 12px; }
    .legend { gap: 11px; }
    .shift-badge { font-size: 10px; padding: 4px 5px; gap: 3px; }
    .shift-toggle { padding: 4px; font-size: 10px; }
    .shift-toggle > span { gap: 3px; }
    .shift-toggle .icon { width: 12px; height: 12px; }
}
@media (max-width: 767.98px) {
    .summary-card { padding: 16px 12px; gap: 10px; }
    .summary-icon { width: 35px; height: 39px; border-radius: 10px; }
    .summary-icon .icon { width: 20px; height: 20px; }
    .summary-label { font-size: 10px; }
    .summary-card strong { font-size: 24px; }
    .summary-card small { font-size: 10px; }
    .summary-grid { gap: 10px; }
    .calendar-options { flex-wrap: wrap; }
    .calendar-day, .calendar-empty { padding: 8px 5px; }
    .day-note { font-size: 8px; }
    .today-label { font-size: 8px; }
    .brand { font-size: 18px; }
    .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
    .brand-mark .rabbit { width: 54px; height: 51px; }
    .brand small { font-size: 9px; }
    .header-inner { min-height: 84px; }
    .welcome-rabbit { display: none; }
    .welcome-row { min-height: 169px; padding: 30px 0; }
    .welcome-row p { font-size: 13px; }
    .welcome-row h1 { font-size: 29px; }
    .admin-link { padding: 9px 12px; font-size: 11px; }
    .header-nav .nav-link span { display: none; }
}
@media (max-width: 575.98px) {
    body { font-size: 14px; }
    .app-container { padding-right: 16px; padding-left: 16px; }
    .header-inner { gap: 8px; }
    .brand { gap: 8px; font-size: 16px; }
    .brand small { font-size: 8px; letter-spacing: 0; }
    .brand-mark { width: 40px; height: 44px; }
    .brand-mark .rabbit { width: 49px; }
    .admin-link { padding: 8px 9px; gap: 5px; font-size: 10px; }
    .admin-link .icon { width: 14px; height: 14px; }
    .eyebrow { font-size: 8px; }
    .welcome-row { min-height: 155px; padding: 27px 0; }
    .welcome-row h1 { font-size: 26px; letter-spacing: -.9px; }
    .welcome-row p { font-size: 12px; max-width: 310px; }
    .summary-grid { gap: 8px; margin-bottom: 20px; }
    .summary-card { flex-direction: column; align-items: flex-start; gap: 9px; padding: 12px; border-radius: 11px; }
    .summary-icon { width: 30px; height: 30px; border-radius: 9px; }
    .summary-icon .icon { width: 18px; height: 18px; }
    .summary-label { font-size: 10px; white-space: nowrap; }
    .summary-card strong { font-size: 23px; }
    .summary-card small { font-size: 10px; margin-left: 1px; }
    .calendar-card { border-radius: 13px; overflow: visible; }
    .calendar-toolbar { padding: 19px 15px 15px; gap: 10px; flex-wrap: wrap; }
    h2 { font-size: 23px; }
    .month-heading { width: 100%; }
    .month-navigation { width: 100%; justify-content: space-between; }
    .btn-today { flex: 1; }
    .calendar-options { padding: 0 15px 15px; gap: 13px; }
    .legend { gap: 8px 12px; font-size: 10px; }
    .month-picker { width: 100%; }
    .month-picker input { flex: 1; width: 150px; }
    .calendar-grid { grid-template-columns: minmax(0, 1fr); }
    .calendar-weekday, .calendar-empty { display: none; }
    .calendar-day { display: grid; grid-template-columns: 70px minmax(0, 1fr) 106px; align-items: center; column-gap: 9px; padding: 10px 13px; min-height: 68px; border-right: 0; }
    .day-heading { grid-column: 1; grid-row: 1; flex-wrap: wrap; justify-content: flex-start; margin: 0; gap: 4px; }
    .day-heading time { display: flex; gap: 6px; align-items: center; }
    .day-number { font-size: 16px; min-width: 22px; }
    .mobile-weekday { display: inline; font-size: 10px; color: var(--muted); }
    .today-label { display: none; }
    .day-note { grid-column: 2; grid-row: 1; font-size: 11px; padding: 3px 0; }
    .day-shift { grid-column: 3; grid-row: 1; text-align: right; margin: 0; }
    .shift-badge { min-height: 30px; padding: 5px 9px; font-size: 11px; gap: 5px; }
    .shift-badge .icon { width: 14px; height: 14px; }
    .shift-select { font-size: 12px; height: 37px; padding: 5px 7px; }
    .shift-toggle { min-height: 44px; padding: 5px 7px; font-size: 12px; }
    .shift-toggle > span { gap: 5px; }
    .shift-toggle .icon { width: 14px; height: 14px; }
    .note-toggle { min-height: 44px; font-size: 10px; }
    .note-field, .personal-note { grid-column: 1 / -1; }
    .personal-note { grid-row: 2; font-size: 12px; }
    .note-field { grid-row: 3; }
    .note-dialog-content { padding: 18px; }
    .note-dialog-actions .btn { padding: 10px 11px; font-size: 12px; }
    .calendar-bottom { padding: 14px; border-radius: 0 0 13px 13px; font-size: 10px; }
    .timezone-note { display: none; }
    .save-bar { padding: 12px; gap: 8px; border-radius: 0 0 12px 12px; box-shadow: 0 -3px 12px #30433308; }
    .save-bar .btn { padding: 10px 12px; font-size: 12px; }
    .save-status { font-size: 10px; max-width: 45%; }
    .calendar-footnote { font-size: 10px; padding: 0 8px; line-height: 1.6; }
    .login-card { margin-top: 30px; margin-bottom: 30px; padding: 25px 23px; }
    .login-card h1 { font-size: 27px; }
    .header-nav { gap: 9px; }
}
@media (max-width: 359.98px) {
    .app-container { padding-left: 10px; padding-right: 10px; }
    .brand small { display: none; }
    .brand { font-size: 15px; }
    .welcome-row h1 { font-size: 23px; }
    .summary-card { padding: 10px 8px; }
    .summary-label { font-size: 9px; }
    .calendar-day { padding: 10px; grid-template-columns: 64px minmax(0, 1fr) 95px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
    body { background: white; }
    .site-header, .month-navigation, .month-picker, .calendar-footnote, .welcome-rabbit { display: none; }
    .welcome-row { min-height: 0; padding: 20px 0; }
    .calendar-card { box-shadow: none; }
    .calendar-day { break-inside: avoid; }
}
