/* Sherpas Dashboards Portal - CSS Design System */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-primary: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(226, 232, 240, 0.8);
  --confidential-bg: #fef2f2;
  --confidential-border: #fee2e2;
  --confidential-text: #991b1b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients (Blobs) */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #dbeafe 0%, #eff6ff 100%);
  top: -10%;
  left: -5%;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #fce7f3 0%, #fdf2f8 100%);
  bottom: -5%;
  right: -5%;
}

/* Confidential Banner */
.confidential-banner {
  background-color: var(--confidential-bg);
  border-bottom: 1px solid var(--confidential-border);
  padding: 0.6rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--confidential-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.user-info {
  display: none;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: normal;
  letter-spacing: normal;
}

.user-info img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.user-info span {
  font-size: 0.75rem;
  font-weight: 500;
}

.user-info button {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-primary);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.user-info button:hover {
  background-color: rgba(0, 0, 0, 0.04);
  border-color: var(--text-primary);
}

/* Main Layout */
.container {
  position: relative;
  z-index: 5;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header & Logo */
.header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.logo {
  height: 54px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #1e293b 0%, #64748b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Auth Pages (Login Card) */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 5;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.auth-header {
  margin-bottom: 2.5rem;
}

.auth-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--confidential-text);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-oauth img {
  width: 20px;
  height: 20px;
}

.btn-oauth:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

/* Dashboard Cards Grid */
.section-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "→";
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.85);
}

.card:hover::after {
  color: var(--accent);
  transform: translateX(4px);
}

.card-project {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  padding-right: 1.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

/* Card States / Loading & Empty */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-bg);
  border: 1.5px dashed var(--text-muted);
  border-radius: 16px;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: white;
}

.footer img {
  height: 22px;
  opacity: 0.4;
  margin-bottom: 0.75rem;
}

.footer .confidential-text {
  font-weight: 700;
  color: var(--confidential-text);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Access Denied Card (404 Page) */
.error-card {
  max-width: 460px;
}

.error-icon {
  width: 56px;
  height: 56px;
  background: #fef2f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.error-icon svg {
  color: var(--confidential-text);
}

.error-email {
  font-family: monospace;
  font-size: 0.8rem;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
}
