/**
 * Capa visual — charcoal / gris profesional (alineado a citas / mantenimiento).
 */
:root {
  --gr-primary: #3a3f51;
  --gr-primary-hover: #2c303c;
  --gr-accent: #5a6275;
  --gr-success: #3d8b54;
  --gr-ink: #2a2f3a;
  --gr-ink-soft: #5c6570;
  --gr-sidebar-bg: #252830;
  --gr-sidebar-text: #d5d8e0;
  --gr-header-bg: #f3f4f6;
  --gr-header-border: #d0d4dc;
  --gr-page-bg: #e9ecef;
  --gr-card: #ffffff;
  --gr-radius: 6px;
  --gr-focus: 0 0 0 3px rgba(58, 63, 81, 0.28);
  --gr-shadow: 0 2px 10px rgba(37, 40, 48, 0.07);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--gr-page-bg);
  color: var(--gr-ink);
  font-family: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--gr-primary); text-decoration: none; }
a:hover { color: var(--gr-primary-hover); text-decoration: underline; }

.gr-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gr-header {
  background: linear-gradient(180deg, #fafbfc 0%, var(--gr-header-bg) 100%);
  border-bottom: 1px solid var(--gr-header-border);
  box-shadow: 0 1px 3px rgba(37, 40, 48, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  min-height: 56px;
  gap: 16px;
}

.gr-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gr-brand img {
  height: 36px;
  width: auto;
  display: block;
}

.gr-brand-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--gr-ink);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gr-header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 13px;
  color: var(--gr-ink-soft);
}

.gr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gr-header-border);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--gr-ink);
}

.gr-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

.gr-sidebar {
  width: 220px;
  background: var(--gr-sidebar-bg);
  color: var(--gr-sidebar-text);
  padding: 16px 0;
  flex-shrink: 0;
}

.gr-sidebar nav a {
  display: block;
  color: var(--gr-sidebar-text);
  padding: 10px 18px;
  text-decoration: none;
  border-left: 3px solid transparent;
  font-size: 13px;
}

.gr-sidebar nav a:hover,
.gr-sidebar nav a.is-active {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #9aa3b5;
  color: #fff;
  text-decoration: none;
}

.gr-sidebar .gr-nav-section {
  padding: 14px 18px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

.gr-main {
  flex: 1;
  padding: 22px 24px 40px;
  min-width: 0;
}

.gr-page-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  color: var(--gr-ink);
}

.gr-page-sub {
  display: none;
  margin: 0 0 20px;
  color: var(--gr-ink-soft);
  font-size: 13px;
}

.gr-card {
  background: var(--gr-card);
  border-radius: var(--gr-radius);
  box-shadow: var(--gr-shadow);
  border: 1px solid #dde1e8;
  padding: 18px 20px;
}

.gr-card + .gr-card { margin-top: 16px; }

.gr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.gr-stat {
  background: #fff;
  border: 1px solid #dde1e8;
  border-radius: var(--gr-radius);
  padding: 14px 16px;
  box-shadow: var(--gr-shadow);
}

.gr-stat-label {
  font-size: 12px;
  color: var(--gr-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gr-stat-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gr-ink);
}

.gr-btn {
  display: inline-block;
  border: none;
  border-radius: 4px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--gr-primary);
  color: #fff;
  text-decoration: none;
}

.gr-btn:hover {
  background: var(--gr-primary-hover);
  color: #fff;
  text-decoration: none;
}

.gr-btn-ghost {
  background: transparent;
  color: var(--gr-primary);
  border: 1px solid var(--gr-header-border);
}

.gr-btn-ghost:hover {
  background: #eef0f4;
  color: var(--gr-primary-hover);
}

.gr-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gr-form-actions[hidden] {
  display: none !important;
}

