/*
  Kebarick HR & Payroll premium visual layer.
  This file is intentionally loaded last so the full treatment can be reversed
  without changing any workflow or module stylesheet.
*/

:root {
  --premium-canvas: #f1f7f5;
  --premium-canvas-deep: #e7f1ee;
  --premium-surface: rgba(255, 255, 255, .97);
  --premium-surface-soft: rgba(247, 252, 250, .97);
  --premium-border: rgba(91, 137, 130, .22);
  --premium-border-strong: rgba(8, 127, 117, .30);
  --premium-shadow: 0 20px 55px rgba(20, 63, 59, .10), 0 3px 10px rgba(20, 63, 59, .05);
  --premium-shadow-soft: 0 10px 28px rgba(20, 63, 59, .075), 0 1px 3px rgba(20, 63, 59, .04);
  --premium-shadow-hover: 0 22px 42px rgba(20, 63, 59, .13), 0 4px 12px rgba(20, 63, 59, .06);
  --premium-radius: 17px;
  --premium-radius-small: 11px;
}

html {
  font-size: 16px;
  background: var(--premium-canvas);
}

body {
  color: var(--ink);
  background-color: var(--premium-canvas);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .055) 1px, transparent 0),
    linear-gradient(145deg, #f8fbfa 0%, #edf5f2 55%, #f5f9f8 100%);
  background-size: 23px 23px, auto;
  font-size: 13px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #fff;
  background: rgba(8, 127, 117, .84);
}

button,
input,
select,
textarea {
  font-family: 'DM Sans', sans-serif;
}

button,
a,
input,
select,
textarea,
summary {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease,
    box-shadow .18s ease, transform .18s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(11, 165, 150, .22);
  outline-offset: 2px;
}

/* Permanent navigation and top bar */
.sidebar {
  background-color: #092b2b;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(130, 219, 203, .105) 1px, transparent 0),
    radial-gradient(circle at 20% 8%, rgba(27, 168, 151, .26), transparent 28%),
    linear-gradient(175deg, #0b3836 0%, #082a2a 48%, #071f21 100%);
  background-size: 22px 22px, auto, auto;
  border-right: 1px solid rgba(164, 224, 214, .10);
  box-shadow: 16px 0 42px rgba(8, 37, 37, .12);
}

.brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(210, 244, 238, .10);
}

.brand-mark {
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.brand strong {
  font-size: 14px;
  letter-spacing: .025em;
}

.brand small,
.facility small,
.sidebar-foot small {
  font-size: 9.5px;
}

.facility {
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid rgba(198, 239, 232, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

nav button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12.5px;
  letter-spacing: .004em;
}

nav button:hover {
  border-color: rgba(202, 239, 233, .08);
  background: rgba(255, 255, 255, .075);
  transform: translateX(2px);
}

nav button.active {
  position: relative;
  overflow: hidden;
  color: #fff !important;
  background-color: #08776f;
  background-image: none;
  border-color: rgba(205, 246, 239, .30);
  box-shadow: 0 5px 13px rgba(2, 29, 29, .15), inset 0 1px 0 rgba(255, 255, 255, .14);
  text-shadow: none;
  transform: none;
  filter: none;
  opacity: 1 !important;
}

nav button.active:disabled {
  cursor: default;
  color: #fff !important;
  opacity: 1 !important;
}

nav button.active .ico,
nav button.active span {
  color: #fff !important;
  opacity: 1 !important;
}

nav button.active::before {
  content: '';
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 4px;
  border-radius: 999px;
  background: #c9fff5;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

nav button span:first-child {
  font-size: 15px;
}

.topbar {
  min-height: 72px;
  background: rgba(255, 255, 255, .90);
  border-bottom: 1px solid rgba(81, 129, 122, .15);
  box-shadow: 0 8px 28px rgba(25, 68, 64, .055);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.crumb strong {
  font-size: 13px;
}

.crumb small,
.profile small {
  font-size: 9.5px;
}

.profile strong {
  font-size: 11px;
}

.search {
  min-height: 39px;
  border-color: var(--premium-border);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 16px rgba(24, 68, 64, .055), inset 0 1px 0 #fff;
}

.search input {
  font-size: 11.5px;
}

.icon-btn {
  min-width: 39px;
  min-height: 39px;
  border-radius: 11px;
  border-color: var(--premium-border);
  background: linear-gradient(145deg, #fff, #f4f9f7);
  box-shadow: 0 5px 14px rgba(24, 68, 64, .05);
}

.icon-btn:hover {
  border-color: var(--premium-border-strong);
  box-shadow: 0 9px 20px rgba(24, 68, 64, .09);
  transform: translateY(-1px);
}

/* Application canvas and page introductions */
main {
  background-color: var(--premium-canvas);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(103, 208, 189, .16), transparent 24%),
    radial-gradient(circle at 89% 16%, rgba(69, 126, 211, .07), transparent 23%),
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .038) 1px, transparent 0);
  background-size: auto, auto, 23px 23px;
}

#app {
  position: relative;
}

.page-head {
  min-height: 126px;
  margin-bottom: 22px;
  padding: 23px 25px;
  border: 1px solid var(--premium-border);
  border-radius: 19px;
  background-color: rgba(255, 255, 255, .94);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .07) 1px, transparent 0),
    radial-gradient(circle at 92% 20%, rgba(67, 193, 174, .20), transparent 27%),
    linear-gradient(135deg, rgba(255, 255, 255, .99), rgba(231, 246, 241, .98));
  background-size: 19px 19px, auto, auto;
  box-shadow: var(--premium-shadow-soft);
}

