/* ==========================================================================
   Champagne Journal - "Quiet Champagne" Design System
   A calm, personal champagne journal
   Palette: Warm Ivory (#FAF7F2), Deep Bottle Green (#1B3B2B), Champagne Gold (#C5A059)
   Typography: Inter (Clean, Straight Modern Sans-Serif across Headings, Brand & UI)
   Corner Radius: 14px | Subtle Warm Borders | SVG Outline Icons
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Quiet Champagne - Light Theme Design Tokens */
  --bg-color: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F5F1E9;
  --bg-surface-hover: #ECE6DB;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FAF7F2;

  --text-main: #1F1E1B;
  --text-muted: #6E6A63;
  --text-on-primary: #FFFFFF;

  --primary: #1B3B2B;
  --primary-hover: #142E21;
  --primary-soft: rgba(27, 59, 43, 0.08);

  --accent-gold: #C5A059;
  --accent-gold-soft: rgba(197, 160, 89, 0.12);
  --accent-gold-border: #D8BD86;

  --border-color: #E8E2D8;
  --border-focus: #1B3B2B;

  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: var(--font-heading); /* Alias for backward compatibility */

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"], html.dark {
  /* Quiet Champagne - Dark Cellar Theme Tokens */
  --bg-color: #141614;
  --bg-surface: #1C1E1B;
  --bg-surface-elevated: #242723;
  --bg-surface-hover: #2C302A;
  --bg-card: #1C1E1B;
  --bg-sidebar: #141614;

  --text-main: #F4F2ED;
  --text-muted: #9E9A91;
  --text-on-primary: #FFFFFF;

  --primary: #2B5740;
  --primary-hover: #356B4E;
  --primary-soft: rgba(65, 126, 92, 0.18);

  --accent-gold: #D8B772;
  --accent-gold-soft: rgba(216, 183, 114, 0.15);
  --accent-gold-border: #997B3D;

  --border-color: #2D302A;
  --border-focus: #D8B772;
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-color);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

/* App Layout */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* Desktop Sidebar Navigation */
.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 20px;
    z-index: 50;
  }

  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
  }

  .sidebar-logo .brand-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--primary);
  }

  [data-theme="dark"] .sidebar-logo .brand-title {
    color: var(--text-main);
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
  }

  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    min-height: 48px;
  }

  .sidebar-link:hover {
    color: var(--text-main);
    background-color: var(--bg-surface-elevated);
  }

  .sidebar-link.active {
    color: var(--primary);
    background-color: var(--primary-soft);
    font-weight: 600;
  }

  [data-theme="dark"] .sidebar-link.active {
    color: var(--text-main);
    background-color: var(--bg-surface-elevated);
  }

  .sidebar-link svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
  }

  .sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
  }

  .sidebar-user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    min-height: 48px;
  }

  .sidebar-user-pill:hover {
    background-color: var(--bg-surface-elevated);
  }
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 96px 16px; /* Extra bottom padding for mobile navigation */
}

@media (min-width: 1024px) {
  .main-content {
    margin-left: 250px;
    margin-right: auto;
    padding: 32px 32px 48px 32px;
  }
}

/* Top App Header (Brand + Profile Icon) */
.app-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 24px 0;
}

.brand-text-header {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.header-profile-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.header-profile-btn:hover {
  background-color: var(--bg-surface-hover);
  transform: scale(1.02);
}

.header-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #D1CDC7;
  color: #555;
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
}

.header-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.bottom-nav-link svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
}

.bottom-nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

[data-theme="dark"] .bottom-nav-link.active {
  color: var(--text-main);
}

.bottom-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 18px;
  height: 2px;
  background-color: var(--accent-gold);
  border-radius: var(--radius-full);
}

/* Views Management */
.app-view {
  display: none;
}

.app-view.active {
  display: block;
}

/* Primary Button Styling */
.btn-primary-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  background-color: var(--primary);
  color: var(--text-on-primary);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background-color var(--transition-fast), transform 0.1s ease;
  border: none;
}

.btn-primary-quiet:hover {
  background-color: var(--primary-hover);
}

.btn-primary-quiet:active {
  transform: scale(0.99);
}

/* Secondary / Outline Button */
.btn-outline-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-outline-quiet:hover {
  background-color: var(--bg-surface-elevated);
}

