/* Scoped last-layer styling. Never affect the login or other portals. */
[data-team-legacy-hidden] { display: none !important; }
[data-attendance-placeholder] { display: none !important; }
[data-attendance-hidden] { display: none !important; }
.app-shell .content:has(> .team-tabs) { min-width: 0; max-width: 100%; }
.app-shell .content > .team-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 0 0 22px; width: fit-content; max-width: 100%; border: 1px solid #dce8f0; background: #eaf3f9; border-radius: 14px; }
.app-shell .team-tabs > button { flex: 0 1 auto; min-width: 0; min-height: 44px; height: auto; padding: 10px 18px; border: 0; border-radius: 10px; background: transparent; color: #34526a; font: 700 13px/1.4 'Manrope',sans-serif; white-space: nowrap; box-shadow: none; }
.app-shell .team-tabs > button.active { background: #fff; color: #086ca5; box-shadow: 0 2px 8px #143b5a12; }
.staff-team,.team-dialog { --team-ink: #17344c; --team-muted: #566f83; font-family: 'Manrope',sans-serif; color: var(--team-ink); line-height: 1.55; }
.staff-team,.staff-team *,.team-dialog,.team-dialog * { box-sizing: border-box; }
.app-shell .staff-team { display: block; width: 100%; max-width: 100%; min-width: 0; }
.staff-team .team-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.staff-team .team-heading-icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg,#d5efff,#eaf9ff); color: #086fa5; }
.team-heading-icon svg { width: 26px; height: 26px; }
.app-shell .staff-team .team-heading h2 { margin: 0; text-align: left; color: #17344c !important; font-size: clamp(22px,2vw,28px) !important; line-height: 1.25; font-weight: 800; }
.app-shell .staff-team .team-heading p { margin: 6px 0 0; color: #566f83 !important; font-size: 13px !important; }
.app-shell .staff-team .team-heading .team-eyebrow { color: #086b9e !important; font-size: 10px !important; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 4px; }
.team-toolbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.team-period { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; max-width: 100%; }
.staff-team .team-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #ccdce8; border-radius: 10px; padding: 0 12px; min-width: 180px; width: 270px; max-width: 100%; min-height: 44px; }
.team-search svg { width: 19px; height: 19px; flex-shrink: 0; color: #59778d; }
.staff-team .team-search input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; color: #193a51; font: 500 14px/1.5 'Manrope',sans-serif; }
.team-search:focus-within { outline: 2px solid #0788c8; outline-offset: 2px; }
.team-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.staff-team .team-button,.team-dialog .team-button { position: static; display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; width: auto; min-width: 0; min-height: 42px; height: auto; padding: 10px 14px; border: 1px solid transparent !important; border-radius: 10px !important; background: linear-gradient(130deg,#096caa,#0786bf) !important; color: #fff !important; -webkit-text-fill-color: currentColor; font: 700 12px/1.4 'Manrope',sans-serif !important; text-transform: none; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 10px #086da51c !important; transition: background .15s,box-shadow .15s; }
.staff-team .team-button span,.team-dialog .team-button span { display: inline; color: inherit !important; font: inherit !important; background: none !important; opacity: 1; }
.team-button svg { width: 17px; height: 17px; flex: 0 0 17px; color: inherit; }
.staff-team .team-button::before,.staff-team .team-button::after,.team-dialog .team-button::before,.team-dialog .team-button::after { content: none !important; }
.staff-team .team-button-secondary,.team-dialog .team-button-secondary { background: #fff !important; color: #286084 !important; border-color: #cedfe9 !important; box-shadow: none !important; }
.team-button:hover:not(:disabled) { filter: brightness(.96); }
.team-button:focus-visible,.team-dialog input:focus-visible,.team-dialog select:focus-visible,.team-dialog textarea:focus-visible { outline: 3px solid #39b6ee !important; outline-offset: 3px; }
.staff-team .team-button:disabled,.team-dialog .team-button:disabled { opacity: .5 !important; cursor: not-allowed; }
.staff-team .team-message,.team-dialog .team-message { margin: 0 0 14px; padding: 12px 14px; background: #e6f6ee; border-radius: 10px; color: #176447 !important; font-size: 13px !important; }
.staff-team .team-message:empty,.staff-team .team-message[hidden],.team-dialog .team-message:empty { display: none; }
.staff-team .team-message.is-error,.team-dialog .team-message.is-error { background: #fff0f0; color: #a42736 !important; }
.team-data-area { min-width: 0; }
.team-data-area[aria-busy] { min-height: 160px; padding: 40px 16px; text-align: center; background: #fff; border-radius: 14px; color: #536d82; }
.app-shell .staff-team .team-table-hint,.app-shell .staff-team .team-calculation-note { color: #546d80 !important; font-size: 12px !important; margin: 10px 0; }
.team-calculation-note { padding: 12px 16px; background: #edf7fd; border-radius: 10px; border-left: 3px solid #178dc6; }
.staff-team .team-table-scroll { width: 100%; max-width: 100%; overflow: auto !important; overscroll-behavior-x: contain; border: 1px solid #d8e5ee; border-radius: 14px; background: #fff; scrollbar-width: thin; }
.staff-team .team-table-scroll:focus-visible { outline: 2px solid #1389c0; outline-offset: 2px; }
.staff-team .team-table { display: table !important; width: 100%; min-width: 980px !important; border-collapse: collapse; table-layout: auto; font-size: 13px; }
.staff-team .team-table thead { display: table-header-group !important; }
.staff-team .team-table tbody { display: table-row-group !important; }
.staff-team .team-table tr { display: table-row !important; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.staff-team .team-table th,.staff-team .team-table td { display: table-cell !important; padding: 14px 16px !important; text-align: left; border: 0; border-bottom: 1px solid #e6eef4; color: #24455d !important; font-size: 13px !important; line-height: 1.5; vertical-align: middle; }
.staff-team .team-table th { background: #f0f7fb; color: #3b627d !important; font-size: 11px !important; font-weight: 800; white-space: nowrap; text-transform: none; }
.staff-team .team-table tr:last-child td { border-bottom: 0; }
.staff-team .team-table tbody tr:hover { background: #f7fbfe; }
.staff-team .team-table strong { display: block; color: #16374f !important; font-size: 13px !important; }
.staff-team .team-table small { display: block; color: #637789 !important; margin-top: 4px; font-size: 11px !important; }
.staff-team .team-table td::before { content: none !important; display: none !important; }
.staff-team .team-table .team-address { min-width: 180px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.staff-team .team-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.staff-team .team-table .team-net { font-weight: 800; color: #086c96 !important; }
.staff-team .team-table .team-account-status { color: #12704e !important; }
.staff-team .team-table .team-account-status.is-inactive { color: #6b7480 !important; }
.staff-team .team-table .team-adjusted { color: #0c72a5 !important; }
.staff-team .team-table td:last-child { white-space: nowrap; }
.staff-team .team-table td .team-button { padding: 8px 10px; margin: 2px 4px 2px 0; }
.staff-team .team-table .team-empty { text-align: center; padding: 35px !important; color: #597186 !important; white-space: normal; }
.team-dialog { width: min(650px,calc(100vw - 28px)); max-width: 650px; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #d4e4ee; border-radius: 18px; background: #fff; box-shadow: 0 24px 90px #071e4660; overflow: auto; }
.team-dialog::backdrop { background: #102c4bb3; backdrop-filter: blur(3px); }
.team-dialog-form { padding: 28px; position: relative; }
.team-dialog h2 { margin: 0 64px 8px 0; color: #17344c !important; font-size: 23px !important; line-height: 1.35; }
.team-dialog p { color: #546d80; font-size: 13px; }
.team-dialog header { margin-bottom: 22px; }
.team-dialog .team-dialog-close { position: absolute; top: 16px; right: 16px; padding: 10px; }
.team-dialog-close span { display: none !important; }
.team-form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.team-field-wide { grid-column: 1/-1; }
.staff-team .team-field,.team-dialog .team-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #35576e; font-size: 12px; font-weight: 700; }
.staff-team .team-field input,.team-dialog input,.team-dialog textarea,.team-dialog select { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border: 1px solid #cbdde8; border-radius: 10px; background: #fbfdff; color: #183b54; font: 500 14px/1.5 'Manrope',sans-serif; }
.team-dialog textarea { min-height: 80px; resize: vertical; }
.team-pay-total { align-self: end; padding: 13px; background: #e8f7fc; color: #075d85; border-radius: 10px; font-size: 14px; font-weight: 800; }
.team-form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.team-dialog .team-message:not(:empty) { margin-top: 18px; }
/* Attendance rows stay horizontal on both desktop and phones. Only their
   scroll container moves sideways; the page itself keeps the viewport width. */
.app-shell .attendance-portal-staff,.attendance-portal-staff .attendance-table-panel { min-width: 0; max-width: 100%; }
.attendance-portal-staff .attendance-table-scroll { overflow: auto !important; max-width: 100%; overscroll-behavior-x: contain; border: 1px solid #d8e6ef; border-radius: 12px; background: #fff; }
.attendance-portal-staff .attendance-data-table { display: table !important; width: 100%; min-width: 1000px !important; border-collapse: collapse; }
.attendance-portal-staff .attendance-data-table thead { display: table-header-group !important; }
.attendance-portal-staff .attendance-data-table tbody { display: table-row-group !important; }
.attendance-portal-staff .attendance-data-table tr { display: table-row !important; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.attendance-portal-staff .attendance-data-table th,.attendance-portal-staff .attendance-data-table td { display: table-cell !important; padding: 12px 14px !important; border: 0 !important; border-bottom: 1px solid #e5edf3 !important; color: #26495f; font-size: 12px !important; white-space: nowrap; vertical-align: middle; }
.attendance-portal-staff .attendance-data-table th { background: #eef7fc; font-size: 11px !important; }
.attendance-portal-staff .attendance-data-table td::before { content: none !important; display: none !important; }
.attendance-portal-staff .attendance-data-table td small { white-space: nowrap; }
.attendance-portal-staff .attendance-active-table { min-width: 650px !important; }
.attendance-portal-staff .attendance-active-panel { border: 1px solid #d9e7ef; border-radius: 12px; background: #fff; padding: 14px; }
.attendance-portal-staff .attendance-active-panel summary { color: #24536f; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px; }
.attendance-portal-staff .attendance-active-panel[open] summary { margin-bottom: 14px; }
/* Settings start as three text choices, with only the chosen form visible. */
#attendance-settings-panel .attendance-settings-menu { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
#attendance-settings-panel .attendance-settings-choice { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 100px; padding: 20px; border: 1px solid #d4e4ee; border-radius: 13px; background: #fff; color: #173f5b; text-align: left; cursor: pointer; box-shadow: 0 3px 15px #173d5e05; }
#attendance-settings-panel .attendance-settings-choice b { font-size: 16px !important; color: #163f5c !important; }
#attendance-settings-panel .attendance-settings-choice small { margin-top: 7px; font-size: 12px; color: #526c81 !important; }
#attendance-settings-panel .attendance-settings-choice:hover,#attendance-settings-panel .attendance-settings-choice:focus-visible { border-color: #0d8bc1; background: #f0faff; outline: 2px solid #6bc7ee; outline-offset: 2px; }
#attendance-settings-panel [hidden] { display: none !important; }
#attendance-settings-panel label { font-size: 13px; color: #34526a; }
#attendance-settings-panel input { font-size: 14px; }
#attendance-settings-panel p,#attendance-settings-panel .attendance-check small { font-size: 13px; color: #536b7d; }
#attendance-settings-panel .attendance-card-title h3 { font-size: 19px; }
#attendance-settings-panel .attendance-settings-back { justify-self: start; padding: 8px 0; border: 0; color: #087cac; background: transparent; font-weight: 700; font-size: 13px; cursor: pointer; }
@media(max-width:760px) {
 .attendance-portal-staff .attendance-period-toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; padding: 12px; }
 .attendance-portal-staff .attendance-period-heading,.attendance-portal-staff .attendance-period-actions,.attendance-portal-staff .attendance-period-label { grid-column: 1/-1; }
 .attendance-portal-staff .attendance-period-toolbar label { min-width: 0; width: 100%; }
 .attendance-portal-staff .attendance-period-toolbar input { min-width: 0; width: 100%; font-size: 14px; }
 .attendance-portal-staff .attendance-period-actions { display: flex; }
 .attendance-portal-staff .attendance-period-actions button { flex: 1; }
 .app-shell .content > .team-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; margin-bottom: 18px; }
 .app-shell .team-tabs > button { width: 100%; padding: 10px 8px; font-size: 12px; }
 .staff-team .team-heading { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
 .staff-team .team-heading-icon { flex-basis: 44px; height: 44px; border-radius: 12px; }
 .team-toolbar { gap: 12px; }
 .staff-team .team-search { width: 100%; }
 .team-period { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); width: 100%; }
 .team-period .team-button { grid-column: 1/-1; }
 .team-actions { gap: 7px; }
 .staff-team .team-actions .team-button { flex: 1 1 auto; padding: 10px; }
 .team-dialog-form { padding: 22px 18px; }
 .team-form-grid { grid-template-columns: minmax(0,1fr); }
 .team-dialog input,.team-dialog select,.team-dialog textarea,.staff-team .team-search input,.staff-team .team-field input { font-size: 16px; }
 .team-form-actions { justify-content: stretch; }
 .team-form-actions .team-button { flex: 1; }
 #attendance-settings-panel .attendance-settings-menu { grid-template-columns: 1fr; }
 #attendance-settings-panel .attendance-settings-choice { min-height: 88px; padding: 16px; }
 #attendance-settings-panel input { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) { .staff-team *,.team-dialog * { transition: none !important; } }
