:root {
  --bg: #f5f5f2;
  --bg-card: #ffffff;
  --bg-muted: #efeeea;
  --border: #d9d6cf;
  --border-strong: #b8b3a8;
  --text: #1a1a1a;
  --text-muted: #6b6b66;
  --text-soft: #8a8a82;
  --accent: #2d4a2b;
  --accent-soft: #e8efe7;
  --accent-hover: #1f3a1d;
  --danger: #a83232;
  --danger-bg: #fce8e6;
  --warning: #b8651a;
  --warning-bg: #fbe9d3;
  --info: #2a5a8f;
  --info-bg: #e3edf7;
  --success: #2d6a3e;
  --success-bg: #e0f0e4;
  --feriado-bg: #fde2c7;
  --domingo-bg: #d8e8d2;
  --falta-bg: #fadcd9;
  --atestado-bg: #d9e8f5;
  --ferias-bg: #efe2f5;
  --ferias-fg: #5a3270;
  --rescisao-bg: #e2e2e2;
  --rescisao-fg: #4a4a4a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ============ LAYOUT ============ */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #1a1a1a;
  color: #e8e6e0;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: #fff;
}

.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a8a82;
  margin-bottom: 32px;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b6b66;
  margin-bottom: 8px;
  padding: 0 8px;
}

.nav-item {
  display: block;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: #d4d2cc;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-item.active {
  background: #fff;
  color: #1a1a1a;
}

.nav-empresa-atual {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-weight: 600;
  padding: 10px 12px;
  line-height: 1.3;
  font-size: 13px;
  white-space: normal;
  word-wrap: break-word;
}

.nav-empresa-atual:hover {
  background: rgba(255,255,255,0.10);
}

.nav-empresa-atual .empresa-trocar {
  display: block;
  font-size: 10.5px;
  color: #8a8a82;
  font-weight: 500;
  margin-top: 3px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empresa-badge {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 12px;
  margin-top: 24px;
  font-size: 12px;
}

.empresa-badge .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a8a82;
  margin-bottom: 4px;
}

.empresa-badge .nome {
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.3;
}

.empresa-badge .competencia {
  font-family: 'IBM Plex Mono', monospace;
  color: #d4d2cc;
  margin-top: 6px;
  font-size: 12px;
}

/* ============ MAIN ============ */
.main {
  padding: 32px 40px;
  max-width: 1400px;
  width: 100%;
}

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

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  white-space: nowrap;
}

.btn:hover { background: var(--bg-muted); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-small { padding: 5px 10px; font-size: 12.5px; }

.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-muted); }

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 500;
}

.input, .select, .textarea {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-card);
  font-size: 13.5px;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45,74,43,0.12);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  user-select: none;
}

.checkbox input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }

/* ============ TABLES ============ */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
}