.gr-fase1-fields {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.gr-fase1-fields:disabled .gr-detalle-split-body,
.gr-fase1-fields[disabled] .gr-detalle-split-body {
  opacity: 0.72;
  pointer-events: none;
}

.gr-fase-panel[hidden] {
  display: none !important;
}

.gr-fase-panel.is-visible {
  animation: gr-fase-in 0.25s ease-out;
}

@keyframes gr-fase-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gr-alert {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 13px;
}

.gr-toast {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 80;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  animation: gr-toast-in 0.25s ease-out;
}

.gr-toast.is-hiding {
  animation: gr-toast-out 0.3s ease-in forwards;
}

.gr-toast-ok {
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #166534;
}

.gr-toast-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

@keyframes gr-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gr-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.gr-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.gr-alert-ok {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.gr-muted { color: var(--gr-ink-soft); }
.gr-footer-note {
  margin-top: 28px;
  font-size: 12px;
  color: var(--gr-ink-soft);
}

/* -------- Login -------- */
body.gr-login {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(58, 63, 81, 0.18), transparent 60%),
    linear-gradient(165deg, #dfe3ea 0%, #e9ecef 45%, #d5dae3 100%);
}

.gr-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gr-login-panel {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(37, 40, 48, 0.14);
  border: 1px solid #d0d4dc;
}

.gr-login-hero {
  background:
    linear-gradient(160deg, rgba(37, 40, 48, 0.92), rgba(58, 63, 81, 0.88)),
    #252830;
  color: #e8eaef;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gr-login-hero img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
  padding: 8px;
  margin-bottom: 22px;
}

.gr-login-hero h1 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
}

.gr-login-hero p {
  margin: 0;
  opacity: 0.85;
  font-size: 14px;
  max-width: 36ch;
}

.gr-login-form {
  padding: 36px 32px;
}

.gr-login-form header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--gr-ink);
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
}

.gr-field {
  margin-bottom: 14px;
}

.gr-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: #1f2430;
}

.gr-field input {
  width: 100%;
  border: 1px solid #c5c9d4;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--gr-ink);
  background: #fff;
}

.gr-field input:focus {
  outline: none;
  border-color: var(--gr-primary);
  box-shadow: var(--gr-focus);
}

.gr-login-form .gr-btn {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
}

.gr-login-port {
  margin-top: 18px;
  font-size: 12px;
  color: var(--gr-ink-soft);
  text-align: center;
}

.gr-login-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.gr-login-actions .gr-btn {
  width: auto;
  flex: 1;
}

.gr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gr-select-sucursal {
  border: 1px solid var(--gr-header-border);
  border-radius: 999px;
  padding: 5px 12px;
  background: #fff;
  color: var(--gr-ink);
  font-size: 13px;
  max-width: 220px;
}

.gr-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}

.gr-form select,
.gr-form input[type="text"],
.gr-form input[type="email"],
.gr-form input[type="password"] {
  width: 100%;
  border: 1px solid #c5c9d4;
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 14px;
  color: var(--gr-ink);
  background: #fff;
}

.gr-form select:focus,
.gr-form input:focus {
  outline: none;
  border-color: var(--gr-primary);
  box-shadow: var(--gr-focus);
}

.gr-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.gr-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gr-ink);
}

.gr-periodo-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.gr-table-wrap {
  overflow-x: auto;
}

.gr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gr-table th,
.gr-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.gr-table th {
  color: #1f2430;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gr-table tr:hover td {
  background: #f7f8fa;
}

.gr-form textarea {
  width: 100%;
  border: 1px solid #c5c9d4;
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 14px;
  color: var(--gr-ink);
  background: #fff;
  resize: vertical;
  font-family: inherit;
}

.gr-form textarea:focus {
  outline: none;
  border-color: var(--gr-primary);
  box-shadow: var(--gr-focus);
}

.gr-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.gr-inline-form {
  display: inline;
  margin: 0;
}

.gr-link-danger {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.gr-stat-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gr-stat-link:hover {
  border-color: #b0b6c3;
  box-shadow: 0 3px 14px rgba(37, 40, 48, 0.12);
  text-decoration: none;
  color: inherit;
}

.gr-stat-link .gr-stat-value {
  font-size: 14px;
  font-weight: 600;
}

.gr-card-activo {
  border-color: #86efac;
  background: #f0fdf4;
}

.gr-row-activo td {
  background: #f0fdf4 !important;
}

.gr-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.gr-badge-ok,
.gr-badge-vigente {
  background: #dcfce7;
  color: #166534;
}

.gr-badge-proximo {
  background: #e0e7ff;
  color: #3730a3;
}

.gr-badge-vencido {
  background: #fee2e2;
  color: #991b1b;
}

.gr-badge-sin_vigencia {
  background: #f3f4f6;
  color: #4b5563;
}

.gr-form input[type="date"] {
  width: 100%;
  border: 1px solid #c5c9d4;
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 14px;
  color: var(--gr-ink);
  background: #fff;
}

.gr-form input[type="file"] {
  width: 100%;
  font-size: 13px;
}

.gr-thumbs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.gr-thumbs img {
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #d0d4dc;
  width: 48px;
  height: 48px;
}

.gr-detalle-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 21%);
  gap: 16px 22px;
  align-items: start;
  margin-top: 12px;
}

