/* Rotina360 R89 — histórico de aprovações do RH e login responsivo isolado. */

body.r360-blue-ux .r360-blue-rh-history-tab {
  position: relative;
}

body.r360-blue-ux .r360-blue-rh-history-tab.active,
body.r360-blue-ux .r360-blue-rh-history-tab.is-active {
  color: #fff !important;
  border-color: #155eef !important;
  background: linear-gradient(135deg, #5b4df6, #155eef) !important;
  box-shadow: 0 10px 24px rgba(21, 94, 239, .2);
}

body.r360-blue-ux .r360-blue-rh-history-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  color: #155eef;
  background: rgba(21, 94, 239, .1);
  font-size: 13px;
  font-weight: 900;
}

body.r360-blue-ux .r360-blue-rh-history-tab.active .r360-blue-rh-history-icon {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

body.r360-blue-ux .r360-blue-rh-history-panel {
  min-width: 0;
  margin-top: 12px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid #d8e4f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(30, 64, 175, .08);
}

body.r360-blue-ux .r360-blue-rh-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e6edf7;
}

body.r360-blue-ux .r360-blue-rh-history-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #5b4df6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

body.r360-blue-ux .r360-blue-rh-history-head h2 {
  margin: 0;
  color: #14213d;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.18;
}

body.r360-blue-ux .r360-blue-rh-history-head p {
  max-width: 800px;
  margin: 7px 0 0;
  color: #60708c;
  font-size: 13px;
  line-height: 1.55;
}

body.r360-blue-ux .r360-blue-rh-history-refresh,
body.r360-blue-ux .r360-blue-rh-history-clear {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #cbd8eb;
  border-radius: 10px;
  color: #17233c;
  background: #fff;
  font-weight: 800;
}

body.r360-blue-ux .r360-blue-rh-history-refresh:hover,
body.r360-blue-ux .r360-blue-rh-history-clear:hover {
  color: #155eef;
  border-color: #155eef;
  background: #f5f8ff;
}

body.r360-blue-ux .r360-blue-rh-history-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

body.r360-blue-ux .r360-blue-rh-history-metrics article {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #dce6f5;
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfdff, #f5f8ff);
}

body.r360-blue-ux .r360-blue-rh-history-metrics span,
body.r360-blue-ux .r360-blue-rh-history-metrics small {
  display: block;
  color: #65758f;
  font-size: 11px;
}

body.r360-blue-ux .r360-blue-rh-history-metrics strong {
  display: block;
  margin: 4px 0;
  overflow-wrap: anywhere;
  color: #14213d;
  font-size: 19px;
  line-height: 1.18;
}

body.r360-blue-ux .r360-blue-rh-history-tools {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

body.r360-blue-ux .r360-blue-rh-history-search {
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #cbd8eb;
  border-radius: 11px;
  background: #fff;
}

body.r360-blue-ux .r360-blue-rh-history-search:focus-within {
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, .1);
}

body.r360-blue-ux .r360-blue-rh-history-search span {
  margin-right: 8px;
  color: #71809a;
  font-size: 20px;
}

body.r360-blue-ux .r360-blue-rh-history-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #14213d;
  background: transparent;
  font: inherit;
  font-size: 14px;
}

body.r360-blue-ux .r360-blue-rh-history-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr)) repeat(2, minmax(130px, .7fr)) auto;
  gap: 8px;
  flex: 1 1 100%;
  min-width: 0;
}

body.r360-blue-ux .r360-blue-rh-history-filters label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.r360-blue-ux .r360-blue-rh-history-filters label > span {
  padding-left: 2px;
  color: #68778f;
  font-size: 10px;
  font-weight: 750;
}

body.r360-blue-ux .r360-blue-rh-history-filters select,
body.r360-blue-ux .r360-blue-rh-history-filters input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #cbd8eb;
  border-radius: 10px;
  color: #263550;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

body.r360-blue-ux .r360-blue-rh-history-filters select:focus,
body.r360-blue-ux .r360-blue-rh-history-filters input:focus {
  outline: 0;
  border-color: #155eef;
  box-shadow: 0 0 0 3px rgba(21, 94, 239, .1);
}

body.r360-blue-ux .r360-blue-rh-history-clear {
  align-self: end;
  white-space: nowrap;
}

