/* =========================================================
   Netrich Console — AWS Console–identical sign-in styles
   Precise margins, padding, and spacing to match AWS UI
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --aws-orange: #ff9900;
  --aws-orange-btn: #ff9900;
  --aws-orange-hover: #e47911;
  --aws-blue: #0073bb;
  --aws-blue-hover: #0a4a74;
  --aws-navy: #232f3e;
  --aws-text: #0f1111;
  --aws-label: #0f1111;
  --aws-muted: #565959;
  --aws-border: #888c8c;
  --aws-border-light: #d5dbdb;
  --aws-bg: #ffffff;
  --aws-input-bg: #ffffff;
  --aws-focus: #007185;
  --aws-card-shadow: 0 2px 4px rgba(15, 17, 17, 0.08);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

.aws-signin-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--aws-text);
  background-color: #fafafa;
  background-image: url("../img/cubes-bg.svg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 110% auto;
}

/* ---------- Top utility bar ---------- */
.aws-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 12px 24px 0;
  font-size: 12px;
  color: var(--aws-muted);
}

.aws-topbar a,
.aws-topbar .aws-dd {
  color: var(--aws-blue);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.aws-topbar a:hover,
.aws-topbar .aws-dd:hover {
  color: var(--aws-orange-hover);
  text-decoration: underline;
}

.aws-topbar .aws-dd::after {
  content: " ▾";
  font-size: 10px;
}

/* ---------- Logo ---------- */
.aws-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 20px;
  padding: 0 16px;
}

.aws-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--aws-navy);
  line-height: 1;
}

.aws-logo .word {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1.2px;
  text-transform: lowercase;
}

.aws-logo .smile-svg {
  display: block;
  width: 58px;
  height: 14px;
  margin-top: -2px;
}

/* ---------- Main layout shell ---------- */
.aws-shell {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto;
  padding: 0 16px 48px;
  max-width: 960px;
}

.aws-panel {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  border: 1px solid var(--aws-border-light);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--aws-card-shadow);
}

/* ---------- Form column ---------- */
.aws-form-col {
  flex: 1 1 52%;
  min-width: 300px;
  max-width: 420px;
  margin: 0;
  padding: 28px 32px 24px;
  background: #ffffff;
}

.aws-form-col.iam {
  padding: 24px 28px 20px;
}

.aws-form-col h1 {
  margin: 0 0 6px;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--aws-text);
}

.aws-form-col h1 .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border: 1.5px solid var(--aws-blue);
  border-radius: 50%;
  color: var(--aws-blue);
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  vertical-align: middle;
  line-height: 1;
}

.aws-subtitle {
  margin: 0 0 18px;
  padding: 0;
  font-size: 13px;
  color: var(--aws-text);
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--aws-label);
}

.section-label a {
  font-weight: 400;
  font-size: 13px;
  color: var(--aws-blue);
  text-decoration: none;
}

.section-label a:hover {
  color: var(--aws-orange-hover);
  text-decoration: underline;
}

/* ---------- User type radios (Sign In page) ---------- */
.user-type-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
}

.user-type-option {
  display: block;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--aws-border-light);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.user-type-option.active {
  border-color: var(--aws-blue);
  box-shadow: 0 0 0 1px var(--aws-blue);
  background: #fff;
}

.user-type-option input[type="radio"] {
  margin: 0 10px 0 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--aws-blue);
  width: 16px;
  height: 16px;
}

.user-type-option .opt-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--aws-text);
  vertical-align: middle;
}

.user-type-option .opt-desc {
  display: block;
  margin: 4px 0 0 26px;
  padding: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--aws-muted);
  font-weight: 400;
}

/* ---------- Fields ---------- */
.field {
  margin: 0 0 14px;
  padding: 0;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 4px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--aws-label);
}

.field-label a {
  font-weight: 400;
  color: var(--aws-blue);
  text-decoration: none;
}

.field-label a:hover {
  color: var(--aws-orange-hover);
  text-decoration: underline;
}

.field-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--aws-border);
  border-radius: 4px;
  background: var(--aws-input-bg);
  font-size: 13px;
  line-height: 1.4;
  color: var(--aws-text);
  outline: none;
}

.field-input:focus {
  border-color: var(--aws-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 133, 0.2);
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 16px;
  padding: 0;
  font-size: 13px;
  color: var(--aws-text);
  cursor: pointer;
  font-weight: 400;
}

.field-check input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--aws-navy);
}

.field-aux {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0 18px;
  padding: 0;
}

.field-aux .field-check {
  margin: 0;
}

.field-aux a {
  color: var(--aws-blue);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px dashed var(--aws-blue);
  padding-bottom: 1px;
}

.field-aux a:hover {
  color: var(--aws-orange-hover);
  border-bottom-color: var(--aws-orange-hover);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 8px 16px;
  border: 1px solid #c89411;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7dfa5 0%, #f0c14b 40%, #ff9900 100%);
  color: #0f1111;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #f5d78e 0%, #e2b039 40%, #e47911 100%);
}

.btn-secondary {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 16px;
  border: 1px solid #414d5c;
  border-radius: 8px;
  background: #ffffff;
  color: #0f1111;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary.blue {
  border-color: var(--aws-blue);
  color: var(--aws-blue);
}

