/* =========================================
   ABSENVIA BY AUTHENTRIQ
   Light · Sage green · Grey
   ========================================= */

:root {
  color-scheme: light;

  --background: #f5f7f5;
  --surface: #ffffff;
  --surface-soft: #f9faf9;

  --sage-light: #e8efe9;
  --sage: #526d59;
  --sage-dark: #364b3c;

  --text: #28312c;
  --muted: #66716a;
  --border: #dce3dd;

  --warning-background: #f7f1e4;
  --warning-text: #796132;

  --danger-background: #faeeee;
  --danger-text: #9a4545;

  --radius: 12px;
  --shadow: 0 8px 30px rgba(40, 49, 44, 0.035);
}


/* =========================================
   BASE
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--sage-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.25;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -1.4px;
}

h2 {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.45px;
}

h3 {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
}

p {
  margin-bottom: 16px;
}

button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}

:focus-visible {
  outline: 3px solid #8da594;
}

::selection {
  background: #d8e6db;
  color: var(--sage-dark);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* =========================================
   APPLICATION LAYOUT
   ========================================= */

.app-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 36px 22px 24px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.brand {
  display: block;
  margin: 0 12px 40px;
  color: var(--sage-dark);
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1.3px;
  line-height: 1.2;
  text-decoration: none;
}

.brand span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
}

.navigation-label {
  margin: 0 12px 12px;
  color: #879188;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-bottom: 30px;
}

.nav-link {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--sage-dark);
}

.nav-link.active,
.nav-link[aria-current="page"] {
  background: var(--sage-light);
  color: var(--sage-dark);
  font-weight: 600;
}

.sidebar-note {
  margin-top: auto;
  padding: 20px 12px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.sidebar-note strong {
  display: block;
  margin-bottom: 7px;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 600;
}

.sidebar-note p {
  margin-bottom: 0;
}

.main-content {
  width: 100%;
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto;
  padding: 48px;
}

.app-view {
  min-width: 0;
}


/* =========================================
   PAGE HEADERS
   ========================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.page-header > div:first-child {
  max-width: 680px;
}

.page-header p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}


/* =========================================
   BUTTONS
   ========================================= */

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.primary-button {
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--sage);
  background: var(--sage);
  color: #ffffff;
}

.primary-button:hover {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

.secondary-button {
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--sage-dark);
}

.secondary-button:hover {
  border-color: #b8c8bc;
  background: var(--sage-light);
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--sage);
}

