/* Shared presentation, after each role's layout and selected colour scheme. */
body { font-family: var(--bnk-font-sans); font-weight: var(--weight-body); }
body :where(strong, b, th) { font-weight: var(--weight-emphasis); }
body :is(h2, h3, h4, legend) { font-weight: var(--weight-label); }
body main :is(.page-header h1, .admin-dashboard__header h1, .employee-mobile-welcome h1, .cal-heading h1, .login-heading h1),
.login-shell .login-context h2, .account-security h1 {
  font-weight: var(--weight-display);
  letter-spacing: -.025em;
  line-height: 1.14;
}
body.admin-shell main :is(.page-header h1, .admin-dashboard__header h1, .cal-heading h1) {
  font-size: clamp(1.8rem, 2.1vw + .5rem, 2.6rem);
  color: var(--bnk-text-primary);
}
body.admin-shell :is(.eyebrow,.admin-eyebrow,.login-eyebrow) { font-weight: var(--weight-label); letter-spacing: .115em; }
body.admin-shell main :is(h2, .admin-panel h2) { font-size: clamp(1.06rem, 1.2vw, 1.28rem); letter-spacing: -.015em; }
body.admin-shell .admin-container { padding-top: 0; min-width: 0; }
.admin-shell .admin-sidebar {
  background-color: #0a1826;
  background-image:
    linear-gradient(180deg, #0d1c2b 2%, rgba(8,22,36,.95) 34%, rgba(8,22,36,.64) 62%, rgba(6,19,30,.24) 88%, rgba(5,16,27,.75)),
    url("../images/metallfasade.c4510479526e.webp");
  background-size: cover, auto 100%;
  background-repeat: no-repeat;
  background-position: center, center bottom;
  box-shadow: 2px 0 12px #06121c30;
}
.admin-sidebar__header { min-height: 78px; }
.admin-brand img { width: 172px; }
.admin-shell .admin-nav a { font-weight: var(--weight-label); color: #e3ebf2; }
.admin-shell .admin-nav a.is-active {
  color: #ffe5b5;
  border-color: #b5873b;
  background: linear-gradient(100deg, rgba(164,117,49,.48), rgba(82,64,42,.64));
  box-shadow: inset 0 1px 1px #f4d89735;
}
.admin-nav__group > p { font-weight: var(--weight-label); color: #afbdcc; }
.admin-sidebar__footer { background: rgba(8,21,33,.85); }
.admin-sidebar__credits { color:#a4b4c2; }
.workspace-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; gap: 1rem; border-bottom: 1px solid var(--bnk-border-subtle);
  margin-bottom: clamp(16px,2vh,25px); color: var(--bnk-text-secondary);
  font-size: .84rem;
}
.workspace-bar nav, .workspace-user { display: flex; align-items: center; gap: .8rem; }
.workspace-bar nav span:last-child { color: var(--bnk-gold-300); }
.workspace-bar nav span[aria-hidden] { color: var(--bnk-text-muted); }
.workspace-bar a { color: inherit; text-decoration: none; }
.workspace-bar a:hover { text-decoration: underline; text-underline-offset: .2em; }
.workspace-user .admin-avatar { width: 32px; height: 32px; border-radius: 50%; }
.workspace-user small { display: block; color: var(--bnk-text-muted); font-size: .7rem; }
.admin-shell .page-header, .admin-dashboard__header { text-shadow: none; }
.admin-shell .page-header .muted { margin: .35rem 0; line-height: 1.5; }
.admin-shell :is(.card, .admin-panel, .update-summary-card, .payroll-confirmation-dialog, .cal-sheet, .rules-panel) {
  background: linear-gradient(150deg,rgba(212,219,225,.055), transparent 42%), var(--bnk-surface-glass);
  border: 1px solid var(--bnk-border-subtle); border-radius: var(--panel-radius);
  box-shadow: var(--bnk-shadow-card);
}
body.admin-shell main :is(.button,.bnk-gold-button) { font-weight: var(--weight-label); border-radius: 7px; }
.admin-shell main :is(.button,.admin-settings-tabs a):focus-visible,
.rules-layout input:focus-visible { outline: 2px solid var(--bnk-gold-300); outline-offset: 3px; }
.admin-dashboard { gap: var(--workspace-gap); }
.admin-panel__header { padding-bottom: .65rem; }
.admin-shell .admin-period-selector { padding: 0; background: transparent; box-shadow: none; border: 0; backdrop-filter: none; }
.admin-shell .admin-metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(135px,100%),1fr)); gap: 0;
  overflow: hidden; border: 1px solid var(--bnk-border-subtle);
  border-radius: var(--panel-radius); background: var(--bnk-surface-glass);
}
body.admin-shell main .admin-metric-card {
  padding: .85rem; min-height: 94px; border: 0; border-right: 1px solid var(--bnk-border-subtle);
  border-radius: 0; box-shadow: none; backdrop-filter: none; background: transparent;
}
.admin-metric-card::after { content: none; }
.admin-metric-card:last-child { border-inline-end: 0; }
.admin-metric-card > span { min-height: 1em; font-size: .75rem; }
.admin-metric-card > strong { font-weight: var(--weight-body); font-size: clamp(1.1rem,1.55vw,1.65rem); }
.admin-metric-card > small { font-size: .72rem; }
.admin-shell .work-calendar { max-width: 70rem; margin-inline: 0; }
.admin-shell .admin-settings-tabs {
  display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0 0 var(--workspace-gap);
  padding: 0; border: 0; border-bottom: 1px solid var(--bnk-border-subtle);
  border-radius: 0; background: transparent;
}
.admin-shell .admin-settings-tabs a {
  padding: .65rem .5rem; border-radius: 0; border-bottom: 2px solid transparent;
  font-size: .86rem; color: var(--bnk-text-secondary);
}
.admin-shell .admin-settings-tabs a.is-active { border-color: var(--bnk-gold-400); color: var(--bnk-gold-300); background: transparent; }
.admin-shell .admin-settings-tabs a:hover { background: var(--bnk-gold-soft); }
.rules-layout {
  display: grid; gap: var(--workspace-gap); align-items: start;
  grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) minmax(245px,.85fr);

}
.rules-column { display: grid; gap: var(--workspace-gap); min-width: 0; }
.rules-standards a { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding-block: .52rem; text-decoration: none; font-size: .86rem; color: var(--bnk-text-secondary); border-top: 1px solid var(--bnk-border-subtle); }
.rules-standards a:hover { color: var(--bnk-gold-300); }
.rules-standards a strong { font-weight: var(--weight-label); }
.rules-standards small { color: var(--bnk-text-muted); font-size: .77rem; }
.preview-choice,.preview-start { display: block; padding: .4rem; border: 1px solid #394b55; border-radius: 5px; }
.preview-start { background: #174c3e; color: #e0f1e9; border-color: #38765f; text-align:center; }
.rules-foot { grid-column: 1 / 3; display: flex; align-items: center; gap: .7rem; justify-content: space-between; flex-wrap: wrap; }
.rules-foot .muted { font-size: .77rem; }
.rules-panel { min-width: 0; padding: clamp(15px,1.3vw,22px); }
.rules-panel h2 { display: flex; align-items: center; gap: .65rem; margin: 0 0 .55rem; }
.rules-panel h2 svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--bnk-gold-300); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rules-panel p { color: var(--bnk-text-secondary); margin: .3rem 0 1rem; font-size: .84rem; line-height: 1.45; }
.setting-row { padding: .55rem 0; border-top: 1px solid var(--bnk-border-subtle); }
.setting-row:first-of-type { border: 0; }
.setting-row:last-child { padding-bottom: 0; }
.admin-shell .setting-row label {
  display: flex; justify-content: space-between; align-items: center; gap: .65rem;
  font-size: .9rem; line-height: 1.35; font-weight: var(--weight-label);
  color: var(--bnk-text-primary); cursor: pointer;
}
.setting-row small { display: block; margin-top: .2rem; color: var(--bnk-text-muted); font-size: .77rem; line-height: 1.4; }
.admin-shell .setting-row input[role=switch] {
  position: relative; appearance: none; flex: none; width: 37px; height: 22px;
  margin: 0; padding: 0; border-radius: 20px; border: 1px solid #72808a; background: #445361; cursor: pointer;
}
.setting-row input::before {
  position: absolute; inset: 2px auto auto 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #f7f5ee; box-shadow: 0 1px 3px #19263866; content: "";
}
.admin-shell .setting-row input:checked { background: linear-gradient(100deg,#a87528,#d29e4b); border-color: #c59852; }
.setting-row input:checked::before { transform: translateX(15px); }
.preview-device {
  display: grid; align-content: start; gap: .9rem; width: min(100%,230px); margin: 1.05rem auto .5rem;
  padding: 1.7rem .8rem; border-radius: 30px; border: 3px solid #837c6c;
  background: linear-gradient(170deg,#253645 0,#0a1824 28%,#081521 80%);
  box-shadow: inset 0 0 0 2px #040b11, 0 5px 12px #0002; color: #e4eaf0;
  min-height: 310px; font-size: .76rem;
}
.preview-device img { width: 102px; height: auto; margin-bottom: .3rem; }
.preview-device time { font-weight: var(--weight-display); font-size: 1.15rem; }
.preview-section { display: grid; gap: .48rem; padding-top: .75rem; border-top: 1px solid #39444c; }
.preview-device strong { font-weight: var(--weight-label); color: #edf0f2; }
.preview-periods { display: flex; justify-content: space-between; gap: .2rem; }
.preview-periods span { font-size: .6rem; color: #c6d2db; }
.preview-periods b { display: block; margin-top: .2rem; font-size: .74rem; color: #f0d7a9; }
.preview-manual { justify-self: start; border-radius: 5px; color: #18222a; background: #ddc492; padding: .3rem .55rem; }
.rules-layout:not(:has([name=clock_enabled]:checked)) .preview-clock,
.rules-layout:not(:has([name=show_bonus_month]:checked,[name=show_bonus_year]:checked)) .preview-bonus,
.rules-layout:not(:has([name=show_bonus_month]:checked)) .preview-month,
.rules-layout:not(:has([name=show_bonus_year]:checked)) .preview-year { display: none; }
body.admin-shell main table { font-variant-numeric: tabular-nums; }
body.admin-shell main tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bnk-text-primary) 3%, transparent); }
body.admin-shell main tbody tr:has(input[type=checkbox]:checked) { background: var(--bnk-gold-soft); }
body.admin-shell main td { font-size: .81rem; }
body.admin-shell main th { font-size: .77rem; text-transform: none; letter-spacing: .01em; font-weight: var(--weight-label); }
body.admin-shell main :is(tbody strong,td b) { font-weight: var(--weight-label); }
body.admin-shell main :is(th.numeric,td.numeric,td[data-label="Netto"],td[data-label="Pause"]) { text-align: right; }
@media (min-width: 901px) {
  body.admin-shell main :is(th,td) { padding-block: .46rem; border-color: var(--bnk-border-subtle); }
  body.admin-shell main td.actions .button.small { min-height: 30px; }
}
@media (min-width:1081px) {
  .admin-shell .admin-container { width: 100%; max-width: 1670px; padding-inline: var(--workspace-pad); }
  .admin-shell .admin-nav { gap: 13px; padding: 15px 13px; }
  .admin-nav__group { gap: 1px; }
  .admin-nav__group > p { margin-bottom: 4px; }
  .admin-shell .admin-nav a { min-height: 32px; padding: 5px 11px; font-size: .86rem; border-radius: 8px; }
  .admin-shell .admin-nav svg { width: 17px; height: 17px; stroke-width: 1.5; }
}
@media (min-width:681px) and (max-width:1180px) {
  .rules-preview { grid-column: 2; grid-row: 2 / 4; }
  .rules-foot { grid-column: 1; }
  .rules-layout { grid-template-columns: repeat(2,minmax(0,1fr));  }
}
@media (max-width:1080px) {
  .workspace-bar { display: none; }
  body.admin-shell .admin-container { padding-top: 1.15rem; }
  .admin-shell .admin-sidebar { background-color: #0c1b29; background-size: cover,cover; }
  .admin-shell .admin-sidebar__header { min-height: 62px; }
}
@media (max-width:680px) {
  .rules-layout { grid-template-columns: minmax(0,1fr);  }
  .setting-row label { min-height: 44px; }
  .rules-foot { grid-column: 1; }
  .rules-foot button { width: 100%; }
  .admin-settings-tabs a { min-height: 44px; }
  .admin-shell .admin-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.admin-shell main .admin-metric-card { border-bottom: 1px solid var(--bnk-border-subtle); }
}
@media (forced-colors:active) {
  .admin-shell .setting-row input[role=switch] { appearance: auto; }
  .setting-row input::before { display:none; }
}

.level-switch,.row-shortcuts { display:flex; align-items:center; gap:.3rem; flex-wrap:nowrap; }
.level-switch { margin:.6rem 0; flex-wrap:wrap; }
.level-switch > span { margin-right:.4rem; color:var(--bnk-text-muted); }
.level-switch button,.row-shortcuts > :is(a,button,span) {
  border:1px solid var(--bnk-border-subtle); background:var(--bnk-midnight-800); color:var(--bnk-text-primary);
  border-radius:6px; padding:.28rem .6rem; font:inherit; font-size:.86rem;
}
.level-switch [aria-pressed=true] { color:var(--bnk-gold-300); border-color:var(--bnk-border-gold); }
.row-shortcuts > :is(a,button,span) { display:inline-grid; place-items:center; min-width:26px; min-height:26px; padding:0; }
.row-shortcuts [aria-disabled=true] { opacity:.55; }
.row-shortcuts .positive { color:var(--bnk-success); }
.admin-shell main .review-table { width:100%; table-layout:auto; min-width:0; }
.admin-shell main .review-table :is(th,td) { padding:.37rem .45rem; font-weight:400; vertical-align:middle; }
.review-table[data-level=compact] :is(th,td),.review-table[data-level=standard] :is(th,td) { white-space:nowrap; }
.admin-shell main .admin-time-table:not([data-level=detailed]) :is(th,td):is(:nth-child(5),:nth-child(7)),
.admin-shell main .billing-results:not([data-level=detailed]) :is(th,td):is(:nth-child(6),:nth-child(9)),
.admin-shell main .admin-time-table[data-level=compact] :is(th,td):nth-child(4),
.admin-shell main .billing-results[data-level=compact] :is(th,td):nth-child(5),
.admin-time-table:not([data-level=detailed]) .admin-time-table__statuses > :not(:first-child) { display:none; }
.row-shortcuts .admin-row-menu { width:auto; }
.row-shortcuts .admin-row-menu > summary { min-width:26px; padding:.2rem; }
.review-table dialog { max-width:min(38rem,90vw); color:var(--bnk-text-primary); background:var(--bnk-midnight-900); border:1px solid var(--bnk-border-subtle); border-radius:10px; }
.review-table dialog::backdrop { background:#071625a3; }
.review-table .detail-trigger { padding:0; font:inherit; color:var(--bnk-gold-300); background:transparent; border:0; cursor:pointer; }
@media (max-width:850px) {
 .admin-shell main .admin-time-table:not([data-level=detailed]) { display:table; }
 .admin-shell main .admin-time-table:not([data-level=detailed]) :is(thead,tbody) { display:table-row-group; }
 .admin-shell main .admin-time-table:not([data-level=detailed]) tr { display:table-row; }
 .admin-shell main .admin-time-table:not([data-level=detailed]) :is(td,th) { display:table-cell; }
 .admin-shell main .admin-time-table:not([data-level=detailed]) td::before { display:none; }
 .admin-shell main .review-table:not([data-level=detailed]) :is(td,th) { max-width:14rem; white-space:nowrap; }
 .admin-shell main .review-table:not([data-level=detailed]) :is(td,th) > a { display:inline-block; max-width:12rem; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
 .admin-shell main .admin-time-table:not([data-level=detailed]) .admin-time-table__statuses > :not(:first-child) { display:none; }
}

