/* Ponto RH - estilos (compativel com Safari antigo / iPad) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0ea5e9 100%);
  min-height: 100vh;
  color: #1f2937;
  -webkit-text-size-adjust: 100%;
}
.container { max-width: 1100px; margin: 0 auto; padding: 16px; }
.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 24px;
  margin: 16px 0;
}
h1, h2, h3 { color: #0f172a; margin-top: 0; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
.muted { color: #6b7280; font-size: 14px; }
.center { text-align: center; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #1d4ed8; }
.btn:active { transform: scale(0.98); }
.btn-big { padding: 22px 32px; font-size: 20px; border-radius: 16px; width: 100%; }
.btn-green { background: #16a34a; }
.btn-green:hover { background: #15803d; }
.btn-red { background: #dc2626; }
.btn-red:hover { background: #b91c1c; }
.btn-gray { background: #6b7280; }
.btn-gray:hover { background: #4b5563; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }

.input, select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin: 6px 0 12px 0;
  outline: none;
  -webkit-appearance: none;
}
.input:focus, select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }

.label { font-weight: 600; font-size: 14px; color: #374151; display: block; margin-top: 8px; }

.row { display: flex; flex-wrap: wrap; gap: 12px; }
.col { flex: 1; min-width: 200px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
th { background: #f3f4f6; font-weight: 600; color: #374151; position: sticky; top: 0; }
tr:hover td { background: #f9fafb; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #e5e7eb; color: #374151; }

.msg { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.msg-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.msg-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.msg-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.hidden { display: none !important; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 12px 0; color: #fff;
}
.topbar h1 { color: #fff; font-size: 22px; margin: 0; }
.topbar .user { font-size: 13px; opacity: 0.9; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .col { min-width: 150px; }

/* Organizacao do painel do RH */
.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.filters-grid .field {
  flex: 1 1 190px;
  min-width: 170px;
}
.filters-grid .field .input { margin: 4px 0 0 0; }

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}
.section-head h2 { margin: 0; font-size: 18px; }
.section-head .sub { font-size: 12px; color: #6b7280; }

.btn-blue { background: #0ea5e9; }
.btn-blue:hover { background: #0284c7; }

.stat { background: #f8fafc; border-radius: 12px; padding: 14px; text-align: center; }
.stat .num { font-size: 26px; font-weight: 700; color: #2563eb; }
.stat .lbl { font-size: 12px; color: #6b7280; }

.grid-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.grid-stats .stat { flex: 1; min-width: 120px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 50;
  padding: 16px;
}
.modal { background: #fff; border-radius: 16px; padding: 24px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }

@media (max-width: 600px) {
  .card { padding: 16px; }
  h1 { font-size: 22px; }
  .btn-big { font-size: 18px; padding: 18px 24px; }
}

/* iPad: botao grande */
@media (min-width: 700px) and (max-width: 1100px) {
  .btn-big { font-size: 22px; padding: 26px 32px; }
}