:root {
  --rco-teal: #00b7c9;
  --rco-teal-mid: #00a0b0;
  --rco-teal-deep: #007f8c;
  --rco-panel: rgb(10 16 22 / 0.78);
  --rco-panel-border: rgb(255 255 255 / 0.22);
  --rco-text: #f4f8fb;
  --rco-muted: #b7c4ce;
  --rco-field: rgb(6 12 18 / 0.72);
  --rco-line: rgb(255 255 255 / 0.16);
  --rco-shadow: 0 22px 48px rgb(0 0 0 / 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--rco-text);
  background: #0a1218 url("../images/login-bg.jpg") center / cover no-repeat fixed;
}

.rco-server {
  display: none !important;
}

.rco-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: linear-gradient(
    110deg,
    rgb(4 10 16 / 0.42) 0%,
    rgb(4 10 16 / 0.18) 48%,
    rgb(4 10 16 / 0.34) 100%
  );
}

.rco-login-card {
  width: min(420px, 100%);
  border-radius: 22px;
  padding: 28px 28px 24px;
  border: 1px solid var(--rco-panel-border);
  background: var(--rco-panel);
  box-shadow: var(--rco-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rco-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.rco-brand img {
  display: block;
  width: min(220px, 72%);
  height: auto;
}

.rco-panel-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  position: relative;
}

.rco-panel-title {
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.01em;
}

.rco-otp-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.rco-back-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rco-panel-border);
  border-radius: 999px;
  background: transparent;
  color: var(--rco-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.rco-back-btn:hover,
.rco-back-btn:focus-visible {
  border-color: var(--rco-teal);
  color: #fff;
  outline: none;
}

.rco-error {
  display: none;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgb(170 40 48 / 0.85);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.rco-error.is-visible {
  display: block;
}

.rco-error.is-success {
  background: rgb(24 120 90 / 0.88);
}

.rco-form {
  margin-top: 18px;
}

.rco-login-section,
.rco-otp-section {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.step-hidden {
  display: none !important;
}

.rco-field {
  position: relative;
  margin-top: 14px;
}

.rco-field:first-child {
  margin-top: 0;
}

.rco-field input {
  width: 100%;
  height: 52px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 12px;
  padding: 0 46px 0 46px;
  font-size: 16px;
  color: #fff;
  background: var(--rco-field);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rco-field input::placeholder {
  color: rgb(210 220 230 / 0.72);
}

.rco-field input:focus {
  border-color: var(--rco-teal);
  box-shadow: 0 0 0 3px rgb(0 183 201 / 0.22);
}

.rco-field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--rco-teal);
  pointer-events: none;
}

.rco-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgb(220 230 240 / 0.85);
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rco-toggle-password:hover,
.rco-toggle-password:focus-visible {
  color: var(--rco-teal);
  outline: none;
}

.rco-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 14px;
  font-size: 14px;
}

.rco-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rco-text);
  cursor: pointer;
  user-select: none;
}

.rco-shortcut input {
  width: 16px;
  height: 16px;
  accent-color: var(--rco-teal);
}

.rco-submit {
  margin-top: 18px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, #26d0e0 0%, #00b7c9 46%, #008fa0 100%);
  box-shadow:
    0 2px 0 rgb(255 255 255 / 0.22) inset,
    0 10px 22px rgb(0 120 140 / 0.35);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.rco-submit:hover {
  filter: brightness(1.05);
}

.rco-submit:active {
  transform: translateY(1px);
}

.rco-submit:focus-visible {
  outline: 3px solid rgb(0 183 201 / 0.45);
  outline-offset: 2px;
}

.rco-submit:disabled,
.rco-submit.is-loading {
  opacity: 0.85;
  cursor: wait;
  pointer-events: none;
}

.rco-submit-arrow {
  font-size: 20px;
  line-height: 1;
}

.rco-submit .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rco-btn-spin 0.7s linear infinite;
}

@keyframes rco-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.rco-signup {
  margin-top: 16px;
  text-align: center;
  color: var(--rco-muted);
  font-size: 14px;
}

.rco-signup a {
  color: var(--rco-teal);
  font-weight: 600;
  text-decoration: none;
}

.rco-signup a:hover,
.rco-signup a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.rco-otp-label {
  margin: 4px 0 12px;
  color: var(--rco-text);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.otp-digit {
  width: 100%;
  height: 48px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 10px;
  background: var(--rco-field);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.otp-digit:focus {
  border-color: var(--rco-teal);
  box-shadow: 0 0 0 3px rgb(0 183 201 / 0.22);
}

.otp-resend-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.otp-resend-link {
  border: 0;
  background: transparent;
  color: #7ed7e6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.otp-resend-link:disabled,
.otp-resend-link[disabled] {
  color: rgb(180 190 200 / 0.7);
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .rco-login-page {
    padding: 20px 12px;
    align-items: flex-start;
  }

  .rco-login-card {
    margin-top: 24px;
    padding: 22px 16px 18px;
    border-radius: 18px;
  }

  .rco-panel-title {
    font-size: 22px;
  }
}
