/* Investigator Authentication & Profile Styling for The Briar House File */

/* Topbar Investigator Badge Button */
.investigator-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #232a2c;
  color: #dfdcd3;
  border: 1px solid #4a5654;
  border-radius: 4px;
  padding: 5px 11px;
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.investigator-badge-btn:hover {
  background: #313c3e;
  border-color: #cbb279;
  color: #fff;
}
.investigator-badge-btn:active {
  transform: translateY(1px);
}
.investigator-badge-btn .badge-icon {
  font-size: 0.75rem;
}

/* Modal Backdrop & Container */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal.hidden {
  display: none !important;
}
.auth-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 14, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.auth-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #1e2426;
  border: 1px solid #485654;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.06) inset;
  color: #e5e1d8;
  padding: 28px 24px 24px;
  overflow: hidden;
  z-index: 201;
  animation: authFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-card-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c7a75c 0%, #e6cc87 50%, #c7a75c 100%);
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #2b3537;
  border: 1px solid #4a5856;
  color: #c7c2b6;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-modal__close:hover {
  background: #3c4a4c;
  color: #fff;
}

/* Header */
.auth-head {
  margin-bottom: 20px;
}
.auth-kicker {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #c7b175;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.auth-head h2 {
  font-family: var(--font-doc, serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: #f7f4ec;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.auth-head p {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #a2aba7;
  margin: 0;
}
.auth-head code {
  background: #14191a;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid #364240;
  color: #e5cc8a;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
}

/* Alerts */
.auth-alert {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.74rem;
  line-height: 1.4;
  margin-bottom: 16px;
}
.auth-alert--error {
  background: rgba(138, 43, 43, 0.28);
  border: 1px solid #9e4343;
  color: #fca5a5;
}
.auth-alert--success {
  background: rgba(43, 138, 70, 0.28);
  border: 1px solid #3d9b5c;
  color: #86efac;
}

/* Forms */
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form label {
  display: grid;
  gap: 5px;
}
.auth-form label span {
  font-family: var(--font-mono, monospace);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b7c0bd;
  text-transform: uppercase;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  background: #14191a;
  border: 1px solid #435250;
  border-radius: 4px;
  color: #f0ece1;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: #c7b175;
  box-shadow: 0 0 0 2px rgba(199, 177, 117, 0.2);
}
.auth-hint {
  font-size: 0.62rem;
  color: #83908c;
  line-height: 1.35;
}

/* Buttons */
.auth-primary-btn {
  background: #c7b175;
  color: #171b1c;
  border: 0;
  border-radius: 4px;
  padding: 11px 16px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s, transform 0.1s;
}
.auth-primary-btn:hover:not(:disabled) {
  background: #dfcb95;
}
.auth-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-secondary-btn {
  background: #2c3739;
  color: #dfdcd3;
  border: 1px solid #4e5e5c;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-secondary-btn:hover {
  background: #394749;
  border-color: #c7b175;
}

.auth-danger-btn {
  background: rgba(138, 43, 43, 0.22);
  color: #f87171;
  border: 1px solid #7f2d2d;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.auth-danger-btn:hover {
  background: rgba(138, 43, 43, 0.4);
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #2f3a39;
  font-size: 0.7rem;
  color: #8c9794;
}
.auth-foot--split {
  justify-content: space-between;
}
.auth-link-btn {
  background: none;
  border: 0;
  color: #c7b175;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.auth-link-btn:hover {
  color: #e8d7a4;
}

/* OTP 6-Digit Inputs */
.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 10px 0 16px;
}
.otp-digit {
  width: 100%;
  height: 52px;
  background: #14191a;
  border: 1px solid #4b5a58;
  border-radius: 4px;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 1.4rem;
  font-weight: 800;
  color: #f3eedf;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.otp-digit:focus {
  border-color: #c7b175;
  box-shadow: 0 0 0 2px rgba(199, 177, 117, 0.25);
  background: #192022;
}

