﻿/* Passport Login Styles - Microsoft Fluent Design */

:root {
  --neutral-0: #ffffff;
  --neutral-2: #faf9f8;
  --neutral-4: #f3f2f1;
  --neutral-8: #edebe9;
  --neutral-20: #c8c6c4;
  --neutral-40: #a19f9d;
  --neutral-60: #797775;
  --neutral-80: #323130;
  --neutral-100: #000000;
  
  --brand-primary: #0078d4;
  --brand-dark: #005a9e;
  --brand-light: #eff6fc;
  
  --success: #107c10;
  --error: #a80000;

  --font-base: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --shadow-card: 0 1.6px 3.6px 0 rgba(0,0,0,0.13), 0 0.3px 0.9px 0 rgba(0,0,0,0.11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-base);
  background:
    radial-gradient(1200px 700px at 18% 0%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(135deg, #f0f2f5 0%, #e1eaf7 100%);
  background-repeat: no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-80);
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.login-header {
  margin-bottom: 24px;
  text-align: center;
}
.logo {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--neutral-80);
}
.subtitle {
  margin: 0;
  color: var(--neutral-60);
  font-size: 15px;
}

.login-box {
  background: var(--neutral-0);
  padding: 44px;
  width: 100%;
  box-shadow: 0 6.4px 14.4px 0 rgba(0,0,0,0.13), 0 1.2px 3.6px 0 rgba(0,0,0,0.11);
  border-radius: 2px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--neutral-20);
  margin-bottom: 32px;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-60);
  padding: 12px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}
.tab:hover { color: var(--neutral-80); }
.tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}
.tab.is-active { color: var(--brand-primary); }
.tab.is-active::after { background: var(--brand-primary); }

/* Form Fields */
.pane { display: none; }
.pane.is-active { display: block; animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-80);
}

.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--neutral-60);
  border-radius: 2px;
  font-size: 15px;
  color: var(--neutral-80);
  outline: none;
  background-color: var(--neutral-0);
  transition: all 0.1s ease;
}
.input:hover { border-color: var(--neutral-80); }
.input:focus {
  border-color: var(--brand-primary);
  border-bottom-width: 2px;
  padding-bottom: -1px; /* Compensate? border-box handles it usually but let's be safe */
}
.input::placeholder { color: var(--neutral-40); }

.btn {
  height: 36px;
  border: none;
  border-radius: 2px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease;
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-block { width: 100%; }

.btn-default {
  background: var(--neutral-0);
  border: 1px solid var(--neutral-60);
  color: var(--neutral-80);
}
.btn-default:hover { background: var(--neutral-4); }
.btn-sm { font-size: 13px; height: 32px; padding: 0 16px; }

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--brand-primary);
}
.btn-ghost:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn:focus-visible,
.tab:focus-visible,
.input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(0, 120, 212, 0.95);
  outline-offset: 2px;
}

.hint {
  margin-top: 24px;
  font-size: 13px;
  color: var(--neutral-60);
  text-align: center;
  line-height: 1.5;
}

/* QR Code */
.qr-container {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neutral-4);
  margin-bottom: 20px;
  position: relative;
}
.qr-img {
  width: 180px;
  height: 180px;
  mix-blend-mode: multiply;
  background: var(--neutral-0);
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.06);
}

.qr-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  color: var(--neutral-80);
  background: linear-gradient(
    180deg,
    rgba(243,242,241,0) 0%,
    rgba(243,242,241,0.92) 55%,
    rgba(243,242,241,0.96) 100%
  );
  pointer-events: none;
}

.qr-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.qr-uuid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  margin-top: 8px;
  opacity: 0.55;
  text-align: center;
  word-break: break-all;
}

/* Footer */
.login-footer {
  margin-top: 24px;
}
.foot-row {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--neutral-60);
  align-items: center;
}
.dot { display: inline-flex; align-items: center; font-size: 16px; line-height: 1; color: var(--neutral-40); }
.dot::before { content: "·"; }
a { color: var(--neutral-60); text-decoration: none; transition: color 0.1s; }
a:hover { color: var(--brand-primary); text-decoration: underline; }

[hidden] { display: none !important; }

/* Badges */
.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.05);
}

.badge-subtle {
  background: var(--neutral-4);
  color: var(--neutral-60);
}

@media (max-width: 480px) {
  .login-wrapper { padding: 18px 14px; }
  .login-box { padding: 28px 20px; }
  .tabs { margin-bottom: 24px; }
}
