/* Flash Asia AI shared brand system */
:root {
  --fa-ink: #1b1f24;
  --fa-ink-soft: #252b31;
  --fa-green: #6da952;
  --fa-green-strong: #5c9145;
  --fa-green-soft: #edf4e9;
  --fa-canvas: #f4f6f3;
  --fa-card: #ffffff;
  --fa-text: #1f2a1c;
  --fa-muted: #6c7668;
  --fa-line: #dce5d8;
  --fa-shadow: 0 18px 48px rgba(24, 35, 20, .09);
}

body.fa-app-shell,
body.fa-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(109, 169, 82, .12), transparent 34rem),
    linear-gradient(180deg, #f8faf7 0%, var(--fa-canvas) 100%);
  color: var(--fa-text);
}

body.fa-app-shell header,
body.fa-page header {
  min-height: 58px;
  background: linear-gradient(112deg, #171b20 0%, #20272b 68%, #253329 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 7px 24px rgba(11, 16, 12, .18);
}

.fa-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.fa-brand__logo {
  display: block;
  width: 88px;
  height: 42px;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}

.fa-brand__ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 26px;
  padding: 0 8px;
  border-radius: 9px 9px 9px 3px;
  background: var(--fa-green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 6px 18px rgba(109, 169, 82, .24);
}

.fa-page-title {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .02em;
  margin-left: 12px;
  margin-right: auto;
  white-space: nowrap;
}

.fa-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-left: auto;
}

.fa-icon-link,
.fa-icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  margin: 0 !important;
  padding: 7px 11px !important;
  border: 1px solid rgba(255, 255, 255, .13) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .055) !important;
  color: rgba(255, 255, 255, .86) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-decoration: none !important;
  opacity: 1 !important;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.fa-icon-link:hover,
.fa-icon-button:hover {
  background: rgba(109, 169, 82, .22) !important;
  border-color: rgba(148, 202, 123, .42) !important;
  transform: translateY(-1px);
}

.fa-icon-link svg,
.fa-icon-button svg,
.fa-platform-icon svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

body.fa-app-shell #sidebar {
  background: rgba(255, 255, 255, .96);
  border-right-color: var(--fa-line);
  box-shadow: 9px 0 30px rgba(29, 45, 22, .045);
}

body.fa-app-shell .sidebar-btn {
  min-height: 42px;
  border-color: var(--fa-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faf7, #eef3eb);
  color: #426336;
  font-weight: 650;
}

body.fa-app-shell .sidebar-btn:hover {
  background: var(--fa-green-soft);
  border-color: #c9dbc1;
}

body.fa-app-shell #composer {
  background: rgba(255, 255, 255, .9);
  border-top-color: var(--fa-line);
  box-shadow: 0 -12px 36px rgba(28, 42, 22, .06);
  backdrop-filter: blur(10px);
}

body.fa-app-shell #send-btn {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fa-green), var(--fa-green-strong));
  box-shadow: 0 9px 22px rgba(91, 143, 68, .22);
}

.fa-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.fa-auth-brand .auth-logo {
  width: min(280px, 72vw);
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(21, 25, 29, .36);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .24);
  backdrop-filter: blur(10px);
}

.fa-auth-brand__label {
  color: rgba(255, 255, 255, .84);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

body.fa-app-shell #login-screen,
body.fa-app-shell #sent-screen {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

body.fa-app-shell #code-input {
  text-align: center;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: .28em;
}

body.fa-page main {
  width: min(100%, 1280px);
  margin-inline: auto;
}

body.fa-page .card,
body.fa-page .panel,
body.fa-page article.card {
  border: 1px solid rgba(218, 229, 214, .94);
  box-shadow: var(--fa-shadow);
}

body.fa-page button,
body.fa-page .button {
  border-radius: 11px;
}

body.fa-page input,
body.fa-page select {
  border-color: #d4dfd0;
  border-radius: 10px;
}

