/* MELT copy (Umndeni Drilling): navy + orange look from Melt's mock-up. Loaded after style.css.
 * Pages with <body class="dark"> (home, drill history, reports, login) are fully dark; the older detail pages keep the
 * light style.css body and get the dark header + bottom menu. */
:root { --navy: #0b1830; --navy2: #12233f; --navy3: #0f2a52; --line2: #263b5e; --orange: #f7931e; --green: #26a641;
  --amber: #f5a300; --red: #d93636; --blue: #1f6fd1; --txt: #f3f5f9; --txt2: #b9c4d8; }
body { padding-bottom: 96px; }
header.mtop { background: var(--navy); border-bottom: 3px solid var(--orange); gap: 10px 16px; }
header.mtop .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; }
header.mtop .brand span span, .mlogin h1 span { color: var(--orange); }
header.mtop .site { color: #fff; font-size: 19px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  border-left: 2px solid #3a4d70; padding-left: 14px; }
header.mtop .spacer { flex: 1; }
.langs { display: inline-flex; border: 2px solid #3a4d70; border-radius: 10px; overflow: hidden; }
.langs a { color: #fff; text-decoration: none; font-weight: 800; padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; }
.langs a.on { background: var(--orange); color: #111; }
.installbtn { background: var(--orange); border-color: var(--orange); color: #111; min-height: 44px; }
header.mtop .logout { color: #fff; font-weight: 700; padding: 8px 10px; }
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr) 1.6fr;
  gap: 6px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #08111f; border-top: 3px solid var(--orange); }
.bnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 68px;
  color: #fff; text-decoration: none; border-radius: 10px; background: var(--navy2); border: 1px solid var(--line2); text-align: center; }
.bnav a svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.bnav a.on svg path:first-child { fill: none; }
.bnav a b { font-size: 17px; }
.bnav a small { font-size: 11px; color: var(--txt2); line-height: 1.1; }
.bnav a.on { background: var(--orange); border-color: var(--orange); }
.bnav a.on small { color: #222; }
.navcount { background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 13px; }
.flash.ok { background: #d9f5df; color: #0a5c0a; border: 1px solid #9bd8a8; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }

/* dark pages */
body.dark { background: radial-gradient(1200px 500px at 70% -10%, #1a3157 0, var(--navy) 60%) fixed, var(--navy); color: var(--txt); }
body.dark a { color: #9cc3ff; }
body.dark main { max-width: 1600px; }
.bigbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 22px;
  border-radius: 12px; font-weight: 800; font-size: 20px; text-decoration: none; border: 0; cursor: pointer; color: #fff !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.bigbtn.small { min-height: 50px; font-size: 18px; padding: 0 16px; }
.bigbtn.green { background: linear-gradient(#36c24f, #1f9437); }
.bigbtn.orange { background: linear-gradient(#ffa53a, #e5780b); color: #111 !important; }
.bigbtn.red { background: linear-gradient(#ea4d4d, #b72424); }
.bigbtn.navy { background: var(--navy3); border: 2px solid #3a5b8f; }
.empty { color: var(--txt2); font-size: 20px; }

/* home: hero */
.hero { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; margin-bottom: 14px; }
.htitle { font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
.htitle .l1 { display: block; font-size: clamp(26px, 4vw, 48px); color: #fff; }
.htitle .l2 { display: block; font-size: clamp(32px, 5.4vw, 66px); color: var(--orange); }
.htitle .hco { font-style: normal; font-size: 18px; color: var(--txt2); margin-top: 6px; letter-spacing: .6px; }
.hrig { width: 220px; height: 90px; }
.clock { background: #0a1426; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 16px; display: grid; gap: 6px;
  font-size: 22px; font-weight: 700; }
.clock div { display: flex; align-items: center; gap: 10px; }
.clock svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; }
.clock .live { color: #4ade6a; } .clock .live svg { stroke: #4ade6a; }
.clock .live.off { color: #ff7b7b; } .clock .live.off svg { stroke: #ff7b7b; }
/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr) 1.25fr; gap: 12px; margin-bottom: 14px; }
.tile { display: flex; align-items: center; gap: 14px; background: linear-gradient(#13284a, #0c1a33); border: 1px solid var(--line2);
  border-radius: 14px; padding: 14px 16px; }
.tile .ti { width: 58px; height: 58px; flex: none; fill: none; stroke-width: 2.5; }
.tile .ti.white { stroke: #fff; }
.tile b { display: block; font-size: 40px; line-height: 1; }
.tile span { display: block; font-size: 17px; font-weight: 700; text-transform: uppercase; color: #dfe6f3; }
/* drill cards */
.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.dcard { background: #eef2f8; color: #0b1830; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  border: 2px solid #2a4570; }
.dcard header { background: linear-gradient(#123063, #0b1f43); color: #fff; text-align: center; padding: 10px 8px; }
.dcard h2 { margin: 0; font-size: 30px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; text-transform: uppercase; }
.pill i { width: 18px; height: 18px; border-radius: 50%; background: #888; display: inline-block; }
.st-active .pill { color: #4ade6a; } .st-active .pill i { background: #2fb84a; }
.st-delayed .pill { color: #ffc23a; } .st-delayed .pill i { background: var(--amber); }
.st-maintenance .pill { color: #ff8a8a; } .st-maintenance .pill i { background: var(--red); }
.st-idle .pill { color: #c3cbd9; } .st-idle .pill i { background: #8592a8; }
.dcard .mid { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 12px 12px 6px; }
.ring { position: relative; width: 140px; height: 140px; }
.ring svg { width: 140px; height: 140px; }
.ring .rbg { fill: none; stroke: #c9d0dc; stroke-width: 11; }
.ring .rfg { fill: none; stroke: var(--blue); stroke-width: 11; stroke-linecap: round; }
.st-delayed .ring .rfg { stroke: var(--orange); } .st-maintenance .ring .rfg { stroke: var(--red); } .st-idle .ring .rfg { stroke: #8592a8; }
.rtxt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.rtxt b { font-size: 30px; font-weight: 900; } .rtxt span { font-size: 20px; font-weight: 800; } .rtxt small { font-size: 15px; font-weight: 700; color: #34435e; }
.dcard .pct { text-align: center; border-left: 2px solid #c9d0dc; padding-left: 8px; }
.dcard .pct b { display: block; font-size: 38px; color: #1554b0; font-weight: 900; }
.st-delayed .pct b { color: #c46200; } .st-maintenance .pct b { color: #b72424; }
.dcard .pct span { font-size: 18px; color: #1554b0; font-weight: 700; }
.dcard .stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #d3d9e3; margin: 0 10px; }
.dcard .stats div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 8px 4px; text-align: center; }
.dcard .stats div + div { border-left: 2px solid #d3d9e3; }
.dcard .stats svg { grid-row: span 2; width: 28px; height: 28px; fill: none; stroke: #0b1830; stroke-width: 2; }
.dcard .stats b { font-size: 26px; font-weight: 900; } .dcard .stats span { font-size: 16px; font-weight: 700; color: #34435e; }
.dcard .since { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--navy3); color: #fff;
  margin: 6px 10px; border-radius: 10px; padding: 8px; min-height: 64px; text-align: center; }
.dcard .since small { display: block; font-size: 16px; font-weight: 700; }
.dcard .since b { display: block; font-size: 24px; }
.dcard .since em { display: block; font-style: normal; font-size: 14px; color: #ffd28a; }
.dcard .since .ic { font-size: 30px; } .ic.play { color: #3ad35a; } .ic.pause { color: var(--amber); font-weight: 900; }
.dcard .bigbtn { margin: 4px 10px 12px; font-size: 22px; }
.worksafe { text-align: right; color: var(--orange); font-weight: 900; font-size: 22px; text-transform: uppercase; margin: 14px 4px 0; }
/* login / start */
.mlogin { max-width: 460px; margin: 6vh auto; text-align: center; background: var(--navy2); border: 1px solid var(--line2);
  border-radius: 16px; padding: 24px; }
.mlogin h1 { font-size: 40px; margin: 6px 0 0; color: #fff; }
.mlogin .company { font-size: 20px; color: var(--txt2); text-transform: uppercase; letter-spacing: .6px; margin: 4px 0 18px; }
.mlogin form { display: grid; gap: 8px; text-align: left; }
.mlogin label { font-size: 20px; color: #fff; }
.mlogin input { font-size: 22px; min-height: 58px; }
.mlogin button { margin-top: 12px; }
/* drill history */
.pgtitle, .dhead h1 { font-size: 38px; font-weight: 900; margin: 4px 0; text-transform: uppercase; }
.dhead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 10px; }
.dhead .sub { color: var(--orange); }
.dhead .pill { background: #0a1426; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line2); }
.dfilter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; background: var(--navy2); border: 1px solid var(--line2);
  border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.dfilter label { display: grid; gap: 4px; font-size: 18px; color: #fff; }
.dfilter input { font-size: 20px; }
.dfilter .spacer { flex: 1; }
.rigtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rigtabs a { background: var(--navy3); color: #fff !important; text-decoration: none; font-weight: 800; font-size: 19px;
  padding: 10px 16px; border-radius: 10px; border: 2px solid #3a5b8f; }
.rigtabs a.on { background: var(--orange); border-color: var(--orange); color: #111 !important; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; margin-bottom: 14px; }
.tbox { background: var(--navy2); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; }
.tbox h2 { color: var(--orange); font-size: 21px; margin: 0 0 8px; }
.tbox dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.tbox dt { font-size: 15px; color: var(--txt2); font-weight: 700; text-transform: uppercase; }
.tbox dd { margin: 0; font-size: 26px; font-weight: 900; }
.dsec { background: var(--navy2); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.dsec h2 { font-size: 24px; margin: 0 0 10px; color: #fff; }
.tscroll { overflow-x: auto; }
.htable { border-collapse: collapse; font-size: 18px; width: auto; }
.htable th, .htable td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; vertical-align: top; }
.htable td:last-child { white-space: normal; }
.htable th { color: var(--txt2); font-size: 15px; text-transform: uppercase; }
.htable .num { text-align: right; }
.htable tfoot th { color: #fff; font-size: 18px; text-transform: none; border-top: 2px solid var(--orange); }
.open { color: #ffc23a; }
.svcform { margin-top: 12px; }
.svcform summary { list-style: none; display: inline-flex; }
.svcform summary::-webkit-details-marker { display: none; }
.svcform form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; align-items: end; }
.svcform label { display: grid; gap: 4px; font-size: 18px; color: #fff; }
.biglinks { display: flex; flex-wrap: wrap; gap: 12px; }
.biglinks .bigbtn { min-width: 220px; }
/* manager install help */
.ihelp { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: center; justify-content: center; }
.ihelp[hidden] { display: none; }
.ihelp-in { background: #fff; color: #111; border-radius: 16px; padding: 22px; max-width: 420px; text-align: center; font-size: 20px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, 1fr); } .tile.wide { grid-column: span 2; } .hrig { display: none; }
  .hero { grid-template-columns: 1fr auto; } }
@media (max-width: 600px) {
  header.mtop .site { border: 0; padding: 0; font-size: 16px; } header.mtop .brand { font-size: 22px; }
  .hero { grid-template-columns: 1fr; } .clock { grid-template-columns: repeat(3, auto); font-size: 17px; justify-content: start; }
  .tile b { font-size: 32px; } .tile .ti { width: 44px; height: 44px; } .tile span { font-size: 14px; }
  .bnav { grid-template-columns: repeat(5, 1fr); gap: 3px; } .bnav a small { display: none; } .bnav a b { font-size: 13px; }
  .bnav a { min-height: 60px; } .pgtitle, .dhead h1 { font-size: 28px; }
}
/* print: the history page (and ?print=1) on white, left aligned, columns as wide as their text */
body.printview { background: #fff; color: #000; padding-bottom: 0; }
body.printview header.mtop, body.printview .bnav { display: none; }
body.printview main { max-width: none; padding: 8px 12px; }
body.printview .dsec, body.printview .tbox { background: #fff; border: 1px solid #999; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
body.printview .dsec h2, body.printview .tbox h2, body.printview .htable tfoot th { color: #000; }
body.printview .htable { font-size: 13px; } body.printview .htable th { color: #333; font-size: 11px; }
body.printview .htable th, body.printview .htable td { padding: 3px 8px; border-bottom: 1px solid #ccc; }
body.printview .tbox dd { font-size: 17px; } body.printview .tbox dt { color: #333; font-size: 11px; }
body.printview .totals { grid-template-columns: 1fr 1fr; gap: 8px; }
body.printview .dhead h1 { font-size: 24px; } body.printview .pco { margin: 0; font-size: 14px; flex-basis: 100%; }
body.printview .empty { color: #555; font-size: 13px; margin: 0; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  body { padding-bottom: 0; background: #fff !important; color: #000 !important; }
  header.mtop, .bnav, .noprint, .dfilter, .rigtabs, .svcform, form, .ihelp, .dhead .bigbtn { display: none !important; }
  .dsec, .tbox { break-inside: avoid; }
}
/* start page: one app, 3 giant buttons */
.capbtn { background: var(--orange); color: #111 !important; font-weight: 900; text-decoration: none; padding: 8px 14px;
  border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.mstart { max-width: 560px; margin: 2vh auto; text-align: center; display: grid; gap: 16px; }
.mstart h1 { font-size: 42px; margin: 0; color: #fff; } .mstart h1 span { color: var(--orange); }
.mstart .company { font-size: 20px; color: var(--txt2); text-transform: uppercase; letter-spacing: .6px; margin: 0 0 6px; }
.giant { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left;
  min-height: 112px; padding: 14px 20px; border-radius: 18px; font-size: 32px; font-weight: 900; text-decoration: none;
  color: #fff !important; box-shadow: inset 0 -6px 0 rgba(0,0,0,.25); }
.giant span { grid-row: span 2; font-size: 44px; }
.giant small { font-size: 17px; font-weight: 700; opacity: .9; }
.giant.orange { background: linear-gradient(#ffa53a, #e5780b); color: #111 !important; }
.giant.green { background: linear-gradient(#36c24f, #1f9437); }
.giant.navy { background: var(--navy3); border: 2px solid #3a5b8f; }
@media (max-width: 600px) { .capbtn { padding: 6px 10px; } header.mtop { padding: 8px 10px; } }
.st-done .pill { color: #9cc3ff; } .st-done .pill i { background: #4a7bd1; } .st-done .ring .rfg { stroke: #4a7bd1; }
.bnav a, body.dark .bnav a { color: #fff !important; }
.bnav a.on, body.dark .bnav a.on { color: #111 !important; } .bnav a.on svg { stroke: #111; }
@media (max-width: 600px) {
  header.mtop { gap: 6px 8px; }
  header.mtop .brand { order: 1; flex: 1 1 50%; font-size: 21px; } header.mtop .brand img { width: 30px; height: 30px; }
  header.mtop .langs { order: 2; } header.mtop .spacer { display: none; }
  header.mtop .site { order: 3; flex: 1 1 auto; font-size: 14px; }
  header.mtop .capbtn, header.mtop .installbtn, header.mtop .logout { order: 4; font-size: 15px; min-height: 40px; padding: 4px 10px; }
  header.mtop .logout { font-size: 14px; }
}
.pill.st-active { color: #4ade6a; } .pill.st-active i { background: #2fb84a; }
.pill.st-delayed { color: #ffc23a; } .pill.st-delayed i { background: var(--amber); }
.pill.st-maintenance { color: #ff8a8a; } .pill.st-maintenance i { background: var(--red); }
.pill.st-done { color: #9cc3ff; } .pill.st-done i { background: #4a7bd1; }