.gr-detalle-split:not(:has(.gr-detalle-fotos)) {
  grid-template-columns: 1fr;
}

.gr-detalle-split-body {
  min-width: 0;
}

.gr-detalle-fotos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gr-detalle-fotos.is-single {
  grid-template-columns: 1fr;
}

.gr-detalle-foto-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gr-detalle-foto {
  display: block;
  overflow: hidden;
  border: 1px solid #d0d4dc;
  border-radius: 8px;
  background: #eef0f3;
  box-shadow: 0 1px 4px rgba(37, 40, 48, 0.08);
}

.gr-detalle-foto img {
  display: block;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  object-fit: cover;
}

.gr-foto-rotate-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 160px;
}

.gr-foto-rotate-form {
  margin: 0;
}

.gr-foto-rotate-btn {
  padding: 4px 8px !important;
  font-size: 12px !important;
  min-height: 0;
  line-height: 1.2;
}

.gr-foto-picker {
  border: 1px dashed #c5cad3;
  border-radius: var(--gr-radius);
  background: #f7f8fa;
  padding: 12px;
}

.gr-foto-picker.is-dragover {
  border-color: var(--gr-primary);
  background: #eef1f6;
}

.gr-foto-picker-input,
.gr-foto-picker-camera {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.gr-foto-picker-toolbar .gr-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gr-foto-picker-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gr-foto-picker-status {
  margin-left: auto;
  font-size: 12px;
}

.gr-foto-picker-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.gr-foto-preview {
  position: relative;
  width: 132px;
  background: #fff;
  border: 1px solid #d0d4dc;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(37, 40, 48, 0.06);
}

.gr-foto-preview img {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  background: #e9ecef;
}

.gr-foto-preview-meta {
  padding: 6px 8px 8px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--gr-ink-soft);
}

.gr-foto-preview-name {
  display: block;
  color: var(--gr-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.gr-foto-preview-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
}

.gr-foto-preview-rotate,
.gr-foto-preview-remove {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 40, 48, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gr-foto-preview-rotate:hover {
  background: var(--gr-primary);
}

.gr-foto-preview-rotate:disabled {
  opacity: 0.5;
  cursor: wait;
}

.gr-foto-preview-remove:hover {
  background: #b42318;
}

.gr-foto-picker-msg {
  margin: 10px 0 0;
  font-size: 12px;
}

.gr-foto-picker-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  font-size: 12px;
}

.gr-badge-estatus-abierto {
  background: #fee2e2;
  color: #991b1b;
}

.gr-badge-estatus-finalizado {
  background: #ffedd5;
  color: #9a3412;
}

.gr-badge-estatus-cerrado {
  background: #dcfce7;
  color: #166534;
}

/* Tab 1 Gemba: selector + formulario */
.gr-gemba-split {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}
.gr-gemba-left .gr-btn,
.gr-gemba-left .gr-btn-ghost {
  box-sizing: border-box;
}
.gr-field-stack .gr-field {
  margin-top: 10px;
}
.gr-field-stack .gr-field:first-child {
  margin-top: 0;
}
.gr-input-locked,
.gr-form-disabled input,
.gr-form-disabled select,
.gr-form-disabled textarea {
  background: #eef0f4 !important;
  color: #3a4150;
}
.gr-recorrido-activo-ok {
  margin: 0 0 10px;
  color: #1e7e34;
  font-weight: 700;
  font-size: 14px;
}
.gr-recorrido-activo-none {
  margin: 0 0 10px;
  color: #a32020;
  font-weight: 700;
  font-size: 14px;
}
.gr-block-title {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.gr-table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gr-table-search-form {
  margin-top: 12px;
  max-width: 440px;
}

.gr-table-search-form input[type="search"] {
  width: 100%;
}

/* Indicador de campo lleno / pendiente / faltante */
.gr-form[data-gr-fill-check] .gr-field > label,
.gr-form[data-gr-fill-check] .gr-foto-picker .gr-field > label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-field-mark {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #c5c9d4;
  background: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  box-sizing: border-box;
}

.gr-field.is-filled .gr-field-mark {
  border-color: #1f9d55;
  background: #1f9d55;
  color: #fff;
}

.gr-field.is-filled .gr-field-mark::before {
  content: "\2713";
}

.gr-field.is-missing .gr-field-mark {
  border-color: #c62828;
  background: #fff;
  color: #c62828;
}

.gr-field.is-missing .gr-field-mark::before {
  content: "!";
}

.gr-field.is-missing select,
.gr-field.is-missing input:not([type="file"]):not([type="hidden"]),
.gr-field.is-missing textarea {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.16);
}

.gr-field.is-missing .gr-foto-picker {
  border-color: #c62828;
  background: #fff5f5;
}

.gr-form-missing-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--gr-radius);
  background: #fde8e8;
  color: #8a1f1f;
  font-size: 13px;
  font-weight: 600;
}

