/*
 * Emerson Tech Admin — stylesheet
 *
 * NOTE: This file DUPLICATES the brand tokens and component patterns from
 * site/style.css. The admin/ folder deploys as its own, fully separate
 * Netlify site with no shared build pipeline or asset pipeline linking it
 * back to site/. If the public site's brand colors, fonts, or component
 * styling ever change, those changes must be applied HERE MANUALLY as well
 * — there is no automatic sync between the two stylesheets.
 */

:root{
  --bg:#FAF6EF;
  --bg-alt:#F3EDE2;
  --surface:#FFFFFF;
  --surface-2:#F3EDE2;
  --border:#E5DCCB;
  --border-strong:#CFC4AD;
  --navy:#1B2A4A;
  --heading:#1B2A4A;
  --text:#2A3550;
  --text-muted:#566072;
  --teal:#0E7C7B;
  --teal-soft:rgba(14,124,123,0.10);
  --accent:#F2994A;
  --accent-hover:#EE8A31;
  --accent-deep:#B9650F;
  --on-accent:#1B2A4A;
  --font-sans:"Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head:"Fraunces", Georgia, "Times New Roman", serif;
}

*{box-sizing:border-box;}

body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  border-top:4px solid var(--teal);
}

a{color:inherit;}
img{max-width:100%;}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible{
  outline:2px solid var(--teal);
  outline-offset:2px;
  border-radius:4px;
}

.container{max-width:1080px;margin:0 auto;padding:0 24px;}

h1,h2,h3{
  font-family:var(--font-head);
  color:var(--heading);
  font-weight:600;
  margin:0 0 8px;
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block;
  background:var(--accent);
  color:var(--on-accent);
  padding:12px 26px;
  border-radius:8px;
  font-weight:700;
  text-decoration:none;
  font-size:15px;
  font-family:inherit;
  border:1px solid rgba(27,42,74,0.28);
  cursor:pointer;
  box-shadow:0 1px 2px rgba(27,42,74,0.12);
  transition:background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 4px 10px rgba(27,42,74,0.16);}
.btn.outline{background:transparent;border:1.5px solid var(--navy);color:var(--navy);box-shadow:none;}
.btn.outline:hover{background:var(--navy);color:var(--bg);transform:translateY(-1px);}

/* ---------- Form fields ---------- */
.field-label{display:block;font-size:13px;font-weight:700;color:var(--heading);margin-bottom:6px;}
.field-input{
  width:100%;
  padding:11px 12px;
  background:var(--bg);
  border:1px solid var(--border-strong);
  border-radius:8px;
  font-size:14px;
  font-family:inherit;
  color:var(--text);
  margin-bottom:16px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus{
  outline:none;
  border-color:var(--teal);
  box-shadow:0 0 0 3px rgba(14,124,123,0.15);
}

/* ---------- Card ---------- */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:10px;
  padding:26px 24px;
  box-shadow:0 1px 3px rgba(27,42,74,0.07);
}

/* ---------- Login page ---------- */
.login-wrap{
  min-height:calc(100vh - 4px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login-card{
  width:100%;
  max-width:380px;
}
.login-title{font-size:24px;margin-bottom:6px;}
.login-sub{color:var(--text-muted);font-size:14.5px;margin:0 0 22px;}
.login-submit{width:100%;text-align:center;}
.login-error{
  min-height:18px;
  color:#B3261E;
  font-size:13.5px;
  font-weight:600;
  margin:-6px 0 14px;
}

/* ---------- Dashboard top bar ---------- */
.topbar{
  background:var(--surface);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 24px;
}
.topbar-brand{
  font-family:var(--font-head);
  color:var(--heading);
  font-weight:600;
  font-size:20px;
}

.dash-main{padding:32px 24px 64px;}

/* ---------- Stat cards ---------- */
.stat-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:20px;
  margin-bottom:40px;
}
.stat-card{text-align:left;}
.stat-value{
  font-family:var(--font-head);
  font-size:34px;
  font-weight:700;
  color:var(--accent-deep);
  line-height:1.1;
  margin-bottom:6px;
}
.stat-label{
  font-size:13.5px;
  font-weight:700;
  color:var(--text-muted);
  text-transform:uppercase;
  letter-spacing:0.04em;
}

/* ---------- Dashboard sections ---------- */
.dash-section{margin-bottom:44px;}
.dash-section-title{font-size:20px;margin-bottom:16px;}

/* ---------- Tables ---------- */
.table-wrap{
  overflow-x:auto;
  border-radius:10px;
  border:1px solid var(--border);
  box-shadow:0 1px 3px rgba(27,42,74,0.07);
}
table.admin-table{width:100%;min-width:560px;border-collapse:collapse;background:var(--surface);}
table.admin-table th,
table.admin-table td{
  padding:14px 16px;
  text-align:left;
  font-size:14px;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
}
table.admin-table th{background:var(--navy);color:var(--bg);font-weight:700;}
table.admin-table td{color:var(--text-muted);}
table.admin-table td:first-child{color:var(--heading);font-weight:600;white-space:nowrap;}
table.admin-table tr:last-child td{border-bottom:none;}
table.admin-table select.status-select{margin-bottom:0;width:auto;min-width:120px;}
.status-msg{display:inline-block;margin-left:8px;font-size:12.5px;color:#B3261E;font-weight:600;}

@media (max-width:720px){
  .stat-grid{grid-template-columns:1fr;}
  .topbar-inner{padding:14px 20px;}
  .topbar-brand{font-size:17px;}
}