table.data th {
  background: var(--bg-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(0,0,0,0.015); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-off { background: #ebe9e3; color: var(--text-muted); }
.badge-warn { background: var(--warning-bg); color: var(--warning); }

/* ============ PONTO TABLE ============ */
.ponto-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ponto-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.ponto-header h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ponto-header .sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

table.ponto {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  table-layout: fixed;
}

table.ponto th {
  background: #fff;
  padding: 10px 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-strong);
  text-align: center;
}

table.ponto td {
  padding: 0;
  border: 1px solid var(--border);
  text-align: center;
  height: 30px;
  background: #fff;
}

table.ponto td.data-cell {
  padding: 0 8px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

table.ponto td.dia-cell {
  padding: 0 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11.5px;
  color: var(--text-muted);
}

table.ponto td.abona-cell {
  padding: 0;
}

table.ponto input.t {
  width: 100%;
  height: 100%;
  padding: 4px 6px;
  border: none;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  color: var(--text);
}

table.ponto input.t:focus {
  background: #fffbe6;
  box-shadow: inset 0 0 0 2px var(--accent);
}

table.ponto select.abona-sel {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  padding: 4px 4px;
  text-align: center;
  font-family: inherit;
  font-size: 11.5px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  text-align-last: center;
  cursor: pointer;
}

table.ponto select.abona-sel:focus {
  background: #fffbe6;
  box-shadow: inset 0 0 0 2px var(--accent);
}

table.ponto td.calc {
  color: var(--text-muted);
  font-weight: 500;
}

table.ponto td.calc.he50 { color: var(--warning); font-weight: 600; }
table.ponto td.calc.he100 { color: var(--danger); font-weight: 600; }
table.ponto td.calc.atraso { color: var(--danger); font-weight: 600; }

/* Row states */
table.ponto tr.row-feriado td:not(.calc) { background: var(--feriado-bg); }
table.ponto tr.row-domingo td:not(.calc) { background: var(--domingo-bg); }
table.ponto tr.row-feriado td.data-cell,
table.ponto tr.row-feriado td.dia-cell { background: var(--feriado-bg); color: #6b3a0f; font-weight: 600; }
table.ponto tr.row-domingo td.data-cell,
table.ponto tr.row-domingo td.dia-cell { background: var(--domingo-bg); color: #2d4a2b; font-weight: 600; }

table.ponto tr.row-falta td { background: var(--falta-bg); color: var(--danger); font-weight: 600; }
table.ponto tr.row-atestado td { background: var(--atestado-bg); color: var(--info); font-weight: 600; }
table.ponto tr.row-ferias td { background: var(--ferias-bg); color: var(--ferias-fg); font-weight: 600; }
table.ponto tr.row-rescisao td { background: var(--rescisao-bg); color: var(--rescisao-fg); font-weight: 600; }
table.ponto tr.row-falta input.t,
table.ponto tr.row-atestado input.t,
table.ponto tr.row-ferias input.t,
table.ponto tr.row-rescisao input.t { color: inherit; font-weight: inherit; }
table.ponto input.t.invalid { background: #fadcd9; color: var(--danger); border-color: var(--danger); }
table.ponto input.t.incompleto { background: #fff3cd; }

table.ponto tfoot td {
  background: var(--bg-muted);
  font-weight: 700;
  padding: 10px 6px;
  border-top: 2px solid var(--border-strong);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
}

.totals-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
}

.tot-item {
  text-align: center;
}

.tot-item .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.tot-item .value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
}

.tot-item .value.he50 { color: var(--warning); }
.tot-item .value.he100 { color: var(--danger); }
.tot-item .value.atraso { color: var(--danger); }

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal {
  background: var(--bg-card);
  border-radius: 10px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-muted);
}

.close-btn {
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  padding: 4px 8px;
}

/* ============ MISC ============ */
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.flex-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 8px; }
.hidden { display: none !important; }

.warn-box {
  padding: 11px 14px;
  background: var(--warning-bg);
  color: var(--warning);
  border-left: 3px solid var(--warning);
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 14px;
}

.info-box {
  padding: 11px 14px;
  background: var(--info-bg);
  color: var(--info);
  border-left: 3px solid var(--info);
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 14px;
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.05);
}

.jornada-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.jornada-table th, .jornada-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  text-align: center;
}

.jornada-table th {
  background: var(--bg-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.jornada-table input {
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  outline: none;
}

.jornada-table input:focus { background: #fffbe6; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a1a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

.search-input {
  max-width: 320px;
}

.empresa-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg-card);
  cursor: pointer;
}

.empresa-list-item:hover { border-color: var(--accent); }
.empresa-list-item.active { background: var(--accent-soft); border-color: var(--accent); }

/* Grid de cards de empresa */
.empresas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0 16px;
}

.empresa-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: transform .12s, border-color .12s, box-shadow .12s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empresa-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.empresa-card.ativa {
  border-color: var(--accent);
  border-width: 2px;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
}

.empresa-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.empresa-codigo {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.empresa-nome {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
}

.empresa-stats {
  font-size: 12px;
  color: var(--text-muted);
}

.empresa-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Scroll horizontal para tabelas */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

/* Banner de aviso de backup local */
.banner-aviso-local {
  background: #fff3cd;
  border: 1px solid #ffd966;
  color: #6b5113;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin: 0 16px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.banner-aviso-local b { color: #5a4310; }
.banner-aviso-local button {
  background: #ffd966;
  border: none;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 42px;
  height: 42px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ============ RESPONSIVO MOBILE ============ */
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100vh;
    z-index: 99;
    transition: left .25s ease;
    box-shadow: 4px 0 12px rgba(0,0,0,.2);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 98;
  }

  .sidebar-backdrop.show { display: block; }

  .menu-toggle { display: flex; align-items: center; justify-content: center; }

  .main {
    padding: 60px 12px 24px;
    max-width: 100%;
  }

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

  .page-title { font-size: 22px; }

  .page-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .page-actions .field {
    flex: 1;
    min-width: 120px;
  }

  .empresas-grid {
    grid-template-columns: 1fr;
    padding: 0 4px;
  }

  /* Tabelas — scroll horizontal */
  .table-wrap, .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.ponto {
    min-width: 740px;
  }

  table.data {
    min-width: 600px;
  }

  /* Inputs maiores no celular */
  table.ponto input.t {
    font-size: 14px;
    min-height: 32px;
  }

  .totals-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 14px;
    margin: 0 4px 12px;
  }

  .modal {
    width: calc(100% - 24px);
    max-width: 100%;
    max-height: 90vh;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .ponto-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media print {
  .sidebar, .page-actions, .legend, .totals-summary .no-print, .menu-toggle, .sidebar-backdrop { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
}

/* ============================================================
   TELA DE LOGIN
============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.login-box {
  background: #fff;
  border-radius: 14px;
  padding: 36px 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.login-brand {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.login-erro {
  background: #fadcd9;
  color: #a83232;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 16px;
  border: 1px solid #f0c2bd;
}

.login-foot {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

/* ============================================================
   STATUS DE SINCRONIZAÇÃO (canto inferior direito)
============================================================ */
.sync-status {
  position: fixed;
  bottom: 14px;
  right: 14px;
  background: #1a1a1a;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: 'IBM Plex Mono', monospace;
  z-index: 90;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-status.salvando { background: #d68918; }
.sync-status.ok { background: var(--success); }
.sync-status.erro { background: var(--danger); }

.sync-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* Link de acesso da empresa (admin vê) */
.token-link {
  background: #f5f5f0;
  border: 1px dashed #bdbdb5;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  word-break: break-all;
  color: #555;
}

.token-link button {
  margin-left: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .login-box { padding: 28px 22px; }
}