body.gr-modal-open {
  overflow: hidden;
}

.gr-modal[hidden] {
  display: none !important;
}

.gr-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.gr-modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(24, 27, 34, 0.55);
}

.gr-modal-dialog {
  position: relative;
  z-index: 1;
  width: 96%;
  max-width: 1080px;
  height: 90%;
  max-height: 920px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gr-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #252830;
  color: #f3f4f6;
  flex-shrink: 0;
  height: 44px;
  box-sizing: border-box;
}

.gr-modal-bar strong {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gr-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f3f4f6;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}

.gr-modal-close:hover {
  color: #fff;
}

.gr-modal-dialog iframe {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: calc(90vh - 76px);
  min-height: 420px;
  border: 0;
  background: #f4f5f7;
}

body.gr-embed {
  background: #f4f5f7;
  min-height: 100%;
}

.gr-embed-main {
  padding: 16px 18px 28px;
}

.gr-embed-main .gr-page-title {
  margin-top: 0;
}

.gr-embed .gr-toast {
  top: 12px;
  right: 12px;
}

@media (max-width: 900px) {
  .gr-gemba-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .gr-detalle-split {
    grid-template-columns: 1fr;
  }

  .gr-login-panel {
    grid-template-columns: 1fr;
  }
  .gr-login-hero {
    padding: 28px 24px;
  }
  .gr-shell {
    flex-direction: column;
  }
  .gr-sidebar {
    width: 100%;
    padding: 8px 0;
  }
  .gr-sidebar nav {
    display: flex;
    flex-wrap: wrap;
  }
  .gr-sidebar nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .gr-sidebar nav a.is-active {
    border-bottom-color: #9aa3b5;
  }
}

/* Modal cambiar contrase�a */
.gr-modal-pwd .gr-modal-dialog-sm {
  width: 96%;
  max-width: 440px;
  height: auto;
  max-height: 90vh;
  overflow: auto;
}

.gr-password-form {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gr-password-form .gr-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 13px;
}

.gr-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gr-password-form .gr-password-wrap input[type="password"],
.gr-password-form .gr-password-wrap input[type="text"] {
  width: 100%;
  padding: 8px 40px 8px 10px;
  border: 1px solid var(--gr-header-border);
  border-radius: var(--gr-radius);
  font: inherit;
}

.gr-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--gr-ink-soft);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--gr-radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gr-password-toggle:hover {
  color: var(--gr-ink);
  background: rgba(37, 40, 48, 0.06);
}

.gr-password-toggle .gr-pwd-icon-hide {
  display: none;
}

.gr-password-toggle.is-visible .gr-pwd-icon-show {
  display: none;
}

.gr-password-toggle.is-visible .gr-pwd-icon-hide {
  display: block;
}

.gr-captcha-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gr-captcha-controls input {
  flex: 1;
}

.gr-password-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}
