/* ==========================================================================
   goldinvoice -- shared styles
   Warm, personal small-business look: sunset-photo backdrop, one coral
   accent, a serif for headings paired with a clean sans for forms.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #1F3A4D;
  --ink-soft: #4A6273;
  --coral: #E8623C;
  --coral-dark: #C94E2C;
  --teal: #3C7A89;
  --sand: #F6E9D8;
  --card-bg: rgba(255, 252, 247, 0.93);
  --card-bg-table: rgba(255, 252, 247, 0.68);
  --card-shadow: rgba(31, 58, 77, 0.22);
  --border-soft: #E4D6C3;

  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;

  background-image:
    linear-gradient(180deg, rgba(20, 32, 42, 0.45) 0%, rgba(20, 32, 42, 0.20) 40%, rgba(20, 32, 42, 0.35) 100%),
    url('/static/BeachSunset01.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;

  padding: 2.5rem 1.25rem 4rem;
}

/* Every direct block sitting on the page becomes a soft floating card --
   this covers every template without needing a wrapper div added to each
   one individually. */
body > h1,
body > h2,
body > h3,
body > form,
body > p,
body > ul,
body > div {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 32px -12px var(--card-shadow);
}

body > table {
  max-width: 720px;
  margin: 0 auto 1.5rem;
  background: var(--card-bg-table);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 32px -12px var(--card-shadow);
}

/* Welcome page: same lighter transparency as tables, since it's mostly
   whitespace around big buttons rather than dense form content. */
.welcome-page > h1,
.welcome-page > h2,
.welcome-page > p,
.welcome-page > ul {
  background: var(--card-bg-table);
}

body > h1:first-child {
  margin-top: 0;
}

/* Headings ---------------------------------------------------------------- */

h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 2.1rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--coral);
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
}

h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Forms --------------------------------------------------------------------
   Templates place <label> and <input> as siblings separated by <br>, so
   these rules target that structure directly rather than assuming a
   wrapper element exists. */

form label {
  display: block;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 1.1rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

form label:first-of-type {
  margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 420px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  max-width: 100%;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(60, 122, 137, 0.25);
}

input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--coral);
  vertical-align: middle;
}

button,
input[type="submit"] {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  background: var(--coral);
  border: none;
  padding: 0.9rem 2.4rem;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 1.5rem;
  box-shadow: 0 6px 16px -6px var(--card-shadow);
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover,
input[type="submit"]:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
}

/* Links --------------------------------------------------------------------- */

a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

.add-contact,
.btn {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
}

.add-contact:hover,
.btn:hover {
  background: var(--coral-dark);
  color: #fff;
  text-decoration: none;
}

/* Tables ---------------------------------------------------------------------
   Overrides the inline border="1" cellpadding="6" attributes already on
   these tables in the markup -- no template edits needed for this. */

table {
  border: none;
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
  background: rgba(246, 233, 216, 0.75);
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

/* Lists (welcome page nav) ----------------------------------------------- */

ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

ul li {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

ul li a {
  color: var(--ink);
  font-weight: 500;
}

ul li a:hover {
  color: var(--coral);
}

/* Welcome page: main navigation reads as big buttons, not plain links */
.welcome-page ul {
  max-width: 480px;
}

.welcome-page > p {
  text-align: center;
}

.welcome-message {
  font-style: italic;
  font-weight: 600;
  color: var(--ink) !important;
  font-size: 1.15rem;
}

.welcome-page ul li {
  margin-bottom: 0.9rem;
}

.welcome-page ul li a {
  display: block;
  text-align: center;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px var(--card-shadow);
  transition: background 0.15s ease, transform 0.1s ease;
}

.welcome-page ul li a:hover {
  background: var(--coral-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Accessibility ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Small screens -------------------------------------------------------------- */

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 1.25rem 0.75rem 3rem;
  }

  body > h1,
  body > h2,
  body > h3,
  body > form,
  body > table,
  body > p,
  body > ul,
  body > div {
    padding: 1.1rem 1.1rem;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.6rem;
  }
}