@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --navy: #07112f; --blue: #3b66f5; --blue-dark: #284ddb; --ink: #12182b;
    --muted: #6f778b; --line: #e8eaf0; --surface: #fff; --canvas: #f5f7fb;
    --pink: #ec5b91; --purple: #8c5adb; --cyan: #24a9d8;
    --shadow: 0 18px 48px rgba(20, 33, 70, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(59, 102, 245, .25); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { height: 82px; background: var(--navy); color: #fff; display: flex; align-items: stretch; gap: 38px; padding: 0 clamp(24px, 4vw, 72px); position: sticky; top: 0; z-index: 20; box-shadow: 0 10px 30px rgba(3, 10, 32, .12); }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; flex: 0 0 auto; }
.brand::after { content: ""; width: 1px; height: 38px; background: rgba(255,255,255,.3); margin-left: 20px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #43e6e2, #3384f6); box-shadow: inset 0 0 0 5px rgba(255,255,255,.15); }
.brand-mark img { width: 27px; height: 27px; }
.main-nav { display: flex; align-items: stretch; gap: 34px; }
.main-nav a { position: relative; display: flex; align-items: center; color: #aeb5cb; text-decoration: none; font-size: 14px; white-space: nowrap; transition: color .2s ease; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active::after { content: ""; position: absolute; left: 50%; bottom: 17px; width: 32px; height: 3px; border-radius: 2px; background: #fff; transform: translateX(-50%); }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.company-switcher { display: flex; align-items: center; gap: 8px; color: #c7ccdc; background: none; border: 0; padding: 12px 0; text-decoration: none; }
.company-switcher img { width: 14px; height: 14px; filter: brightness(0) invert(1); opacity: .75; }
.icon-button { width: 38px; height: 38px; border: 0; padding: 8px; background: transparent; color: inherit; display: grid; place-items: center; border-radius: 50%; }
.icon-button:hover { background: rgba(255,255,255,.09); }
.icon-button img { width: 22px; height: 22px; }
.site-header .icon-button img { filter: brightness(0) invert(1); }
.notification-button { position: relative; }
.notification-dot { position: absolute; right: 6px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #fa6380; border: 2px solid var(--navy); }
.profile-button { width: 44px; height: 44px; border-radius: 50%; padding: 2px; border: 1px solid rgba(255,255,255,.75); background: transparent; overflow: hidden; }
.profile-button img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.menu-toggle { display: none; margin-left: auto; align-self: center; }

main { max-width: 1760px; margin: 0 auto; padding: 38px clamp(22px, 4vw, 72px) 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); text-transform: uppercase; font-size: 11px; line-height: 1; font-weight: 700; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(26px, 2.2vw, 34px); letter-spacing: -.035em; }

.filter-panel { display: grid; grid-template-columns: minmax(280px, 1.8fr) minmax(220px, .9fr) minmax(230px, .8fr) auto auto; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 8px 28px rgba(26, 37, 71, .04); margin-bottom: 22px; }
.search-field, .select-field, .month-picker { height: 48px; border: 1px solid var(--line); border-radius: 9px; background: #fff; display: flex; align-items: center; transition: border .2s, box-shadow .2s; }
.search-field:focus-within, .select-field:focus-within, .month-picker:focus-within { border-color: #aab9f8; box-shadow: 0 0 0 3px rgba(59, 102, 245, .08); }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 10px 0 15px; color: var(--ink); background: transparent; }
.search-field img, .select-field img, .calendar-icon { width: 18px; height: 18px; flex: 0 0 auto; margin-right: 14px; opacity: .78; }
.select-field { position: relative; }
.select-field select { width: 100%; height: 100%; border: 0; outline: 0; appearance: none; color: #4d556a; background: transparent; padding: 0 44px 0 15px; }
.select-field img { position: absolute; right: 0; pointer-events: none; }
.month-picker output { flex: 1; min-width: 108px; text-align: center; color: #394156; font-size: 14px; font-weight: 500; }
.month-nav { width: 34px; height: 100%; border: 0; background: transparent; color: #7b8295; display: grid; place-items: center; }
.month-nav:hover { color: var(--blue); }
.month-nav img { width: 16px; height: 16px; }
.calendar-icon { margin: 0 12px 0 2px; }
.primary-button, .secondary-button, .danger-button { min-height: 46px; border-radius: 9px; padding: 0 20px; font-weight: 600; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.primary-button { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(59,102,245,.2); }
.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(59,102,245,.28); }
.secondary-button { background: #fff; color: #3b4254; border-color: var(--line); }
.secondary-button:hover { background: #f8f9fc; border-color: #d7dae4; }
.danger-button { background: #fff0f3; color: #c83458; margin-right: auto; }
.danger-button:hover { background: #ffe3e9; }
.add-shift-button { display: flex; align-items: center; gap: 8px; }
.add-shift-button img { width: 18px; height: 18px; filter: brightness(0) invert(1); }

.schedule-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.schedule-toolbar { min-height: 80px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.schedule-toolbar h2 { font-size: 17px; margin: 0 0 4px; }
.schedule-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.legend { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.legend-dot.morning { background: var(--pink); }.legend-dot.evening { background: var(--purple); }.legend-dot.flexible { background: var(--cyan); }
.table-scroll { overflow-x: auto; scrollbar-color: #ccd1de #f4f5f8; scrollbar-width: thin; }
.schedule-grid { min-width: 1250px; display: grid; grid-template-columns: 238px repeat(7, minmax(144px, 1fr)); }
.grid-header { height: 78px; display: flex; align-items: center; justify-content: center; gap: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fcfcfd; color: #737a8d; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.grid-header strong { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-size: 14px; }
.grid-header.today strong { color: #fff; background: var(--blue); }
.grid-header.employee-heading { justify-content: flex-start; padding-left: 22px; color: #363d50; font-weight: 600; }
.grid-header.weekend { background: #f8f9fb; }
.employee-row { display: contents; }
.employee-card { min-height: 148px; display: flex; align-items: center; gap: 14px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.employee-card img { width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; background: #e8ecf5; }
.employee-card h3 { margin: 0 0 4px; font-size: 14px; }.employee-card p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.employee-card span { display: inline-flex; color: #128856; background: #dcf8eb; border-radius: 20px; padding: 3px 8px; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.day-cell { min-height: 148px; padding: 38px 10px 10px; position: relative; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 8px; }
.day-cell::before { content: attr(data-day); position: absolute; top: 10px; left: 10px; right: 10px; height: 21px; padding: 0 8px; border-radius: 5px; background: #f8f8fa; color: transparent; font-size: 10px; }
.day-cell::after { content: "•••"; position: absolute; right: 16px; top: 8px; color: #7b8191; letter-spacing: 1px; transform: rotate(90deg); font-size: 10px; }
.day-cell.weekend { background: #fcfcfd; }.day-cell.current-day { box-shadow: inset 2px 0 0 rgba(59,102,245,.09), inset -2px 0 0 rgba(59,102,245,.09); }
.shift { min-height: 31px; border: 1px solid currentColor; border-radius: 18px; padding: 5px 7px; font-size: 11px; font-weight: 600; background: #fff; display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.shift:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(21,26,47,.08); }
.shift.morning { color: var(--pink); background: #fffafd; }.shift.evening { color: var(--purple); background: #fcfaff; }.shift.flexible { color: var(--cyan); background: #f9fdff; }.shift span { color: #3e4557; }
.add-shift { min-height: 62px; border: 1px dashed #d7dae3; border-radius: 10px; background: #f8f8fa; color: #778094; display: grid; place-items: center; transition: background .2s, color .2s, border .2s; }
.add-shift:hover { background: #f1f4ff; color: var(--blue); border-color: #aab9f8; }.add-shift img { width: 20px; height: 20px; opacity: .7; }
.empty-state { padding: 60px 20px; text-align: center; }.empty-state img { width: 32px; height: 32px; opacity: .65; }.empty-state h3 { margin: 12px 0 4px; }.empty-state p { color: var(--muted); margin: 0; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; color: #fff; background: var(--navy); border-radius: 10px; padding: 13px 18px; box-shadow: 0 14px 35px rgba(3,10,32,.22); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.shift-dialog { width: min(520px, calc(100% - 28px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 30px 90px rgba(7,17,47,.24); }
.shift-dialog::backdrop { background: rgba(7,17,47,.45); backdrop-filter: blur(3px); }
.shift-dialog form { padding: 26px; }.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }.dialog-heading h2 { margin: 0; font-size: 24px; }.dialog-close { color: #6e768a; }.dialog-close:hover { background: #f2f3f7; }
.dialog-context { color: var(--muted); font-size: 13px; margin: 12px 0 20px; }.shift-options { display: grid; gap: 10px; }.shift-options label input { position: absolute; opacity: 0; pointer-events: none; }
.shift-options label span { min-height: 58px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; grid-template-columns: 16px 1fr; align-items: center; color: #363d50; font-weight: 600; cursor: pointer; }
.shift-options label small { display: block; color: var(--muted); font-weight: 400; grid-column: 2; }.shift-options input:checked + span { border-color: var(--blue); background: #f6f8ff; box-shadow: 0 0 0 2px rgba(59,102,245,.1); }
.dialog-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; }

@media (max-width: 1180px) {
    .site-header { gap: 20px; }.main-nav { gap: 20px; }.main-nav a:nth-child(3), .main-nav a:nth-child(4) { display: none; }.filter-panel { grid-template-columns: 1.4fr 1fr 1fr auto auto; }
}
@media (max-width: 860px) {
    .site-header { height: 68px; padding: 0 20px; }.brand { font-size: 20px; }.brand::after { display: none; }.brand-mark { width: 36px; height: 36px; }.menu-toggle { display: grid; }
    .main-nav { position: absolute; top: 68px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 10px 20px 18px; background: var(--navy); box-shadow: 0 20px 30px rgba(3,10,32,.18); }.main-nav.open { display: flex; }
    .main-nav a, .main-nav a:nth-child(3), .main-nav a:nth-child(4) { display: block; padding: 12px; }.main-nav a.active::after { left: 12px; bottom: 4px; transform: none; }
    .header-actions .company-switcher, .header-actions .icon-button:not(.notification-button) { display: none; }.header-actions { margin-left: 0; gap: 8px; } main { padding: 26px 16px 48px; }
    .filter-panel { grid-template-columns: 1fr 1fr; }.search-field, .month-picker { grid-column: 1 / -1; }.filter-panel > button { width: 100%; }
}
@media (max-width: 560px) {
    .page-heading { align-items: center; }.page-heading .eyebrow { display: none; }.add-shift-button { min-height: 42px; padding: 0 14px; }.filter-panel { grid-template-columns: 1fr 1fr; padding: 12px; }.select-field { grid-column: 1 / -1; }
    .schedule-toolbar { align-items: flex-start; }.legend { display: none; }.schedule-grid { grid-template-columns: 196px repeat(7, 142px); }.employee-card { padding: 14px; }.employee-card img { width: 42px; height: 42px; }
    .dialog-actions { flex-wrap: wrap; }.dialog-actions .danger-button { order: 2; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
