:root {
  --ink: #27343b;
  --muted: #66757f;
  --line: #d8e0e3;
  --surface: #ffffff;
  --soft: #f4f7f8;
  --green: #2aa876;
  --cyan: #2d9cdb;
  --red: #c94c4c;
  --amber: #b88716;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 420px);
}

.login-card {
  display: grid;
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 28, 32, 0.08);
}

.login-logo {
  width: 150px;
  height: 114px;
  object-fit: contain;
  object-position: center;
}

.login-copy {
  display: grid;
  gap: 6px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.login-note {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.login-note span {
  color: var(--muted);
  font-size: 13px;
}

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

button {
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--green);
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
}

button.secondary {
  color: var(--ink);
  background: #e7eef0;
}

button.secondary.active {
  color: #ffffff;
  background: var(--green);
}

.danger-button {
  color: #8c3232 !important;
  background: #f6e2e2 !important;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.menu-button {
  flex: 0 0 auto;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand img {
  width: 118px;
  height: 74px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.15;
}

h2 {
  font-size: 17px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.role-box,
label {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.user-menu {
  position: relative;
}

.user-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
}

.user-button.active {
  color: #ffffff;
  background: var(--green);
}

.user-summary {
  display: grid;
  text-align: left;
  gap: 2px;
}

.user-summary strong {
  font-size: 13px;
}

.user-summary span {
  color: var(--muted);
  font-size: 11px;
}

.user-button.active .user-summary span {
  color: rgba(255, 255, 255, 0.86);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
  flex: 0 0 auto;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(20, 28, 32, 0.12);
  display: none;
  gap: 10px;
  z-index: 22;
}

.user-dropdown.open {
  display: grid;
}

.user-dropdown-head,
.user-dropdown-note {
  display: grid;
  gap: 4px;
}

.user-dropdown-note {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  padding: 8px 10px;
}

textarea {
  resize: vertical;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
  padding: 18px;
}

.module-shell.module-gasolina,
.module-shell.module-notas,
.module-shell.module-calendario,
.module-shell.module-configuracion {
  grid-template-columns: 1fr;
}

.module-shell.module-gasolina .sidebar,
.module-shell.module-notas .sidebar,
.module-shell.module-calendario .sidebar,
.module-shell.module-configuracion .sidebar {
  display: none;
}

.sidebar,
.content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.content {
  min-width: 0;
}

.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, calc(100vw - 24px));
  padding: 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 180ms ease;
  z-index: 20;
  display: grid;
  align-content: start;
  gap: 16px;
}

.app-drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 32, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 19;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.drawer-group {
  display: grid;
  gap: 8px;
}

.drawer-link {
  justify-content: flex-start;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.drawer-link.active {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.drawer-note {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.drawer-company-switch {
  gap: 10px;
}

.drawer-company-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.drawer-company-picker img {
  width: 74px;
  height: 56px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  flex: 0 0 auto;
}

.drawer-company-picker select {
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  font-weight: 600;
}

.sidebar section,
.report-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.sidebar section {
  display: grid;
  gap: 10px;
}

.employee-list,
.holiday-list {
  display: grid;
  gap: 6px;
  max-height: 330px;
  overflow: auto;
}

.employee-button {
  display: grid;
  gap: 2px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.employee-button.active {
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}

.employee-button span,
.holiday-item span,
td span {
  color: var(--muted);
  font-size: 12px;
}

.compact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

.holiday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.calendar-box .section-head {
  justify-content: flex-start;
}

.calendar-box .section-head h2 {
  margin-right: auto;
}

.holiday-editor {
  gap: 10px;
  display: none;
}

.sync-status-text {
  display: none;
}

.holiday-editor.open {
  display: grid;
}

.holiday-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.holiday-actions[hidden] {
  display: none;
}

.holiday-delete {
  min-height: 30px;
  padding: 4px 10px;
  color: var(--ink);
  background: #f0e6e6;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
}

.view-switch {
  display: flex;
  gap: 8px;
}

.view-tab {
  min-width: 140px;
}

.view-tab.active {
  background: var(--green);
  color: #ffffff;
}

.view-panel {
  display: none;
  gap: 16px;
}

.view-panel.open {
  display: grid;
}

.module-panel {
  display: none;
  gap: 16px;
}

.module-panel.open {
  display: grid;
}

.summary-strip div {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-strip strong {
  font-size: 24px;
}

.operation-summary-strip strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.operation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.compact-title {
  margin-bottom: 8px;
}

.operation-kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.operation-kv div {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.operation-kv div:last-child {
  border-bottom: 0;
}

.operation-kv dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.operation-kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.operation-dashboard {
  --operation-accent: #2aa876;
  --operation-blue: #1f7a8c;
  --operation-amber: #b7791f;
  --operation-red: #c24141;
}

.operation-hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 249, 246, 0.98));
}

.operation-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--operation-accent), var(--operation-blue));
}

.operation-hero-title {
  align-items: center;
  padding-left: 2px;
}

.operation-hero-title h2 {
  margin-bottom: 2px;
}

.operation-summary-strip {
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(130px, 1fr));
}

