/* Sprint 5.5 extracted view styles. */

/* Source: app/Views/auth/login.php */
:root {
      --bg-main: #f1f5f9;
      --bg-soft: #e8f2ff;
      --surface: #ffffff;
      --surface-muted: #f8fafc;
      --line: #dbe5f1;
      --line-strong: #cbd5e1;
      --text-main: #0f172a;
      --text-soft: #64748b;
      --text-muted: #94a3b8;
      --brand: #0369a1;
      --brand-strong: #075985;
      --brand-soft: #e0f2fe;
      --accent: #0ea5e9;
      --focus: #38bdf8;
      --danger-bg: #fef2f2;
      --danger-text: #991b1b;
      --danger-line: #fecaca;
      --success-bg: #f0fdf4;
      --success-text: #166534;
      --success-line: #bbf7d0;
      --shadow-card: 0 24px 48px -28px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(148, 163, 184, 0.14);
      --shadow-panel: 0 18px 36px -24px rgba(3, 105, 161, 0.35);
      --radius-xl: 28px;
      --radius-lg: 18px;
      --radius-md: 12px;
      --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
      --font-display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
    }

    * {
      box-sizing: border-box;
    }

    body.auth-page {
      margin: 0;
      min-height: 100vh;
      font-family: var(--font-body);
      color: var(--text-main);
      background:
        radial-gradient(ellipse 900px 520px at 8% -8%, rgba(56, 189, 248, 0.18) 0%, transparent 68%),
        radial-gradient(ellipse 760px 480px at 96% 108%, rgba(14, 165, 233, 0.14) 0%, transparent 64%),
        linear-gradient(165deg, #f8fafc 0%, var(--bg-main) 42%, var(--bg-soft) 100%);
      display: flex;
      flex-direction: column;
      padding: 0 16px 28px;
      position: relative;
      overflow-x: hidden;
    }

    body.auth-page::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
      background-size: 40px 40px;
      mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 100%);
    }

    .auth-topbar {
      width: min(1120px, 100%);
      margin: 0 auto;
      padding: 18px 0 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      position: relative;
      z-index: 2;
    }

    .auth-topbar-brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      color: inherit;
    }

    .auth-topbar-logo {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: var(--surface);
      border: 1px solid var(--line);
      box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.35);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
    }

    .auth-topbar-logo img {
      width: 34px;
      height: 34px;
      object-fit: contain;
      display: block;
    }

    .auth-topbar-copy {
      display: grid;
      gap: 1px;
      line-height: 1.2;
    }

    .auth-topbar-copy strong {
      font-family: var(--font-display);
      font-size: 15px;
      letter-spacing: 0.01em;
    }

    .auth-topbar-copy span {
      font-size: 11px;
      color: var(--text-soft);
      font-weight: 600;
    }

    .auth-topbar-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(8px);
      color: #334155;
      font-size: 12px;
      font-weight: 700;
      text-decoration: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    }

    .auth-topbar-link:hover {
      border-color: #93c5fd;
      box-shadow: 0 10px 20px -14px rgba(3, 105, 161, 0.45);
      transform: translateY(-1px);
      color: #0c4a6e;
    }

    .auth-shell {
      width: min(1120px, 100%);
      margin: 0 auto;
      flex: 1;
      display: grid;
      align-items: center;
      position: relative;
      z-index: 1;
    }

    .auth-card {
      display: grid;
      grid-template-columns: 1.05fr 0.95fr;
      border-radius: var(--radius-xl);
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.65);
      box-shadow: var(--shadow-card);
      background: var(--surface);
    }

    .auth-side {
      position: relative;
      padding: 38px 34px;
      background:
        radial-gradient(520px 300px at 0% 0%, rgba(56, 189, 248, 0.22), transparent 72%),
        radial-gradient(420px 280px at 100% 100%, rgba(14, 165, 233, 0.18), transparent 74%),
        linear-gradient(155deg, #0b1220 0%, #111827 48%, #0f172a 100%);
      color: #e2e8f0;
      display: grid;
      gap: 24px;
      align-content: center;
      isolation: isolate;
    }

    .auth-side::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.18) 100%);
      pointer-events: none;
      z-index: -1;
    }

    .auth-side-head {
      display: grid;
      gap: 14px;
    }

    .auth-logo-wrap {
      width: min(248px, 78%);
      padding: 10px 12px;
      border-radius: 16px;
      border: 1px solid rgba(147, 197, 253, 0.38);
      background: rgba(248, 250, 252, 0.97);
      box-shadow: 0 14px 28px rgba(2, 6, 23, 0.28);
    }

    .auth-logo-wrap img {
      width: 100%;
      height: auto;
      display: block;
      object-fit: contain;
      border-radius: 12px;
    }

    .auth-brand-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .auth-brand {
      font-family: var(--font-display);
      font-size: 32px;
      line-height: 1;
      letter-spacing: -0.02em;
      margin: 0;
      color: #f8fafc;
    }

    .auth-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 10px;
      border-radius: 999px;
      background: rgba(14, 165, 233, 0.16);
      border: 1px solid rgba(125, 211, 252, 0.35);
      color: #bae6fd;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .auth-badge-dot {
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: #22d3ee;
      box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.18);
    }

    .auth-lead {
      margin: 0;
      font-size: 14px;
      line-height: 1.7;
      color: #cbd5e1;
      max-width: 480px;
    }

    .auth-feature-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .auth-feature-grid li {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 9px 5px 6px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.38);
      border: 1px solid rgba(148, 163, 184, 0.16);
      font-size: 10.5px;
      line-height: 1.3;
      color: #e2e8f0;
      font-weight: 600;
      white-space: nowrap;
    }

    .auth-feature-grid li span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      padding: 1px 5px;
      border-radius: 999px;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.02em;
      color: #7dd3fc;
      background: rgba(14, 165, 233, 0.18);
      border: 1px solid rgba(125, 211, 252, 0.22);
    }

    .auth-side-foot {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-top: 4px;
      font-size: 11px;
      color: #94a3b8;
      line-height: 1.5;
    }

    .auth-side-foot svg {
      width: 16px;
      height: 16px;
      stroke: #38bdf8;
      fill: none;
      stroke-width: 2;
      flex-shrink: 0;
    }

    .auth-panel {
      padding: 36px 34px 32px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      display: grid;
      align-content: center;
      gap: 16px;
    }

    .panel-head {
      display: grid;
      gap: 6px;
      margin-bottom: 2px;
    }

    .panel-eyebrow {
      margin: 0;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #0369a1;
    }

    .panel-title {
      margin: 0;
      font-family: var(--font-display);
      font-size: 28px;
      letter-spacing: -0.02em;
      color: #0f172a;
      line-height: 1.1;
    }

    .panel-subtitle {
      margin: 4px 0 0;
      font-size: 13px;
      line-height: 1.65;
      color: var(--text-soft);
      max-width: 420px;
    }

    .login-guide {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      padding: 8px 10px;
      border-radius: 10px;
      background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
      border: 1px solid #bae6fd;
      font-size: 10.5px;
      line-height: 1.45;
      color: #475569;
    }

    .login-guide-title {
      margin: 0;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #0c4a6e;
      white-space: nowrap;
    }

    .login-guide-item {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 4px;
    }

    .login-guide-item strong {
      color: #0f172a;
      font-size: 10.5px;
      font-weight: 700;
    }

    .login-guide-sep {
      width: 1px;
      height: 14px;
      background: #cbd5e1;
      flex-shrink: 0;
    }

    .login-guide code {
      font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
      font-size: 10px;
      font-weight: 700;
      color: #0c4a6e;
      background: #e0f2fe;
      border: 1px solid #bae6fd;
      border-radius: 4px;
      padding: 0 4px;
      white-space: nowrap;
    }

    .msg {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      border-radius: var(--radius-md);
      padding: 11px 12px;
      font-size: 12px;
      line-height: 1.55;
      border: 1px solid transparent;
    }

    .msg-icon {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .msg.error {
      background: var(--danger-bg);
      color: var(--danger-text);
      border-color: var(--danger-line);
    }

    .msg.success {
      background: var(--success-bg);
      color: var(--success-text);
      border-color: var(--success-line);
    }

    .login-form {
      display: grid;
      gap: 14px;
      padding: 16px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-panel);
    }

    .field-group {
      display: grid;
      gap: 6px;
    }

    .field-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .field-group label {
      font-size: 12px;
      font-weight: 700;
      color: #1e293b;
    }

    .field-tag {
      font-size: 10px;
      font-weight: 700;
      color: #0369a1;
      background: var(--brand-soft);
      border: 1px solid #bae6fd;
      border-radius: 999px;
      padding: 2px 8px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .input-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .input-icon {
      position: absolute;
      left: 12px;
      width: 16px;
      height: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #64748b;
      pointer-events: none;
      z-index: 1;
    }

    .input-icon svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .input-wrap input {
      width: 100%;
      border: 1px solid var(--line-strong);
      border-radius: var(--radius-md);
      padding: 12px 12px 12px 38px;
      font-size: 14px;
      color: #0f172a;
      background: #fff;
      outline: none;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }

    .input-wrap input::placeholder {
      color: var(--text-muted);
      font-size: 13px;
    }

    .input-wrap input:focus {
      border-color: var(--focus);
      box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
      background: #fcfeff;
    }

    .input-wrap.has-toggle input {
      padding-right: 44px;
    }

    .input-toggle {
      position: absolute;
      right: 8px;
      width: 32px;
      height: 32px;
      border-radius: 9px;
      border: 1px solid transparent;
      background: transparent;
      color: #64748b;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }

    .input-toggle:hover {
      color: #0f172a;
      background: #f1f5f9;
      border-color: var(--line);
    }

    .input-toggle svg {
      width: 15px;
      height: 15px;
      stroke: currentColor;
      fill: none;
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .input-toggle .icon-hide {
      display: none;
    }

    .input-toggle.is-active .icon-show {
      display: none;
    }

    .input-toggle.is-active .icon-hide {
      display: block;
    }

    .submit-btn {
      margin-top: 2px;
      width: 100%;
      border: 0;
      border-radius: var(--radius-md);
      padding: 12px 14px;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: 0.01em;
      color: #f8fafc;
      background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
      cursor: pointer;
      box-shadow: 0 14px 24px -14px rgba(3, 105, 161, 0.75);
      transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    }

    .submit-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 18px 30px -14px rgba(3, 105, 161, 0.85);
      filter: saturate(1.04);
    }

    .submit-btn.is-submitting {
      pointer-events: none;
      cursor: wait;
      opacity: 0.92;
      transform: none !important;
      box-shadow: none !important;
    }

    .submit-btn.is-submitting::after {
      content: "";
      width: 13px;
      height: 13px;
      border-radius: 999px;
      border: 2px solid rgba(255, 255, 255, 0.35);
      border-top-color: rgba(255, 255, 255, 0.95);
      display: inline-block;
      margin-left: 8px;
      vertical-align: -2px;
      animation: auth-spin 0.8s linear infinite;
    }

    .panel-note {
      margin: 0;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 13px;
      border-radius: var(--radius-md);
      font-size: 11.5px;
      color: #475569;
      line-height: 1.6;
      background: var(--surface-muted);
      border: 1px solid var(--line);
    }

    .panel-note-icon {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      margin-top: 1px;
      color: #0369a1;
    }

    .auth-page-footer {
      width: min(1120px, 100%);
      margin: 22px auto 0;
      padding-top: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      font-size: 11px;
      color: var(--text-soft);
      position: relative;
      z-index: 2;
    }

    .auth-page-footer strong {
      color: #334155;
      font-weight: 700;
    }

    .auth-submit-success-toast {
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 5000;
      max-width: min(360px, calc(100vw - 24px));
      padding: 11px 13px;
      border-radius: 12px;
      background: #166534;
      color: #f0fdf4;
      border: 1px solid #22c55e;
      box-shadow: 0 16px 28px rgba(6, 78, 59, 0.3);
      font-size: 12px;
      line-height: 1.4;
      animation: auth-toast-in 0.18s ease;
    }

    .kip-wa-float {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 1200;
      display: inline-flex;
      align-items: center;
      gap: 12px;
      max-width: min(360px, calc(100vw - 32px));
      box-sizing: border-box;
      padding: 12px 14px 12px 12px;
      border-radius: 999px;
      background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
      color: #ffffff;
      text-decoration: none;
      box-shadow: 0 18px 34px -16px rgba(22, 163, 74, 0.72), 0 0 0 0 rgba(34, 197, 94, 0.22);
      border: 1px solid rgba(255, 255, 255, 0.22);
      animation: waPulse 6s ease-in-out infinite;
    }

    .kip-wa-float:hover {
      transform: translateY(-2px);
      filter: brightness(1.04);
      color: #ffffff;
      text-decoration: none;
      box-shadow: 0 22px 42px -16px rgba(22, 163, 74, 0.82), 0 0 0 10px rgba(34, 197, 94, 0.08);
    }

    .kip-wa-icon {
      width: 42px;
      height: 42px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.18);
      flex: 0 0 auto;
    }

    .kip-wa-copy {
      display: grid;
      gap: 1px;
      line-height: 1.2;
    }

    .kip-wa-copy strong {
      font-size: 13px;
      font-weight: 900;
      letter-spacing: -0.01em;
    }

    .kip-wa-copy span {
      font-size: 11px;
      font-weight: 700;
      opacity: 0.92;
    }

    @keyframes auth-spin {
      to { transform: rotate(360deg); }
    }

    @keyframes auth-toast-in {
      from { transform: translateY(-8px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    @keyframes waPulse {
      0%, 40%, 60%, 100% {
        opacity: 1;
        box-shadow: 0 18px 34px -16px rgba(22, 163, 74, 0.72), 0 0 0 0 rgba(34, 197, 94, 0.18);
      }
      50% {
        opacity: 0;
        box-shadow: 0 22px 42px -16px rgba(22, 163, 74, 0.82), 0 0 0 12px rgba(34, 197, 94, 0.08);
      }
    }

    @media (max-width: 980px) {
      .auth-card {
        grid-template-columns: 1fr;
      }

      .auth-side {
        padding: 28px 24px;
        gap: 18px;
      }

      .auth-brand {
        font-size: 26px;
      }

      .auth-panel {
        padding: 28px 24px 24px;
      }

      .panel-title {
        font-size: 24px;
      }
    }

    @media (max-width: 560px) {
      body.auth-page {
        padding: 0 12px 20px;
      }

      .auth-topbar {
        padding: 14px 0 16px;
      }

      .auth-topbar-link span {
        display: none;
      }

      .auth-card {
        border-radius: 20px;
      }

      .auth-feature-grid li {
        white-space: normal;
      }

      .login-form {
        padding: 14px;
      }

      .login-guide-sep {
        display: none;
      }

      .login-guide {
        gap: 4px 6px;
      }

      .auth-submit-success-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
      }

      .kip-wa-float {
        right: 14px;
        bottom: 14px;
        padding: 8px 12px;
        gap: 8px;
      }

      .kip-wa-icon {
        width: 30px;
        height: 30px;
      }

      .kip-wa-icon svg {
        width: 16px !important;
        height: 16px !important;
      }

      .kip-wa-copy strong {
        font-size: 11.5px;
      }

      .kip-wa-copy span {
        font-size: 9.5px;
      }

      .auth-page-footer {
        flex-direction: column;
        align-items: flex-start;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .submit-btn,
      .input-wrap input,
      .input-toggle,
      .auth-topbar-link {
        transition: none !important;
      }

      .kip-wa-float {
        animation: none !important;
      }
    }