.text-button:hover {
  color: var(--sage-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

#view-profile > .text-button {
  margin-bottom: 22px;
}

.icon-button {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 24px;
  font-weight: 400;
}

.icon-button:hover {
  background: var(--sage-light);
  color: var(--sage-dark);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:disabled:hover {
  transform: none;
}

.primary-button:disabled:hover {
  background: var(--sage);
  border-color: var(--sage);
}

.secondary-button:disabled:hover {
  background: var(--surface);
  border-color: var(--border);
}


/* =========================================
   SUMMARY CARDS
   ========================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card > p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stat-card > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--sage-dark);
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -1.8px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stat-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}


/* =========================================
   PANELS
   ========================================= */

.panel {
  min-width: 0;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-header h2 {
  margin-bottom: 0;
}

.panel-header > label {
  width: 140px;
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.dashboard-grid > .panel {
  height: calc(100% - 24px);
}


/* =========================================
   BADGES
   ========================================= */

.subtle-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.status-badge.pending,
.status-badge.draft,
.status-badge[data-status="Pending"],
.status-badge[data-status="draft"] {
  background: var(--warning-background);
  color: var(--warning-text);
}

.status-badge.declined,
.status-badge[data-status="Declined"] {
  background: var(--danger-background);
  color: var(--danger-text);
}

.status-badge.archived,
.status-badge[data-status="archived"] {
  background: #edf0ed;
  color: var(--muted);
}


/* =========================================
   FILTERS
   ========================================= */

.record-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.record-filters > label {
  flex: 1 1 190px;
  margin-bottom: 0;
}

.record-filters > label:first-child {
  flex-grow: 2;
}

.record-filters input,
.record-filters select {
  min-height: 43px;
  background: var(--surface);
}


/* =========================================
   FORM FIELDS
   ========================================= */

label {
  display: block;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  border-color: #8da594;
  box-shadow: 0 0 0 3px rgba(141, 165, 148, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #909991;
  opacity: 1;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
  min-height: 44px;
}

input[type="checkbox"],
input[type="radio"] {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--sage);
}

input[type="file"] {
  padding: 8px;
  font-size: 12px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  background: var(--sage-light);
  color: var(--sage-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #dce8df;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 0;
  font-weight: 400;
}

.checkbox-label input {
  margin-top: 3px;
}

.form-grid,
.form-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.field-hint,
.prototype-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
}

label > .field-hint {
  display: block;
  margin-top: 7px;
}

.form-error {
  margin: 12px 0;
  color: var(--danger-text);
  font-size: 13px;
  line-height: 1.6;
}

.form-error:empty {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

fieldset {
  min-width: 0;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

legend {
  padding: 0 8px;
  color: var(--sage-dark);
  font-size: 14px;
  font-weight: 600;
}

fieldset > :last-child {
  margin-bottom: 0;
}

fieldset h3 {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

fieldset h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}


/* =========================================
   TABLES
   ========================================= */

.table-container {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

thead {
  background: var(--surface-soft);
}

th {
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 17px 15px;
  border-bottom: 1px solid #edf0ed;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafcf9;
}

td:first-child {
  font-weight: 500;
}

td strong {
  display: block;
  font-weight: 600;
}

td small,
.department-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

td .primary-button,
td .secondary-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

td .text-button {
  padding: 5px 0;
  font-size: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 130px;
}

.empty-state {
  padding: 30px 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
}

td.empty-state {
  padding: 38px 20px;
}


/* =========================================
   ACTIVITY AND SUMMARY ITEMS
   ========================================= */

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid #edf0ed;
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.activity-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.activity-item time,
.activity-item small {
  color: var(--muted);
  font-size: 11px;
}

.activity-list > .empty-state {
  margin-bottom: 0;
}

.record-summary {
  margin-bottom: 20px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
}

.record-summary p {
  margin-bottom: 6px;
}

.record-summary p:last-child {
  margin-bottom: 0;
}

.calculated-result {
  padding: 15px 18px;
  border-radius: 8px;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 14px;
}

.calculated-result output {
  margin-left: 8px;
  font-size: 22px;
  font-weight: 600;
}


/* =========================================
   TEAM PROFILE CARDS
   ========================================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.team-grid > .empty-state {
  grid-column: 1 / -1;
}

.team-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.team-card h2,
.team-card h3 {
  margin-bottom: 7px;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.team-card > p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
}

.team-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 14px;
  font-weight: 600;
}

.team-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.team-card-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.team-card-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--sage-dark);
  font-size: 22px;
  font-weight: 600;
}

.team-card > button,
.team-card > a {
  margin-top: auto;
}


/* =========================================
   INDIVIDUAL PROFILE
   ========================================= */

.profile-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.profile-tab {
  flex-shrink: 0;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.profile-tab:hover {
  background: #edf2ed;
  color: var(--sage-dark);
}

.profile-tab.active,
.profile-tab[aria-current="page"] {
  border-color: #d7e3d9;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-weight: 600;
}

.profile-panel > h2 {
  margin-bottom: 24px;
}

#profile-details {
  overflow-wrap: anywhere;
}

#profile-bradford-period {
  color: var(--sage);
  font-size: 13px;
  font-weight: 600;
}

#profile-tab-bradford > p {
  max-width: 900px;
  color: var(--muted);
  font-size: 13px;
}

#profile-bradford-warning:not(:empty) {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--warning-background);
  color: var(--warning-text);
  font-size: 12px;
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.summary-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.summary-item p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong {
  color: var(--sage-dark);
  font-size: 22px;
  font-weight: 600;
}


/* =========================================
   DIALOGS
   ========================================= */

dialog {
  width: min(620px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 30px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 90px rgba(27, 39, 31, 0.18);
}

dialog::backdrop {
  background: rgba(30, 42, 34, 0.42);
  backdrop-filter: blur(4px);
}

dialog.wide-dialog {
  width: min(1040px, calc(100% - 40px));
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.form-heading h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.form-heading .eyebrow {
  margin-bottom: 8px;
}

dialog form {
  margin: 0;
}

#confirmation-dialog {
  width: min(460px, calc(100% - 32px));
}

#confirmation-message {
  color: var(--muted);
  font-size: 14px;
}


/* =========================================
   WORKING-DAY SELECTION
   ========================================= */

.working-days-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 270px;
  margin: 18px 0;
  padding: 2px;
  overflow-y: auto;
}

.working-days-grid > p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.working-day,
.working-days-grid > label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
}

.working-day:has(input:checked),
.working-days-grid > label:has(input:checked) {
  border-color: #b3c7b8;
  background: var(--sage-light);
  color: var(--sage-dark);
}

#absence-days-summary {
  margin-bottom: 0;
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 600;
}

#absence-sickness-fields {
  margin-top: 24px;
}


/* =========================================
   PHASED RETURN
   ========================================= */

.phased-return-table {
  min-width: 950px;
  margin-bottom: 20px;
}

.phased-return-table th,
.phased-return-table td {
  padding: 10px;
  vertical-align: top;
}

.phased-return-table th[scope="row"] {
  padding-top: 24px;
  text-align: center;
}

.phased-return-table input,
.phased-return-table textarea {
  margin-top: 0;
  padding: 8px;
  font-size: 12px;
}

.phased-return-table input[type="date"] {
  min-width: 135px;
}

.phased-return-table input[type="number"] {
  min-width: 75px;
}

.phased-return-table input[type="time"] {
  min-width: 105px;
}

.phased-return-table input[type="text"] {
  min-width: 130px;
}

.phased-return-table textarea {
  min-width: 185px;
  min-height: 64px;
}


/* =========================================
   ALLOWANCES AND DOCUMENT ITEMS
   ========================================= */

#employee-allowance-history:not(:empty) {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.document-item,
.review-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.document-item:last-child,
.review-item:last-child {
  border-bottom: 0;
}

.document-item h3,
.review-item h3 {
  margin-bottom: 6px;
}

.document-item p,
.review-item p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.document-item .header-actions,
.review-item .header-actions {
  flex-shrink: 0;
}


/* =========================================
   ERRORS AND NOTIFICATIONS
   ========================================= */

.app-error {
  margin-bottom: 24px;
  padding: 16px 18px;
  border: 1px solid #eed1d1;
  border-radius: 9px;
  background: var(--danger-background);
  color: var(--danger-text);
  font-size: 13px;
}

.save-notification {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 100;
  max-width: min(440px, calc(100vw - 40px));
  margin: 0;
  padding: 15px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--sage-dark);
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(30, 42, 34, 0.18);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.save-notification:empty {
  display: none;
}


/* =========================================
   FOOTER
   ========================================= */

.app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.app-footer p {
  margin-bottom: 0;
  color: #7c877e;
  font-size: 10px;
  line-height: 1.7;
}

#storage-status {
  max-width: 430px;
}