.operation-summary-strip .operation-metric {
  min-height: 92px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(14, 32, 43, 0.06);
}

.operation-summary-strip .operation-metric::before {
  width: 5px;
  background: var(--operation-accent);
}

.operation-summary-strip .operation-metric:nth-child(2)::before,
.operation-summary-strip .operation-metric:nth-child(5)::before {
  background: var(--operation-blue);
}

.operation-summary-strip .operation-metric:nth-child(3)::before {
  background: var(--operation-amber);
}

.operation-summary-strip .operation-metric-warning::before {
  background: var(--operation-red);
}

.operation-summary-strip .operation-metric span {
  color: #5d7079;
  font-size: 11px;
}

.operation-summary-strip .operation-metric strong {
  color: var(--ink-strong);
  font-size: 26px;
  line-height: 1.08;
}

.operation-summary-strip .operation-metric-service strong {
  color: var(--operation-accent);
}

.operation-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.operation-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--operation-accent);
}

.operation-card-sync::before {
  background: var(--operation-blue);
}

.operation-card-backup::before {
  background: var(--operation-amber);
}

.operation-card-punches::before {
  background: var(--operation-red);
}

.operation-card .panel-title {
  margin-top: 4px;
}

.operation-kv div {
  min-height: 32px;
}

.operation-kv dd {
  color: var(--ink-strong);
  font-weight: 700;
}

.operation-audit-panel {
  border-radius: 8px;
}

.operation-audit-panel .table-wrap {
  border-radius: 8px;
}

.operation-audit-panel tbody td {
  vertical-align: top;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.add-circle-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 260px);
  gap: 10px;
  margin-bottom: 14px;
}

.employee-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.employee-form-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.admin-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.area-chip button {
  width: 24px;
  min-height: 24px;
  padding: 0;
  color: var(--muted);
  background: #ffffff;
  border-color: var(--line);
  border-radius: 999px;
  box-shadow: none;
}

.area-chip button:hover:not(:disabled) {
  color: #ffffff;
  background: #d94d55;
  border-color: #d94d55;
}

.user-editor-card[hidden],
.company-card[hidden],
.employee-form-card[hidden] {
  display: none;
}

.employee-editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 32, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 28;
}

.employee-editor-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.employee-editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, calc(100vw - 18px));
  padding: 18px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 36px rgba(20, 28, 32, 0.12);
  overflow: auto;
  transform: translateX(100%);
  transition: transform 180ms ease;
  z-index: 29;
}

.employee-editor-panel.open {
  transform: translateX(0);
}

.employee-form-drawer {
  min-height: calc(100vh - 36px);
  align-content: start;
}

.employee-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.employee-editor-head p {
  margin-top: 4px;
}

.module-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.program-access-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-2);
}

.program-access-section[hidden] {
  display: none;
}

.module-access-grid .checkbox-field {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
}

.checkbox-field input {
  width: auto;
  min-height: auto;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f9fbfb;
}

.employee-admin-row {
  cursor: pointer;
}

.employee-admin-row.active {
  background: #eef8f3;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.placeholder-card {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.document-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  margin-top: 14px;
}

.document-form,
.document-side,
.document-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.compact-form {
  display: grid;
  gap: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip-list .area-chip {
  display: inline-grid;
  gap: 2px;
  text-align: left;
}

.chip-list .area-chip.active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 3px 0 0 var(--green);
}

.vehicle-editor[hidden] {
  display: none;
}

.vehicle-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  text-align: left;
}

.vehicle-row:hover:not(:disabled),
.vehicle-row.selected {
  color: var(--ink-strong);
  background: var(--green-soft);
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
  transform: none;
}

.vehicle-row span {
  display: grid;
  gap: 2px;
}

.vehicle-row small {
  color: var(--muted);
  font-weight: 700;
}

.vehicle-edit-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
}

.vehicle-edit-button:hover:not(:disabled) {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: none;
  transform: none;
}