.page-head h1 {
  margin-top: 3px;
  font-size: clamp(25px, 2.15vw, 31px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.page-head p {
  max-width: 760px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .13em;
}

.head-actions {
  gap: 9px;
}

.btn {
  min-height: 39px;
  padding: 10px 14px;
  border-radius: 10px;
  border-color: var(--premium-border);
  background: linear-gradient(145deg, #fff, #f4f9f7);
  box-shadow: 0 4px 12px rgba(24, 68, 64, .045);
  font-size: 11.5px;
  font-weight: 700;
}

.btn:hover:not(:disabled) {
  border-color: var(--premium-border-strong);
  box-shadow: 0 9px 19px rgba(24, 68, 64, .09);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: rgba(4, 103, 96, .86);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .11) 1px, transparent 0),
    linear-gradient(135deg, #0aa091, #08756d);
  background-size: 17px 17px, auto;
  box-shadow: 0 9px 20px rgba(8, 127, 117, .18), inset 0 1px 0 rgba(255, 255, 255, .19);
}

/* Reusable cards, summaries and content surfaces */
.panel,
.stat,
.quick,
.module-card,
.compliance-card,
.ops-summary-card,
.enterprise-card,
.enterprise-report-card,
.enterprise-setting,
.leave-balance-card,
.leave-policy-note,
.payroll-readiness,
.payroll-control-strip,
.report-preview-summary,
.gate-pass-card,
.daily-department-card {
  border-color: var(--premium-border);
  background-color: var(--premium-surface);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .027) 1px, transparent 0),
    linear-gradient(150deg, rgba(255, 255, 255, .99), rgba(247, 252, 250, .98));
  background-size: 22px 22px, auto;
  box-shadow: var(--premium-shadow-soft);
}

.panel,
.module-card,
.compliance-card,
.enterprise-card,
.enterprise-report-card,
.gate-pass-card,
.daily-department-card {
  border-radius: var(--premium-radius);
}

.stat,
.quick,
.ops-summary-card,
.enterprise-setting,
.leave-balance-card,
.leave-policy-note,
.payroll-readiness,
.payroll-control-strip {
  border-radius: 14px;
}

.stat:hover,
.quick:hover,
.module-card:hover,
.enterprise-card:hover,
.enterprise-report-card:hover {
  border-color: var(--premium-border-strong);
  box-shadow: var(--premium-shadow-hover);
  transform: translateY(-2px);
}