/* =========================================
   MEDIUM LAPTOPS
   ========================================= */

@media (max-width: 1250px) {
  .app-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .main-content {
    padding: 36px 28px;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header > .header-actions {
    justify-content: flex-end;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dashboard-grid > .panel {
    height: auto;
  }
}


/* =========================================
   TABLETS AND SMALL LAPTOPS
   ========================================= */

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 22px 24px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand {
    margin: 0 0 22px;
    font-size: 27px;
  }

  .navigation-label {
    margin-left: 0;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
  }

  .nav-link {
    width: auto;
    padding: 10px 13px;
    font-size: 12px;
  }

  .sidebar-note {
    display: none;
  }

  .main-content {
    padding: 32px 24px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .page-header > .header-actions {
    justify-content: flex-start;
  }

  .page-header > .primary-button,
  .page-header > .secondary-button {
    align-self: flex-start;
  }

  .panel {
    padding: 22px;
  }

  .record-filters > label {
    flex-basis: 160px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 28px;
    letter-spacing: -0.9px;
  }

  h2 {
    font-size: 18px;
  }

  .sidebar {
    padding: 20px 16px 14px;
  }

  .brand {
    margin-bottom: 20px;
  }

  .nav-link {
    padding: 9px 11px;
    font-size: 11px;
  }

  .navigation-label {
    font-size: 9px;
  }

  .main-content {
    padding: 26px 16px;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-header p:not(.eyebrow) {
    font-size: 13px;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions > .primary-button,
  .header-actions > .secondary-button {
    flex: 1 1 auto;
  }

  .stats-grid {
    gap: 12px;
    margin-bottom: 22px;
  }

  .stat-card {
    padding: 18px 15px;
  }

  .stat-card > p {
    min-height: 34px;
    margin-bottom: 10px;
    font-size: 11px;
  }

  .stat-card > strong {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .stat-card > span {
    font-size: 10px;
  }

  .panel {
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 10px;
  }

  .panel-header {
    align-items: flex-start;
    gap: 12px;
  }

  .panel-header h2 {
    font-size: 17px;
  }

  .subtle-badge {
    font-size: 10px;
  }

  .record-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .record-filters > label {
    flex: none;
    width: 100%;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .team-card {
    padding: 22px;
  }

  .profile-tabs {
    gap: 4px;
  }

  .profile-tab {
    padding: 9px 12px;
    font-size: 12px;
  }

  .form-grid,
  .form-date-grid {
    grid-template-columns: 1fr;
  }

  dialog,
  dialog.wide-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px;
    border-radius: 12px;
  }

  .form-heading {
    margin-bottom: 20px;
    gap: 12px;
  }

  .form-heading h2 {
    font-size: 21px;
  }

  fieldset {
    padding: 16px;
  }

  legend {
    font-size: 13px;
  }

  .working-days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-actions {
    gap: 8px;
  }

  .form-actions > button {
    flex: 1 1 auto;
  }

  .document-item,
  .review-item {
    flex-direction: column;
    gap: 12px;
  }

  .activity-item {
    flex-wrap: wrap;
  }

  .save-notification {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }

  .app-footer {
    flex-direction: column;
    margin-top: 28px;
  }

  th,
  td {
    padding-right: 12px;
    padding-left: 12px;
  }
}


/* =========================================
   VERY SMALL SCREENS
   ========================================= */

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card > p {
    min-height: 0;
  }

  .working-days-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================
   PRINT
   ========================================= */

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .app-layout {
    display: block;
  }

  .sidebar,
  .app-footer,
  .save-notification,
  .record-filters,
  .profile-tabs,
  .header-actions,
  .form-actions,
  .text-button,
  .icon-button,
  .primary-button,
  .secondary-button {
    display: none !important;
  }

  .main-content {
    max-width: none;
    padding: 0;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .panel,
  .stat-card {
    box-shadow: none;
    border-color: #cccccc;
  }

  .panel,
  .stat-card,
  tr {
    break-inside: avoid;
  }

  .table-container {
    overflow: visible;
  }

  table {
    font-size: 10px;
  }

  th,
  td {
    padding: 8px;
  }

  dialog[open] {
    position: static;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  dialog::backdrop {
    background: transparent;
  }

  .phased-return-table {
    min-width: 0;
  }

  .phased-return-table input,
  .phased-return-table textarea {
    min-width: 0;
  }
}


/* =========================================
   ABSENVIA AUTHENTICATION
   ========================================= */

#auth-screen.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  padding: 32px 20px;

  overflow-y: auto;

  background: var(--background);
}

#auth-screen.auth-screen[hidden] {
  display: none !important;
}

#auth-screen .auth-card {
  width: 100%;
  max-width: 440px;

  margin: auto;
  padding: 40px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--surface);

  box-shadow: 0 20px 60px rgba(40, 49, 44, 0.08);
}

#auth-screen .auth-brand {
  margin-bottom: 34px;
}

#auth-screen .auth-brand h1 {
  margin: 0;

  color: var(--sage-dark);

  font-size: 30px;
  font-weight: 650;
  line-height: 1.2;

  letter-spacing: -1.3px;
}