.btn-secondary:hover {
  background: #f7fafa;
}

.aws-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 14px;
  padding: 0;
  color: var(--aws-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.aws-or::before,
.aws-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--aws-border-light);
}

.center-link {
  display: block;
  margin: 4px 0 8px;
  padding: 8px 0;
  text-align: center;
  color: var(--aws-blue);
  text-decoration: none;
  font-size: 13px;
}

.center-link:hover {
  color: var(--aws-orange-hover);
  text-decoration: underline;
}

.legal-inline {
  margin: 16px 0 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--aws-muted);
}

.legal-inline a {
  color: var(--aws-blue);
  text-decoration: none;
}

.legal-inline a:hover {
  text-decoration: underline;
  color: var(--aws-orange-hover);
}

.legal-below {
  max-width: 420px;
  margin: 14px 0 0;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--aws-muted);
}

.legal-below a {
  color: var(--aws-blue);
  text-decoration: none;
}

.legal-below a:hover {
  text-decoration: underline;
}

/* ---------- Promo column ---------- */
.aws-promo-col {
  flex: 1 1 48%;
  min-width: 260px;
  max-width: 360px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #f3f3f3;
  border-left: 1px solid var(--aws-border-light);
}

.aws-promo-col.dark {
  background: #0f1111;
  color: #ffffff;
  border-left-color: #0f1111;
}

.aws-promo-media {
  display: block;
  width: 100%;
  height: 168px;
  margin: 0;
  padding: 0;
  object-fit: cover;
  object-position: center top;
  background: #1a1a1a;
}

.aws-promo-col.light .aws-promo-media {
  height: 150px;
  object-fit: cover;
  background: #ece7df;
}

.aws-promo-content {
  flex: 1;
  margin: 0;
  padding: 22px 24px 28px;
}

.aws-promo-content h2 {
  margin: 0 0 10px;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.aws-promo-content p {
  margin: 0 0 16px;
  padding: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.95;
}

.aws-promo-col.light .aws-promo-content h2 {
  color: var(--aws-text);
  font-size: 20px;
}

.aws-promo-col.light .aws-promo-content p {
  color: var(--aws-muted);
  font-size: 13px;
}

.promo-cta {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
}

.promo-cta:hover {
  background: rgba(255, 255, 255, 0.08);
}

.aws-promo-col.light .promo-cta {
  border: none;
  padding: 0;
  color: var(--aws-text);
  font-weight: 700;
}

.aws-promo-col.light .promo-cta:hover {
  color: var(--aws-blue);
  background: transparent;
  text-decoration: underline;
}

/* ---------- Alerts ---------- */
.aws-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cc0c39;
  border-radius: 4px;
  background: #fff5f5;
  color: #7f1d1d;
  font-size: 13px;
}

.aws-alert.info {
  border-color: #0073bb;
  background: #f0f8fc;
  color: #0b3d5b;
}

.aws-alert.success {
  border-color: #037f0c;
  background: #f0faf0;
  color: #0b3d1b;
}

.aws-alert.warning {
  border-color: #b54708;
  background: #fff8e6;
  color: #7a3e00;
}

.otp-input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 18px;
  font-weight: 600;
}

/* ---------- Page footer ---------- */
.aws-page-footer {
  margin: 0;
  padding: 24px 16px 40px;
  text-align: center;
  font-size: 11px;
  color: var(--aws-muted);
}

.aws-page-footer a {
  color: var(--aws-blue);
  text-decoration: none;
  margin: 0 4px;
}

/* ---------- Register page (same shell as Sign In) ---------- */
.aws-panel-register {
  max-width: 860px;
}

.aws-panel-register .aws-form-col {
  max-width: 440px;
  flex: 1 1 440px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-error {
  margin: 4px 0 0;
  font-size: 12px;
  color: #d13212;
  font-weight: 500;
}

.field-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--aws-muted);
  line-height: 1.35;
}

.aws-panel-register .field-check {
  margin: 0 0 16px;
}

@media (max-width: 820px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* IAM layout: form + promo as separate siblings with legal under form */
.aws-iam-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.aws-iam-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--aws-border-light);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--aws-card-shadow);
}

.aws-iam-row .aws-form-col {
  border: none;
  box-shadow: none;
  max-width: 400px;
}

.aws-iam-row .aws-promo-col {
  min-height: 480px;
}

/* ---------- Root password solo card ---------- */
.aws-solo {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 28px 32px 24px;
  border: 1px solid var(--aws-border-light);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--aws-card-shadow);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .aws-panel,
  .aws-iam-row {
    flex-direction: column;
    max-width: 440px;
  }

  .aws-form-col,
  .aws-promo-col,
  .aws-iam-row .aws-form-col {
    max-width: 100%;
    min-width: 0;
  }

  .aws-promo-col {
    border-left: none;
    border-top: 1px solid var(--aws-border-light);
  }

  .aws-promo-col.dark {
    border-top-color: #222;
  }

  .aws-form-col,
  .aws-form-col.iam {
    padding: 24px 20px 20px;
  }

  .aws-topbar {
    gap: 12px;
    padding: 10px 12px 0;
    font-size: 11px;
    flex-wrap: wrap;
  }
}