.history-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.chip-list small {
  color: var(--muted);
  font-weight: 700;
}

.action-row,
.items-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.delivery-items {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.delivery-item-row {
  display: grid;
  grid-template-columns: 90px minmax(220px, 1fr) 100px minmax(140px, 0.7fr) auto;
  gap: 8px;
}

.document-preview {
  margin-top: 14px;
  color: #26352f;
  background: #ffffff;
}

.print-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d9e3dc;
}

.print-head img {
  width: 148px;
  height: 82px;
  object-fit: contain;
}

.print-head div {
  display: grid;
  gap: 4px;
  text-align: right;
  text-transform: uppercase;
}

.print-head span {
  color: var(--muted);
  font-weight: 800;
}

.print-head strong {
  color: var(--ink-strong);
  font-size: 22px;
}

.print-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 14px 0;
}

.print-fields p {
  color: #26352f;
}

.print-table {
  border: 1px solid #c9d8d0;
}

.print-table th,
.print-table td {
  border-bottom: 1px solid #dbe7e1;
}

.print-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.print-signatures span {
  padding-top: 10px;
  border-top: 1px solid #81928a;
  color: #26352f;
  text-align: center;
  font-weight: 700;
}

#deliveryPrintArea .print-signatures {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-history {
  margin-top: 14px;
}

.fuel-view {
  display: none;
}

.fuel-view.open {
  display: block;
}

.fuel-view-switch {
  margin-top: 12px;
}

.fuel-status-badge {
  display: inline-flex;
  align-items: center;
  min-width: 82px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(47, 66, 57, 0.14);
  background: #eef3f0;
  color: #26352f;
}

.fuel-status-borrador {
  background: #f3f0e7;
  color: #5b5139;
}

.fuel-status-emitida {
  background: #e9f3ed;
  color: #235339;
}

.fuel-status-usada {
  background: #e9eef4;
  color: #29455e;
}

.fuel-status-anulada {
  background: #f5eaea;
  color: #783535;
}

.fuel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 170px;
}

.fuel-actions button {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.print-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 16px;
}

.print-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-brand-row,
.company-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.company-logo-row img {
  width: 92px;
  height: 68px;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
}

.company-card.active-brand {
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}

.company-card {
  position: relative;
}

.edit-company-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.company-editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, calc(100vw - 18px));
  padding: 18px;
  overflow: auto;
  z-index: 29;
}

.company-editor-panel form {
  display: grid;
  gap: 14px;
}

.company-area-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.user-editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, calc(100vw - 18px));
  padding: 18px;
  overflow: auto;
  z-index: 29;
}

.placeholder-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--green);
}