/* Segmented Control Switch (Året | Flaskor) */
.segmented-control {
  display: flex;
  background-color: var(--bg-surface-elevated);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.segmented-btn {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.segmented-btn.active {
  background-color: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
}

[data-theme="dark"] .segmented-btn.active {
  background-color: var(--primary);
  color: var(--text-on-primary);
}

/* Progress Bar */
.quiet-progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.quiet-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

[data-theme="dark"] .quiet-progress-fill {
  background-color: var(--accent-gold);
}

/* ==========================================================================
   VIEW 1: HEM ("Den här veckan" & Guest Landing)
   ========================================================================== */
.home-greeting-badge {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.home-question-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.home-progress-block {
  margin-bottom: 20px;
}

.home-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.home-card-section {
  margin-top: 28px;
}

.home-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

/* Clean Tasting List Items (Senast provat) */
.tasting-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  cursor: pointer;
  min-height: 52px;
}

.tasting-item-row:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--accent-gold);
}

.tasting-item-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  padding-right: 12px;
}

.tasting-item-producer {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
}

.tasting-item-cuvee {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tasting-item-stars {
  color: var(--accent-gold);
  font-size: 1rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Milestone Card */
.milestone-note-card {
  padding: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
}

.milestone-note-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Guest Landing Hero */
.guest-landing-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 40px;
}

.guest-hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.guest-hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.guest-hero-image-wrap:hover img {
  transform: scale(1.02);
}

.guest-hero-overlay-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(18, 30, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.guest-hero-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guest-hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.guest-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guest-hero-btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.hero-cta-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(27, 59, 43, 0.25);
}

.hero-cta-main:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.guest-hero-explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
}

.guest-hero-login-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  transition: color 0.15s ease;
}

.guest-hero-login-link:hover {
  color: var(--text-main);
  text-decoration: underline;
}

.header-login-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
}

.home-guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.home-guest-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  flex-shrink: 0;
}

.guest-banner-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.guest-banner-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.guest-banner-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.guest-trial-notice {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sections Shared */
.landing-section-box,
.landing-preview-section,
.landing-why-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}

.landing-section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.landing-section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 3-Steps Grid */
.landing-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 768px) {
  .landing-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.landing-step-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.landing-step-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 4px;
}

.landing-step-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.landing-step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Sample Tasting Card Preview */
.landing-sample-tasting-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.sample-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sample-week-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sample-stars-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.sample-producer-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

.sample-cuvee-name {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sample-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.sample-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.sample-notes-quote {
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-surface);
  border-left: 3px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 0;
}

/* Why Section */
.landing-why-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
}

.landing-why-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
}

.landing-why-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.landing-why-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.landing-why-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Bottom CTA Box */
.landing-bottom-cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  margin-top: 10px;
}

.landing-bottom-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.landing-bottom-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 440px;
}

.hero-cta-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.hero-cta-bottom:hover {
  background-color: var(--primary-hover);
}

.guest-feed-link {
  display: inline-block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 500;
}

/* ==========================================================================
   VIEW 2: SAMLING ("Året" & "Flaskor")
   ========================================================================== */
.view-title-main {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}

.collection-count-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

/* 4-column Year Map Grid */
.year-map-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.year-week-tile {
  aspect-ratio: 1 / 0.82;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  padding: 6px;
  user-select: none;
}

.year-week-tile:active {
  transform: scale(0.96);
}

.year-week-number {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

/* Logged Week Tile: Deep bottle green with gold checkmark */
.year-week-tile.logged {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.year-week-tile.logged .week-check-icon {
  color: var(--accent-gold);
  font-size: 0.85rem;
  line-height: 1;
  margin-bottom: 2px;
  font-weight: 700;
}

.year-week-tile.logged .week-bottle-badge {
  background-color: var(--accent-gold);
  color: #121e18;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.1;
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

/* Current Week Tile: Cream background, gold border, gold number & label */
.year-week-tile.current {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
}

.year-week-tile.current .week-current-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--accent-gold);
  margin-top: 3px;
  line-height: 1;
  text-align: center;
}

/* Unlogged / Remaining Week Tile */
.year-week-tile.empty {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: #8C8880;
}

[data-theme="dark"] .year-week-tile.empty {
  color: #6C7069;
}

/* Legend at bottom of Samling */
.collection-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 0 24px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.legend-swatch.swatch-logged {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.legend-swatch.swatch-current {
  border: 1.5px solid var(--accent-gold);
  background-color: var(--bg-surface);
}

.legend-swatch.swatch-remaining {
  background-color: var(--bg-surface);
}

/* Bottle List View in Samling */
.search-bar-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-bar-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px 12px 42px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  font-size: 0.95rem;
}

.search-bar-wrap input:focus {
  border-color: var(--primary);
}

.search-bar-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  stroke-width: 1.75;
  fill: none;
  pointer-events: none;
}

.bottle-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bottle-list-card {
  padding: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bottle-list-card:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--accent-gold);
}

