* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f4f8; color: #1c2430; font-size: 16px; }
#topbar { background: #0f2a43; color: #fff; padding: 12px 16px; display: flex;
  justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; }
#netbanner { position: sticky; top: 0; z-index: 60; background: #8a5a00; color: #fff;
  text-align: center; padding: 9px 12px; font-size: 14px; }
#netbanner[hidden] { display: none; }
.brand { font-weight: 700; font-size: 18px; }
#userbox { font-size: 13px; opacity: .9; text-align: right; }
#userbox button { margin-left: 8px; }
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; background: #0f2a43;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #1d4a73; }
#nav a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #9db3c8; text-decoration: none; font-size: 11px; font-weight: 600;
  padding: 7px 2px 5px; border-radius: 10px; min-width: 0; }
#nav a .tab-ic { font-size: 22px; line-height: 1; }
#nav a .tab-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#nav a.active { color: #fff; background: #1d4a73; }
.subnav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: 0 0 auto; background: #fff; border: 1px solid #d7e0ea; color: #0f2a43;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.subnav a.active { background: #0f2a43; color: #fff; border-color: #0f2a43; }
#main { max-width: 900px; margin: 0 auto; padding: 16px 12px 110px; }
.card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2, .card h3 { margin: 0 0 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.stat { text-align: center; }
.stat .num { font-size: 28px; font-weight: 700; color: #0f2a43; }
.stat .lbl { font-size: 13px; color: #5a6b7d; }
input, select, textarea { width: 100%; padding: 10px; margin: 6px 0; border: 1px solid #c9d4e0;
  border-radius: 8px; font-size: 16px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
label { font-size: 13px; color: #5a6b7d; font-weight: 600; }
button, .btn { background: #1668b0; color: #fff; border: 0; border-radius: 8px;
  padding: 10px 16px; font-size: 15px; cursor: pointer; }
button:hover, .btn:hover { background: #0f4f88; }
button:disabled { background: #9db3c8; cursor: not-allowed; }
.btn-danger { background: #c0392b; } .btn-danger:hover { background: #96281b; }
.btn-green { background: #1e8e4f; } .btn-green:hover { background: #156f3c; }
.btn-gray { background: #5a6b7d; } .btn-gray:hover { background: #45525f; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e6ecf2; }
th { color: #5a6b7d; font-size: 12px; text-transform: uppercase; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #f4f8fc; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.open { background: #fff3cd; color: #856404; }
.badge.in_progress { background: #cfe5ff; color: #0b4d91; }
.badge.closed { background: #d4edda; color: #155724; }
.badge.cancelled { background: #f1f3f4; color: #5f6368; }
.badge.high, .badge.urgent { background: #f8d7da; color: #721c24; }
.badge.low { background: #e2e3e5; color: #383d41; }
.badge.normal { background: #e2e3e5; color: #383d41; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; }
.tabs button { background: #e6ecf2; color: #1c2430; white-space: nowrap; }

/* ---------- SaaS: landing, pricing, onboarding, billing ---------- */

.hero { background: #0f2a43; color: #fff; border-radius: 12px; padding: 34px 20px;
  text-align: center; margin-bottom: 12px; }
.hero h1 { font-size: 30px; margin: 0 0 12px; line-height: 1.2; }
.hero p { color: #cfe0f0; margin: 0 0 8px; }
.btn-big { display: block; width: 100%; max-width: 340px; margin: 18px auto 10px;
  padding: 15px; font-size: 18px; font-weight: 700; text-decoration: none;
  background: #1e8e4f; color: #fff; border-radius: 10px; text-align: center; }
.btn-big:hover { background: #156f3c; }
.hero-link { color: #8fc1ec; font-size: 15px; }
.hero-demo-note { font-size: 12px; color: #9db3c8; margin-top: 14px !important; }
.feat { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0;
  border-bottom: 1px solid #eef2f6; }
.feat:last-child { border-bottom: 0; }
.feat .ic { font-size: 24px; line-height: 1.2; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 600px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card { background: #fff; border: 2px solid #e6ecf2; border-radius: 12px;
  padding: 20px 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.plan-card h3 { margin: 0 0 6px; }
.plan-card .price { font-size: 30px; font-weight: 700; color: #0f2a43; margin-bottom: 8px; }
.ob-item { display: flex; gap: 12px; align-items: center; padding: 12px 4px;
  border-bottom: 1px solid #eef2f6; }
.ob-item:last-child { border-bottom: 0; }
.ob-item.done { opacity: .75; }
.ob-ic { font-size: 22px; }
.bill-banner { border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; font-size: 14px; }
.bill-banner.trial { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }
.bill-banner.pastdue { background: #ffedd5; color: #7c4a03; border: 1px solid #fed7aa; }
.bill-banner.expired { background: #f8d7da; color: #721c24; border: 1px solid #f5c2c7; }
.modal-overlay { position: fixed; inset: 0; background: rgba(15,42,67,.55);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 420px;
  width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 10px; }
.modal p { margin: 0 0 6px; }
.tabs button.active { background: #1668b0; color: #fff; }
.gate-ok { background: #d4edda; border-left: 4px solid #1e8e4f; padding: 10px; border-radius: 8px; margin: 8px 0; }
.gate-block { background: #fdecea; border-left: 4px solid #c0392b; padding: 10px; border-radius: 8px; margin: 8px 0; }
.gate-block ul { margin: 6px 0 0 18px; padding: 0; }
.req-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #eef2f6; }
.req-item .dot { font-size: 18px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #1c2430;
  font-weight: 400; padding: 10px 0; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.checklist input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; }
.checklist .done span { text-decoration: line-through; color: #8a99a8; }
.pm-progress { height: 10px; background: #e8eef4; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.pm-progress > div { height: 100%; background: #1e8e4f; border-radius: 6px; transition: width .25s; }
.pm-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid #eef2f6; }
.pm-item input[type="checkbox"] { width: 28px; height: 28px; margin: 0; flex-shrink: 0; accent-color: #1e8e4f; }
.pm-item .task { flex: 1; font-size: 15px; color: #1c2430; }
.pm-item.done .task { text-decoration: line-through; color: #8a99a8; }
.pm-item .note-input { width: 100%; margin-top: 6px; font-size: 13px; padding: 8px; }
.pm-item .item-notes { font-size: 13px; color: #5a6b7d; margin-top: 4px; }
.note { border-left: 3px solid #1668b0; padding: 6px 10px; margin: 8px 0; background: #f7fafd; border-radius: 0 8px 8px 0; }
.note .meta { font-size: 12px; color: #5a6b7d; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-grid img { width: 100%; border-radius: 8px; }
.photo-grid figure { margin: 0; } .photo-grid figcaption { font-size: 12px; color: #5a6b7d; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1c2430; color: #fff; padding: 12px 20px; border-radius: 10px;
  opacity: 0; transition: opacity .3s; z-index: 99; max-width: 90%; text-align: center; }
#toast.show { opacity: 1; }
.alert { background: #fff3cd; border-left: 4px solid #e0a800; padding: 10px; border-radius: 8px; margin: 8px 0; }
.muted { color: #5a6b7d; font-size: 13px; }
.sig-pad { border: 2px dashed #9db3c8; border-radius: 8px; width: 100%; height: 180px; touch-action: none; background: #fff; }
.login-wrap { max-width: 380px; margin: 40px auto; }
.login-wrap .card { padding: 24px; }
.role-wrap { max-width: 460px; }

/* ---------- role selection menu (pre-login) ---------- */
.role-tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; text-align: left; }
.role-tile { display: block; background: #0f2a43; color: #fff; border-radius: 12px;
  padding: 18px 16px; text-decoration: none; box-shadow: 0 2px 6px rgba(15,42,67,.25); }
.role-tile:hover { background: #1d4a73; }
.role-tile:active { transform: scale(.98); }
.role-icon { font-size: 34px; }
.role-label { font-size: 20px; font-weight: 700; margin: 6px 0 4px; }
.role-desc { font-size: 14px; color: #cfe0f0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-size: 14px; }
.kv dt { color: #5a6b7d; } .kv dd { margin: 0; }

/* ---------- team chat ---------- */
.chatlog { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 8px 2px; margin: 8px 0; }
.chatmsg { max-width: 85%; background: var(--card2, #1c2740); border: 1px solid var(--line, #2a3a5c); border-radius: 12px; padding: 8px 12px; align-self: flex-start; }
.chatmsg.mine { align-self: flex-end; background: #17406b; }
.chatmeta { font-size: 11px; opacity: 0.75; margin-bottom: 3px; }
.chatmeta span { opacity: 0.7; }
.chatbody { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chatform { display: flex; gap: 8px; margin-top: 4px; }
.chatform input { flex: 1; }

/* OyorraTek crest logo */
.brand{display:flex;align-items:center;gap:8px}
.brand-logo{width:28px;height:28px;border-radius:8px;object-fit:cover}
.login-logo{width:44px;height:44px;border-radius:12px;object-fit:cover;vertical-align:middle;margin-right:8px}
.hero-logo{width:120px;height:120px;border-radius:28px;object-fit:cover;margin:0 auto 12px;display:block}
.hero-logo-full{width:200px;height:200px;border-radius:28px;object-fit:cover;margin:0 auto 12px;display:block}

/* ---------- OyorraTek design refresh (Sept 2026): mockup-style polish ---------- */
.card { border-radius: 16px; padding: 18px; box-shadow: 0 2px 10px rgba(15,42,67,.09);
  border: 1px solid #e9eff5; }
button, .btn { border-radius: 12px; font-weight: 600; }
input, select, textarea { border-radius: 12px; }
#topbar { box-shadow: 0 2px 12px rgba(0,0,0,.18); }
#main h2 { font-size: 22px; letter-spacing: -.01em; }
.badge { padding: 5px 12px; font-size: 12px; letter-spacing: .02em; text-transform: capitalize; }

/* search + filter chips (tickets, and reusable elsewhere) */
.searchbar { margin: 12px 0 4px; }
.searchbar input { border-radius: 999px; padding: 13px 20px; border: 1px solid #d7e0ea;
  box-shadow: 0 1px 4px rgba(15,42,67,.06); margin: 0; }
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow button { flex: 0 0 auto; border-radius: 999px; background: #fff;
  border: 1px solid #d7e0ea; color: #0f2a43; padding: 9px 18px; font-size: 14px; font-weight: 600; }
.chiprow button.active { background: #0f2a43; color: #fff; border-color: #0f2a43; }

/* job cards */
.jobs-head { margin-bottom: 4px; }
#job-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.job-card { position: relative; background: #fff; border: 1px solid #e9eff5; border-radius: 16px;
  padding: 16px 46px 16px 16px; box-shadow: 0 2px 10px rgba(15,42,67,.09); cursor: pointer; }
.job-card:active { transform: scale(.99); }
.job-card-top { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; flex-wrap: wrap; }
.job-no { margin-left: auto; font-size: 12px; color: #8a99a8; font-weight: 700; }
.job-title { font-size: 17px; font-weight: 700; margin-bottom: 9px; color: #16222e; line-height: 1.3; }
.job-tech { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #0f2a43; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.job-meta { font-size: 13px; color: #5a6b7d; }
.job-chev { position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 30px; color: #b9c6d3; line-height: 1; }

/* in-card tab pills */
.tabs button { border-radius: 999px; }
.modal { border-radius: 16px; }
#toast { bottom: 104px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.stat { border-radius: 16px; }
.stat .num { font-size: 32px; }

/* AI enhance buttons */
.btn-ai { background: #fff; color: #0f2a43; border: 1px dashed #94a9bd;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; }
.btn-ai:disabled { opacity: .6; }

/* Dispatch board drag-and-drop */
.dropcol.over { outline: 2px dashed #3b82f6; outline-offset: 3px; }
.dropjob.sel { outline: 2px solid #3b82f6; outline-offset: 1px; }
.dropjob { user-select: none; -webkit-user-select: none; }

/* White-label company branding */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 18px; }
.powered-by { font-size: 10px; font-weight: 400; opacity: .6; }
.brand-preview { display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #0f2242; color: #fff; border-radius: 10px; min-height: 48px; }

/* Trade personalization: trade picker grid + dashboard calculator tiles (fss-v41) */
.trade-pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.trade-pick{display:flex;align-items:center;gap:8px;border:1px solid #e3d9c2;background:#fffdf7;border-radius:10px;padding:10px 12px;font-size:14px;cursor:pointer}
.trade-pick input{width:20px;height:20px;flex-shrink:0;accent-color:#b98a2f}
.trade-pick input:checked ~ span:last-child{font-weight:700}
.calc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
