/* EH Mecanic — estilo do sistema web */
:root {
  --blue: #0b2b5a;
  --blue-soft: #d9e5f5;
  --blue-line: #b7c6df;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1c2530;
  --muted: #6b7686;
  --green: #1a7f45;
  --red: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16,32,64,.08), 0 4px 16px rgba(16,32,64,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 24px;
  background: var(--blue); color: #fff; padding: 0 24px; height: 58px;
  box-shadow: var(--shadow); position: sticky; top: 0; z-index: 10;
}
.brand { color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: #fff; color: var(--blue); border-radius: 6px;
  padding: 2px 7px; font-weight: 800; letter-spacing: .5px;
}
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a {
  color: #cfdcef; padding: 8px 12px; border-radius: 7px; font-weight: 500;
}
.mainnav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.mainnav a.active { background: rgba(255,255,255,.18); color: #fff; }
.userbox { display: flex; align-items: center; gap: 12px; color: #cfdcef; font-size: 14px; }

/* Container */
.container { max-width: 1100px; margin: 26px auto; padding: 0 20px; }
.footer { text-align: center; color: var(--muted); padding: 30px; font-size: 13px; }

/* Page head */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; }

/* Cards */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px;
}
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Stat tiles */
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .num { font-size: 28px; font-weight: 700; color: var(--blue); }
.stat .lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #eef1f6; }
table.data th { background: var(--blue-soft); color: var(--blue); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fafbfe; }
.text-right { text-align: right; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: none;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: #0a2247; text-decoration: none; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: 6px 12px; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-secondary { background: #e7ecf4; color: var(--blue); }
.btn-secondary:hover { background: #d9e2ef; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #8f1e17; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* Forms */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cdd5e2; border-radius: 8px;
  font-size: 15px; font-family: inherit; background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,43,90,.12);
}
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.inline { display: flex; gap: 12px; }
.inline > * { flex: 1; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.flash-success { background: #e4f4ea; color: var(--green); border: 1px solid #b9e2c8; }
.flash-error { background: #fdeceb; color: var(--red); border: 1px solid #f4c7c4; }

/* Login — layout em duas colunas */
.login-split { display: flex; min-height: 100vh; }
.login-brand {
  flex: 1.15; background: linear-gradient(135deg, #0b2b5a 0%, #12437f 55%, #1c5aa8 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; color: #fff; position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; right: -140px; bottom: -140px; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(244,164,23,.22), transparent 70%);
}
.login-brand img {
  width: min(460px, 82%); background: #fff; border-radius: 24px; padding: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28); position: relative; z-index: 2;
}
.login-brand h1 { font-size: 30px; font-weight: 800; margin-top: 30px; position: relative; z-index: 2; }
.login-brand p { color: #bcd0ea; margin-top: 8px; font-size: 16px; position: relative; z-index: 2; }
.login-form-side {
  flex: .85; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: var(--bg);
}
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { color: var(--blue); margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 22px; }
@media (max-width: 860px) {
  .login-split { flex-direction: column; }
  .login-brand { padding: 34px; flex: none; }
  .login-brand img { width: 220px; padding: 18px; }
  .login-brand h1 { font-size: 24px; margin-top: 20px; }
  .login-form-side { flex: none; padding: 30px 22px 50px; }
}

/* Badges / chips */
.chip { display: inline-block; background: var(--blue-soft); color: var(--blue); padding: 2px 9px; border-radius: 20px; font-size: 12.5px; font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