.bottle-card-house {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.bottle-card-cuvee {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bottle-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   VIEW 3: LOGGA CHAMPAGNE (Quick Form)
   ========================================================================== */
.view-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.btn-back-arrow {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.btn-back-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.view-back-header-center {
  text-align: center;
  flex: 1;
}

.view-back-header-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.view-back-header-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.log-week-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.log-week-select {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px 22px 2px 8px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color var(--transition-fast);
}

.log-week-select:focus,
.log-week-select:hover {
  border-color: var(--accent-gold);
}

/* Form Styles */
.form-field-group {
  margin-bottom: 16px;
}

.form-label-quiet {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input-quiet {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-input-quiet:focus {
  border-color: var(--primary);
}

.form-textarea-quiet {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
  font-size: 1rem;
  resize: vertical;
  line-height: 1.5;
  transition: border-color var(--transition-fast);
}

.form-textarea-quiet:focus {
  border-color: var(--primary);
}

/* 5-Star Rating Box */
.star-rating-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 52px;
}

.star-rating-btn {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--border-color);
  transition: color var(--transition-fast), transform var(--transition-fast);
  padding: 4px;
}

.star-rating-btn.active {
  color: var(--accent-gold);
}

.star-rating-btn:hover {
  transform: scale(1.15);
}

/* Date Input Wrap with Calendar Icon */
.date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.date-input-wrap input {
  padding-right: 44px;
}

.date-input-wrap svg {
  position: absolute;
  right: 14px;
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 1.75;
  fill: none;
  pointer-events: none;
}

/* Accordion: "Fler detaljer" */
.quiet-accordion {
  margin: 16px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  overflow: hidden;
}

.quiet-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.quiet-accordion-summary::-webkit-details-marker {
  display: none;
}

.quiet-accordion-summary svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  transition: transform var(--transition-fast);
}

details[open] .quiet-accordion-summary svg {
  transform: rotate(180deg);
}

.quiet-accordion-content {
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
  padding-top: 14px;
}

/* Toggle Switch Row: "Synlig i flödet" */
.switch-row-quiet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.switch-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Native/CSS Switch Toggle */
.quiet-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.quiet-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.quiet-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #D6D1C9;
  transition: 0.2s;
  border-radius: 28px;
}

.quiet-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.quiet-toggle input:checked + .quiet-slider {
  background-color: var(--primary);
}

.quiet-toggle input:checked + .quiet-slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   VIEW 4: FLÖDE (Editorial Magazine Feed)
   ========================================================================== */
.feed-header {
  margin-bottom: 24px;
  text-align: left;
}

.feed-header .view-title-main {
  margin-bottom: 4px;
}

.feed-header-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feed-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editorial-feed-card {
  padding: 20px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-card-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background-color: #E2DDD6;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.feed-avatar-circle svg {
  width: 18px;
  height: 18px;
  stroke: #666;
  stroke-width: 1.75;
  fill: none;
}

.feed-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.feed-author-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.feed-champagne-house {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.feed-cuvee-row {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: -6px;
}

.feed-stars-row {
  color: var(--accent-gold);
  font-size: 1.15rem;
  letter-spacing: 2px;
}

.feed-tasting-notes {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
}

.feed-card-divider {
  height: 1px;
  background-color: var(--border-color);
  margin-top: 4px;
}

/* Skåla Action Button */
.btn-skala-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  align-self: flex-start;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-skala-action:hover {
  background-color: var(--bg-surface-elevated);
}

.btn-skala-action.cheered {
  color: var(--accent-gold);
  font-weight: 600;
}

.btn-skala-action svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

/* ==========================================================================
   VIEW 5: PROFIL (Dedicated Profile Page)
   ========================================================================== */
.profile-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background-color: #E2DDD6;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}

.profile-avatar-large svg {
  width: 36px;
  height: 36px;
  stroke: #555;
  stroke-width: 1.5;
  fill: none;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-user-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.profile-user-email {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 12px;
}

.profile-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 20px 0 8px 4px;
}

.profile-group-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.profile-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  min-height: 52px;
  font-size: 0.95rem;
  color: var(--text-main);
  width: 100%;
  text-align: left;
}

.profile-row-item:last-child {
  border-bottom: none;
}

.profile-row-item:hover {
  background-color: var(--bg-surface-elevated);
}

.profile-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-row-left svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-main);
  stroke-width: 1.6;
  fill: none;
  flex-shrink: 0;
}

.profile-row-item.danger-row {
  color: #B3261E;
}

.profile-row-item.danger-row .profile-row-left svg {
  stroke: #B3261E;
}