.table-filter {
  display: block;
  width: 100%;
  min-width: 110px;
  margin-top: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.status.review {
  background: var(--amber);
}

.status.missing {
  background: var(--red);
}

.status.holiday {
  background: var(--cyan);
}

.status.rest {
  color: #47606d;
  background: #e9f1f4;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e7eef0;
}

.status-pill.status-activo {
  background: #dff3eb;
  color: #177553;
}

.status-pill.status-inactivo {
  background: #f6e2e2;
  color: #8c3232;
}

.status-pill.status-pausado {
  background: #f7edd6;
  color: #8d6513;
}

.punch-list,
.issue-list,
.punch-editor {
  display: grid;
  gap: 6px;
}

[hidden] {
  display: none !important;
}

.punch-chip {
  display: inline-flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  background: #ffffff;
}

.punch-chip.ignored {
  opacity: 0.55;
  text-decoration: line-through;
}

.issue-list {
  color: var(--amber);
  font-size: 12px;
  margin-top: 6px;
}

dialog {
  width: min(960px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(20, 28, 32, 0.5);
}

.dialog-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.profile-lock-note {
  padding: 12px;
  color: var(--muted);
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--ink);
  background: #e7eef0;
}

.punch-row {
  display: grid;
  grid-template-columns: 180px 180px 72px minmax(220px, 1fr) 36px 36px;
  gap: 8px;
  align-items: end;
}

.punch-row.permission-row {
  grid-template-columns: 180px 180px 72px 82px minmax(120px, 1fr) 36px 36px;
}

.row-icon-button {
  min-height: 36px;
  width: 36px;
  box-shadow: none;
}

.compact-note {
  min-width: 120px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.editor-actions {
  position: sticky;
  bottom: 0;
  align-items: center;
  padding-top: 14px;
  margin-top: 10px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.editor-actions button {
  min-height: 40px;
  padding: 8px 14px;
  box-shadow: none;
}

.editor-actions .secondary {
  color: var(--muted);
  background: #f4f8f6;
}

.save-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.save-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.period-add-actions {
  margin-top: 12px;
}

.excel-report-print {
  display: none;
}

.excel-report-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 10px;
}

.excel-report-logo img {
  max-width: 180px;
  max-height: 70px;
  object-fit: contain;
}

.report-preview-print {
  display: block;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-preview-print .page-break-before {
  margin-top: 24px;
}

.print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

.wide-dialog {
  width: min(1180px, calc(100vw - 24px));
}

#reviewDialog {
  width: min(940px, calc(100vw - 24px));
}

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

  .summary-strip {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .employee-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar,
  .brand,
  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-strip,
  .form-grid,
  .punch-row,
  .compact-row,
  .admin-toolbar,
  .admin-split-grid,
  .employee-form-card .form-grid,
  .placeholder-grid,
  .document-grid,
  .print-fields,
  .module-access-grid {
    grid-template-columns: 1fr;
  }

  .delivery-item-row {
    grid-template-columns: 80px 1fr;
  }
}

/* Vioffice visual refresh */
:root {
  --ink: #18332b;
  --ink-strong: #0f251d;
  --muted: #5d7068;
  --line: #d8e6df;
  --line-strong: #bfd3c9;
  --surface: #ffffff;
  --soft: #eef8f2;
  --soft-2: #f7fbf8;
  --green: #0d8f63;
  --green-dark: #07593f;
  --green-light: #b7d96b;
  --green-soft: #e9f7ed;
  --cyan: #5c8f2f;
  --red: #c94c4c;
  --amber: #b88716;
  --shadow: 0 14px 34px rgba(15, 37, 29, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 37, 29, 0.06);
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(248, 252, 249, 0.97) 0%, rgba(235, 248, 240, 0.96) 100%),
    repeating-linear-gradient(90deg, rgba(15, 37, 29, 0.026) 0 1px, transparent 1px 72px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green-dark), var(--green), var(--green-light));
  z-index: 50;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--green);
  box-shadow: 0 8px 16px rgba(13, 143, 99, 0.16);
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 10px 22px rgba(7, 89, 63, 0.22);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button.secondary {
  color: var(--ink);
  background: var(--green-soft);
  border-color: var(--line);
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  background: #dcefe4;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

button.secondary.active,
.view-tab.active,
.drawer-link.active {
  color: #ffffff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}

input,
select,
textarea {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 6px;
  padding: 8px 11px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(13, 143, 99, 0.72);
  box-shadow: 0 0 0 3px rgba(13, 143, 99, 0.14);
}

.login-page {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(239, 249, 243, 0.96)),
    repeating-linear-gradient(0deg, rgba(15, 37, 29, 0.035) 0 1px, transparent 1px 64px);
}

.login-shell {
  width: min(100%, 440px);
}

.login-card {
  gap: 22px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(216, 228, 232, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 150px;
  height: 114px;
  object-fit: contain;
  object-position: center;
}

.login-copy h1 {
  font-size: 25px;
}

.login-form {
  gap: 14px;
}

.login-note {
  padding: 14px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 16;
  min-height: 78px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(216, 228, 232, 0.92);
  box-shadow: 0 10px 28px rgba(14, 32, 43, 0.05);
  backdrop-filter: blur(12px);
}

.brand img {
  width: 122px;
  height: 78px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.brand p {
  margin-top: 3px;
  font-size: 13px;
}

.user-button {
  padding: 7px 12px 7px 8px;
  border-radius: 8px;
}

.user-avatar {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-weight: 800;
}

.user-dropdown {
  min-width: 280px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.layout {
  width: min(100%, 1620px);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 114px);
  overflow: auto;
  padding-right: 2px;
}

.app-drawer {
  width: min(334px, calc(100vw - 24px));
  box-shadow: 18px 0 36px rgba(14, 32, 43, 0.12);
}

.drawer-backdrop,
.employee-editor-backdrop {
  background: rgba(14, 32, 43, 0.38);
}

.drawer-note {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-2);
}

.drawer-note span {
  font-size: 13px;
  line-height: 1.42;
}

.drawer-link {
  border-radius: 6px;
  box-shadow: none;
}

.drawer-link.active {
  box-shadow: 0 8px 18px rgba(42, 168, 118, 0.18);
}

.drawer-company-picker {
  border-radius: 6px;
}

.sidebar section,
.report-panel,
.summary-strip div,
.placeholder-card,
.employee-form-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(216, 228, 232, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.sidebar section {
  gap: 11px;
  padding: 14px;
}

.report-panel {
  padding: 16px;
}

.employee-list,
.holiday-list {
  gap: 7px;
  padding-right: 2px;
}

.employee-button {
  min-height: auto;
  padding: 10px 11px;
  border-radius: 6px;
  box-shadow: none;
}

.employee-button:hover:not(:disabled) {
  color: var(--ink-strong);
  background: var(--soft-2);
  border-color: var(--line-strong);
  box-shadow: none;
}

.employee-button.active {
  border-color: rgba(13, 143, 99, 0.72);
  background: #e9f7ed;
  box-shadow: inset 4px 0 0 var(--green);
}

.summary-strip div {
  min-height: 78px;
  position: relative;
  overflow: hidden;
}

.summary-strip div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
}

.summary-strip div:nth-child(2)::before {
  background: var(--green-light);
}

.summary-strip div:nth-child(3)::before {
  background: #8eb342;
}

.summary-strip div:nth-child(4)::before,
.summary-strip div:nth-child(5)::before {
  background: #d45a5a;
}

.summary-strip span,
.placeholder-kicker {
  font-weight: 800;
}

.summary-strip strong {
  color: var(--ink-strong);
  font-size: 25px;
}

.panel-title p {
  margin-top: 4px;
  max-width: 760px;
}

.view-switch {
  flex-wrap: wrap;
}

.employee-form-card,
.placeholder-card {
  background: #fbfdfe;
}

.employee-editor-panel {
  width: min(580px, calc(100vw - 18px));
  box-shadow: -18px 0 36px rgba(14, 32, 43, 0.12);
}

.module-access-grid .checkbox-field {
  border-radius: 8px;
}

.checkbox-field input {
  accent-color: var(--green);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f9fa;
  box-shadow: 0 1px 0 var(--line);
}

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

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #f8fbfc;
}

.status,
.status-pill,
.punch-chip {
  border-radius: 999px;
}

.status,
.status-pill {
  font-weight: 800;
}

dialog {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(14, 32, 43, 0.52);
}

.icon-button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px) {
  .topbar {
    position: static;
  }

  .topbar-actions,
  .user-button,
  .dialog-actions,
  .holiday-actions {
    width: 100%;
  }

  .user-button,
  .dialog-actions {
    justify-content: center;
  }

  .layout {
    padding: 12px;
  }

  .login-card {
    padding: 22px;
  }
}