.panel-head {
  min-height: 62px;
  padding: 15px 18px;
  border-bottom-color: rgba(91, 137, 130, .14);
  background-color: rgba(244, 250, 248, .82);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .055) 1px, transparent 0),
    linear-gradient(120deg, rgba(239, 249, 246, .86), rgba(255, 255, 255, .72));
  background-size: 18px 18px, auto;
}

.panel-head h2 {
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.012em;
}

.panel-head p {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
}

.panel-body {
  padding: 18px;
  font-size: 12px;
}

.stat {
  min-height: 114px;
  padding: 17px;
}

.stat > small,
.ops-summary-card small,
.enterprise-summary small,
.leave-balance-card small {
  font-size: 9.5px;
  letter-spacing: .065em;
}

.stat strong {
  margin-top: 7px;
  font-size: 27px;
  letter-spacing: -.035em;
}

.stat em,
.ops-summary-card em {
  font-size: 10px;
  line-height: 1.4;
}

.ops-summary-card {
  padding: 16px;
}

.ops-summary-card strong {
  font-size: 17px;
}

.quick,
.module-card,
.enterprise-card,
.enterprise-report-card {
  padding: 17px;
}

.quick strong,
.module-card h3,
.enterprise-card h3,
.enterprise-report-card h3,
.compliance-card h3 {
  font-size: 13px;
  line-height: 1.35;
}

.quick small,
.module-card p,
.enterprise-card p,
.enterprise-report-card p,
.compliance-card p {
  font-size: 10.5px;
  line-height: 1.55;
}

.alert,
.integration-note,
.risk-banner,
.admin-note,
.enterprise-note,
.enterprise-modal-note,
.employee-info-box,
.import-preserve-banner {
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65);
}

.alert strong,
.integration-note strong,
.risk-banner strong,
.admin-note strong {
  font-size: 11.5px;
}

.alert p,
.integration-note p,
.risk-banner p,
.admin-note p {
  font-size: 10.5px;
  line-height: 1.55;
}

.tag,
.status,
.device-badge,
.enterprise-badge {
  min-height: 24px;
  padding: 5px 9px;
  font-size: 9.5px;
  letter-spacing: .02em;
}

