/* ==========================================================================
   OneDox login — tricolour design (NewUI-legal, Sep 2026).
   Used only by resources/views/vendor/admin/login.blade.php.
   External stylesheet on purpose: the app's CSP allows 'self' stylesheets but
   no inline style="" attributes.
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --saffron: #ff8a1e;
  --white: #ffffff;
  --green: #0e6b3a;
  --dark-green: #0b3d2e;
  --ink: #494949;
  --danger: #b42318;
  --danger-bg: #fef3f2;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  background: #fff url("../img/login-bg-tricolour.jpeg") center center / cover no-repeat;
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 40%, rgba(0,0,0,0.15) 100%);
  z-index: -1;
}

/* ---------- Hero ---------- */
.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 8vh, 80px) 20px clamp(24px, 6vh, 40px);
  overflow: auto;
  z-index: 2;
}

.form-brand {
  text-align: center;
  margin-bottom: 26px;
}

.brand-icon {
  width: clamp(36px, 8vw, 48px);
  height: clamp(36px, 8vw, 48px);
  object-fit: contain;
  margin-bottom: 8px;
}

.logo-title {
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.logo-title .accent { font-weight: 700; color: var(--ink); }

.tagline {
  margin-top: 4px;
  margin-bottom: 20px;
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
}

/* tricolour track */
.progress-track {
  display: flex;
  width: min(220px, 100%);
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}
.progress-track .bar { flex: 1; height: 100%; }
.bar.orange { background: var(--saffron); }
.bar.white  { background: var(--white); }
.bar.green  { background: var(--green); }

.feature-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.5vw, 8px);
  font-size: clamp(0.5rem, 2vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.feature-nav span:not(.sep) { color: var(--ink); }
.feature-nav .sep { color: rgba(73,73,73,0.5); }

/* ---------- Card ---------- */
.login-form {
  width: 100%;
  max-width: 420px;
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: clamp(22px, 3.5vw, 32px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.form-field { margin-bottom: 18px; }

.form-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fafafa;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-field input::placeholder { color: #a8a8a8; }
.form-field input:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
}
.form-field input.is-invalid { border-color: var(--danger); background: #fffafa; }

.field-error {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--danger);
}

/* Server errors (bad password, lock) and the client-side checks */
.form-alert {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.84rem;
  line-height: 1.4;
}
.form-alert[hidden] { display: none; }

/* ---------- Links, remember, button ---------- */
.form-row.forgot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.forgot-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.forgot-link:hover,
.forgot-link:focus-visible { text-decoration: underline; }

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(73,73,73,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.login-btn:hover,
.login-btn:focus-visible {
  background: #333333;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(73,73,73,0.45);
}
.login-btn:disabled { opacity: .7; cursor: progress; transform: none; }

.lock-note {
  text-align: center;
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { overflow: auto; }
  .hero { padding: 48px 16px 30px; }
}
@media (max-height: 760px) {
  body { overflow: auto; }
  .hero { justify-content: flex-start; }
}