body.r360-blue-ux .r360-blue-rh-history-order {
  margin-left: auto;
  color: #6b7890;
  font-size: 11px;
  font-weight: 750;
}

body.r360-blue-ux .r360-blue-rh-history-list {
  display: grid;
  gap: 10px;
}

body.r360-blue-ux .r360-blue-rh-history-card {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1.4fr) minmax(190px, 1fr) minmax(175px, .8fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce6f5;
  border-radius: 14px;
  background: #fbfdff;
}

body.r360-blue-ux .r360-blue-rh-history-card:hover {
  border-color: #aebff0;
  box-shadow: 0 10px 24px rgba(30, 64, 175, .08);
}

body.r360-blue-ux .r360-blue-rh-history-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #5b4df6, #155eef);
  font-size: 14px;
  font-weight: 900;
}

body.r360-blue-ux .r360-blue-rh-history-person,
body.r360-blue-ux .r360-blue-rh-history-approved,
body.r360-blue-ux .r360-blue-rh-history-date {
  min-width: 0;
}

body.r360-blue-ux .r360-blue-rh-history-person strong,
body.r360-blue-ux .r360-blue-rh-history-approved strong,
body.r360-blue-ux .r360-blue-rh-history-date strong {
  display: block;
  overflow-wrap: anywhere;
  color: #14213d;
  font-size: 13px;
}

body.r360-blue-ux .r360-blue-rh-history-person span,
body.r360-blue-ux .r360-blue-rh-history-person small,
body.r360-blue-ux .r360-blue-rh-history-approved span,
body.r360-blue-ux .r360-blue-rh-history-approved small,
body.r360-blue-ux .r360-blue-rh-history-date span,
body.r360-blue-ux .r360-blue-rh-history-date small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #67758d;
  font-size: 10px;
}

body.r360-blue-ux .r360-blue-rh-history-approved,
body.r360-blue-ux .r360-blue-rh-history-date {
  padding-left: 14px;
  border-left: 1px solid #e1e8f3;
}

body.r360-blue-ux .r360-blue-rh-history-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  border: 1px dashed #cbd8eb;
  border-radius: 14px;
  color: #68778f;
  text-align: center;
  background: #fbfdff;
}

body.r360-blue-ux .r360-blue-rh-history-state strong,
body.r360-blue-ux .r360-blue-rh-history-state span { display: block; }
body.r360-blue-ux .r360-blue-rh-history-state.success { border-color: #a7e3c1; color: #166534; background: #f0fdf4; }
body.r360-blue-ux .r360-blue-rh-history-state.error { border-color: #fecaca; color: #991b1b; background: #fff7f7; }

/* Login: escopo próprio para não atingir formulários ou cards internos do sistema. */
.auth-screen.r360-layout-scope {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 42px);
  overflow: hidden auto;
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.17), transparent 28%),
    radial-gradient(circle at 87% 82%, rgba(91,77,246,.32), transparent 30%),
    linear-gradient(145deg, #0b2f75 0%, #155eef 54%, #5b4df6 115%) !important;
}

.auth-screen.r360-layout-scope::before,
.auth-screen.r360-layout-scope::after {
  content: '';
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  pointer-events: none;
}

.auth-screen.r360-layout-scope::before { width: min(48vw, 620px); aspect-ratio: 1; left: -18vw; top: -28vh; }
.auth-screen.r360-layout-scope::after { width: min(42vw, 540px); aspect-ratio: 1; right: -16vw; bottom: -30vh; }

.auth-screen.r360-layout-scope .auth-card {
  position: relative;
  width: min(100%, 420px);
  max-width: 420px;
  padding: clamp(28px, 4vw, 40px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  box-shadow: 0 28px 72px rgba(4, 22, 58, .34);
}

.auth-screen.r360-layout-scope .auth-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #5b4df6, #155eef, #42b4e6);
}

.auth-screen.r360-layout-scope .auth-logo {
  margin-top: 2px;
  color: #155eef;
  font-size: clamp(27px, 3vw, 32px);
  letter-spacing: -.04em;
}

.auth-screen.r360-layout-scope .auth-tag {
  max-width: 290px;
  margin: 4px auto 24px;
  color: #66758d;
  font-size: 12px;
  line-height: 1.45;
}

