/* Westin Purchasing - site styles (branding from westin-homes.com, Nov 2026) */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/playfair-display-400.woff2") format("woff2"); }

:root {
  --navy: #004D69;        /* westin-homes.com header / nav */
  --navy-deep: #013C52;   /* westin-homes.com footer */
  --accent: #4589A5;      /* westin-homes.com buttons */
  --accent-soft: #E3EFF4;
  --ink: #231F20;
  --text: #5E5858;
  --muted: #847D7D;
  --line: #E4E7EA;
  --page: #F5F7F8;
  --card: #FFFFFF;
  --ok-bg: #E2F3E7;  --ok: #1E6B35;
  --warn-bg: #FFF1D6; --warn: #8A5A00;
  --bad-bg: #FBE3E3;  --bad: #9B2C2C;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(1,60,82,.06), 0 4px 16px rgba(1,60,82,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* our display rules must not un-hide things */
html, body { margin: 0; }
body { font: 400 15px/1.55 Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--page);
  min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; color: var(--ink); font-weight: 400; margin: 0 0 .4em; }
h1 { font-size: 30px; line-height: 1.2; } h2 { font-size: 22px; } h3 { font-size: 18px; }
a { color: var(--navy); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); font-size: 13px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header / nav / footer ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { text-decoration: none; flex: none; }
.logo img { height: 46px; width: auto; display: block; }
.logo span { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--navy); padding: 8px 12px; border-radius: 6px; font-size: 14px; white-space: nowrap; }
.nav a:hover { background: var(--accent-soft); }
.nav a.on { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav a.classic { color: var(--muted); }
.user-chip { font-size: 13px; color: var(--muted); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px;
  color: var(--navy); font: inherit; cursor: pointer; }
main.wrap { flex: 1; width: 100%; padding-top: 28px; padding-bottom: 48px; }
.site-footer { background: var(--navy-deep); color: #cfe0e7; font-size: 12.5px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; flex-wrap: wrap; }
.site-footer a { color: #fff; }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; padding: 9px 16px;
  font: 500 14px Poppins, system-ui, sans-serif; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; line-height: 1.3; }
.btn:hover { background: var(--navy); color: #fff; }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--accent-soft); color: var(--navy); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #f0caca; }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.block { width: 100%; padding: 12px; }
label.field { display: block; font-size: 13px; color: var(--ink); margin-bottom: 14px; }
.input { width: 100%; margin-top: 5px; border: 1px solid #cfd6db; border-radius: 6px; padding: 10px 12px;
  font: 400 15px Poppins, system-ui, sans-serif; color: var(--ink); background: #fff; }
.input:focus, .btn:focus-visible, .nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input[disabled] { background: #f2f4f5; color: var(--muted); }
.hint { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.hint.ok { color: var(--ok); } .hint.warn { color: var(--warn); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.badge.new { background: var(--ok-bg); color: var(--ok); }
.badge.upd { background: var(--warn-bg); color: var(--warn); }
.badge.off { background: #EEF0F2; color: #66707a; }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.chips { display: inline-flex; flex-wrap: wrap; background: #EEF2F4; border-radius: 8px; padding: 3px; gap: 2px; }
.chips a { padding: 6px 12px; border-radius: 6px; font-size: 13px; color: var(--text); text-decoration: none; white-space: nowrap; }
.chips a:hover { color: var(--navy); }
.chips a.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.alert { border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.alert.info { background: var(--accent-soft); color: var(--navy); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { width: 300px; margin: 0; }
.toolbar select.input { width: auto; }

/* ---------- tables (become cards on phones) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: #FAFCFD; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.right { text-align: right; }
table.data .job a { font-weight: 500; text-decoration: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }

/* ---------- grids / dashboard ---------- */
.grid { display: grid; gap: 18px; }
.grid.k4 { grid-template-columns: repeat(4, 1fr); }
.grid.k2 { grid-template-columns: 2fr 1fr; }
.grid.half { grid-template-columns: 1fr 1fr; }
.grid + .grid, .grid + .card { margin-top: 18px; }
.kpi .n { font: 600 30px Poppins, system-ui, sans-serif; color: var(--navy); line-height: 1.1; }
.kpi .n.warn { color: var(--warn); }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi a { text-decoration: none; display: block; }
.kpi.hl { background: var(--navy); border-color: var(--navy); }
.kpi.hl .n, .kpi.hl .l { color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }

/* ---------- sign-in pages ---------- */
body.auth { background: #fff; }
.auth-layout { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #d8e7ee; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between; }
.auth-art img { height: 70px; width: auto; align-self: flex-start; }
.auth-art h1 { color: #fff; font-size: 40px; line-height: 1.15; }
.auth-art p { max-width: 420px; }
.auth-art .fine { color: #9fc0cd; font-size: 13px; margin: 0; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-form .box { width: 100%; max-width: 380px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; margin: 4px 0 20px; }

/* ---------- admin ---------- */
.edit-row td { background: #F7FAFB !important; padding: 16px 12px; }
.edit-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: start; }
.edit-grid label.field { margin: 0; }
.panel-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.panel-actions .spacer { flex: 1; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
td.folder a { word-break: break-word; }
td.folder .folder-warn, td.folder .muted { display: block; font-size: 12px; white-space: normal; }
.grid > .card { margin-top: 0; }   /* tiles side by side: no stacked-card spacing */
.pager .actions { flex-wrap: wrap; }
.pager .spacer { flex: 1; }
.folder-warn { color: var(--warn); font-size: 13px; white-space: nowrap; }
.create-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

/* ---------- simple notice pages ---------- */
.notice { max-width: 640px; margin: 64px auto; }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column;
    padding: 8px 20px 16px; border-bottom: 1px solid var(--line); z-index: 20; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a.on { box-shadow: inset 3px 0 0 var(--accent); }
  .menu-btn { display: inline-block; }
  .user-chip { display: none; }
  h1 { font-size: 26px; }
  .auth-layout { grid-template-columns: 1fr; min-height: 0; }
  .auth-art { padding: 28px 20px; }
  .auth-art h1 { font-size: 28px; margin: 18px 0 0; }
  .auth-art .more { display: none; }
  .grid.k4, .grid.half { grid-template-columns: 1fr 1fr; }
  .grid.k2 { grid-template-columns: 1fr; }
  .toolbar .input, .toolbar select.input { width: 100%; }
  .edit-grid, .create-grid { grid-template-columns: 1fr; }
  .panel-actions .spacer { display: none; }
  td.folder .folder-warn, td.folder .muted { display: inline; margin-left: 6px; }
  table.data.cards thead { display: none; }
  table.data.cards, table.data.cards tbody, table.data.cards tr, table.data.cards td { display: block; width: 100%; }
  table.data.cards tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 4px; }
  table.data.cards td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.data.cards td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-align: left; }
  table.data.cards td.wide { display: block; text-align: left; }
  table.data.cards td.wide::before { content: none; }
  table.data.cards tr.edit-row { padding: 12px; }
  .card.flush-sm { background: none; border: 0; box-shadow: none; padding: 0; }
}
@media (max-width: 480px) {
  .grid.half { grid-template-columns: 1fr; }
  .grid.k4 { gap: 10px; }
  .grid.k4 .card { padding: 14px; }
  .kpi .n { font-size: 24px; }
}
