.rhv-root {
  box-sizing: border-box;
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  color: #18232d;
  font: inherit;
}

.rhv-root *,
.rhv-root *::before,
.rhv-root *::after {
  box-sizing: border-box;
}

.rhv-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rhv-title,
.rhv-state-title,
.rhv-child-title,
.rhv-panel-title,
.rhv-routine-title {
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.rhv-title {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.rhv-state,
.rhv-child-group,
.rhv-pending-panel {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #d8e0e5;
  border-radius: 0.85rem;
  background: #fff;
}

.rhv-state-title,
.rhv-child-title,
.rhv-panel-title {
  font-size: 1.1rem;
}

.rhv-state-message,
.rhv-progress,
.rhv-panel-note,
.rhv-empty {
  margin: 0.55rem 0 0;
  color: #52616c;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.rhv-child-group {
  display: grid;
  gap: 0.75rem;
}

.rhv-progress {
  margin-top: 0;
  font-size: 0.9rem;
}

.rhv-routine-list,
.rhv-pending-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rhv-routine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.7rem 0;
  border-top: 1px solid #e6ebee;
}

.rhv-routine-details {
  min-width: 0;
  flex: 1 1 auto;
}

.rhv-routine-title {
  font-size: 1rem;
  font-weight: 650;
}

.rhv-routine-status {
  margin: 0.25rem 0 0;
  color: #52616c;
  font-size: 0.9rem;
  line-height: 1.35;
}

.rhv-status-approved {
  color: #1f6b42;
}

.rhv-status-pending {
  color: #72510a;
}

.rhv-action {
  flex: 0 0 auto;
  min-width: 6.5rem;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid #244c64;
  border-radius: 0.65rem;
  background: #244c64;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

.rhv-action:hover:not(:disabled) {
  background: #17394e;
}

.rhv-action:focus-visible {
  outline: 3px solid #d28b18;
  outline-offset: 2px;
}

.rhv-action:disabled {
  border-color: #87949c;
  background: #e1e6e9;
  color: #46535b;
  cursor: not-allowed;
}

.rhv-pending-panel {
  display: grid;
  gap: 0.65rem;
  border-color: #e1d2a9;
  background: #fffdf7;
}

.rhv-pending-child {
  flex: 1 0 100%;
  color: #52616c;
  font-size: 0.88rem;
  font-weight: 650;
}

.rhv-empty {
  padding: 0.5rem 0;
}

@media (max-width: 420px) {
  .rhv-state,
  .rhv-child-group,
  .rhv-pending-panel {
    padding: 0.8rem;
  }

  .rhv-routine {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .rhv-action {
    width: 100%;
  }
}
