/* style.css — shared styles for ALL pages (public + dashboard) */
:root
{
  --header-green: #b1d3b9;
  --pill-green: #88bda4;
  --pill-green-dark: #659287;
  --page-bg: #e6f2dd;
  --input-gray: #d9d9d9;
  --panel-gray: #d9d9d9;
  --row-gray: #dcdcdc;
  --avatar-teal: #7fb08a;
  --white: #ffffff;
  --text-dark: #2e2e2e;
  --text-muted: #6b6b6b;
  --text-on-green: #1f1f1f;
  --radius: 10px;
  --gap: 16px;
  --header-height: 64px;
}
* { box-sizing: border-box; }

body
{
  margin: 0;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  background-color: var(--page-bg);
  color: var(--text-dark);
}
button { font: inherit; cursor: pointer; border: none; }
input { font: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible
{
  outline: 3px solid var(--pill-green-dark);
  outline-offset: 2px;
}

/* ===== HEADER (every page) ===== */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-height);
  background-color: var(--header-green);
  padding: 0 24px;
}
.site-header .logo,
.logo
{
  height: 60px;
  width: auto;
  justify-self: start;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a
{
  color: var(--text-on-green);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover,
.main-nav a[aria-current="page"]
{
  text-decoration: underline;
  text-underline-offset: 4px;
}
.login-btn
{
  justify-self: end;
  background-color: var(--pill-green-dark);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 28px;
  border-radius: 6px;
}
.login-btn:hover { filter: brightness(1.08); }

.user-badge
{
  justify-self: end;
  background-color: var(--pill-green-dark);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ===== SHARED BUTTONS ===== */
.green-btn
{
  display: inline-block;
  background-color: var(--pill-green);
  color: var(--white);
  text-decoration: none;
  text-align: center;
  border-radius: 10px;
}
.green-btn:hover { filter: brightness(1.05); }

.tree-branch
{
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(80%, 1100px);
  pointer-events: none;
  z-index: 0;
}
.tree-branch img { display: block; width: 100%; height: auto; }

/* ===== PUBLIC: HOME PAGE ===== */
.hero
{
  position: relative;
  min-height: calc(100vh - var(--header-height));
  padding: 48px 24px 0;
  text-align: center;
  overflow: hidden;
}
.hero-title
{
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 14ch;
  color: var(--pill-green);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
}
.signup-btn
{
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 22px 64px;
  font-size: 1.4rem;
  border-radius: 16px;
}

/* ===== PUBLIC: LOGIN + SIGNUP ===== */
.auth-page
{
  position: relative;
  min-height: calc(100vh - var(--header-height));
  padding: 40px 24px 28vw;
  overflow: hidden;
}
.auth-title
{
  position: relative;
  z-index: 1;
  margin: 0 0 32px;
  text-align: center;
  color: var(--pill-green);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
}
.auth-form
{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.95rem; color: var(--text-on-green); }
.form-field input
{
  width: 100%;
  height: 34px;
  padding: 0 12px;
  background-color: var(--input-gray);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-dark);
}
.form-field input:focus { border-color: var(--pill-green); outline: none; }
.requirements { margin: -8px 0 0; font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }
.requirements ul { margin: 2px 0 0; padding-left: 18px; }
.auth-btn { align-self: center; margin-top: 8px; padding: 10px 44px; font-size: 1rem; }

/* ===== PUBLIC: ABOUT + PRIVACY ===== */
.info-page { max-width: 720px; margin: 0 auto; padding: 48px 24px 64px; }
.info-logo { display: block; width: min(320px, 70%); height: auto; margin: 0 auto 32px; }
.info-page h3
{
  margin: 0 0 20px;
  text-align: center;
  color: var(--pill-green);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
}
.info-page h4 { margin: 32px 0 8px; color: var(--pill-green-dark); font-size: 1.15rem; font-weight: 700; }
.info-page p,
.info-page li
{
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-dark);
}

/* ===== DASHBOARD: PAGE LAYOUT ===== */
.page-body { display: flex; gap: var(--gap); padding: 24px 32px; }
.sidebar
{
  background-color: var(--panel-gray);
  border-radius: var(--radius);
  padding: 20px;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: flex-start;
}
.sidebar-btn
{
  background-color: var(--pill-green);
  color: var(--white);
  border-radius: 20px;
  padding: 14px 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: block;
}
.content { background-color: var(--panel-gray); border-radius: var(--radius); padding: 24px; flex: 1; }

/* ===== DASHBOARD: CONTACTS LIST ===== */
.search-bar
{
  background-color: var(--row-gray);
  border: none;
  border-radius: 20px;
  padding: 14px 18px;
  width: 100%;
  margin-bottom: 20px;
}
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-row
{
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--row-gray);
  border-radius: var(--radius);
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
}
.avatar
{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--avatar-teal);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
}
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.contact-name { font-weight: 600; }
.contact-phone { color: var(--text-muted); font-size: 14px; }

/* ===== DASHBOARD: CREATE CONTACT ===== */
.form-toolbar { display: flex; justify-content: space-between; margin-bottom: 20px; }
.pill-btn
{
  background-color: var(--pill-green-dark);
  color: var(--white);
  border-radius: 20px;
  padding: 10px 22px;
  font-weight: 600;
}
.visually-hidden
{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.text-input
{
  display: block;
  width: 100%;
  background-color: var(--white);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

/* ===== DASHBOARD: CONTACT PROFILE ===== */
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-top .avatar { width: 56px; height: 56px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.field-pill
{
  background-color: var(--pill-green);
  color: var(--white);
  border-radius: 20px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 600;
}
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.action-row .field-pill { background-color: var(--pill-green-dark); }

/* ===== DASHBOARD: TRASH PAGE ===== */
.trash-banner
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background-color: var(--pill-green);
  color: var(--white);
  font-weight: 600;
  text-align: center;
  padding: 16px 20px;
  margin: -24px -24px 20px -24px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.trash-tab
{
  display: inline-block;
  background-color: var(--pill-green);
  color: var(--white);
  border-radius: 20px;
  padding: 10px 20px;
  font-weight: 600;
  margin-bottom: 16px;
}
.trash-row { background-color: var(--white); }

/* ===== SMALL SCREENS ===== */
@media (max-width: 600px)
{
  .site-header { grid-template-columns: 1fr auto; height: auto; padding: 12px 16px; row-gap: 8px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .signup-btn { padding: 18px 48px; }
  .tree-branch { width: 100%; }
  .auth-page { padding-bottom: 40vw; }
}
