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

:root {
    --ink: #182b49;
    --muted: #677b95;
    --blue: #2864cb;
    --blue-dark: #1b4fa8;
    --blue-light: #edf5ff;
    --line: #dfE8f3;
    --canvas: #f4f7fb;
    --danger: #af3744;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.55 'DM Sans', sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #87b5ff; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 30px; line-height: 1.2; letter-spacing: -1px; font-weight: 700; }
h2 { margin-bottom: 8px; font-size: 19px; letter-spacing: -.4px; line-height: 1.4; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; background: #fff; border-right: 1px solid var(--line); padding: 32px 20px 24px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -.6px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: var(--blue); color: #fff; font-size: 27px; line-height: 1; font-weight: 700; }
.main-nav { display: grid; gap: 8px; margin-top: 48px; }
.main-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 12px; border-radius: 9px; color: #5d708b; font-size: 13px; font-weight: 600; }
.main-nav a:hover { background: #f5f8fd; text-decoration: none; }
.main-nav a[aria-current] { background: #eaf2ff; color: #205cc2; }
.nav-symbol { width: 18px; text-align: center; font-size: 20px; font-weight: 400; line-height: 1; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: #eaf1fc; color: #386199; font-size: 14px; font-weight: 700; }
.sidebar-account { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-details { flex: 1; min-width: 0; }
.account-details strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.account-details span { display: block; font-size: 11px; color: var(--muted); }
.sidebar-account form { flex-basis: 100%; padding-left: 46px; }
.text-button { border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 600; padding: 0; }
.text-button:hover { text-decoration: underline; }
.workspace-main { margin-left: 224px; }
.workspace-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 16px 36px; border-bottom: 1px solid var(--line); background: #fff; font-size: 13px; color: #4c6384; }
.timezone { color: var(--muted); font-size: 12px; }
.container { padding: 34px 36px 54px; max-width: 1540px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading p { margin: 0; }
.role-badge { display: inline-flex; padding: 5px 11px; border-radius: 6px; background: #e7f0ff; color: #38629d; font-size: 12px; font-weight: 600; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1.3px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 12px #294d7710; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; }
.panel-heading h2 { margin: 0; }
.panel-heading p { font-size: 12px; margin: 4px 0 0; }
.record-count, .panel-heading > .muted { color: #57759a; font-size: 12px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 21px 24px; }
.stat > span { color: #5a7394; font-size: 13px; font-weight: 500; }
.stat strong { display: block; font-size: 34px; font-weight: 600; letter-spacing: -1px; margin: 6px 0; line-height: 1.2; }
.stat small { color: var(--muted); font-size: 11px; }
.stat-hours { background: #eaf3ff; border-color: #d6e6fb; }
.stat-hours strong { color: #2058a9; }
label { display: block; margin-bottom: 8px; font-size: 12px; color: #4f6482; font-weight: 600; }
input, select { width: 100%; display: block; min-height: 46px; border: 1px solid #ccd9e9; border-radius: 8px; padding: 11px 13px; margin: 0 0 22px; background: #fff; color: var(--ink); }
input:focus, select:focus { border-color: #4b87e3; }
input[type="date"] { min-width: 0; }
.primary, .secondary, .attendance-history, .roster-action { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 8px; padding: 10px 18px; border: 1px solid transparent; font-weight: 600; white-space: nowrap; font-size: 13px; }
.primary { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 2px 3px #1c4d9b12; }
.primary:hover { background: var(--blue-dark); text-decoration: none; }
.secondary, .attendance-history { background: #fff; border-color: #d2dff0; color: #46658c; }
.secondary:hover, .attendance-history:hover { background: #f1f6fd; text-decoration: none; }
button:disabled { color: #8b9bb0; background: #edf1f6; border-color: #e1e7ef; box-shadow: none; cursor: not-allowed; }
button:disabled:hover { background: #edf1f6; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 20px 24px; margin-bottom: 24px; box-shadow: none; }
.filters > div { flex: 1; min-width: 155px; }
.filters .employee-filter { flex: 1.3; }
.filters input, .filters select { margin: 0; }
.filters .primary { min-height: 46px; }
.punch-controls { padding: 20px 24px; margin-bottom: 24px; }
.attendance-actions, .attendance-actions form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.attendance-actions form { margin: 0; }
.shift-status { color: #5c7290; font-size: 13px; margin-left: 6px; }
#punch-location-status { margin: 12px 0 0; font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { padding: 14px 20px; background: #edf5ff; color: #53749c; border-block: 1px solid #dce8f6; font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 18px 20px; border-bottom: 1px solid #e9eff7; vertical-align: middle; font-size: 13px; }
td strong { font-weight: 600; }
td small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.employee-identity { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.employee-identity small { margin-top: 2px; }
.employee-identity strong { display: block; }
.employee-identity .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; border-radius: 9px; }
.pin-value { display: inline-block; padding: 4px 7px; font-size: 12px; letter-spacing: .7px; background: #f1f5fb; border: 1px solid #e5ecf6; border-radius: 5px; color: #51698b; }
.pill { display: inline-block; padding: 5px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.in { background: #e9f5f1; color: #25765f; }
.pill.out { background: #eaf1ff; color: #466eb0; }
.pill.unknown { background: #fff4dc; color: #946b19; }
.location-link { color: #6782a7; font-size: 10px; }
.date-missing { color: #bd3446; font-weight: 600; }
.date-missing small { color: #bd3446; font-size: 10px; font-weight: 400; }
.daily-total th, .daily-total td { background: #f1f7ff; border-top: 0; border-bottom: 2px solid #dfebfa; padding-top: 11px; padding-bottom: 11px; }
.daily-total th { color: #355c8d; font-size: 12px; }
.daily-total th span { font-weight: 400; color: #7589a4; margin-left: 10px; font-size: 11px; }
.daily-total strong { color: #244e86; font-size: 14px; font-weight: 700; }
.pending-label { margin-left: 12px; font-size: 10px; color: #89631e; }
.roster-actions { display: flex; align-items: center; gap: 8px; }
.roster-action { min-width: 58px; min-height: 36px; padding: 7px 12px; font-size: 12px; }
.roster-action:hover { text-decoration: none; }
.roster-action--edit { background: #edf4ff; border-color: #d5e4fc; color: #2c63af; }
.roster-action--edit:hover { background: #e0edff; }
.roster-action--delete { background: #fff5f5; border-color: #f0d4d8; color: #ae3c4b; }
.roster-action--delete:hover { background: #fde7eb; }
.pagination { padding: 18px 24px; display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 8px; }
.pagination a { font-size: 12px; }
.empty { padding: 54px 24px; color: var(--muted); text-align: center; }
.form-panel { padding: 28px; }
.form-panel h2 { margin-bottom: 22px; }
.form-panel form:not(.employee-create-form) { max-width: 650px; }
.employee-create-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
.employee-create-form .form-footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.roster { margin-top: 26px; }
.notice, .errors { padding: 16px 20px; margin-bottom: 24px; border-radius: 10px; border: 1px solid #c9e5d9; background: #eef9f3; color: #356b55; }
.notice p { margin: 6px 0 10px; font-size: 13px; }
.errors { border-color: #f0d3d8; background: #fff2f4; color: #a33e4c; }
.errors ul { margin-bottom: 0; padding-left: 20px; }
.token { display: block; width: fit-content; padding: 9px 14px; background: #fff; border-radius: 7px; letter-spacing: 3px; font-size: 19px; user-select: all; }
.danger { color: var(--danger); }
.primary.danger-button { background: #b63e4d; border-color: #b63e4d; }
.primary.danger-button:hover { background: #96303e; }
.footnote, .field-help { color: var(--muted); font-size: 12px; }
.guest-header { display: flex; justify-content: space-between; align-items: center; padding: 26px 38px; }
.guest-header > span { color: var(--muted); font-size: 12px; }
.sign-in-page { min-height: 100vh; background: radial-gradient(ellipse at 50% 35%, #e9f2ff 0%, #f4f7fc 65%); }
.login-container { max-width: 530px; margin: 30px auto 60px; padding: 0 24px; }
.login-card { padding: 34px; background: #fff; border: 1px solid #dce7f6; border-radius: 20px; box-shadow: 0 18px 50px #2a548014; }
.login-heading { text-align: center; }
.login-heading .brand-mark { margin-bottom: 18px; width: 46px; height: 46px; }
.login-heading h1 { font-size: 26px; }
.login-heading p { font-size: 13px; }
.login-role-options { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; gap: 5px; border-radius: 10px; background: #f1f5fc; margin: 26px 0; }
.login-role-options a { border: 1px solid transparent; padding: 9px; text-align: center; border-radius: 7px; color: #70839e; font-weight: 600; font-size: 13px; }
.login-role-options a[aria-current] { background: #fff; border-color: #dbe6f6; color: #285fb2; box-shadow: 0 2px 4px #2c548610; }
.login-role-options a:hover { text-decoration: none; }
.login-list-title { font-size: 12px; color: #617897; margin-bottom: 12px; }
.login-employee-list { list-style: none; margin: 0; padding: 4px; display: grid; gap: 8px; max-height: 350px; overflow-y: auto; }
.login-employee-list a { display: flex; align-items: center; gap: 12px; border: 1px solid #e0e8f4; border-radius: 10px; padding: 11px 12px; color: #334f73; font-size: 13px; font-weight: 600; }
.login-employee-list a:hover { background: #f3f7ff; border-color: #bdd3f4; text-decoration: none; }
.account-arrow { margin-left: auto; color: #9bacbf; }
.selected-account { display: flex; gap: 12px; align-items: center; margin: 24px 0; }
.selected-account h2 { font-size: 17px; margin: 0 0 3px; }
.selected-account a { font-size: 12px; }
.pin-input { font-size: 22px; letter-spacing: 12px; text-align: center; min-height: 56px; }
.primary.full { width: 100%; justify-content: space-between; }
.login-help { margin: 22px 0 0; font-size: 12px; text-align: center; color: var(--muted); }

@media (min-width: 1600px) {
    .container { padding-top: 42px; }
}
@media (max-width: 1100px) {
    .sidebar { width: 202px; padding-inline: 14px; }
    .workspace-main { margin-left: 202px; }
    .container { padding: 28px 24px; }
    .workspace-topbar { padding-inline: 24px; }
    .stat { padding: 18px; }
    .stat strong { font-size: 28px; }
    th, td { padding-inline: 15px; }
    .employee-identity .avatar { display: none; }
}
@media (max-width: 800px) {
    .sidebar { position: static; width: auto; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .brand { font-size: 18px; }
    .main-nav { grid-row: 2; grid-column: 1 / -1; display: flex; margin: 0; gap: 8px; }
    .main-nav a { flex: 1; justify-content: center; padding: 10px; }
    .sidebar-account { border: 0; padding: 0; margin: 0; justify-content: flex-end; }
    .sidebar-account .avatar, .sidebar-account .account-details { display: none; }
    .sidebar-account form { padding: 0; flex-basis: auto; font-size: 12px; }
    .workspace-main { margin: 0; }
    .workspace-topbar { min-height: 48px; padding: 10px 20px; font-size: 12px; }
    .container { padding: 24px 16px 36px; }
    h1 { font-size: 26px; }
    .page-heading { align-items: flex-start; margin-bottom: 24px; }
    .page-heading p { font-size: 12px; }
    .stats { gap: 10px; }
    .stat { padding: 15px; }
    .stat strong { font-size: 25px; }
    .stat > span { font-size: 11px; }
    .stat small { font-size: 10px; }
    .filters { padding: 18px; gap: 14px; }
    .filters > div { min-width: 135px; }
    .filters .employee-filter { flex-basis: 100%; }
    .filters .primary { width: 100%; }
    .panel-heading { padding: 20px; }
    .employee-create-form { grid-template-columns: 1fr; }
    .employee-create-form .primary { width: 100%; }
    .form-panel { padding: 22px; }
    .daily-total th span { display: block; margin: 2px 0 0; }
    .pending-label { display: block; margin: 4px 0 0; }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-hours { grid-column: 1 / -1; }
    .stat-hours strong { font-size: 28px; }
    .role-badge { display: none; }
    .record-count { font-size: 10px; }
    .pagination { padding: 16px; }
    .pagination .secondary { padding: 8px 12px; }
    .punch-controls { padding: 18px; }
    .shift-status { width: 100%; margin: 4px 0 0; }
    .guest-header { padding: 22px; }
    .login-container { padding-inline: 16px; margin-top: 14px; }
    .login-card { padding: 26px 22px; }
}