.profile-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-row-right svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.profile-version-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.profile-version-footer {
  text-align: center;
  padding: 28px 0 12px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   BOTTOM SHEET DRAWER (Week Tasting Details)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  border-bottom: none;
  z-index: 70;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 20px 32px 20px;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
}

.sheet-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet-bottles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-bottle-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-bottle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.sheet-bottle-card-house {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.sheet-bottle-card-cuvee {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sheet-bottle-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.sheet-bottle-card-notes {
  background-color: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-main);
  font-style: italic;
}

.sheet-bottle-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.sheet-bottle-card-btn {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.sheet-bottle-card-btn:active {
  transform: scale(0.97);
}

.sheet-bottle-card-btn.danger {
  color: #B3261E;
  border-color: rgba(179,38,30,0.25);
  background: transparent;
}

/* Autocomplete Suggestions */
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 30;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: var(--bg-surface-elevated);
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: #34A853;
}

.status-dot.yellow {
  background-color: #FBBC05;
}

.status-dot.red {
  background-color: #EA4335;
}

/* Modal Dialogs (Auth, Admin, About) */
.quiet-dialog {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  margin: auto;
  box-shadow: 0 16px 36px rgba(0,0,0,0.15);
}

.quiet-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dialog-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.dialog-close-btn {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.dialog-close-btn:hover {
  background-color: var(--bg-surface-elevated);
}

/* Toast Message */
.quiet-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.quiet-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Duplicate warning notice in Log view */
.duplicate-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: rgba(197, 160, 89, 0.12);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 16px 0 20px 0;
  color: var(--text-main);
}

[data-theme="dark"] .duplicate-warning-banner {
  background-color: rgba(197, 160, 89, 0.16);
  border-color: rgba(197, 160, 89, 0.45);
}

.duplicate-warning-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
  margin-top: 1px;
}

.duplicate-warning-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.duplicate-warning-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-main);
}

.duplicate-warning-text strong {
  font-weight: 600;
  color: var(--text-main);
}

/* Language Switcher & Modal */
.header-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.header-lang-btn:hover {
  border-color: var(--accent-gold);
  background-color: var(--bg-surface);
}

.header-lang-globe {
  font-size: 0.95rem;
  line-height: 1;
}

.guest-hero-lang-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: fit-content;
  align-self: center;
}

.guest-lang-pill {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.guest-lang-pill:hover {
  color: var(--text-main);
}

.guest-lang-pill.active {
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.lang-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-select-option:hover {
  border-color: var(--accent-gold);
}

.lang-select-option.selected {
  border-color: var(--accent-gold);
  background-color: rgba(197, 160, 89, 0.08);
  font-weight: 600;
}

.lang-select-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.lang-select-check {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1.1rem;
  opacity: 0;
}

.lang-select-option.selected .lang-select-check {
  opacity: 1;
}

/* Print / Yearbook Styling */
@media print {
  .sidebar, .bottom-nav, .app-top-header, .btn-primary-quiet, .segmented-control, .collection-legend, .search-bar-wrap {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  .main-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .year-map-grid {
    break-inside: avoid;
  }
}

/* ==========================================================================
   ADMINISTRATION DASHBOARD MODAL
   ========================================================================== */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-stat-card {
  background: var(--bg-surface-elevated);
  padding: 14px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.admin-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.admin-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
  line-height: 1.1;
}

.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-segmented-group {
  display: inline-flex;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}

.admin-filter-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.admin-filter-btn:hover {
  color: var(--text-main);
}

.admin-filter-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.admin-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.admin-search-input {
  width: 100%;
  padding: 6px 12px 6px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.8rem;
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.admin-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}

.admin-table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
  min-width: 540px;
}

.admin-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-surface-elevated);
  z-index: 2;
}

.admin-table th {
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: var(--bg-surface-elevated);
}

.admin-user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-email {
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

.admin-user-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
}

.admin-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.admin-provider-badge.google {
  background-color: rgba(66, 133, 244, 0.12);
  color: #1a73e8;
  border: 1px solid rgba(66, 133, 244, 0.25);
}

.admin-provider-badge.password {
  background-color: rgba(197, 160, 89, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(197, 160, 89, 0.35);
}

.admin-provider-badge.anonymous {
  background-color: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.admin-bottles-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
}

.admin-bottles-badge.has-bottles {
  background-color: rgba(197, 160, 89, 0.18);
  color: var(--accent-gold);
  border: 1px solid rgba(197, 160, 89, 0.4);
}

.admin-bottles-badge.zero {
  background-color: transparent;
  color: var(--text-muted);
}
