:root {
  color: #172026;
  background: #f4f6f8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #f4f6f8;
}

button,
input,
select {
  font: inherit;
}

.ops-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.ops-header {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ops-header p,
.ops-detail-head p {
  color: #66717b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.ops-header h1,
.ops-detail-head h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.ops-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.ops-user {
  color: #66717b;
  font-size: 13px;
  font-weight: 700;
}

.ops-logout {
  align-items: center;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  color: #172026;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
}

.ops-actions button,
.ops-rule-form button {
  background: #ffffff;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  color: #172026;
  cursor: pointer;
  min-height: 36px;
  padding: 0 14px;
}

.auth-body {
  background:
    radial-gradient(circle at 10% 12%, rgba(107, 83, 210, 0.16), transparent 28%),
    linear-gradient(135deg, #f7f7fb 0%, #eef2f7 48%, #f7faf8 100%);
  color: #172033;
  min-height: 100vh;
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(360px, 1.05fr) minmax(360px, 0.85fr);
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
}

.auth-brand,
.auth-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(210, 216, 226, 0.92);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(34, 44, 65, 0.12);
}

.auth-brand {
  display: grid;
  gap: 24px;
  min-height: 520px;
  padding: 32px;
}

.auth-brand h1 {
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0 0 18px;
}

.auth-brand p,
.auth-copy {
  color: #53617a;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.auth-visual {
  align-items: center;
  background: #fbfcff;
  border: 1px solid #dce2eb;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.auth-grid {
  background-image:
    linear-gradient(#edf1f7 1px, transparent 1px),
    linear-gradient(90deg, #edf1f7 1px, transparent 1px);
  background-size: 28px 28px;
  inset: 0;
  position: absolute;
}

.auth-iguana {
  background: linear-gradient(145deg, #7d55c7, #4d2c82);
  border: 8px solid #2c1d49;
  border-radius: 42% 42% 34% 34%;
  height: 190px;
  position: relative;
  width: 230px;
}

.auth-iguana::before,
.auth-iguana::after {
  background: #6bed82;
  border-radius: 999px;
  content: "";
  position: absolute;
}

.auth-iguana::before {
  height: 18px;
  left: 34px;
  top: -28px;
  transform: rotate(-28deg);
  width: 118px;
}

.auth-iguana::after {
  bottom: -24px;
  height: 22px;
  right: 28px;
  width: 150px;
}

.auth-eye {
  background: #ffe36a;
  border: 6px solid #25173e;
  border-radius: 50%;
  height: 56px;
  position: absolute;
  top: 38px;
  width: 56px;
}

.auth-eye::after {
  background: #241735;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: 19px;
  position: absolute;
  top: 18px;
  width: 18px;
}

.auth-eye.left {
  left: 48px;
}

.auth-eye.right {
  right: 48px;
}

.auth-smile {
  border-bottom: 6px solid #25173e;
  border-radius: 0 0 80px 80px;
  bottom: 54px;
  height: 46px;
  left: 58px;
  position: absolute;
  width: 112px;
}

.auth-board {
  background: #20293a;
  border: 5px solid #111827;
  border-radius: 8px;
  bottom: -38px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 8px;
  left: 54px;
  padding: 14px;
  position: absolute;
  transform: rotate(-2deg);
  width: 130px;
}

.auth-board span {
  background: linear-gradient(90deg, #b66df1, #9ce954);
  border-radius: 999px;
  display: block;
  height: 8px;
}

.auth-card {
  padding: 32px;
}

.auth-eyebrow {
  color: #6b4bd2;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.auth-card h2 {
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form label {
  color: #5a6678;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input,
.auth-form select {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  color: #172033;
  min-height: 56px;
  padding: 0 16px;
}

.auth-primary,
.auth-provider {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.08em;
  min-height: 52px;
  text-transform: uppercase;
}

.auth-primary {
  background: #6b4bd2;
  border: 0;
  color: #ffffff;
  margin-top: 18px;
}

.auth-provider {
  background: #ffffff;
  border: 1px solid #d8dee8;
  color: #172033;
  gap: 12px;
  width: 100%;
}

.auth-primary:disabled,
.auth-provider:disabled {
  cursor: wait;
  opacity: 0.62;
}

.google-mark {
  color: #4285f4;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.auth-separator {
  background: #e4e9f1;
  height: 1px;
  margin: 26px 0;
}

.auth-message {
  color: #5a6678;
  font-size: 13px;
  min-height: 18px;
}

.auth-message.error {
  color: #9b2c20;
}

.ops-rule-form button {
  background: #146c94;
  border-color: #146c94;
  color: #ffffff;
}

.ops-error {
  background: #fff2f0;
  border: 1px solid #efb6ad;
  border-radius: 6px;
  color: #9b2c20;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.ops-kpis,
.ops-grid,
.ops-lower {
  display: grid;
  gap: 12px;
}

.ops-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.ops-kpis article,
.ops-panel {
  background: #ffffff;
  border: 1px solid #dce2e8;
  border-radius: 8px;
}

.ops-kpis article {
  min-height: 84px;
  padding: 16px;
}

.ops-kpis span,
.ops-metrics span {
  color: #66717b;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.ops-kpis strong {
  font-size: 28px;
}

.ops-grid {
  grid-template-columns: 360px minmax(0, 1fr);
  margin-bottom: 12px;
}

.ops-panel {
  padding: 14px;
}

.ops-section-title {
  color: #3a4650;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

.ops-target {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 12px minmax(0, 1fr) 52px;
  min-height: 54px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.ops-target.active {
  background: #edf6fa;
}

.ops-target strong,
.ops-target small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-target small {
  color: #66717b;
  margin-top: 3px;
}

.ops-dot {
  border-radius: 50%;
  display: block;
  height: 10px;
  width: 10px;
}

.ops-dot.ok,
.ops-pill.ok,
.ops-pill.dry_run {
  background: #dff3e6;
  color: #17623a;
}

.ops-dot.warning,
.ops-pill.warning {
  background: #fff1c7;
  color: #7a5300;
}

.ops-dot.critical,
.ops-pill.critical,
.ops-pill.failed {
  background: #ffe0dc;
  color: #9b2c20;
}

.ops-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
}

.ops-detail-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ops-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-metrics > div {
  border: 1px solid #e4e9ee;
  border-radius: 6px;
  min-height: 108px;
  padding: 14px;
}

.ops-metrics strong {
  display: block;
  font-size: 24px;
  margin-bottom: 12px;
}

.ops-bar {
  background: #e8edf2;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.ops-bar i {
  display: block;
  height: 100%;
}

.green {
  background: #38a169;
}

.blue {
  background: #2b6cb0;
}

.amber {
  background: #d69e2e;
}

.red {
  background: #e53e3e;
}

.ops-lower {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.8fr);
  margin-bottom: 12px;
}

.ops-table {
  display: grid;
  gap: 6px;
}

.ops-row {
  align-items: center;
  border: 1px solid #e4e9ee;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(160px, 1fr) minmax(180px, 1.1fr) 130px;
  min-height: 42px;
  padding: 8px 10px;
}

.ops-row span,
.ops-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-rule-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-rule-form label {
  color: #4d5963;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.ops-rule-form input,
.ops-rule-form select {
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  min-height: 36px;
  min-width: 0;
  padding: 0 10px;
}

.ops-rule-form label:first-child,
.ops-rule-form button {
  grid-column: 1 / -1;
}

.ops-empty {
  color: #66717b;
  border: 1px dashed #c8d0d8;
  border-radius: 6px;
  padding: 12px;
}

@media (max-width: 980px) {
  .ops-shell {
    padding: 14px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auth-brand {
    min-height: auto;
    padding: 22px;
  }

  .auth-visual {
    min-height: 240px;
  }

  .auth-card {
    padding: 22px;
  }

  .ops-header,
  .ops-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-kpis,
  .ops-grid,
  .ops-lower,
  .ops-metrics {
    grid-template-columns: 1fr;
  }

  .ops-row {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}