#auth-screen .auth-brand span {
  display: block;

  margin-top: 5px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 600;

  letter-spacing: 1.8px;
  text-transform: uppercase;
}

#auth-screen .auth-copy {
  margin-bottom: 28px;
}

#auth-screen .auth-copy .eyebrow {
  margin: 0 0 10px;

  color: var(--sage);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 1.8px;
}

#auth-screen .auth-copy h2 {
  margin: 0 0 10px;

  color: var(--text);

  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;

  letter-spacing: -0.5px;
}

#auth-screen .auth-copy p:last-child {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.65;
}

#auth-screen .auth-form {
  display: flex;
  flex-direction: column;

  width: 100%;

  gap: 19px;
}

#auth-screen .auth-form label {
  display: flex;
  flex-direction: column;

  width: 100%;

  margin: 0;
  gap: 7px;

  color: var(--text);

  font-size: 13px;
  font-weight: 600;
}

#auth-screen .auth-form input {
  display: block;

  width: 100%;
  max-width: 100%;
  height: 48px;

  margin: 0;
  padding: 0 13px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--surface);
  color: var(--text);

  box-sizing: border-box;

  font-size: 14px;

  outline: none;

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

#auth-screen .auth-form input:hover {
  border-color: #b8c8bc;
}

#auth-screen .auth-form input:focus {
  border-color: var(--sage);

  box-shadow:
    0 0 0 3px rgba(82, 109, 89, 0.12);
}

