@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
  --ink: #0f172a;
  --muted: #5f6b7a;
  --primary: #0ea5e9;
  --primary-strong: #0f766e;
  --accent: #f59e0b;
  --surface: #ffffff;
  --surface-muted: #f5f7fb;
  --border: #e5e7eb;
  --card-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --card-shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.06);
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Sora', 'Space Grotesk', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(14, 165, 233, 0.14), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(245, 158, 11, 0.16), transparent 22%),
    radial-gradient(circle at 80% 68%, rgba(15, 118, 110, 0.13), transparent 26%),
    var(--surface-muted);
  min-height: 100vh;
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: var(--primary-strong);
}

a:hover {
  color: #0b7466;
}

.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  margin: 18px auto 6px;
  max-width: 1180px;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

@media (min-width: 992px) {
  .brand-logo {
    height: 48px;
  }
}

.nav-link {
  font-weight: 600;
  color: var(--muted);
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--ink);
}

.nav-date-form {
  padding-left: 6px;
  padding-right: 6px;
}

.nav-date-label {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-date-input {
  width: 152px;
  border-radius: 12px;
  font-weight: 600;
}

@media (min-width: 992px) {
  .nav-date-input {
    width: 168px;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: none;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ba6df, #0c685f);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-primary,
.btn-light {
  border-radius: 12px;
  font-weight: 600;
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.card.shadow-sm {
  box-shadow: var(--card-shadow-soft);
}

.page-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 12px 56px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-heading .eyebrow {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.page-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(15, 118, 110, 0.13));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 50px rgba(14, 165, 233, 0.14);
  overflow: hidden;
}

.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.48;
}

.page-hero::before {
  width: 200px;
  height: 200px;
  background: rgba(14, 165, 233, 0.35);
  top: -60px;
  right: 8%;
}

.page-hero::after {
  width: 180px;
  height: 180px;
  background: rgba(15, 118, 110, 0.35);
  bottom: -60px;
  left: 6%;
}

.page-hero .content {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-strong);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.18);
}

.hero-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.hero-subtitle {
  color: var(--muted);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.accent-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px dashed rgba(14, 165, 233, 0.4);
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}

.floating-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
}

.filter-pill {
  background: #eef6ff;
  color: #0b4f74;
  padding: 7px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.chip {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.tag-badge {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--muted);
}

.group-header {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), transparent);
  border-radius: 14px;
  padding: 10px 14px;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}

.paper-card {
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
}

.paper-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.thumb-box {
  background: linear-gradient(135deg, #f3f4f6, #eef2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb-box img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.summary-line {
  min-height: 48px;
  color: var(--muted);
}

.masonry-item {
  width: 100%;
  height: 100%;
}

.thumb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 20, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.thumb-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.35);
  display: block;
  cursor: grab;
  transform-origin: center center;
}

.paper-card-muted {
  opacity: 0.55;
  filter: grayscale(0.6);
}

.paper-card-muted:hover {
  opacity: 0.7;
  filter: grayscale(0.3);
}

.paper-card-highlight {
  box-shadow: 0 18px 46px rgba(15, 118, 110, 0.22);
  border: 1px solid rgba(15, 118, 110, 0.22) !important;
}

.logo-btn {
  padding: 7px 12px;
}

.logo-icon {
  height: 16px;
  width: 16px;
  display: block;
}

.fav-list-scroll {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.fav-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #fff);
  padding-top: 10px;
}

.pill-check {
  border: 1px solid #e5e7eb;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.12s ease;
  font-weight: 600;
}

.pill-check input {
  display: none;
}

.pill-check.active {
  background: linear-gradient(135deg, #0ea5e9, #0f766e);
  color: #fff;
  border-color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.segmented-toggle label {
  border: 1px solid #e5e7eb;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.12s ease;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.08);
}

.segmented-toggle .btn-check:checked + label {
  background: linear-gradient(90deg, #0ea5e9, #0f766e);
  color: #fff;
  border-color: #0f766e;
}

.auth-card,
.settings-card {
  border-radius: 18px;
  box-shadow: var(--card-shadow-soft);
}

.rename-input {
  border: 1px solid transparent;
  background: transparent;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  min-width: 200px;
}

.rename-input:hover,
.rename-input:focus {
  border-color: #d1d5db;
  background: #f8fafc;
  outline: none;
}

.rename-hint {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.rename-form {
  margin: 0;
}

.rename-form:hover .rename-hint,
.rename-input:focus + .rename-hint {
  opacity: 1;
}

@media (max-width: 992px) {
  .navbar {
    margin: 0 10px 8px;
  }

  .page-shell {
    padding: 10px 12px 48px;
  }

  .page-hero {
    border-radius: 18px;
  }
}