/* Tables and analytical views */
.ops-table-wrap,
.enterprise-table-wrap,
.payroll-lines-wrap,
.monthly-roster-scroll,
.report-preview-table {
  border-color: var(--premium-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: inset 0 1px 0 #fff, 0 5px 16px rgba(24, 68, 64, .045);
}

table {
  font-size: 11.5px;
}

th {
  padding-top: 11px;
  padding-bottom: 11px;
  background-color: #edf6f3;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .055) 1px, transparent 0),
    linear-gradient(180deg, #f4faf8, #eaf4f1);
  background-size: 17px 17px, auto;
  color: #385551;
  font-size: 9.5px;
  letter-spacing: .045em;
  line-height: 1.35;
}

td {
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 11.5px;
  line-height: 1.42;
}

tbody tr:nth-child(even) {
  background: rgba(239, 247, 244, .38);
}

tbody tr:hover {
  background: rgba(220, 242, 235, .56);
}

.person strong,
.employee-name {
  font-size: 11.5px;
}

.person small,
.employee-no,
.employee-position,
.ss-muted,
.notify-empty {
  font-size: 9.5px;
  line-height: 1.45;
}

.report-card-actions,
.report-preview-downloads,
.payroll-output-actions {
  gap: 8px;
}

.report-preview-summary {
  padding: 13px 15px;
  font-size: 10.5px;
}

/* Forms, settings and employee records */
.form-field label,
.employee-fields label > span,
.employee-upload-grid label > span,
.roster-toolbar-fields label > span,
.payroll-period-controls label > span,
.enterprise-setting label {
  margin-bottom: 6px;
  color: #3c5551;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .055em;
}

.form-field input,
.form-field select,
.form-field textarea,
.employee-fields input,
.employee-fields select,
.employee-fields textarea,
.roster-toolbar input,
.roster-toolbar select,
.filter-row input,
.filter-row select,
.enterprise-filter input,
.enterprise-filter select,
.payroll-period-controls input,
.payroll-period-controls select {
  min-height: 40px;
  border-color: var(--premium-border);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: inset 0 1px 2px rgba(24, 68, 64, .025), 0 1px 0 #fff;
  color: var(--ink);
  font-size: 12px;
}

.form-field textarea,
.employee-fields textarea {
  min-height: 86px;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.employee-fields input:focus,
.employee-fields select:focus,
.employee-fields textarea:focus {
  border-color: #38a99d;
  box-shadow: 0 0 0 4px rgba(8, 127, 117, .10), 0 7px 18px rgba(24, 68, 64, .06);
}

.employee-form-head,
.employee-record-head,
.complete-import-head {
  background-color: #f4faf8;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .065) 1px, transparent 0),
    linear-gradient(120deg, #eff9f6, #fff);
  background-size: 18px 18px, auto;
}

.employee-form-kicker {
  font-size: 9.5px;
}

.employee-form-head p,
.employee-record-head p,
.complete-import-head p {
  font-size: 11px;
}

.employee-stepper {
  background-color: #f1f8f6;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .045) 1px, transparent 0),
    linear-gradient(180deg, #f5faf8, #ecf6f3);
  background-size: 19px 19px, auto;
}

.employee-stepper button {
  min-height: 40px;
  font-size: 10.5px;
}

.employee-stepper button.active {
  background: linear-gradient(135deg, #dff4ef, #edf9f6);
  box-shadow: inset 0 0 0 1px rgba(8, 127, 117, .11);
}

.employee-section-title h3 {
  font-size: 19px;
}

.employee-section-title p,
.employee-subsection > div:first-child p,
.employee-info-box p,
.employee-check small,
.employee-review-item small,
.employee-record-list small {
  font-size: 9.5px;
}

.employee-subsection > div:first-child h4,
.employee-info-box strong,
.employee-check strong,
.employee-review-item strong,
.employee-record-list strong {
  font-size: 10.5px;
}

.employee-record-section,
.employee-record-banner,
.employee-review-hero,
.employee-review-item,
.employee-upload-grid label,
.complete-import-drop {
  border-color: var(--premium-border);
  background-image: linear-gradient(145deg, #fff, #f8fcfa);
  box-shadow: var(--premium-shadow-soft);
}

.employee-record-section h3 {
  font-size: 12px;
  background: #f3f9f7;
}

.employee-record-grid small {
  font-size: 8.5px;
}

.employee-record-grid strong,
.employee-record-banner > div:last-child strong {
  font-size: 10px;
}

/* Roster, leave and payroll workspaces */
.roster-toolbar,
.payroll-period-controls,
.enterprise-filter {
  border-radius: var(--premium-radius);
  background-color: rgba(255, 255, 255, .96);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .04) 1px, transparent 0),
    linear-gradient(135deg, #fff, #f1f9f6);
  background-size: 20px 20px, auto;
  box-shadow: var(--premium-shadow-soft);
}

.roster-period-state span,
.payroll-policy-grid small,
.leave-policy-checks,
.leave-quote-grid small {
  font-size: 9.5px;
}

.roster-period-state strong,
.payroll-policy-grid strong,
.leave-quote-grid strong {
  font-size: 11px;
}

.roster-legend span {
  min-height: 25px;
  padding: 5px 9px;
  font-size: 9px;
}

.roster-cell select,
.roster-date-control {
  min-height: 34px;
  border-radius: 8px;
  font-size: 10px;
}

.leave-manager-summary,
.leave-statement-summary,
.payroll-basis-grid,
.payroll-policy-grid,
.payroll-rate-list,
.payroll-output-list {
  font-size: 11px;
}

.leave-balance-card strong,
.enterprise-summary strong {
  font-size: 18px;
}

/* Modal windows and sign-in */
.modal-backdrop {
  background-color: rgba(5, 31, 31, .58);
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .055) 1px, transparent 0);
  background-size: 21px 21px;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.modal-card {
  border: 1px solid rgba(181, 223, 216, .42);
  border-radius: 20px;
  background: linear-gradient(155deg, #fff, #f8fcfa);
  box-shadow: 0 34px 100px rgba(2, 31, 30, .30), 0 6px 24px rgba(2, 31, 30, .15);
}

.modal-head {
  min-height: 68px;
  padding: 17px 20px;
  background-color: #f2faf7;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .065) 1px, transparent 0),
    linear-gradient(120deg, #eaf7f3, #fff);
  background-size: 18px 18px, auto;
}

.modal-head h2 {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.modal-head p {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
}

.modal-body {
  padding: 20px;
  font-size: 12px;
}

.modal-foot {
  min-height: 65px;
  padding: 13px 20px;
  border-top-color: var(--premium-border);
  background: rgba(247, 251, 250, .94);
  box-shadow: 0 -7px 20px rgba(24, 68, 64, .035);
}

.login-screen {
  background-color: #072d2c;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(156, 226, 214, .11) 1px, transparent 0),
    radial-gradient(circle at 16% 15%, rgba(23, 170, 151, .35), transparent 27%),
    radial-gradient(circle at 88% 80%, rgba(58, 118, 199, .16), transparent 29%),
    linear-gradient(140deg, #061f20, #0a3d39 58%, #076d63);
  background-size: 23px 23px, auto, auto, auto;
}

.login-card {
  border: 1px solid rgba(200, 239, 232, .18);
  border-radius: 25px;
  background: rgba(250, 253, 252, .98);
  box-shadow: 0 38px 110px rgba(0, 18, 18, .42), 0 6px 24px rgba(0, 18, 18, .22);
}

.login-art {
  background-color: #075a55;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .10) 1px, transparent 0),
    radial-gradient(circle at 18% 18%, rgba(67, 213, 190, .24), transparent 28%),
    linear-gradient(155deg, #0a8179, #064641 70%, #063735);
  background-size: 19px 19px, auto, auto;
}

.login-art h1 {
  font-size: 38px;
  letter-spacing: -.035em;
}

.login-art p {
  font-size: 13px;
}

.login-cycle {
  font-size: 10px;
}

.login-form {
  background-color: #fbfdfc;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(8, 127, 117, .038) 1px, transparent 0),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(244, 250, 248, .98));
  background-size: 21px 21px, auto;
}

.login-form h2 {
  font-size: 25px;
}

.login-form > p {
  font-size: 11px;
}

.login-role {
  min-height: 53px;
  border-color: var(--premium-border);
  border-radius: 12px;
  padding: 11px 12px;
  background: linear-gradient(145deg, #fff, #f6faf9);
  box-shadow: 0 4px 13px rgba(24, 68, 64, .045);
  font-size: 11.5px;
}

.login-role small {
  font-size: 9px;
}

.login-role:hover,
.login-role.active {
  border-color: rgba(8, 127, 117, .42);
  background: linear-gradient(135deg, #e5f6f2, #f4fbf9);
  box-shadow: 0 8px 20px rgba(8, 127, 117, .10);
  transform: translateY(-1px);
}

.login-input {
  min-height: 43px;
  border-color: var(--premium-border);
  border-radius: 11px;
  background: #fff;
  font-size: 12px;
}

.login-help,
.login-error {
  font-size: 10px;
  line-height: 1.45;
}

.toast {
  border: 1px solid rgba(185, 225, 218, .21);
  border-radius: 13px;
  box-shadow: 0 18px 45px rgba(0, 29, 28, .24);
  font-size: 11.5px;
}

@media (max-width: 900px) {
  .page-head {
    align-items: flex-start;
    min-height: 116px;
    padding: 21px;
  }

  .head-actions {
    flex-wrap: wrap;
  }

  .panel-head {
    padding: 14px 16px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 66px;
  }

  .page-head {
    min-height: 0;
    padding: 18px;
    border-radius: 16px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .page-head p {
    font-size: 12px;
  }

  .panel,
  .module-card,
  .enterprise-card,
  .enterprise-report-card {
    border-radius: 14px;
  }

  .modal-card {
    border-radius: 17px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  table,
  td {
    font-size: 10.5px;
  }

  .login-form h2 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