#auth-screen .auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 48px;

  margin: 4px 0 0;
  padding: 12px 18px;

  border: 1px solid var(--sage);
  border-radius: 8px;

  background: var(--sage);
  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

#auth-screen .auth-submit:hover {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

#auth-screen .auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

#auth-screen .auth-error {
  width: 100%;

  margin: -3px 0 0;
  padding: 11px 13px;

  border: 1px solid rgba(154, 69, 69, 0.12);
  border-radius: 8px;

  background: var(--danger-background);
  color: var(--danger-text);

  box-sizing: border-box;

  font-size: 12px;
  line-height: 1.5;
}

#auth-screen .auth-error[hidden] {
  display: none !important;
}

#auth-screen .auth-security {
  margin: 25px 0 0;

  color: #879188;

  font-size: 10px;
  line-height: 1.5;

  text-align: center;
}

@media (max-width: 520px) {
  #auth-screen.auth-screen {
    padding: 18px;
  }

  #auth-screen .auth-card {
    max-width: 100%;
    padding: 30px 24px;
    border-radius: 14px;
  }

  #auth-screen .auth-brand {
    margin-bottom: 28px;
  }

  #auth-screen .auth-copy {
    margin-bottom: 24px;
  }

  #auth-screen .auth-copy h2 {
    font-size: 21px;
  }
}
/* =========================================
   SIGN OUT
   ========================================= */

.logout-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  width: 100%;

  margin-top: 14px;
  padding: 11px 12px;

  border: 1px solid transparent;
  border-radius: 8px;

  background: transparent;
  color: var(--muted);

  font-size: 12px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.logout-button:hover {
  background: var(--sage-light);
  color: var(--sage-dark);
}

.logout-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* =========================================
   ABSENVIA 2.0 · WORKSPACE IDENTITY
   ========================================= */

.workspace-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 18px 12px;
}

.workspace-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 13px;
  font-weight: 700;
}

.workspace-card strong {
  margin: 0 0 2px;
}

.workspace-card p {
  margin: 0;
  text-transform: capitalize;
}

body[data-workspace-role] .app-layout {
  transition: opacity 160ms ease;
}


/* ABSENVIA 2.0 ROLE EXPERIENCE */
.role-preview {
  margin: auto 10px 14px; padding: 14px;
  border: 1px dashed #b8c8bc; border-radius: 10px;
  background: var(--surface-soft);
}
.role-preview label {
  margin-bottom: 8px; color: #879188; font-size: 9px;
  font-weight: 700; letter-spacing: 1.6px;
}
.role-preview select { margin-top: 0; min-height: 38px; padding: 8px 10px; font-size: 12px; }
.role-preview .text-button { margin-top: 6px; padding: 4px 0; font-size: 11px; }
.role-context-badge {
  display: inline-flex; width: fit-content; margin-top: 2px; padding: 5px 9px;
  border-radius: 999px; background: var(--sage-light); color: var(--sage-dark);
  font-size: 10px; font-weight: 700; letter-spacing: .35px;
}


