/* ============================================================================
   MC Electrical — shared UI theme  (mce-theme.css)
   Drop-in stylesheet extracted from the Timesheet platform so other tools /
   calculators share the same look. Link it in the <head> BEFORE your own CSS:

     <link rel="stylesheet" href="mce-theme.css">

   Then build your markup with the classes below (.btn, .card, .bar, .badge,
   .modal-overlay/.modal-card, table.sum, .banner, etc.). Your app logic is
   untouched — this only styles the shell + common components.
   Brand accent (logo): orange #ef9000 / navy #0d377e. UI brand: blue #1d4ed8.
   ============================================================================ */

:root{
  /* surfaces */
  --bg:#f4f6f9; --card:#fff; --line:#e2e8f0; --ink:#1e293b; --muted:#64748b;
  /* brand (UI) */
  --brand:#1d4ed8; --brand-dark:#1e3a8a;
  /* MCE brand accents (logo / highlights) */
  --mce-orange:#ef9000; --mce-orange-alt:#f39200; --mce-navy:#0d377e;
  /* status palette */
  --ok:#16a34a; --warn:#d97706; --danger:#dc2626;
  --info:#0891b2; --accent:#7c3aed; --slate:#475569; --grey:#94a3b8;
  /* shape + depth tokens */
  --radius:12px; --radius-sm:8px; --radius-pill:999px;
  --shadow-sm:0 2px 8px rgba(0,0,0,.08);
  --shadow-md:0 10px 28px rgba(0,0,0,.18);
  --shadow-lg:0 20px 50px rgba(0,0,0,.30);
  --focus:2px solid #bfdbfe;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); font-size:14px; line-height:1.45;
}

/* ---------- App header (brand gradient bar) ---------------------------------
   Put a white-text logo (mce-logo-white.svg) on the left and a centred <h1>. */
.app-header{
  background:linear-gradient(135deg,var(--brand),var(--brand-dark));
  color:#fff; padding:40px 22px 16px;
  display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 14px;
}
.app-header .head-logo{height:53px; display:block}
.app-header h1{margin:0; font-size:20px; font-weight:650; flex:1; text-align:center}

/* page container */
.wrap{max-width:1180px; margin:0 auto; padding:18px 22px 60px}

/* ---------- Cards / panels -------------------------------------------------- */
.card,.bar,.summary{
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:14px 16px; margin-bottom:16px;
}
.summary h2{margin:0 0 10px; font-size:15px}

/* a flex toolbar row (filters, inputs sitting side by side) */
.bar{display:flex; flex-wrap:wrap; gap:14px; align-items:flex-end}
.field{display:flex; flex-direction:column; gap:4px}
.field label,.label{
  font-size:11px; text-transform:uppercase; letter-spacing:.04em;
  color:var(--muted); font-weight:600;
}
.grow{flex:1 1 160px}

/* ---------- Buttons --------------------------------------------------------- */
.btn{
  font:inherit; border:none; border-radius:var(--radius-sm);
  padding:8px 14px; cursor:pointer; font-weight:600;
}
.btn-sm{padding:5px 9px; font-size:12px}
.btn-primary{background:var(--brand); color:#fff}
.btn-primary:hover{background:var(--brand-dark)}
.btn-ghost{background:#eef2ff; color:var(--brand-dark)}
.btn-ghost:hover{background:#e0e7ff}
.btn-danger{background:#fef2f2; color:var(--danger)}
.btn-danger:hover{background:#fee2e2}
.btn:disabled{opacity:.45; cursor:not-allowed}

/* ---------- Form controls --------------------------------------------------- */
input,select,textarea{
  font:inherit; padding:7px 9px; border:1px solid var(--line);
  border-radius:var(--radius-sm); background:#fff; color:var(--ink);
}
input:focus,select:focus,textarea:focus{outline:var(--focus); border-color:var(--brand)}

/* ---------- Badges / pills -------------------------------------------------- */
.badge{
  display:inline-block; font-size:11px; font-weight:600;
  padding:2px 8px; border-radius:var(--radius-pill); color:#fff;
}
.app-badge{
  display:inline-block; font-size:12px; font-weight:700; padding:3px 9px;
  border-radius:var(--radius-pill); background:#e0e7ff; color:#1e3a8a; white-space:nowrap;
}
.note{font-size:12px; color:var(--muted)}

/* ---------- Tabs ------------------------------------------------------------ */
.tabs{display:flex; flex-wrap:wrap; gap:4px; position:relative; z-index:1}
.tab{
  display:flex; align-items:center; gap:7px; background:#e9eef5;
  border:1px solid var(--line); border-bottom:none; border-radius:10px 10px 0 0;
  padding:8px 13px; cursor:pointer; font:inherit; font-weight:650;
  color:var(--muted); line-height:1.1; transition:background .12s;
}
.tab:hover{background:#dfe6ef}
.tab.active{background:var(--card); color:var(--ink); box-shadow:inset 0 3px 0 var(--brand); padding-top:9px}

/* ---------- Modal ----------------------------------------------------------- */
.modal-overlay{
  position:fixed; inset:0; z-index:1100; background:rgba(15,23,42,.5);
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal-card{
  background:#fff; border-radius:14px; padding:22px; width:100%;
  max-width:380px; box-shadow:var(--shadow-lg);
}

/* ---------- Tables ---------------------------------------------------------- */
table.sum{width:100%; border-collapse:collapse; font-size:13px}
table.sum th,table.sum td{padding:7px 8px; border-bottom:1px solid var(--line); text-align:left}
table.sum td.r,table.sum th.r{text-align:right}
table.sum tfoot td{font-weight:700; border-top:2px solid var(--ink); border-bottom:none}

/* ---------- Status banners (inline messages) -------------------------------- */
.banner{padding:8px 12px; border-radius:var(--radius-sm); font-size:13px; margin-bottom:12px}
.banner-ok{background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46}
.banner-warn{background:#fff7ed; border:1px solid #fed7aa; color:#9a3412}
.banner-info{background:#eef6ff; border:1px solid #cfe2f5; color:var(--brand-dark)}

/* ---------- Branded login / centred card ------------------------------------ */
.login-card{
  background:#fff; border-radius:16px; padding:30px 26px 26px;
  width:100%; max-width:380px; box-shadow:0 10px 40px rgba(0,0,0,.25);
}

/* ---------- Mobile niceties (employees are mostly on phones) ---------------- */
@media (max-width:640px){
  .app-header{padding:30px 16px 14px}
  .btn{padding:10px 14px}
  .btn-sm{padding:6px 10px; font-size:13px}
  .wrap{padding:14px 14px 48px}
}
