@import url("auth_common.css");

:root {
      --text: #eef5ff;
      --muted: rgba(229, 239, 255, 0.76);
      --panel-blue: #0a5fbb;
      --panel-deep: #083b74;
      --card-bg: rgba(87, 161, 248, 0.16);
      --card-border: rgba(255, 255, 255, 0.1);
      --field-text: #213755;
      --field-placeholder: #a8b6c9;
      --action-blue: #0d3f75;
      --focus: rgba(177, 224, 255, 0.22);
      --danger-bg: rgba(255, 106, 106, 0.14);
      --danger-border: rgba(255, 161, 161, 0.24);
      --danger-text: #fff0f0;
      --btn-login-height: 46px;
      --btn-login-radius: 10px;
      --btn-login-bg: linear-gradient(180deg, #103f72 0%, var(--action-blue) 100%);
      --btn-login-font-size: 1rem;
      --btn-login-font-weight: 700;
      --btn-login-shadow: 0 12px 22px rgba(3, 24, 51, 0.24);
      --btn-login-hover-shadow: 0 16px 26px rgba(3, 24, 51, 0.28);
      --btn-login-hover-filter: brightness(1.01);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: 'Outfit', sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at 15% 12%, rgba(171, 218, 255, 0.42) 0, rgba(171, 218, 255, 0) 22%),
        radial-gradient(circle at 82% 12%, rgba(179, 223, 255, 0.5) 0, rgba(179, 223, 255, 0) 24%),
        radial-gradient(circle at 18% 88%, rgba(135, 194, 255, 0.34) 0, rgba(135, 194, 255, 0) 20%),
        linear-gradient(180deg, #69a8e7 0%, #6ba6e3 100%);
      overflow-x: hidden;
      position: relative;
    }

    body::before,
    body::after {
      content: "";
      position: fixed;
      border-radius: 50%;
      background: rgba(196, 230, 255, 0.16);
      pointer-events: none;
      z-index: 0;
    }

    body::before {
      width: 420px;
      height: 420px;
      left: -120px;
      bottom: -140px;
    }

    body::after {
      width: 360px;
      height: 360px;
      right: -90px;
      top: -70px;
    }

    .portal-shell {
      position: relative;
      min-height: 100vh;
      padding: 34px 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1;
    }

    .top-link {
      position: absolute;
      top: 22px;
      right: 24px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.22);
      background: rgba(255, 255, 255, 0.16);
      color: #f4f8ff;
      text-decoration: none;
      font-size: 0.8rem;
      font-weight: 600;
      backdrop-filter: blur(8px);
      box-shadow: 0 10px 22px rgba(14, 57, 103, 0.12);
      transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    }

    .top-link:hover {
      color: #ffffff;
      transform: translateY(-1px);
      box-shadow: 0 14px 28px rgba(14, 57, 103, 0.18);
    }

    .portal-card {
      position: relative;
      width: min(100%, 1460px);
      min-height: 740px;
      border-radius: 28px;
      background:
        radial-gradient(circle at 50% 34%, rgba(26, 132, 250, 0.28), rgba(26, 132, 250, 0) 22%),
        linear-gradient(135deg, var(--panel-deep) 0%, #0850a6 34%, var(--panel-blue) 100%);
      box-shadow: 0 28px 52px rgba(10, 59, 117, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
      overflow: hidden;
      display: grid;
      place-items: center;
    }

    .portal-card::before,
    .portal-card::after {
      content: "";
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      filter: blur(12px);
      opacity: 0.5;
    }

    .portal-card::before {
      width: 240px;
      height: 240px;
      top: 38px;
      right: 350px;
      background: rgba(59, 153, 255, 0.22);
    }

    .portal-card::after {
      width: 220px;
      height: 220px;
      left: 300px;
      bottom: 72px;
      background: rgba(118, 204, 255, 0.18);
    }

    .shape,
    .shape::before,
    .shape::after {
      position: absolute;
      content: "";
      display: block;
      border-radius: 999px;
    }

    .shape-a {
      width: 122px;
      height: 44px;
      left: 320px;
      top: 188px;
      transform: rotate(-46deg);
      background: linear-gradient(180deg, rgba(210, 235, 255, 0.96), rgba(106, 181, 255, 0.84));
      box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }

    .shape-a::after {
      width: 122px;
      height: 44px;
      left: 56px;
      top: 55px;
      transform: rotate(92deg);
      background: linear-gradient(180deg, rgba(196, 229, 255, 0.96), rgba(95, 176, 255, 0.84));
    }

    .shape-b {
      width: 92px;
      height: 34px;
      left: 324px;
      top: 318px;
      transform: rotate(-45deg);
      background: linear-gradient(180deg, rgba(193, 225, 255, 0.94), rgba(96, 173, 255, 0.8));
      box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
    }

    .shape-b::after {
      width: 92px;
      height: 34px;
      left: 40px;
      top: 42px;
      transform: rotate(90deg);
      background: linear-gradient(180deg, rgba(195, 230, 255, 0.94), rgba(97, 169, 255, 0.8));
    }

    .shape-c {
      width: 154px;
      height: 154px;
      left: 396px;
      bottom: 72px;
      border: 18px solid rgba(117, 192, 255, 0.9);
      border-right-color: transparent;
      border-top-color: rgba(142, 209, 255, 0.72);
      transform: rotate(28deg);
      filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
      background: transparent;
    }

    .shape-d {
      width: 178px;
      height: 178px;
      right: 230px;
      top: 118px;
      border: 20px solid rgba(23, 94, 165, 0.55);
      border-bottom-color: transparent;
      border-left-color: transparent;
      transform: rotate(14deg);
      filter: blur(2px);
      background: transparent;
    }

    .shape-e {
      width: 154px;
      height: 154px;
      right: 148px;
      bottom: 164px;
      border: 18px solid rgba(9, 52, 102, 0.56);
      border-left-color: transparent;
      border-top-color: transparent;
      transform: rotate(-16deg);
      background: transparent;
    }

    .shape-f {
      width: 104px;
      height: 28px;
      right: 244px;
      bottom: 136px;
      background: linear-gradient(180deg, rgba(152, 214, 255, 0.9), rgba(87, 173, 255, 0.76));
      transform: rotate(12deg);
      box-shadow: 0 12px 20px rgba(0, 0, 0, 0.14);
    }

    .shape-f::before {
      width: 48px;
      height: 28px;
      left: 76px;
      top: 34px;
      background: linear-gradient(180deg, rgba(152, 214, 255, 0.9), rgba(87, 173, 255, 0.76));
    }

    .shape-g {
      width: 94px;
      height: 24px;
      right: 190px;
      bottom: 82px;
      background: linear-gradient(180deg, rgba(152, 214, 255, 0.9), rgba(87, 173, 255, 0.76));
      transform: rotate(14deg);
      box-shadow: 0 12px 20px rgba(0, 0, 0, 0.14);
    }

    .shape-g::before {
      width: 48px;
      height: 24px;
      left: 66px;
      top: 28px;
      background: linear-gradient(180deg, rgba(152, 214, 255, 0.9), rgba(87, 173, 255, 0.76));
    }

    .portal-form-pane {
      position: relative;
      width: min(100%, 540px);
      padding: 34px 34px 26px;
      border-radius: 26px;
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      backdrop-filter: blur(14px);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 34px rgba(4, 28, 63, 0.22);
      overflow: hidden;
    }

    .portal-form-pane::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 76% 22%, rgba(255, 255, 255, 0.14), transparent 20%),
        linear-gradient(125deg, transparent 0%, transparent 56%, rgba(14, 44, 90, 0.24) 68%, transparent 85%);
      pointer-events: none;
    }

    .brand-stack {
      position: relative;
      z-index: 1;
      margin-bottom: 14px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .brand-copy {
      min-width: 0;
    }

    .brand-top {
      margin: 0;
      font-size: 1.04rem;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.95);
    }

    .brand-title {
      margin: 0;
      font-size: clamp(2.8rem, 5vw, 4rem);
      line-height: 0.95;
      font-weight: 700;
      color: #ffffff;
    }

    .alert-panel {
      position: relative;
      z-index: 1;
      margin-bottom: 18px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid var(--danger-border);
      background: var(--danger-bg);
      color: var(--danger-text);
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 0.9rem;
    }

    .field-block {
      position: relative;
      z-index: 1;
      margin-bottom: 22px;
    }

    .field-block label {
      display: block;
      margin-bottom: 8px;
      font-size: 0.95rem;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.96);
    }

    .field-wrap {
      position: relative;
    }

    .field-wrap .trail-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
    }

    .field-wrap .trail-btn {
      right: 10px;
      border: 0;
      background: transparent;
      color: #6d7f96;
      width: 34px;
      height: 34px;
      border-radius: 10px;
    }

    .field-wrap .trail-btn:hover {
      background: rgba(23, 132, 216, 0.08);
      color: var(--primary-strong);
    }

    .field-input {
      width: 100%;
      height: 44px;
      border-radius: 9px;
      border: 1px solid rgba(255, 255, 255, 0.34);
      background: #ffffff;
      color: var(--field-text);
      padding: 10px 44px 10px 14px;
      font-size: 0.94rem;
      outline: none;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.92);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .field-input::placeholder {
      color: var(--field-placeholder);
    }

    .field-input:focus {
      border-color: rgba(214, 242, 255, 0.7);
      box-shadow: 0 0 0 4px var(--focus);
    }

    .form-row-meta {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 14px;
      margin: -4px 0 24px;
    }

    .remember-check {
      display: none;
    }

    .helper-link {
      color: rgba(241, 248, 255, 0.86);
      text-decoration: none;
      font-size: 0.82rem;
      font-weight: 400;
    }

    .helper-link:hover {
      color: #ffffff;
    }

    .portal-actions {
      position: relative;
      z-index: 1;
      margin-top: 8px;
    }

    .bottom-note {
      position: relative;
      z-index: 1;
      margin-top: 18px;
      text-align: center;
      color: rgba(239, 246, 255, 0.9);
      font-size: 0.88rem;
    }

    .bottom-note a {
      color: #ffffff;
      font-weight: 600;
      text-decoration: none;
    }

    .guest-pay {
      position: relative;
      left: auto;
      bottom: auto;
      transform: none;
      width: auto;
      max-width: 220px;
      margin-top: 6px;
      padding: 8px 14px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border-radius: 4px;
      background: rgba(233, 245, 255, 0.96);
      color: #5f8fcb;
      text-decoration: none;
      font-size: 0.82rem;
      font-weight: 600;
      box-shadow: 0 12px 22px rgba(11, 53, 102, 0.16);
    }

    .guest-pay i {
      font-size: 1.1rem;
      color: #1d6dcd;
    }

    .chat-card {
      position: absolute;
      left: 50%;
      bottom: 18px;
      transform: translateX(-50%);
      width: auto;
      max-width: calc(100% - 40px);
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
    }

    .chat-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      background: linear-gradient(180deg, #2d84e1 0%, #1a68ca 100%);
      color: #ffffff;
      font-size: 1.2rem;
      box-shadow: 0 8px 16px rgba(26, 104, 202, 0.22);
    }

    .chat-copy {
      line-height: 1.15;
    }

    .chat-copy small {
      display: block;
      color: #555f6f;
      font-size: 0.82rem;
      font-weight: 500;
    }

    .chat-copy strong {
      display: block;
      margin-top: 4px;
      color: #2074d1;
      font-size: 0.98rem;
      font-weight: 700;
    }

    @media (max-width: 575px) {
      .portal-shell {
        padding: 76px 14px 150px;
      }

      .top-link {
        top: 16px;
        right: 14px;
      }

      .portal-card {
        min-height: auto;
        padding: 34px 16px 226px;
        border-radius: 24px;
      }

      .shape-a,
      .shape-b,
      .shape-c,
      .shape-d,
      .shape-e,
      .shape-f,
      .shape-g {
        display: none;
      }

      .portal-form-pane {
        width: 100%;
        padding: 26px 20px 22px;
      }

      .brand-stack {
        flex-direction: column;
        align-items: flex-start;
      }

      .brand-title {
        font-size: 2.6rem;
      }

      .guest-pay {
        max-width: 100%;
      }
    }