/* =========================================
   ABSENVIA 2.0 · ROLE SHELL & LEAVE CALENDAR
   ========================================= */

.workspace-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 16px 12px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  text-align: left;
}
.workspace-card:hover { background: var(--surface-soft); }
.workspace-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage-dark);
  font-size: 12px;
  font-weight: 700;
}
.workspace-avatar-image { width: 100%; height: 100%; object-fit: cover; }
.workspace-identity { min-width: 0; display: grid; }
.workspace-identity strong {
  overflow: hidden; color: var(--text); font-size: 12px;
  text-overflow: ellipsis; white-space: nowrap;
}
.workspace-identity > span {
  color: var(--muted); font-size: 10px; text-transform: capitalize;
}

.account-admin-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
}

.leave-calendar-shell {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.calendar-month-controls {
  display: flex; align-items: center; gap: 12px;
}
.calendar-month-controls strong {
  min-width: 150px; text-align: center; color: var(--sage-dark);
}
.leave-calendar-legend {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-bottom: 24px; color: var(--muted); font-size: 11px;
}
.leave-calendar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.calendar-key {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.calendar-key.available { background: #dcebdd; }
.calendar-key.limited { background: #efe4bd; }
.calendar-key.full { background: #efd0d0; }
.calendar-key.mine { border: 2px solid var(--sage); background: #fff; }

.leave-calendar-weekdays,
.leave-calendar-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
}
.leave-calendar-weekdays {
  margin-bottom: 8px; color: var(--muted);
  font-size: 10px; font-weight: 700; text-align: center;
}
.calendar-day {
  position: relative;
  min-height: 92px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
}
.calendar-day:not(.empty):hover {
  border-color: var(--border); background: var(--surface-soft);
}
.calendar-day.empty { cursor: default; }
.calendar-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.calendar-day.available .calendar-dot { background: #dcebdd; color: #35523c; }
.calendar-day.limited .calendar-dot { background: #efe4bd; color: #735f28; }
.calendar-day.full .calendar-dot { background: #efd0d0; color: #8c3f3f; }
.calendar-day.mine .calendar-dot {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sage);
}
.calendar-day:hover .calendar-dot { transform: translateY(-1px); }

.calendar-avatars {
  display: flex; justify-content: center; margin-top: 6px;
}
.calendar-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: -4px;
  border: 2px solid var(--surface); border-radius: 50%;
  object-fit: cover; background: var(--sage); color: #fff;
  font-size: 8px; font-weight: 700;
}
.calendar-avatar:first-child { margin-left: 0; }
.calendar-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: -4px;
  border: 2px solid var(--surface); border-radius: 50%;
  background: #edf0ed; color: var(--muted); font-size: 8px; font-weight: 700;
}
.leave-calendar-detail {
  margin-top: 22px; padding: 20px;
  border-radius: 12px; background: var(--surface-soft);
}
.leave-calendar-detail > p { margin: 5px 0 0; color: var(--muted); }
.calendar-people { display: grid; gap: 8px; margin-top: 14px; }
.calendar-people > span {
  display: flex; align-items: center; gap: 8px;
}
.calendar-people small { margin-left: auto; color: var(--muted); }

@media (max-width: 760px) {
  .account-admin-grid { grid-template-columns: 1fr; }
  .leave-calendar-shell { padding: 16px 10px; }
  .leave-calendar-weekdays, .leave-calendar-grid { gap: 3px; }
  .calendar-day { min-height: 70px; padding: 5px 1px; }
  .calendar-dot { width: 38px; height: 38px; }
  .calendar-avatar { width: 20px; height: 20px; font-size: 7px; }
  .leave-calendar-legend { gap: 10px; }
}


/* =========================================
   ABSENVIA 2.1 · PERSONAL EXPERIENCE / TIME OFF
   ========================================= */
.personal-home-header,.profile-hero {
  display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px;
}
.personal-home-header h1,.profile-hero h1 { margin:2px 0 5px;font-size:32px; }
.home-avatar,.profile-hero-avatar {
  display:flex;align-items:center;justify-content:center;width:68px;height:68px;border-radius:50%;
  background:var(--sage-light);color:var(--sage-dark);font-size:18px;font-weight:700;
}
.home-stat-grid,.profile-summary-grid {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:22px;
}
.profile-summary-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.home-stat,.profile-card {
  padding:20px;border:1px solid var(--border);border-radius:14px;background:var(--surface);box-shadow:var(--shadow);
}
.home-stat span,.profile-card span { display:block;color:var(--muted);font-size:11px;margin-bottom:7px; }
.home-stat strong,.profile-card strong { font-size:20px;color:var(--text); }
.quick-action-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px; }
.quick-action {
  padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);text-align:left;
}
.quick-action:hover { border-color:var(--sage);transform:translateY(-1px); }
.quick-action strong,.quick-action span { display:block; }
.quick-action span { margin-top:5px;color:var(--muted);font-size:11px; }
.profile-hero { justify-content:flex-start; }
.profile-detail-grid { display:grid;grid-template-columns:1fr 1fr;gap:20px; }
.profile-list { display:grid;gap:8px; }
.profile-list-row { display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 0;border-bottom:1px solid var(--border); }
.profile-list-row span { color:var(--muted);font-size:11px; }
.dedicated-timeoff-form { max-width:800px; }
.timeoff-person { display:flex;align-items:center;gap:12px;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid var(--border); }
.timeoff-person div { display:grid;gap:2px; }.timeoff-person span { color:var(--muted);font-size:10px; }
.mini-avatar { display:flex!important;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--sage-light);color:var(--sage-dark)!important;font-weight:700; }
.day-planner { margin:20px 0;border:1px solid var(--border);border-radius:12px;overflow:hidden; }
.day-planner-heading,.day-planner-row { display:grid;grid-template-columns:1fr 100px 160px;align-items:center;gap:12px;padding:10px 14px; }
.day-planner-heading { background:var(--surface-soft);color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1px; }
.day-planner-row { border-top:1px solid var(--border); }.day-planner-row select { margin:0;min-height:36px;padding:7px 9px; }
.leave-impact { display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0 22px; }
.leave-impact div { padding:14px;border-radius:10px;background:var(--sage-light); }
.leave-impact span,.leave-impact strong { display:block; }.leave-impact span { color:var(--muted);font-size:10px;margin-bottom:4px; }
.request-note { margin:15px 0;padding:12px 14px;border-radius:9px;background:var(--surface-soft);color:var(--muted);font-size:11px; }
.calendar-selection-bar { display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px;padding:14px 18px;border:1px solid var(--border);border-radius:12px;background:var(--surface); }
.calendar-selection-bar div:first-child { display:grid;gap:2px; }.calendar-selection-bar span { color:var(--muted);font-size:10px; }
.calendar-selection-actions { display:flex;gap:8px; }
.calendar-day.selected .calendar-dot { box-shadow:0 0 0 3px var(--surface),0 0 0 6px var(--sage-dark); }
.calendar-settings-card { grid-column:1/-1; }.calendar-settings-preview { display:grid;gap:5px;margin:15px 0;padding:14px;border-radius:10px;background:var(--surface-soft); }
.calendar-settings-preview span { color:var(--muted);font-size:11px; }

@media(max-width:850px){
  .home-stat-grid,.profile-summary-grid,.quick-action-grid { grid-template-columns:repeat(2,1fr); }
  .profile-detail-grid { grid-template-columns:1fr; }
}
@media(max-width:600px){
  .home-stat-grid,.profile-summary-grid,.quick-action-grid,.leave-impact { grid-template-columns:1fr; }
  .day-planner-heading,.day-planner-row { grid-template-columns:1fr 70px 120px; }
  .calendar-selection-bar { align-items:flex-start;flex-direction:column; }
}


/* =========================================
   ABSENVIA 2.1 · CLEAN HOME
   Home is a launcher only. Attention items belong in Action Centre.
   ========================================= */
.simple-home-header {
  margin-bottom: 26px;
}
.simple-home-header h1 {
  margin: 2px 0 6px;
  font-size: 32px;
}
.simple-home-header p:last-child {
  margin: 0;
  color: var(--muted);
}
.simple-home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
}
.simple-home-actions .quick-action {
  min-height: 112px;
  padding: 22px;
}
.simple-home-actions .quick-action strong {
  font-size: 14px;
}
.simple-home-actions .quick-action span {
  margin-top: 7px;
  line-height: 1.5;
}
@media (max-width: 650px) {
  .simple-home-actions {
    grid-template-columns: 1fr;
  }
}

/* V2 consolidated rebuild */
footer, .app-footer, .footer-note, .prototype-footer { display:none !important; }

.absenvia-picker-input{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  cursor:pointer;
}
.absenvia-picker-input:focus{outline:2px solid rgba(98,125,105,.22);border-color:#6f8977}
.absenvia-picker-popover{
  position:absolute; z-index:9999; width:310px; padding:16px; background:#fff;
  border:1px solid #dce5de; border-radius:18px; box-shadow:0 18px 50px rgba(31,48,38,.14);
}
.picker-head,.picker-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.picker-head button,.picker-actions button{
  border:0;background:#eef4ef;color:#294235;border-radius:10px;padding:8px 11px;cursor:pointer
}
.picker-weekdays,.picker-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;text-align:center}
.picker-weekdays{margin:14px 0 7px;color:#6b7a70;font-size:12px;font-weight:700}
.picker-day{aspect-ratio:1;border:0;border-radius:50%;background:#f1f6f2;color:#26382d;cursor:pointer}
.picker-day:hover{background:#dfece2}.picker-day.selected{background:#6f8977;color:white}
.picker-empty{aspect-ratio:1}
.picker-actions{margin-top:12px}
.profile-detail-panel{margin-top:18px;padding:22px;background:#fff;border:1px solid var(--border);border-radius:18px}
.contract-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.contract-grid label{display:flex;flex-direction:column;gap:7px}
.profile-picture-editor{display:flex;align-items:center;gap:18px}
.profile-picture-preview{width:84px;height:84px;border-radius:50%;display:grid;place-items:center;background:#e7efe9;font-weight:800;font-size:24px}
.field-hint{font-size:12px;color:var(--muted);margin-top:8px}
@media(max-width:760px){.contract-grid{grid-template-columns:1fr}.absenvia-picker-popover{width:min(310px,calc(100vw - 16px))}}


/* Absenvia profile photo + contract controls */
.profile-photo-wrap { display:flex; flex-direction:column; align-items:center; gap:10px; flex:0 0 auto; }
.profile-hero-avatar { overflow:hidden; }
.profile-hero-avatar img, .workspace-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block; }
.profile-photo-button { padding:8px 12px; font-size:12px; white-space:nowrap; }
.contract-days-field { margin-top:16px; }
.field-label { display:block; margin-bottom:9px; font-size:13px; font-weight:650; color:var(--text); }
.contract-day-grid { display:grid; grid-template-columns:repeat(7,minmax(52px,1fr)); gap:8px; }
.contract-day-grid label { display:flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px; border:1px solid var(--border); border-radius:10px; background:var(--surface); font-size:12px; cursor:pointer; }
.contract-day-grid input { margin:0; }
@media (max-width:760px) { .contract-day-grid { grid-template-columns:repeat(4,1fr); } .profile-photo-wrap { align-items:flex-start; } }


/* Profile identity sync fix */
.employee-profile-identity, .team-card-person { display:flex; align-items:center; gap:14px; }
.employee-profile-avatar, .team-card-avatar { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; overflow:hidden; border:1px solid var(--border); border-radius:50%; background:var(--sage-light); color:var(--sage-dark); font-weight:700; }
.employee-profile-avatar { width:72px; height:72px; font-size:20px; }
.team-card-avatar { width:46px; height:46px; font-size:13px; }
.employee-profile-avatar img, .team-card-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