body.fa-page input:focus,
body.fa-page select:focus {
  outline: 3px solid rgba(109, 169, 82, .15);
  border-color: var(--fa-green);
}

body.fa-install main {
  width: min(100%, 1080px);
  padding-top: 28px;
}

body.fa-install .hero {
  position: relative;
  overflow: hidden;
  min-height: 265px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 26px;
  background: linear-gradient(125deg, #171b20 0%, #222a2d 58%, #29402b 100%);
  color: #fff;
  text-align: left;
  box-shadow: 0 28px 70px rgba(20, 29, 18, .22);
}

body.fa-install .hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 188, 94, .34), rgba(123, 188, 94, 0) 68%);
  pointer-events: none;
}

.fa-install-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.fa-install-lockup__logo {
  width: min(290px, 68vw) !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
}

.fa-install-lockup__icon {
  width: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .28);
}

body.fa-install .hero h1 {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  color: #fff;
}

body.fa-install .hero .lead {
  position: relative;
  z-index: 1;
  max-width: 560px;
  color: rgba(255, 255, 255, .72);
}

body.fa-install .grid {
  gap: 20px;
  margin-top: 24px;
}

body.fa-install .card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

body.fa-install .card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--fa-green), #9bc987);
}

.fa-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fa-platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--fa-green-soft);
  color: #4d7b3c;
}

body.fa-install .secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(109, 169, 82, .10);
  color: #436b35;
  font-weight: 650;
}

body.fa-admin main,
body.fa-logs main,
body.fa-calculator main {
  padding-top: 28px;
}

body.fa-admin .card,
body.fa-logs .note,
body.fa-calculator .card {
  border-radius: 18px;
}

@media (max-width: 760px) {
  .fa-brand__logo { width: 70px; height: 36px; }
  .fa-brand__ai { display: none; }
  .fa-page-title { display: none; }
  .fa-icon-link span,
  .fa-icon-button span { display: none; }
  .fa-icon-link,
  .fa-icon-button { width: 36px; padding: 7px !important; }
  body.fa-app-shell header,
  body.fa-page header { padding-inline: 12px; }
  body.fa-install main { padding: 16px; }
  body.fa-install .hero { min-height: 240px; padding: 26px 22px; border-radius: 20px; }
  .fa-install-lockup { align-items: flex-start; flex-direction: column; gap: 14px; }
  .fa-install-lockup__logo { width: min(250px, 82vw) !important; }
  .fa-install-lockup__icon { width: 60px !important; height: 60px !important; }
}

/* Mobile chat composer proportions */
@media (max-width: 640px) {
  body.fa-app-shell .composer-row {
    gap: 8px;
    align-items: flex-end;
  }

  body.fa-app-shell #attach-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  body.fa-app-shell #message-input {
    width: auto;
    min-width: 0;
    min-height: 44px;
    max-height: 144px;
    flex: 1 1 auto;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.35;
  }

  body.fa-app-shell #send-btn {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    height: 44px;
    flex: 0 0 88px;
    padding: 0 6px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
}



/* Passkey / WebAuthn */
.passkey-divider { display:flex; align-items:center; gap:10px; margin:14px 0; color:#879382; font-size:12px; }
.passkey-divider::before, .passkey-divider::after { content:""; height:1px; flex:1; background:#dfe6dc; }
#passkey-login-btn.passkey-primary { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; background:#f2f7ef; color:#365530; border:1px solid #9dbb91; }
#passkey-login-btn.passkey-primary:hover { background:#e8f2e3; }
#passkey-login-btn.passkey-primary svg { width:21px; height:21px; flex:none; }
#passkey-login-btn[hidden], #passkey-register-btn[hidden], .passkey-divider[hidden], .passkey-note[hidden] { display:none !important; }
.passkey-note { margin-top:9px; color:#73806f; font-size:12px; line-height:1.4; text-align:center; }
#passkey-register-btn.is-enabled { color:#4f8b3d; }
@media (max-width: 720px) {
  #passkey-register-btn span { display:none; }
}
