:root {
  --color-black: #090909;
  --color-charcoal: #171717;
  --color-gold: #c9a227;
  --color-gold-light: #e7cf72;
  --color-white: #ffffff;
  --color-surface: #f7f7f4;
  --color-muted: #77776f;
  --color-border: #e8e7df;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* FlickPost app shell tokens */
  --fp-black: #0b0b0b;
  --fp-gold: #c9a227;
  --fp-gold-soft: #fff7dd;
  --fp-white: #ffffff;
  --fp-bg: #F5F5F9;
  --fp-surface: #ffffff;
  --fp-sidebar-bg: #ffffff;
  --fp-topbar-bg: #ffffff;
  --fp-footer-bg: #ffffff;
  --fp-border: #E7E7EE;
  --fp-text: #2F2F35;
  --fp-muted: #7A7A86;
  --fp-radius-sm: 6px;
  --fp-radius: 8px;
  --fp-radius-lg: 10px;
  --fp-shadow: 0 1px 2px rgba(30, 30, 26, .04);
  --fp-sidebar-width: 276px;
  --fp-sidebar-width-collapsed: 96px;
  --fp-header-height: 82px;
  --fp-footer-height: 56px;
  --fp-content-pad-x: clamp(28px, 3vw, 44px);
  --fp-content-pad-y: 16px;
  --fp-control-height: 40px;
  --fp-font-family: var(--font-body);
  --fp-font: var(--fp-font-family);
  --fp-font-size-base: 15px;
  --fp-font-size-sm: 13px;
  --fp-font-size-xs: 12px;
  --fp-font-size-title: 22px;
  --fp-font-weight-normal: 400;
  --fp-font-weight-medium: 500;
  --fp-font-weight-semibold: 600;
}

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