body[data-company-theme="VIOFFICE"] {
  --ink: #173040;
  --ink-strong: #102f40;
  --muted: #486473;
  --line: #cfe8ed;
  --line-strong: #a9dbe5;
  --soft: #eef7f9;
  --soft-2: #f6fcfd;
  --green: #00b7c7;
  --green-dark: #008899;
  --cyan: #173040;
  --amber: #0e7d8c;
  --shadow: 0 18px 46px rgba(12, 67, 83, 0.11);
  --shadow-soft: 0 10px 28px rgba(12, 67, 83, 0.08);
  background:
    linear-gradient(180deg, rgba(239, 252, 254, 0.98) 0%, rgba(233, 243, 246, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(0, 183, 199, 0.045) 0 1px, transparent 1px 72px);
}

body[data-company-theme="VIOFFICE"]::before {
  background: linear-gradient(90deg, #00b7c7, #173040);
}

body[data-company-theme="VIOFFICE"] .topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(207, 232, 237, 0.95);
}

body[data-company-theme="VIOFFICE"] .brand img,
body[data-company-theme="VIOFFICE"] .drawer-company-picker img,
body[data-company-theme="VIOFFICE"] .company-logo-row img {
  background: #ffffff;
  border-color: #d9f1f5;
}

body[data-company-theme="VIOFFICE"] button {
  background: #00b7c7;
  box-shadow: 0 10px 22px rgba(0, 183, 199, 0.18);
}

body[data-company-theme="VIOFFICE"] button:hover:not(:disabled) {
  background: #0094a3;
  box-shadow: 0 12px 26px rgba(0, 183, 199, 0.24);
}

body[data-company-theme="VIOFFICE"] button.secondary {
  color: #173040;
  background: #e8f6f8;
  border-color: #cfe8ed;
  box-shadow: none;
}

body[data-company-theme="VIOFFICE"] button.secondary:hover:not(:disabled) {
  background: #d9f1f5;
  border-color: #a9dbe5;
  box-shadow: var(--shadow-soft);
}

body[data-company-theme="VIOFFICE"] button.secondary.active,
body[data-company-theme="VIOFFICE"] .view-tab.active,
body[data-company-theme="VIOFFICE"] .drawer-link.active {
  color: #ffffff;
  background: #173040;
  border-color: #173040;
  box-shadow: 0 10px 22px rgba(23, 48, 64, 0.18);
}

body[data-company-theme="VIOFFICE"] .user-avatar {
  background: linear-gradient(135deg, #00b7c7, #173040);
}

body[data-company-theme="VIOFFICE"] .sidebar section,
body[data-company-theme="VIOFFICE"] .report-panel,
body[data-company-theme="VIOFFICE"] .summary-strip div,
body[data-company-theme="VIOFFICE"] .placeholder-card,
body[data-company-theme="VIOFFICE"] .employee-form-card,
body[data-company-theme="VIOFFICE"] .login-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(207, 232, 237, 0.95);
}

body[data-company-theme="VIOFFICE"] .drawer-note,
body[data-company-theme="VIOFFICE"] .login-note {
  background: #f0fbfd;
  border-color: #cfe8ed;
}

body[data-company-theme="VIOFFICE"] .employee-button.active {
  border-color: #00b7c7;
  background: #e9fbfd;
  box-shadow: inset 3px 0 0 #00b7c7;
}

body[data-company-theme="VIOFFICE"] .summary-strip div::before,
body[data-company-theme="VIOFFICE"] .company-card.active-brand {
  border-color: #00b7c7;
}

body[data-company-theme="VIOFFICE"] .summary-strip div::before {
  background: #00b7c7;
}

body[data-company-theme="VIOFFICE"] .summary-strip div:nth-child(2)::before,
body[data-company-theme="VIOFFICE"] .summary-strip div:nth-child(4)::before {
  background: #173040;
}

body[data-company-theme="VIOFFICE"] .summary-strip div:nth-child(3)::before,
body[data-company-theme="VIOFFICE"] .summary-strip div:nth-child(5)::before {
  background: #008899;
}

body[data-company-theme="VIOFFICE"] th {
  background: #f0fbfd;
}

body[data-company-theme="VIOFFICE"] tbody tr:hover {
  background: #f6fcfd;
}

body[data-company-theme="VIOFFICE"] .status {
  background: #00b7c7;
}

body[data-company-theme="VIOFFICE"] .status.holiday {
  background: #173040;
}

body[data-company-theme="VIOFFICE"] .status.rest {
  color: #476879;
  background: #e8f3f6;
}

body[data-company-theme="VIOFFICE"] .layout {
  background: linear-gradient(90deg, rgba(235, 249, 252, 0.72), rgba(247, 252, 253, 0.94));
}

body[data-company-theme="VIOFFICE"] .employee-button {
  color: #173040;
  background: #ffffff;
  border-color: #cfe8ed;
  box-shadow: none;
}

body[data-company-theme="VIOFFICE"] .employee-button:hover:not(:disabled) {
  color: #102f40;
  background: #f2fbfd;
  border-color: #85d3df;
  box-shadow: none;
}

body[data-company-theme="VIOFFICE"] .employee-button.active {
  color: #102f40;
  background: #eafafd;
  border-color: #00aebd;
  box-shadow: inset 4px 0 0 #00aebd;
}

body[data-company-theme="VIOFFICE"] .employee-button.active span,
body[data-company-theme="VIOFFICE"] .employee-button span {
  color: #476879;
}

body[data-company-theme="VIOFFICE"] .drawer-link {
  color: #173040;
  background: #ffffff;
  border-color: #cfe8ed;
  box-shadow: none;
}

body[data-company-theme="VIOFFICE"] .drawer-link:hover:not(:disabled) {
  background: #f2fbfd;
  border-color: #85d3df;
}

body[data-company-theme="VIOFFICE"] .sidebar section,
body[data-company-theme="VIOFFICE"] .report-panel,
body[data-company-theme="VIOFFICE"] .summary-strip div {
  background: rgba(255, 255, 255, 0.98);
}

body[data-company-theme="VIOFFICE"] .table-wrap {
  border-color: #bfe2e8;
}

body[data-company-theme="VIOFFICE"] .punch-chip {
  color: #173040;
  background: #ffffff;
  border-color: #bfe2e8;
}

body[data-company-theme="VIOFFICE"] .punch-chip span,
body[data-company-theme="VIOFFICE"] td span {
  color: #476879;
}

/* Interface polish pass */
.login-shell-wide {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 0;
  border: 1px solid rgba(216, 228, 232, 0.92);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(14, 32, 43, 0.12);
}

.login-brand-panel {
  min-height: 480px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 34px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(240, 250, 245, 0.98), rgba(232, 246, 236, 0.94)),
    repeating-linear-gradient(90deg, rgba(15, 37, 29, 0.035) 0 1px, transparent 1px 58px);
}