/* Investigator Warrant Card (Profile) */
.warrant-badge-card {
  background: #171d1e;
  border: 1px solid #3f4e4c;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.warrant-head {
  background: #232c2e;
  padding: 12px 14px;
  border-bottom: 1px solid #374443;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.warrant-dept {
  display: block;
  font-family: var(--font-mono, monospace);
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #929e9b;
}
.warrant-unit {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e5e1d8;
}
.warrant-badge-emblem {
  background: #2b3735;
  border: 1px solid #c7b175;
  color: #e6cb82;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}
.warrant-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.warrant-field {
  display: grid;
  gap: 2px;
}
.warrant-field.wide {
  grid-column: 1 / -1;
  border-top: 1px solid #283332;
  padding-top: 8px;
}
.warrant-field small {
  font-family: var(--font-mono, monospace);
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  color: #7d8986;
  text-transform: uppercase;
}
.warrant-field strong {
  font-size: 0.88rem;
  color: #f7f4ec;
}
.warrant-field span {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #a4b0ac;
}

/* Profile Stats Grid */
.auth-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-card {
  background: #181e1f;
  border: 1px solid #364442;
  border-radius: 4px;
  padding: 10px 8px;
  text-align: center;
  display: grid;
  gap: 2px;
}
.stat-card span {
  font-family: var(--font-mono, monospace);
  font-size: 1.05rem;
  font-weight: 800;
  color: #c7b175;
}
.stat-card small {
  font-size: 0.52rem;
  color: #8c9794;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sync Box */
.auth-sync-status-box {
  background: #141a1b;
  border: 1px solid #2f3b39;
  border-radius: 4px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.auth-sync-status-box > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}
.auth-sync-status-box strong {
  font-size: 0.68rem;
  color: #d1dcd8;
}
.auth-sync-status-box small {
  font-size: 0.58rem;
  color: #74807d;
  font-family: var(--font-mono, monospace);
}

/* Share Section */
.auth-share-section {
  margin-bottom: 16px;
}
.auth-share-trigger-btn {
  width: 100%;
  background: linear-gradient(180deg, #2a3537 0%, #1f2729 100%);
  border: 1px solid #5a6e6b;
  border-radius: 4px;
  padding: 10px 14px;
  color: #f0ece1;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.auth-share-trigger-btn:hover {
  background: linear-gradient(180deg, #37474a 0%, #293537 100%);
  border-color: #d4b46a;
  color: #fff;
}
.auth-share-trigger-btn:active {
  transform: translateY(1px);
}
.auth-share-tray {
  margin-top: 10px;
  background: #141a1b;
  border: 1px solid #374644;
  border-radius: 6px;
  padding: 12px;
  animation: authFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.share-tray-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #c7b175;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.share-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.64rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s, opacity 0.15s;
}
.share-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.share-btn:active {
  transform: translateY(1px);
}
.share-btn--native {
  grid-column: 1 / -1;
  background: #c7b175;
  color: #14191a;
  border-color: #e5cc8a;
  font-weight: 800;
}
.share-btn--whatsapp {
  background: rgba(37, 211, 102, 0.16);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.4);
}
.share-btn--telegram {
  background: rgba(0, 136, 204, 0.16);
  color: #29b6f6;
  border-color: rgba(0, 136, 204, 0.4);
}
.share-btn--x {
  background: rgba(255, 255, 255, 0.08);
  color: #f0ece1;
  border-color: rgba(255, 255, 255, 0.2);
}
.share-btn--copy {
  background: #232c2e;
  color: #d4b46a;
  border-color: #4a5d5a;
}
.share-copy-toast {
  margin-top: 8px;
  font-size: 0.62rem;
  font-family: var(--font-mono, monospace);
  color: #86efac;
  background: rgba(43, 138, 70, 0.25);
  border: 1px solid #3d9b5c;
  padding: 6px 10px;
  border-radius: 4px;
  text-align: center;
  animation: authFadeIn 0.15s ease-out both;
}

.auth-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Mobile Responsiveness for Auth */
@media (max-width: 480px) {
  .investigator-badge-btn .badge-text {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .otp-digit {
    height: 46px;
    font-size: 1.2rem;
  }
  .auth-profile-actions {
    grid-template-columns: 1fr;
  }
}
