/*
 * Application Styles - Editorial / Paper Theme (Design V2)
 */

:root {
  /* Palette: Earthy, Paper, Muted */
  --bg: #fdfcf8;             /* Paper cream */
  --surface: #ffffff;
  --surface-alt: #f4f4f0;    /* Slightly darker paper for inputs/contrast */
  
  --text: #2c2c2c;           /* Soft charcoal */
  --text-muted: #6e6e6e;     /* Medium gray */
  --border: #e6e4dc;         /* Warm gray border */
  
  /* Brand colors */
  --primary: #5f7d76;        /* Muted Green (Add place button) */
  --primary-hover: #4b635d;
  
  /* Accents (for lists) */
  --accent-sage: #e2e8e4;
  --accent-sage-border: #d1d8d4;
  --accent-peach: #fceddd;
  --accent-peach-border: #eedccb;
  --accent-rose: #f5e6e3;
  --accent-rose-border: #e8d5d1;
  --accent-gold: #dcb67d;    /* Stars */

  /* UI Primitives */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 12px rgba(44, 44, 44, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max: 1100px;
  
  /* Typography */
  --font-serif: "Georgia", "Times New Roman", Times, serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
html { scrollbar-gutter: stable; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  /* Optional: Subtle paper texture pattern could be added here */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
.container { max-width: var(--max); margin: 0 auto; padding: 24px 40px; }

/* Header - Clean, Integrated */
header {
  background: transparent;
}

.button_to {
  display: inline-flex;
}

.button_to button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.topbar {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-serif);
  font-weight: 400; /* Regular weight for serif elegance */
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: #8b9d99; /* Muted icon bg */
  display: grid; place-items: center;
  color: white; font-size: 16px;
}
.logo::after { content: "🔒"; font-size: 14px; } 

nav { display: flex; align-items: center; gap: 24px; }

.navlink {
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 400;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.navlink:hover { color: var(--text); }
.navlink.active { 
  color: var(--primary); 
  border-bottom-color: var(--primary); 
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-weight: 500; font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 5px rgba(95, 125, 118, 0.3);
}
.btn.primary:hover { 
  background: var(--primary-hover); 
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn.ghost:hover { 
  border-color: var(--text); 
  color: var(--text); 
}

.btn.small { padding: 6px 14px; font-size: 13px; }

.btn.danger {
  background: #fdf2f2;
  color: #c53030;
  border-color: #fecaca;
}
.btn.danger:hover { background: #fee2e2; }

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0; color: var(--text);
}

/* Page Head */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; padding: 20px 0 30px;
}
h1 { font-size: 32px; letter-spacing: -0.02em; }
.subtitle { margin: 8px 0 0; color: var(--text-muted); font-size: 16px; font-family: var(--font-sans); }

/* Common Components */
.panel, .card {
  background: var(--surface);
  border-radius: var(--radius);
  /* Typically no border in this design, just shadow */
  border: none;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-family: var(--font-serif); font-size: 18px; }
.panel-body { padding: 24px; }

/* Lists & Items (Generic) */
.item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}
.item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

.title { font-family: var(--font-serif); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.meta { color: var(--text-muted); font-size: 14px; font-family: var(--font-sans); line-height: 1.5; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
label { font-size: 14px; font-weight: 500; color: var(--text); font-family: var(--font-sans); }

input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: all 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(95, 125, 118, 0.1);
}

/* Flash Messages */
.flash-stack {
  position: fixed; top: 20px; right: 20px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  width: 400px;
}
.flash {
  padding: 16px; border-radius: 8px;
  background: var(--text); color: white;
  box-shadow: var(--shadow-card);
  display: flex; gap: 12px; align-items: center;
}
.flash__content { flex: 1; }
.flash__title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.flash__message { font-size: 14px; opacity: 0.9; }
.flash__close { color: white; opacity: 0.7; background: transparent; border: none; cursor: pointer; }

/* Footer */
footer {
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  font-family: var(--font-sans);
}

/* Stars */
.stars { color: var(--accent-gold); letter-spacing: 2px; font-size: 14px; }

/* Chips & Tags */
.chip, .tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}