/*
 * Shared look for the PanelDesk sign-in pages: panel login, panel forgot
 * password, customer login and reseller login.
 */

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

:root {
  --pd-ink: #2b3138;
  --pd-muted: #7b8590;
  --pd-line: #c9ced6;
  --pd-accent: #1fa3d4;
  --pd-accent-ring: rgba(31, 163, 212, .2);
}

html, body { margin: 0; min-height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  color: var(--pd-ink);
  background-color: #eceef0;
  /* Soft labyrinth texture, faded towards the centre so the card stays the focus */
  background-image:
    radial-gradient(ellipse 60% 55% at 50% 30%, rgba(246, 247, 248, .95) 0%, rgba(246, 247, 248, .55) 55%, rgba(246, 247, 248, 0) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23f8f9fa' stroke-width='9' stroke-linecap='square'%3E%3Cpath d='M0 0L96 96M96 48L48 96M48 0L0 48M60 36L76 20M20 76L36 60M70 82L82 70'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 16px 24px;
  -webkit-font-smoothing: antialiased;
}

.pd-card {
  width: 100%;
  max-width: 480px;
  background-color: #fbfcfd;
  /* Faint geometric doodles; an odd tile size keeps the repeat from reading as a grid */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='347' height='311'%3E%3Cg fill='none' stroke='%23e8ecf0' stroke-width='2'%3E%3Ccircle cx='300' cy='34' r='12'/%3E%3Cpath d='M38 22l16 6M262 132l10-14 6 18zM24 170l14-10 14 10-5 16h-18zM120 262c8-10 18 2 26-8M170 74a10 10 0 1 1 6 12M318 236l-6 14'/%3E%3Crect x='226' y='212' width='18' height='18' transform='rotate(12 235 221)'/%3E%3C/g%3E%3C/svg%3E");
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(30, 41, 59, .16), 0 2px 6px rgba(30, 41, 59, .06);
  overflow: hidden;
}

.pd-card__body { padding: 36px 38px 8px; }

.pd-poster {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 36px;
  padding: 8px;
  background: #f3f3f3;
  border-radius: 4px;
}
.pd-poster img { display: block; width: 100%; height: 100%; }

.pd-field { position: relative; margin-bottom: 22px; }

.pd-field__icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #8a9099;
  pointer-events: none;
}

.pd-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--pd-ink);
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .15s, box-shadow .15s;
}
.pd-input::placeholder { color: #8f969e; }
.pd-input:focus {
  outline: none;
  border-color: var(--pd-accent);
  box-shadow: 0 0 0 3px var(--pd-accent-ring);
}
.pd-input--password { padding-right: 46px; }

.pd-reveal {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8a9099;
  cursor: pointer;
}
.pd-reveal:hover { color: var(--pd-ink); }
.pd-reveal:focus-visible { outline: 2px solid var(--pd-accent); outline-offset: -2px; }
.pd-reveal svg { width: 18px; height: 18px; }
.pd-reveal .pd-eye-off { display: none; }
.pd-reveal[aria-pressed="true"] .pd-eye { display: none; }
.pd-reveal[aria-pressed="true"] .pd-eye-off { display: block; }

.pd-submit {
  position: relative;
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg, #3fc0ea 0%, #1fa3d4 100%);
  border: 1px solid #1a96c4;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(15, 80, 110, .2);
  cursor: pointer;
  transition: filter .15s, box-shadow .15s;
}
.pd-submit:hover { filter: brightness(.96); }
.pd-submit:active { filter: brightness(.9); }
.pd-submit:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--pd-accent-ring); }
.pd-submit[disabled] { cursor: progress; filter: saturate(.7) brightness(1.02); }
.pd-submit .pd-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pd-spin .7s linear infinite;
}
.pd-submit[disabled] .pd-spinner { display: inline-block; }
@keyframes pd-spin { to { transform: rotate(360deg); } }

.pd-card__footer {
  margin-top: 30px;
  padding: 14px 38px 16px;
  background: #eef3f7;
  border-top: 1px solid #e1e7ec;
}
.pd-secondary {
  display: inline-block;
  padding: 9px 16px;
  font-size: 15px;
  color: var(--pd-ink);
  text-decoration: none;
  background: linear-gradient(180deg, #fff 0%, #f4f6f8 100%);
  border: 1px solid var(--pd-line);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.pd-secondary:hover { background: #fff; border-color: #b4bbc5; }
.pd-secondary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--pd-accent-ring); border-color: var(--pd-accent); }

/* Flash messages from frontend/_partials/flash_messages (Bootstrap markup, no Bootstrap here) */
.alert {
  position: relative;
  margin: 0 0 20px;
  padding: 11px 38px 11px 14px;
  font-size: 14px;
  line-height: 1.45;
  text-align: left !important; /* the partial centres inline; wrapped lines read better left-aligned */
  border: 1px solid transparent;
  border-radius: 4px;
}
.alert p { margin: 0; }
.alert-danger { color: #8a1c2b; background: #fdeef0; border-color: #f4c4cb; }
.alert-success { color: #17603a; background: #ebf8f0; border-color: #bfe6cf; }
.alert .close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  opacity: .55;
  cursor: pointer;
}
.alert .close:hover { opacity: .9; }

/* Visually hidden, still read out by screen readers */
.pd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Visible title + intro line, for pages that need to say what they do */
.pd-heading {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}
.pd-lead {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--pd-muted);
}

/* A card with no grey footer strip needs its own bottom padding */
.pd-card__body:last-child { padding-bottom: 36px; }

@media (max-width: 520px) {
  body { padding-top: 24px; }
  .pd-card__body { padding: 28px 22px 4px; }
  .pd-card__body:last-child { padding-bottom: 28px; }
  .pd-card__footer { padding: 14px 22px; }
  .pd-poster { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 1.5s !important; }
}