.auth-screen.r360-layout-scope .auth-message { min-height: 8px; margin-bottom: 4px; }
.auth-screen.r360-layout-scope .auth-card form.r360-wrap-actions {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}
.auth-screen.r360-layout-scope .auth-card form.r360-wrap-actions > * {
  width: 100% !important;
  max-width: none !important;
}
.auth-screen.r360-layout-scope .field { margin-bottom: 16px; }
.auth-screen.r360-layout-scope .field label { margin-bottom: 7px; color: #263550; font-size: 12px; }

.auth-screen.r360-layout-scope .field input {
  min-height: 48px;
  padding: 11px 13px;
  border-color: #cbd6e5;
  border-radius: 11px;
  font-size: 16px;
}

.auth-screen.r360-layout-scope .field input:focus {
  border-color: #155eef;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, .11);
}

.auth-screen.r360-layout-scope .btn-block {
  min-height: 48px;
  margin-top: 5px;
  border-radius: 11px;
  box-shadow: 0 10px 24px rgba(21, 94, 239, .24);
}

.auth-screen.r360-layout-scope .auth-help {
  margin-top: 18px;
  color: #67758d;
  font-size: 12px;
  line-height: 1.45;
}

.auth-screen.r360-layout-scope .auth-link {
  min-height: 40px;
  margin-top: 5px;
  border-radius: 8px;
  font-weight: 700;
}

@media (max-width: 1120px) {
  body.r360-blue-ux .r360-blue-rh-history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.r360-blue-ux .r360-blue-rh-history-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.r360-blue-ux .r360-blue-rh-history-clear { width: 100%; }
  body.r360-blue-ux .r360-blue-rh-history-card { grid-template-columns: 48px minmax(0, 1fr) minmax(180px, .8fr); }
  body.r360-blue-ux .r360-blue-rh-history-date { grid-column: 2 / -1; padding: 10px 0 0; border-top: 1px solid #e1e8f3; border-left: 0; }
}

@media (max-width: 760px) {
  body.r360-blue-ux .r360-blue-rh-history-panel { padding: 14px; border-radius: 15px; }
  body.r360-blue-ux .r360-blue-rh-history-head { align-items: stretch; flex-direction: column; }
  body.r360-blue-ux .r360-blue-rh-history-refresh { width: 100%; min-height: 46px; }
  body.r360-blue-ux .r360-blue-rh-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.r360-blue-ux .r360-blue-rh-history-card { grid-template-columns: 42px minmax(0, 1fr); align-items: start; padding: 12px; }
  body.r360-blue-ux .r360-blue-rh-history-avatar { width: 42px; height: 42px; border-radius: 12px; }
  body.r360-blue-ux .r360-blue-rh-history-approved,
  body.r360-blue-ux .r360-blue-rh-history-date { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid #e1e8f3; border-left: 0; }
}

@media (max-width: 520px) {
  body.r360-blue-ux .r360-blue-rh-history-metrics,
  body.r360-blue-ux .r360-blue-rh-history-filters { grid-template-columns: 1fr; }
  body.r360-blue-ux .r360-blue-rh-history-search,
  body.r360-blue-ux .r360-blue-rh-history-filters select,
  body.r360-blue-ux .r360-blue-rh-history-filters input,
  body.r360-blue-ux .r360-blue-rh-history-clear { min-height: 46px; }

  .auth-screen.r360-layout-scope {
    align-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  }

  .auth-screen.r360-layout-scope .auth-card {
    width: 100%;
    padding: 26px 20px 22px;
    border-radius: 18px;
  }

  .auth-screen.r360-layout-scope .auth-tag { margin-bottom: 18px; }
}

@media (max-height: 620px) {
  .auth-screen.r360-layout-scope { align-items: flex-start; }
  .auth-screen.r360-layout-scope .auth-card { margin: auto 0; padding-top: 24px; padding-bottom: 20px; }
  .auth-screen.r360-layout-scope .auth-tag { margin-bottom: 14px; }
  .auth-screen.r360-layout-scope .field { margin-bottom: 11px; }
  .auth-screen.r360-layout-scope .auth-help { margin-top: 12px; }
}
