/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Utility classes */
.hidden {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

/* Authentication styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f4f4f7;
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
  background-color: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-actions {
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  width: 100%;
}

.btn-primary {
  background: #4f46e5;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: #f9fafb;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-danger {
  background-color: #dc2626;
  color: white;
  border: 1px solid #dc2626;
}

.btn-danger:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

.auth-footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.auth-footer p {
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-link {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.error-messages {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error-messages h3 {
  color: #dc2626;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.error-messages ul {
  list-style: none;
  color: #dc2626;
  font-size: 0.875rem;
}

.error-messages li {
  margin-bottom: 0.25rem;
}

.error-messages li:before {
  content: "\2022 ";
  font-weight: bold;
}

/* Remember Me Checkbox */
.remember-me-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #4f46e5;
}

.remember-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* Flash messages */
.flash {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.flash.notice {
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.flash.alert {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* Top Bar Navigation */
.top-bar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.top-bar-brand .brand-link {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  transition: opacity 0.2s ease-in-out;
}

.top-bar-brand .brand-link:hover {
  opacity: 0.9;
}

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.user-info .user-name {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-link.logout-link:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Main content spacing */
.main-content {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content-full {
  padding: 0;
}

/* Flash container positioning */
.flash-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Dashboard Styles */
.dashboard-container {
  max-width: 800px;
  margin: 0 auto;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  color: #6b7280;
  font-size: 1.125rem;
}

.dashboard-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

/* Profile Styles */
.profile-container {
  max-width: 600px;
  margin: 0 auto;
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
}

.profile-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 2rem;
}

.profile-info {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.profile-info h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.profile-info .email {
  color: #6b7280;
  margin-bottom: 1rem;
}

.profile-info .role {
  color: #374151;
  font-weight: 500;
}

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-badge.user {
  background-color: #dbeafe;
  color: #1e40af;
}

.role-badge.admin {
  background-color: #fef2f2;
  color: #dc2626;
}

.profile-actions {
  text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
  .top-bar-nav {
    gap: 1rem;
  }

  .user-info .user-name {
    display: none;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .dashboard-title {
    font-size: 2rem;
  }

  .dashboard-content,
  .profile-card {
    padding: 1.5rem;
  }
}

/* ============================================================
   Landing page (Nightshift) — consistent with bigapp.io:
   neutral palette, whitespace, mono labels, ONE yellow marker
   accent, dry/human copy. Scoped under .lp.
   ============================================================ */
.lp {
  --ground: #f4f4f7; --paper: #ffffff; --ink: #16161a; --muted: #6b6b76;
  --faint: #a8a3ae; --marker: #ffd84d; --hair: #e5e5ec; --night: #4f46e5;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.lp-wrap { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* the one playful accent — a partial yellow highlight under key words */
.lp-mark { background: linear-gradient(transparent 62%, var(--marker) 62%); padding: 0 0.05em; }

/* top bar */
.lp-top { border-bottom: 1px solid var(--hair); }
.lp-top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.lp-brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0.4rem; }
.lp-moon { font-size: 1.2rem; }
.lp-tld { font-family: var(--mono); font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.lp-loginlink { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.lp-loginlink:hover { color: var(--ink); }

/* hero */
.lp-hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
  opacity: 0; transform: translateY(8px); animation: lp-rise 0.6s ease forwards; }
@keyframes lp-rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-hero { animation: none; opacity: 1; transform: none; } }
.lp-eyebrow { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin: 0 0 1.1rem; }
.lp-h1 { font-size: clamp(2.4rem, 6.5vw, 4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; margin: 0 0 1.1rem; }
.lp-lede { font-size: 1.15rem; color: var(--muted); max-width: 56ch; margin: 0 0 2rem; }
.lp-cta-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.lp-btn { display: inline-block; background: var(--night); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 0.75rem 1.4rem; border-radius: 10px; text-decoration: none; transition: transform 0.15s ease, opacity 0.15s ease; }
.lp-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.lp-cta-note { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.lp-trust { font-size: 0.95rem; color: var(--faint); margin: 0; }

/* example finding (mono, restrained) */
.lp-example-wrap { padding-bottom: clamp(3rem, 6vw, 5rem); }
.lp-example { border: 1px solid var(--hair); border-radius: 14px; background: var(--ground);
  font-family: var(--mono); font-size: 0.9rem; padding: 1.1rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem; }
.lp-ex-row { color: var(--ink); }
.lp-ex-label { display: inline-block; min-width: 4em; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; }
.lp-example code { color: var(--night); }
.lp-example strong { font-weight: 700; }

/* sections */
.lp-section { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--hair); }
.lp-h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 2rem; }

/* how-it-works steps */
.lp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; max-width: 640px; }
.lp-steps li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.lp-step-n { font-family: var(--mono); font-size: 0.85rem; color: var(--faint); padding-top: 0.2rem; }
.lp-steps h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.25rem; }
.lp-steps p { color: var(--muted); font-size: 1rem; margin: 0; }

/* honest note */
.lp-note-section { background: var(--ground); }
.lp-note { font-size: 1.3rem; line-height: 1.5; letter-spacing: -0.01em; max-width: 52ch; margin: 0; }

/* final cta */
.lp-final .lp-final-lede { margin-bottom: 1.75rem; }

/* footer */
.lp-footer { border-top: 1px solid var(--hair); padding: 2rem 0 3rem; }
.lp-footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.lp-footer-links { display: flex; gap: 1.25rem; }
.lp-footer a { color: var(--muted); text-decoration: none; }
.lp-footer a:hover { color: var(--ink); }

@media (max-width: 520px) {
  .lp-footer-inner { flex-direction: column; align-items: flex-start; }
}