.login-brand-logo {
  width: min(78%, 300px);
  height: 230px;
  object-fit: contain;
  object-position: center;
  justify-self: center;
  align-self: end;
  filter: drop-shadow(0 18px 24px rgba(14, 32, 43, 0.1));
}

.login-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-brand-panel h1 {
  margin-top: 14px;
  font-size: 32px;
}

.login-brand-panel p {
  max-width: 390px;
  margin-top: 10px;
  font-size: 15px;
}

.login-brand-panel > div {
  width: 100%;
  max-width: 390px;
}

.login-shell-wide .login-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  align-content: center;
  padding: 44px;
}

.login-shell-wide .login-copy {
  gap: 10px;
}

.login-shell-wide .login-copy h1 {
  font-size: 32px;
}

.login-shell-wide .login-form {
  margin-top: 4px;
}

.login-shell-wide input {
  min-height: 46px;
}

.login-shell-wide button[type="submit"] {
  min-height: 46px;
}

.topbar {
  min-height: 86px;
  padding: 12px 22px;
}

.brand {
  gap: 18px;
}

.brand img {
  width: 132px;
  height: 84px;
  padding: 5px 7px;
  background: transparent;
  border-color: transparent;
}

.brand h1 {
  font-size: 24px;
}

.brand p {
  max-width: 520px;
}