body {
  min-width: 320px;
  margin: 0;
  color: var(--color-charcoal);
  background: var(--color-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

.app-toast-container {
  position: fixed;
  z-index: 1095;
  top: 16px;
  right: 16px;
  display: grid;
  width: min(370px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  overflow: hidden;
  padding: 13px 13px 14px;
  border: 1px solid #e3e2db;
  border-radius: 9px;
  color: #3e3e39;
  background: #fff;
  box-shadow: 0 14px 38px rgba(24, 24, 20, .17);
  opacity: 0;
  pointer-events: auto;
  transform: translate3d(24px, 0, 0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translate3d(16px, 0, 0);
}

.app-toast__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  font-size: .92rem;
}

.app-toast__content,
.app-toast__content > span {
  display: block;
  min-width: 0;
}

.app-toast__content strong {
  display: block;
  margin: 1px 0 2px;
  color: #252521;
  font-size: .78rem;
  font-weight: 700;
}

.app-toast__content > span {
  color: #74746d;
  font-size: .72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.app-toast__close {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #8a8a82;
  background: transparent;
  font-size: .72rem;
}

.app-toast__close:hover,
.app-toast__close:focus-visible {
  outline: 0;
  color: #262622;
  background: #f2f1ec;
}

.app-toast__progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  transform-origin: left center;
  animation: app-toast-progress 4.2s linear forwards;
}

.app-toast--success { border-color: #cfe5d8; }
.app-toast--success .app-toast__icon { color: #28704d; background: #e8f4ed; }
.app-toast--success .app-toast__progress { color: #42a875; }
.app-toast--info { border-color: #d3e3ec; }
.app-toast--info .app-toast__icon { color: #2d6e92; background: #e9f3f8; }
.app-toast--info .app-toast__progress { color: #55a2cc; }
.app-toast--warning { border-color: #e9ddb5; }
.app-toast--warning .app-toast__icon { color: #866711; background: #fbf3d8; }
.app-toast--warning .app-toast__progress { color: #c9a227; }
.app-toast--danger { border-color: #eccdcd; }
.app-toast--danger .app-toast__icon { color: #a84747; background: #faeaea; }
.app-toast--danger .app-toast__progress { color: #d65c5c; }

@keyframes app-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 44%) 1fr;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  padding: 56px clamp(48px, 6vw, 96px);
  color: var(--color-white);
  background:
    radial-gradient(circle at 20% 15%, rgba(201, 162, 39, 0.18), transparent 28%),
    linear-gradient(145deg, #111111 0%, #050505 100%);
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 50%;
  content: "";
}

.brand-panel::before {
  right: -220px;
  bottom: -220px;
  width: 520px;
  height: 520px;
}

.brand-panel::after {
  right: -110px;
  bottom: -110px;
  width: 300px;
  height: 300px;
}

.brand-panel__glow {
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.14);
  filter: blur(60px);
}

.brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-direction: column;
}

.brand-logo {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 13px;
  color: inherit;
}

.brand-logo:hover {
  color: inherit;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  transform: rotate(45deg);
}

.brand-mark::first-letter {
  transform: rotate(-45deg);
}

.brand-logo strong,
.brand-logo small {
  display: block;
}

.brand-logo strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-logo small {
  margin-top: 2px;
  color: #a8a8a2;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-message {
  margin: auto 0;
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--color-gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-message h1 {
  max-width: 600px;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 4.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.brand-message p {
  max-width: 500px;
  margin: 0;
  color: #b5b5ae;
  font-size: 1rem;
  line-height: 1.8;
}

.trust-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a8a8a2;
  font-size: 0.8rem;
}

.trust-note i {
  color: var(--color-gold);
  font-size: 1rem;
}

.login-panel {
  display: grid;
  padding: 56px 7vw;
  place-items: center;
  background: var(--color-surface);
}

.login-panel__inner {
  width: 100%;
  max-width: 470px;
}

.brand-logo--dark {
  margin-bottom: 64px;
  color: var(--color-charcoal);
}

.login-heading {
  margin-bottom: 38px;
}

.login-heading h2 {
  margin: 0 0 12px;
  color: var(--color-black);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.login-heading p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.form-label {
  margin-bottom: 9px;
  color: #393934;
  font-size: 0.82rem;
  font-weight: 600;
}

.input-shell {
  position: relative;
}

.input-shell > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 18px;
  color: #96968e;
  transform: translateY(-50%);
}

.input-shell .form-control {
  min-height: 56px;
  padding: 14px 50px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-charcoal);
  background: var(--color-white);
  box-shadow: none;
  font-size: 0.92rem;
}

.input-shell .form-control::placeholder {
  color: #aaa9a1;
}

.input-shell .form-control:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
}

.password-toggle {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 15px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: #85857e;
  background: transparent;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--color-black);
  background: #f3f2ec;
}

.form-check-input {
  border-color: #c7c7bf;
  box-shadow: none !important;
}

.form-check-input:checked {
  border-color: var(--color-gold);
  background-color: var(--color-gold);
}

.form-check-label {
  color: #62625c;
  font-size: 0.82rem;
}

.text-link {
  color: #8d7118;
  font-size: 0.8rem;
  font-weight: 600;
}

.text-link:hover {
  color: var(--color-black);
}

.login-disabled-hint {
  color: #9a9a92;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: default;
  user-select: none;
}

.form-check-input:disabled + .form-check-label {
  color: #9a9a92;
}

.btn-gold {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--color-gold);
  border-radius: 8px;
  color: var(--color-black);
  background: var(--color-gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  transition: 180ms ease;
}

.btn-gold:hover,
.btn-gold:focus-visible {
  border-color: var(--color-gold-light);
  color: var(--color-black);
  background: var(--color-gold-light);
  box-shadow: 0 10px 24px rgba(201, 162, 39, 0.22);
  transform: translateY(-1px);
}

.support-note {
  margin: 32px 0 0;
  color: var(--color-muted);
  font-size: 0.8rem;
  text-align: center;
}

.copyright {
  margin: 16px 0 0;
  color: #a1a199;
  font-size: 0.7rem;
  text-align: center;
}

@media (max-width: 991.98px) {
  .login-page {
    display: block;
    min-height: 100vh;
  }

  .login-panel {
    min-height: 100vh;
    padding: 42px 24px;
  }
}

@media (max-width: 575.98px) {
  .app-toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .app-toast {
    padding: 12px;
  }

  .login-panel {
    align-items: start;
    padding: 30px 20px;
  }

  .brand-logo--dark {
    margin-bottom: 54px;
  }

  .login-heading {
    margin-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .app-toast__progress {
    animation: none;
  }
}