.layout {
  gap: 20px;
  padding: 20px;
}

.sidebar section,
.report-panel,
.summary-strip div {
  border-radius: 10px;
}

.sidebar section {
  padding: 16px;
}

.report-panel {
  padding: 18px;
}

.summary-strip {
  gap: 12px;
}

.summary-strip div {
  min-height: 86px;
  padding: 17px 18px;
}

.summary-strip span {
  letter-spacing: 0;
}

.summary-strip strong {
  font-size: 27px;
}

.employee-button {
  border-radius: 8px;
  padding: 12px;
}

.employee-button strong {
  font-size: 14px;
}

.view-switch {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  width: fit-content;
}

.view-tab {
  min-width: 132px;
  border-radius: 8px;
}

.table-wrap {
  border-radius: 10px;
}

th,
td {
  padding: 12px 13px;
}

.app-drawer {
  padding: 20px;
}

.drawer-link {
  min-height: 44px;
  padding-inline: 14px;
}

.drawer-company-picker {
  padding: 10px;
}

.drawer-company-picker img {
  width: 108px;
  height: 72px;
  background: transparent;
}

.user-button {
  min-height: 50px;
}

@media (max-width: 860px) {
  .login-shell-wide {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 28px;
  }
}

@media (max-width: 700px) {
  .login-shell-wide .login-card {
    padding: 26px;
  }

  .login-brand-panel h1,
  .login-shell-wide .login-copy h1 {
    font-size: 27px;
  }

  .view-switch {
    width: 100%;
  }

  .view-tab {
    flex: 1 1 100%;
  }
}

@media (max-width: 980px) {
  .operation-summary-strip {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

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

@media (max-width: 700px) {
  .operation-hero-title {
    align-items: stretch;
  }

  .operation-hero-title .panel-actions,
  .operation-hero-title .panel-actions button {
    width: 100%;
  }

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

  .operation-kv div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Enterprise navigation refresh */
.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(191, 211, 201, 0.9);
  box-shadow: 0 14px 34px rgba(15, 37, 29, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-kicker,
.drawer-kicker,
.drawer-section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand h1 {
  line-height: 1.08;
}

.brand p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-button {
  border-color: rgba(13, 143, 99, 0.24);
  background: #ffffff;
}

.topbar-actions {
  min-width: max-content;
}

.user-button {
  border-color: rgba(191, 211, 201, 0.92);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 37, 29, 0.06);
}

.user-button:hover:not(:disabled) {
  background: #f7fbf8;
}

.app-drawer {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
  border-right: 1px solid var(--line);
}

.drawer-head {
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 2px 0 0;
}

.drawer-group {
  align-content: start;
  gap: 9px;
}

.drawer-section-label {
  display: block;
  padding: 8px 4px 0;
}

.drawer-link {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.drawer-link:hover:not(:disabled) {
  transform: translateX(2px);
}

.drawer-link.active {
  position: relative;
}

.drawer-link.active::after {
  content: "";
  position: absolute;
  inset: 10px 8px 10px auto;
  width: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
}

.module-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(13, 143, 99, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.drawer-link.active .module-icon {
  color: var(--green-dark);
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.85);
}

.drawer-company-switch {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.layout {
  align-items: start;
}

.sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar-card {
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--green);
}

.sidebar-period-card::before {
  background: var(--green-dark);
}

.sidebar-people-card::before {
  background: #5c8f2f;
}

.sidebar-card h2 {
  margin-top: 2px;
}

.content {
  min-width: 0;
}

.module-panel {
  animation: moduleFadeIn 160ms ease;
}

@keyframes moduleFadeIn {
  from {
    opacity: 0.72;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-company-theme="VIOFFICE"] .topbar {
  border-bottom-color: rgba(207, 232, 237, 0.96);
  box-shadow: 0 14px 34px rgba(12, 67, 83, 0.08);
}

body[data-company-theme="VIOFFICE"] .module-icon {
  color: #173040;
  background: #e8f6f8;
  border-color: #cfe8ed;
}

body[data-company-theme="VIOFFICE"] .drawer-link.active .module-icon {
  color: #173040;
  background: #ffffff;
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
  }

  .brand p {
    white-space: normal;
  }
}

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

  .brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
  }

  .brand img {
    width: 112px;
    height: 72px;
  }

  .brand-copy {
    align-self: center;
  }

  .topbar-actions,
  .user-menu,
  .user-button {
    width: 100%;
  }

  .app-drawer {
    gap: 14px;
  }

  .drawer-link {
    min-height: 46px;
  }
}

@media print {
  html,
  body {
    background: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body * {
    visibility: hidden;
  }

  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  body[data-print-area="fuelPrintArea"] #fuelPrintArea,
  body[data-print-area="deliveryPrintArea"] #deliveryPrintArea,
  body[data-print-area="attendanceExcelPrintArea"] #attendanceExcelPrintArea,
  body[data-print-area="reportPreviewPrintArea"] #reportPreviewPrintArea {
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  body[data-print-area="fuelPrintArea"] #fuelPrintArea *,
  body[data-print-area="deliveryPrintArea"] #deliveryPrintArea *,
  body[data-print-area="attendanceExcelPrintArea"] #attendanceExcelPrintArea *,
  body[data-print-area="reportPreviewPrintArea"] #reportPreviewPrintArea * {
    visibility: visible;
  }

  body[data-print-area="attendanceExcelPrintArea"] #attendanceExcelPrintArea,
  body[data-print-area="reportPreviewPrintArea"] #reportPreviewPrintArea {
    background: #ffffff;
    color: #000000;
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8px;
    padding: 4mm;
    max-height: none;
    overflow: visible;
    border: 0;
    break-inside: avoid;
  }

  .excel-report-title {
    border: 1px solid #8ac8d4;
    background: #e5f8fb !important;
    color: #0f2d38 !important;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 4px;
    margin-bottom: 4px;
  }

  .excel-report-print > .page-break-before:not(:first-child) {
    break-before: auto;
    page-break-before: auto;
  }

  .excel-report-meta,
  .excel-report-totals,
  .excel-report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
  }

  .excel-report-meta th,
  .excel-report-meta td,
  .excel-report-totals th,
  .excel-report-totals td,
  .excel-report-table th,
  .excel-report-table td {
    border: 1px solid #8ac8d4;
    padding: 2px 3px;
    vertical-align: middle;
  }

  .excel-report-meta th,
  .excel-report-totals th,
  .excel-report-table th {
    background: #e5f8fb !important;
    color: #0f2d38 !important;
    font-weight: 700;
    text-align: center;
  }

  .excel-report-meta td,
  .excel-report-totals td {
    font-weight: 600;
  }

  .excel-report-totals td {
    text-align: center;
    font-size: 10px;
    background: #f4fbfc !important;
  }

  .excel-report-logo img {
    max-height: 34px;
  }

  .excel-report-table td:nth-child(9) {
    font-size: 9px;
  }

  .excel-report-table td:nth-child(3),
  .excel-report-table td:nth-child(4),
  .excel-report-table td:nth-child(5),
  .excel-report-table td:nth-child(6),
  .excel-report-table td:nth-child(7),
  .excel-report-table td:nth-child(8) {
    text-align: center;
  }

  .print-head img {
    max-width: 150px;
  }

  .print-table th,
  .print-table td {
    padding: 8px;
  }

  .no-print {
    display: none !important;
  }
}
