:root {
  --amber: #f5a623;
  --amber-d: #ef9b0f;
  --amber-l: #f9c662;
  --amber-soft: #fbd384;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --card: #ffffff;
  --bg: #f4f4f6;
  --green: #2ecc71;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: Verdana, Geneva, "DejaVu Sans", Tahoma, sans-serif;
  color: var(--text); background: var(--bg);
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- LOGIN ---------- */
.login-top {
  background: linear-gradient(160deg, var(--amber-l), var(--amber-d));
  color: #fff;
  padding: 56px 24px 70px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-top h1 { font-size: 30px; margin: 14px 0 4px; font-weight: 700; }
.login-top .sign-in { font-weight: 700; letter-spacing: .5px; margin-top: 26px; }

.login-card {
  background: var(--card);
  margin: -40px 18px 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px 22px 30px;
}
.brand {
  text-align: center;
  font-size: 34px; font-weight: 800; font-style: italic;
  margin-bottom: 28px; letter-spacing: -1px;
}
.brand .steps { color: var(--amber); }
.brand .srs { color: #8a8a8a; }

.field {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 18px;
  display: flex; align-items: center;
  padding: 4px 12px;
}
.field .lbl {
  position: absolute; top: -9px; left: 12px;
  background: #fff; padding: 0 6px;
  font-size: 12px; color: var(--muted);
}
.field svg { width: 22px; height: 22px; fill: #555; flex: 0 0 auto; }
.field input {
  border: none; outline: none; flex: 1;
  font-size: 17px; padding: 14px 10px; background: transparent;
}
.field .eye { background: none; border: none; padding: 4px; }

.remember {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 20px; font-size: 15px;
}
.remember input { width: 22px; height: 22px; accent-color: var(--amber); }

.btn-primary {
  width: 100%; border: none; border-radius: 12px;
  background: var(--amber-l); color: #fff;
  font-size: 18px; font-weight: 600; padding: 16px;
  transition: background .15s;
}
.btn-primary:active { background: var(--amber-d); }
.btn-primary:disabled { opacity: .6; }

.login-msg { text-align: center; margin-top: 14px; font-size: 14px; min-height: 18px; }
.login-msg.err { color: #d33; }
.login-msg.ok { color: var(--green); }

.powered { text-align: center; color: var(--muted); font-size: 13px; margin: 40px 0 16px; }

/* ---------- SYNC SCREEN ---------- */
#syncScreen {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(160deg, var(--amber-l), var(--amber-d));
  display: flex; align-items: center; justify-content: center;
}
.sync-wrap {
  width: 100%; max-width: 360px; padding: 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.sync-logo { font-style: italic; font-weight: 800; margin-bottom: 40px; }
.sync-logo .s-steps { color: #fff; font-size: 40px; }
.sync-logo .s-srs { color: rgba(255,255,255,0.65); font-size: 40px; }

.sync-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
  margin-bottom: 26px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sync-title { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.sync-step { color: rgba(255,255,255,0.9); font-size: 14px; margin-bottom: 22px; min-height: 18px; }

.sync-bar {
  width: 100%; height: 12px; border-radius: 8px;
  background: rgba(255,255,255,0.35); overflow: hidden;
}
.sync-bar-fill {
  height: 100%; width: 0%;
  background: #fff; border-radius: 8px;
  transition: width .35s ease;
}
.sync-pct { color: #fff; font-size: 15px; font-weight: 700; margin-top: 12px; }

.sync-net {
  display: flex; gap: 14px; margin-top: 22px; width: 100%;
}
.net-item {
  flex: 1; background: rgba(255,255,255,0.18);
  border-radius: 12px; padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.net-item svg { width: 22px; height: 22px; fill: #fff; }
.net-label { color: rgba(255,255,255,0.85); font-size: 12px; }
.net-val { color: #fff; font-size: 16px; font-weight: 700; }
.sync-data { color: rgba(255,255,255,0.9); font-size: 13px; margin-top: 14px; min-height: 16px; }

.sync-skip {
  margin-top: 30px; background: rgba(255,255,255,0.25); color: #fff;
  border: 1px solid rgba(255,255,255,0.6); border-radius: 24px;
  padding: 12px 26px; font-size: 15px; font-weight: 600;
}

/* ---------- APP / HOME ---------- */
.app-header {
  background: var(--amber-l);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
}
.app-header .title { font-style: italic; font-weight: 800; font-size: 24px; letter-spacing: -.5px; }
.icon-btn { background: none; border: none; padding: 6px; }
.icon-btn svg { width: 28px; height: 28px; fill: #fff; }

.profile {
  background: var(--amber-l);
  color: #1c1c1c;
  display: flex; align-items: center; gap: 16px;
  padding: 4px 22px 34px;
}
.profile .avatar {
  width: 70px; height: 70px; border-radius: 50%;
  border: 2px solid #1c1c1c; display: flex; align-items: center; justify-content: center;
  background: var(--amber-l); flex: 0 0 auto; overflow: hidden;
}
.profile .avatar svg { width: 44px; height: 44px; fill: #2b2b2b; }
.profile .name { font-weight: 800; font-size: 19px; line-height: 1.25; }
.profile .role { font-size: 15px; margin-top: 2px; }
.profile .terr { font-size: 15px; margin-top: 2px; }

/* The white menu card scoops up into the amber profile band */
.menu-wrap {
  background: var(--amber-l);
  padding: 0 0 2px;
}
.menu-card {
  background: #fff;
  margin: 0 14px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px 8px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 2px;
}
.menu-item {
  border: none; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text); text-align: center;
  line-height: 1.15;
}
.menu-item:active { opacity: .6; }
.menu-item .emoji { font-size: 32px; line-height: 1; }

.section { margin: 16px 14px; }
.card {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); padding: 16px 16px;
}
.checkin-row { display: flex; align-items: center; justify-content: space-between; }
.checkin-row .clock { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.checkin-row .clock svg { width: 24px; height: 24px; fill: #2b2b2b; }
.checkin-btn {
  background: var(--amber-l); color: #fff; border: none;
  border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.checkin-btn svg { width: 22px; height: 22px; fill: #fff; }
.dash-line { border: none; border-top: 1.5px dashed #d9d9d9; margin: 16px 0 12px; }
.att-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px 6px; font-size: 13px; }
.att-grid .h { color: var(--muted); font-size: 13px; }
.att-grid .v { font-weight: 700; margin-top: 8px; font-size: 15px; }
.att-grid .right { text-align: right; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { position: relative; }
.metric h4 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.metric .big { font-size: 24px; font-weight: 800; line-height: 1.3; }
.metric .badge { position: absolute; top: 14px; right: 14px; font-size: 22px; }
.ring {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 4px auto 2px; font-weight: 800;
  background: conic-gradient(var(--amber) 0deg, #d6d2cc 0deg);
}
.ring span { background:#fff; width:74px;height:74px;border-radius:50%;display:flex;align-items:center;justify-content:center; font-size:18px;}

.bottom-nav {
  position: sticky; bottom: 0;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 10px 0 12px;
}
.nav-item { border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #9a9a9a; font-size: 12.5px; font-weight: 600; }
.nav-item.active { color: var(--amber); }
.nav-item svg { width: 26px; height: 26px; fill: currentColor; }

.offline-banner {
  background: #444; color: #fff; text-align: center;
  font-size: 13px; padding: 6px; 
}
.app-foot { text-align: center; font-size: 14px; color: #2b2b2b; padding: 14px 0 6px; font-weight: 700; }

/* install prompt */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: 70px;
  background: #222; color: #fff; border-radius: 12px;
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow); z-index: 50;
}
.install-bar button { border: none; border-radius: 8px; padding: 8px 12px; font-weight: 600; }
.install-bar .yes { background: var(--amber); color: #fff; margin-left: 8px; }
.install-bar .no { background: transparent; color: #bbb; }

.app-scroll { padding-bottom: 8px; }

/* ---------- SIDE NAV DRAWER ---------- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 60;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 82%; max-width: 330px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .28s ease;
  z-index: 70;
  box-shadow: 2px 0 18px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-logo {
  padding: 48px 24px 30px;
  border-bottom: 1px solid var(--line);
  font-style: italic; font-weight: 800; line-height: .9;
}
.drawer-logo .d-steps { color: var(--amber); font-size: 34px; display: block; }
.drawer-logo .d-srs { color: #9a9a9a; font-size: 64px; letter-spacing: -2px; }

.drawer-nav { padding: 8px 0 24px; }
.drawer-item {
  width: 100%; border: none; background: none;
  display: flex; align-items: center; gap: 22px;
  padding: 18px 26px;
  font-size: 18px; color: #2b2b2b; text-align: left;
}
.drawer-item:active { background: #f5f5f5; }
.drawer-item svg { width: 26px; height: 26px; fill: #2b2b2b; flex: 0 0 auto; }

/* ---------- SUBSCREENS (Product, etc.) ---------- */
.subscreen {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 40;
  display: flex; flex-direction: column;
}
.sub-header {
  background: var(--amber-l);
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px;
}
.back-btn {
  background: rgba(255,255,255,0.35); border: none;
  border-radius: 8px 20px 20px 8px; padding: 6px 16px 6px 8px;
}
.back-btn svg { width: 26px; height: 26px; fill: #2b2b2b; display: block; }
.sub-title { font-size: 22px; font-weight: 700; color: #2b2b2b; }

.tabs { display: flex; background: #fff; }
.tab {
  flex: 1; border: none; background: none;
  padding: 16px 0; font-size: 16px; color: #9a9a9a; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }

.search-row { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg); }
.search-box {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #ddd; border-radius: 28px;
  padding: 10px 18px;
}
.search-box svg { width: 22px; height: 22px; fill: #333; flex: 0 0 auto; }
.search-box input { border: none; outline: none; flex: 1; font-size: 16px; background: transparent; }
.filter-btn { background: none; border: none; padding: 6px; }
.filter-btn svg { width: 28px; height: 28px; fill: #333; }

.list-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #eef1f4; padding: 14px 18px;
  font-weight: 700; font-size: 15px; color: #2b2b2b;
}
.list-head span:nth-child(2) { color: #2b2b2b; }

.product-list { flex: 1; overflow-y: auto; padding: 12px 14px 24px; }
.product-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  padding: 16px 14px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 14px;
}
.pc-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--amber); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; flex: 0 0 auto;
}
.pc-body { flex: 1; min-width: 0; }
.pc-name { font-weight: 700; font-size: 17px; color: #2b2b2b; margin-bottom: 8px; }
.pc-meta { font-size: 14px; color: #555; line-height: 1.6; }
.pc-tp { font-weight: 700; font-size: 16px; color: #2e7d32; flex: 0 0 auto; padding-top: 2px; }
.list-empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---------- PROFILE ---------- */
.profile-scroll { flex: 1; overflow-y: auto; background: var(--bg); }
.prof-top {
  background: var(--amber-l); color: #2b2b2b;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 20px 30px;
}
.prof-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 3px solid #2b2b2b; background: var(--amber-l);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 14px;
}
.prof-avatar svg { width: 56px; height: 56px; fill: #2b2b2b; }
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-size: 21px; font-weight: 800; text-align: center; }
.prof-role { font-size: 15px; margin-top: 4px; }

.prof-list { padding: 12px 14px 30px; }
.prof-row {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 14px 16px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
}
.prof-row svg { width: 24px; height: 24px; fill: var(--amber); flex: 0 0 auto; }
.prof-row .pr-text { flex: 1; min-width: 0; }
.prof-row .pr-label { font-size: 12.5px; color: var(--muted); }
.prof-row .pr-value { font-size: 16px; color: #2b2b2b; font-weight: 600; word-break: break-word; margin-top: 2px; }

/* ---------- SYNC SETTINGS ---------- */
.syncset-list { flex: 1; overflow-y: auto; padding: 6px 20px; background: #fff; }
.syncset-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; border-bottom: 1px solid #f0f0f0;
}
.syncset-label { font-size: 19px; color: #2b2b2b; }

.toggle {
  position: relative; width: 52px; height: 30px; flex: 0 0 auto;
  background: #cfd6da; border-radius: 16px; border: none;
  transition: background .2s; cursor: pointer;
}
.toggle .knob {
  position: absolute; top: 3px; left: 3px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--amber); transition: transform .2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3); margin-top: -3px;
}
.toggle.on { background: #bfe3c8; }
.toggle.on .knob { transform: translateX(22px); }

.syncset-run {
  margin: 14px 20px 22px; width: calc(100% - 40px);
  background: var(--amber-l); color: #2b2b2b; border: none;
  border-radius: 28px; padding: 16px; font-size: 18px; font-weight: 700;
}

/* ---------- CHEMIST ---------- */
.chem-filter-icon { background: none; border: none; padding: 6px; margin-left: auto; }
.chem-filter-icon svg { width: 30px; height: 30px; fill: #2b2b2b; }
.sub-header .sub-title { flex: 1; }

.chem-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  padding: 18px 16px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 14px;
}
.chem-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid #555; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.chem-avatar svg { width: 36px; height: 36px; fill: none; stroke: #555; stroke-width: 1.4; }
.chem-body { flex: 1; min-width: 0; }
.chem-name { font-weight: 700; font-size: 17px; color: #2b2b2b; margin-bottom: 8px; line-height: 1.3; }
.chem-meta { font-size: 14px; color: #555; line-height: 1.6; word-break: break-word; }

/* ---------- DIALOGS ---------- */
.dialog-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.dialog {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 440px;
  padding: 22px 22px 28px;
  box-shadow: var(--shadow);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head span { font-size: 24px; font-weight: 700; }
.dialog-x { background: none; border: none; padding: 4px; }
.dialog-x svg { width: 28px; height: 28px; fill: #222; }
.dialog-line { border: none; border-top: 1px solid #eee; margin: 18px 0; }
.dialog-field { margin: 18px 0; }
.df-label { font-size: 18px; color: #2b2b2b; margin-bottom: 8px; }
.df-select {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; color: #555; padding: 4px 0;
}
.df-select svg { width: 26px; height: 26px; fill: #bbb; }
.dialog-submit {
  width: 60%; display: block; margin: 8px auto 0;
  background: var(--amber-l); color: #fff; border: none;
  border-radius: 14px; padding: 16px; font-size: 18px; font-weight: 600;
}

.dialog.picker { max-width: 480px; max-height: 80vh; display: flex; flex-direction: column; }
.picker-search { margin: 14px 0; }
.picker-search input {
  width: 100%; border: 1px solid #ddd; border-radius: 10px;
  padding: 12px 14px; font-size: 16px; outline: none;
}
.picker-list { overflow-y: auto; flex: 1; }
.picker-item {
  width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid #f0f0f0; padding: 14px 6px; font-size: 16px;
}
.picker-item:active { background: #f7f7f7; }
.multi-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid #f0f0f0; padding: 14px 6px; font-size: 16px;
}
.multi-item .box {
  width: 24px; height: 24px; border: 2px solid #bbb; border-radius: 5px;
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.multi-item.on .box { background: var(--amber); border-color: var(--amber); }
.multi-item .box svg { width: 16px; height: 16px; fill: #fff; opacity: 0; }
.multi-item.on .box svg { opacity: 1; }
.picker-item.multi { display: flex; align-items: center; gap: 14px; }
.picker-item.multi .mp-check {
  width: 24px; height: 24px; border: 2px solid #bbb; border-radius: 6px;
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.picker-item.multi.sel .mp-check { background: var(--amber); border-color: var(--amber); }
.picker-item.multi .mp-check svg { width: 16px; height: 16px; fill: #fff; display: none; }
.picker-item.multi.sel .mp-check svg { display: block; }

/* ---------- ATTENDANCE APPROVAL ---------- */
.att-detail-scroll { flex: 1; overflow-y: auto; background: #fff; padding: 18px; }
.ad-section-label { font-size: 18px; font-weight: 700; color: #2b2b2b; margin-bottom: 12px; }
.ad-emp { display: flex; align-items: center; gap: 12px; }
.ad-emp-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ccc; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.ad-emp-avatar svg { width: 26px; height: 26px; fill: none; stroke: #777; stroke-width: 1.3; }
.ad-emp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ad-emp-name { font-size: 19px; font-weight: 700; color: #2b2b2b; }
.ad-emp-sub { font-size: 17px; color: #2b2b2b; margin: 6px 0 0 52px; }

.ad-label { font-size: 19px; color: #2b2b2b; margin-top: 20px; }
.ad-date { font-size: 19px; color: var(--amber-d); font-weight: 600; margin-top: 4px; }
.ad-shift { font-size: 18px; color: #2e7d32; font-weight: 600; margin-top: 16px; }

.ad-io { margin-top: 10px; }
.ad-io-head {
  display: flex; justify-content: space-between;
  background: #eef1f4; padding: 14px 14px; border-radius: 6px 6px 0 0;
  font-size: 16px; font-weight: 600; color: #2b2b2b;
}
.ad-io-body { display: flex; justify-content: space-between; padding: 12px 14px; gap: 12px; }
.ad-io-col { flex: 1; font-size: 15px; line-height: 1.5; color: #2b2b2b; }
.ad-io-col.right { text-align: right; }

.ad-img-card {
  border: 1px solid #eee; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  padding: 16px; margin-top: 18px; text-align: center;
}
.ad-img-title { font-size: 20px; font-weight: 700; text-align: left; margin-bottom: 14px; }
.ad-image { max-width: 220px; width: 60%; border-radius: 4px; margin: 0 auto; display: block; }
.ad-img-empty { color: var(--muted); padding: 20px; }

/* ---------- ATTENDANCE APPROVAL ---------- */
.att-appr-scroll { flex: 1; overflow-y: auto; background: #fff; padding: 18px; }
.aa-label { font-size: 18px; font-weight: 700; color: #2b2b2b; }
.aa-emp { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.aa-emp-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #888; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.aa-emp-avatar svg { width: 26px; height: 26px; fill: #555; }
.aa-emp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.aa-emp-name { font-size: 18px; font-weight: 700; color: #2b2b2b; }
.aa-market { color: #555; font-size: 16px; margin: 6px 0 0 52px; }
.aa-section-label { font-size: 18px; color: #2b2b2b; margin-top: 18px; }
.aa-date { color: var(--amber-d); font-weight: 700; font-size: 18px; margin-top: 4px; }
.aa-shift { color: #2e7d32; font-weight: 700; font-size: 17px; margin: 10px 0; }
.aa-checkrow { display: flex; gap: 10px; background: #eef1f4; border-radius: 8px; padding: 14px; }
.aa-check { flex: 1; }
.aa-check.right { text-align: right; }
.aa-check-h { font-weight: 700; font-size: 15px; color: #2b2b2b; margin-bottom: 8px; }
.aa-check-body { font-size: 15px; color: #2b2b2b; line-height: 1.5; }
.aa-remark { color: #888; margin: 10px 0; }
.aa-image-card { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); border-radius: 10px; padding: 16px; margin-top: 8px; }
.aa-image-title { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.aa-image { width: 60%; max-width: 220px; display: block; margin: 0 auto; border-radius: 6px; }
.aa-image-none { text-align: center; color: var(--muted); padding: 20px; }

.appr-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  padding: 14px 14px; margin-bottom: 16px;
  display: flex; align-items: stretch; gap: 12px;
}
.appr-card-main { flex: 1; min-width: 0; }
.appr-emp { color: #2e7d32; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.appr-route { font-size: 16px; color: #2b2b2b; margin-bottom: 10px; word-break: break-word; }
.appr-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; border-top: 1px solid #eee; padding-top: 8px; }
.appr-cols .h { color: var(--muted); font-size: 13px; }
.appr-cols .v { font-weight: 700; font-size: 14px; margin-top: 4px; }
.appr-cols .c3 { text-align: right; }
.appr-eye {
  border: none; background: none; border-left: 1px solid #eee; padding: 0 6px 0 14px;
  display: flex; align-items: center;
}
.appr-eye svg { width: 28px; height: 28px; fill: var(--amber); }
.appr-avatar { width: 44px; height: 44px; flex: 0 0 auto; }
.appr-avatar svg { width: 44px; height: 44px; fill: none; stroke: #555; stroke-width: 1.2; }

.exp-appr-scroll { flex: 1; overflow-y: auto; background: #fff; padding: 18px; }
.exp-appr-emp {
  background: #eef1f4; border-radius: 8px; padding: 16px;
  text-align: center; font-size: 18px; font-weight: 700; color: #2b2b2b;
}
.exp-appr-info { color: #444; }
.exp-appr-info .ai-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 16px; }
.exp-appr-info .ai-row svg { width: 20px; height: 20px; fill: #888; flex: 0 0 auto; }
.exp-appr-info .ai-row.strong { color: #2b2b2b; font-weight: 600; }

.exp-appr-actions { display: flex; gap: 18px; justify-content: center; margin-top: 40px; }
.appr-approve, .appr-reject {
  border: none; border-radius: 12px; padding: 16px 36px;
  font-size: 17px; font-weight: 600; color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.appr-approve { background: #2e7d32; }
.appr-reject { background: #e53935; }

/* ---------- EXPENSE BILL ---------- */
.exp-header { justify-content: space-between; position: relative; }
.exp-title { font-size: 22px; font-weight: 700; color: #2b2b2b; }
.check-btn { background: rgba(255,255,255,0.55); border: none; border-radius: 10px; padding: 8px 12px; }
.check-btn svg { width: 28px; height: 28px; fill: #2b7d2b; display: block; }

.exp-scroll { flex: 1; overflow-y: auto; background: #e9edf0; padding: 0; }
.exp-card { background: #fff; border-radius: 0 0 18px 18px; padding: 22px 18px 30px; }
.exp-h { text-align: center; font-size: 20px; font-weight: 700; margin: 6px 0 22px; }

.exp-field-box {
  position: relative; background: #eef1f4; border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px; margin-bottom: 18px;
}
.exp-ic { width: 26px; height: 26px; fill: #555; flex: 0 0 auto; }
.exp-input {
  border: none; background: transparent; outline: none;
  font-size: 19px; flex: 1; color: #2b2b2b;
}
.exp-input::placeholder { color: #8a8a8a; }
.exp-float-label {
  position: absolute; top: -10px; left: 14px; background: #fff;
  padding: 0 6px; font-size: 14px; color: var(--amber); border-radius: 4px;
}
.req { color: #e53935; }

.exp-dropdown { cursor: pointer; }
.exp-type-val { flex: 1; font-size: 19px; color: #2b2b2b; }
.exp-caret { width: 24px; height: 24px; fill: var(--amber); }
.exp-options {
  background: #fff; border-radius: 8px; margin: -10px 0 18px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.15); overflow: hidden;
  max-height: 340px; overflow-y: auto;
}
.exp-option {
  width: 100%; text-align: left; border: none; background: none;
  padding: 18px 16px; font-size: 19px; color: #2b2b2b;
  border-bottom: 1px solid #f2f2f2;
}
.exp-option:active, .exp-option.sel { background: #fdf3df; }
.exp-option .exp-opt-check {
  display: inline-block; width: 22px; color: var(--amber); font-weight: 700;
}

.exp-date-wrap { flex: 1; }
.exp-date-input { border: none; background: transparent; font-size: 19px; outline: none; width: 100%; color: #2b2b2b; }

.exp-attach {
  width: 100%; background: #eef1f4; border: none; border-radius: 12px;
  padding: 18px; font-size: 19px; color: #2b2b2b; margin-bottom: 16px;
}

.exp-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.exp-thumb { position: relative; border-radius: 8px; overflow: hidden; }
.exp-thumb img { width: 100%; height: 260px; object-fit: cover; display: block; }
.exp-thumb-del {
  position: absolute; top: 8px; right: 8px;
  background: #e53935; border: none; border-radius: 6px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
}
.exp-thumb-del svg { width: 20px; height: 20px; fill: #fff; }

.exp-submit {
  margin: 16px 18px 22px; width: calc(100% - 36px);
  background: #2e7d32; color: #fff; border: none;
  border-radius: 30px; padding: 18px; font-size: 19px; font-weight: 600;
}
.exp-submit:disabled { opacity: .6; }

/* Transport multi-select */
.transport-list { margin: 8px 0 18px; }
.transport-item {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 4px; font-size: 20px; color: #2b2b2b; cursor: pointer;
}
.transport-check {
  width: 30px; height: 30px; border-radius: 6px;
  border: 2px solid #bbb; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.transport-item.on .transport-check { background: #1ab6a8; border-color: #1ab6a8; }
.transport-check svg { width: 22px; height: 22px; fill: #fff; opacity: 0; }
.transport-item.on .transport-check svg { opacity: 1; }

/* ---------- ATTENDANCE LIST ---------- */
.att-list { flex: 1; overflow-y: auto; padding: 14px; }
.att-day {
  background: #fff; border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  padding: 16px 18px; margin-bottom: 16px;
}
.att-date { font-weight: 700; font-size: 16px; color: #2b2b2b; padding-bottom: 12px; border-bottom: 1px solid #e2e2e2; }
.att-shift-name { font-size: 17px; margin: 14px 0 4px; }
.att-shift-name.evening { color: #2e7d32; }
.att-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; }
.att-cols .h { color: var(--muted); font-size: 13px; }
.att-cols .v { font-weight: 600; font-size: 15px; margin-top: 4px; }
.att-cols .c3 { text-align: right; }
.att-cols .c2 { text-align: center; }
.att-absent { text-align: center; color: #e53935; font-weight: 700; font-size: 18px; padding: 6px 0; }

.fab {
  position: absolute; right: 22px; bottom: 26px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--amber); border: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
}
.fab svg { width: 32px; height: 32px; fill: #fff; }

/* ---------- CHECK-IN FORM ---------- */
.ci-header { display: flex; align-items: center; justify-content: space-between; }
.ci-date { font-size: 20px; font-weight: 700; color: #fff; }
.ci-avatar svg { width: 30px; height: 30px; fill: #2b2b2b; }
.ci-scroll { flex: 1; overflow-y: auto; background: #fff; }

.ci-map {
  width: 100%; height: 200px; background: #e8eaed;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ci-map iframe { width: 100%; height: 100%; border: 0; }
.ci-map-fallback { color: #888; font-size: 14px; }

.ci-clock { text-align: center; font-size: 32px; font-weight: 700; padding: 14px 0 6px; color: #2b2b2b; }

.ci-cam-wrap { padding: 0 18px; }
.ci-video, .ci-photo {
  width: 100%; max-height: 360px; aspect-ratio: 4/3; object-fit: cover;
  border: 3px solid #2e7d32; border-radius: 14px; background: #000;
  display: block;
}
.ci-capture {
  display: block; margin: 14px auto 18px; width: 60%;
  background: #eef4f8; border: none; border-radius: 8px;
  padding: 16px; font-size: 16px; font-weight: 600; letter-spacing: 1px; color: #2b2b2b;
}

.ci-shift {
  display: flex; margin: 0 18px 18px;
  border-radius: 4px; overflow: hidden; border: 1px solid var(--amber-l);
}
.ci-shift-btn {
  flex: 1; border: none; background: #fdf0d5;
  padding: 16px 0; font-size: 17px; font-weight: 600; color: #2b2b2b;
}
.ci-shift-btn.active { background: var(--amber-l); }

.ci-field { padding: 6px 18px; }
.ci-label { font-size: 17px; color: #2b2b2b; margin-bottom: 8px; }
.ci-label.muted { color: #9a9a9a; }
.ci-label .req { color: #e53935; }
.ci-select {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; gap: 14px;
  font-size: 18px; color: #444; padding: 6px 0 12px;
}
.ci-select span { flex: 1; text-align: left; }
.ci-select svg:last-child { width: 26px; height: 26px; fill: #888; }
.ci-bm { width: 24px; height: 24px; fill: none; stroke: #444; stroke-width: 1.6; }
.ci-input {
  width: 100%; border: none; border-bottom: 1px solid #333;
  font-size: 18px; padding: 6px 0 12px; outline: none;
}
.ci-divider { border: none; border-top: 1px solid #eee; margin: 4px 18px; }

.ci-submit {
  display: block; margin: 22px 18px 28px; width: calc(100% - 36px);
  background: var(--amber-l); color: #2b2b2b; border: none;
  border-radius: 30px; padding: 18px; font-size: 18px; font-weight: 700;
}

/* ---------- ATTENDANCE APPROVAL ---------- */
.att-appr-scroll { flex: 1; overflow-y: auto; background: #fff; padding: 18px; }
.att-appr-label { font-size: 18px; color: #2b2b2b; margin-bottom: 10px; }
.att-appr-emp { display: flex; align-items: center; gap: 12px; }
.att-appr-emp-av {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  border: 1px solid #ccc; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.att-appr-emp-av svg { width: 26px; height: 26px; fill: #777; }
.att-appr-emp-av img { width: 100%; height: 100%; object-fit: cover; }
.att-appr-emp-name { font-size: 19px; font-weight: 700; color: #2b2b2b; }
.att-appr-sub { font-size: 17px; color: #2b2b2b; margin: 6px 0 0 52px; }
.att-appr-h { font-size: 19px; color: #2b2b2b; margin: 20px 0 4px; }
.att-appr-date { font-size: 19px; color: var(--amber-d); font-weight: 600; }
.att-appr-shift { font-size: 18px; color: #2e7d32; font-weight: 700; margin-top: 10px; }
.att-io { display: flex; margin-top: 8px; }
.att-io-col { flex: 1; }
.att-io-col.right { text-align: right; }
.att-io-head { background: #eef1f4; padding: 10px 12px; font-size: 16px; }
.att-io-col.right .att-io-head { text-align: right; }
.att-io-body { padding: 10px 12px; font-size: 16px; line-height: 1.5; color: #2b2b2b; }
.att-img-card {
  border: 1px solid #eee; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 16px; margin-top: 20px;
}
.att-img-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.att-img-wrap { display: flex; justify-content: center; }
.att-img-wrap img { max-width: 220px; border-radius: 6px; }

/* ---------- EXPENSE BILL LIST ---------- */
.ebill-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.07);
  padding: 16px 16px; margin-bottom: 14px;
}
.ebill-top { display: flex; justify-content: space-between; align-items: center; }
.ebill-date { color: var(--muted); font-size: 15px; }
.ebill-badge {
  font-size: 14px; font-weight: 600; padding: 6px 16px; border-radius: 16px;
}
.ebill-badge.submit { color: #2e7d32; background: #e7f4ea; }
.ebill-badge.draft { color: #b26a00; background: #fdf0d5; }
.ebill-mid { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.ebill-title { font-size: 18px; font-weight: 700; color: #2b2b2b; word-break: break-word; flex: 1; }
.ebill-amount { font-size: 20px; font-weight: 700; color: #2e7d32; flex: 0 0 auto; margin-left: 10px; }
.ebill-vehicle { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* ---------- EXPENSE BILL LIST ---------- */
.ebill-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  padding: 16px 16px; margin-bottom: 14px;
}
.ebill-top { display: flex; align-items: center; justify-content: space-between; }
.ebill-date { font-size: 15px; color: #2b2b2b; }
.ebill-status {
  font-size: 15px; font-weight: 600; padding: 4px 14px; border-radius: 16px;
}
.ebill-status.submit { color: #2e7d32; background: #e6f4ea; }
.ebill-status.draft { color: #b26a00; background: #fdf0d5; }
.ebill-status.approved { color: #2e7d32; background: #e6f4ea; }
.ebill-status.reject { color: #c62828; background: #fdecea; }
.ebill-mid { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.ebill-type { font-size: 19px; font-weight: 700; color: #2b2b2b; flex: 1; word-break: break-word; }
.ebill-amount { font-size: 19px; font-weight: 700; color: #2e7d32; flex: 0 0 auto; padding-left: 12px; }
.ebill-vehicle { font-size: 15px; color: #777; margin-top: 6px; }

/* ---------- PERMISSIONS SCREEN ---------- */
#permScreen {
  position: fixed; inset: 0; z-index: 95;
  background: linear-gradient(160deg, var(--amber-l), var(--amber-d));
  overflow-y: auto;
}
.perm-wrap {
  max-width: 460px; margin: 0 auto; min-height: 100%;
  padding: 50px 26px 30px; display: flex; flex-direction: column;
}
.perm-logo { text-align: center; font-style: italic; font-weight: 800; margin-bottom: 30px; }
.perm-logo .s-steps { color: #fff; font-size: 36px; }
.perm-logo .s-srs { color: rgba(255,255,255,0.65); font-size: 36px; }
.perm-title { color: #fff; font-size: 24px; font-weight: 800; text-align: center; margin: 0 0 8px; }
.perm-sub { color: rgba(255,255,255,0.92); font-size: 15px; text-align: center; margin: 0 0 26px; line-height: 1.5; }

.perm-item {
  background: rgba(255,255,255,0.95); border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
}
.perm-ic { font-size: 28px; flex: 0 0 auto; }
.perm-text { flex: 1; min-width: 0; }
.perm-name { font-size: 17px; font-weight: 700; color: #2b2b2b; }
.perm-desc { font-size: 13px; color: #666; margin-top: 2px; line-height: 1.4; }
.perm-state { font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.perm-state.granted { color: #2e7d32; }
.perm-state.denied { color: #c62828; }
.perm-state.pending { color: #b26a00; }

.perm-allow {
  margin-top: 16px; background: #fff; color: var(--amber-d);
  border: none; border-radius: 28px; padding: 17px; font-size: 18px; font-weight: 700;
}
.perm-allow:disabled { opacity: .6; }
.perm-skip {
  margin-top: 12px; background: transparent; color: rgba(255,255,255,0.9);
  border: none; padding: 12px; font-size: 15px; font-weight: 600;
}
.perm-note { color: rgba(255,255,255,0.95); font-size: 13px; text-align: center; margin-top: 14px; min-height: 18px; }

/* ===================== UTILITY / APPEARANCE ===================== */
/* ---- Utility / Appearance screen ---- */
.util-scroll { flex: 1; overflow-y: auto; padding: 16px 14px 40px; }
.util-card {
  background: var(--card); border-radius: 16px; padding: 18px 16px;
  box-shadow: var(--shadow);
}
.util-h {
  margin: 0 0 18px; font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center;
}
.util-row { margin-bottom: 20px; }
.util-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px;
}

/* Color presets */
.util-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.util-swatch {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent;
  cursor: pointer; padding: 0; outline: 2px solid #e0e0e0; outline-offset: 2px; transition: transform .15s;
}
.util-swatch:active { transform: scale(.9); }
.util-swatch.on { outline-color: var(--text); outline-width: 2.5px; transform: scale(1.12); }

/* Custom color picker row */
.util-color-pick-row { display: flex; align-items: center; gap: 10px; }
.util-color-picker {
  width: 44px; height: 44px; border: none; border-radius: 10px;
  padding: 2px; background: var(--bg); cursor: pointer;
}
.util-color-hex {
  font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: .5px; flex: 1;
}
.util-color-apply {
  border: none; background: var(--amber); color: var(--on-amber, #fff);
  padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* Display mode buttons */
.util-mode-row { display: flex; gap: 10px; }
.util-mode-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border: 2px solid var(--line); background: var(--bg);
  border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  transition: all .15s;
}
.util-mode-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.util-mode-btn.on { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.util-mode-btn.on svg { stroke: var(--amber); }

/* Font select */
.util-select-wrap {
  background: var(--bg); border-radius: 12px; border: 1px solid var(--line);
}
.util-select {
  width: 100%; border: none; background: transparent; padding: 14px 14px;
  font-size: 15px; color: var(--text); appearance: none; cursor: pointer;
  font-family: var(--app-font, inherit);
}

/* Font style buttons */
.util-style-row { display: flex; gap: 8px; flex-wrap: wrap; }
.util-style-btn {
  flex: 1; min-width: 80px; padding: 12px 8px; border: 1.5px solid var(--line);
  background: var(--bg); border-radius: 12px; font-size: 14px; color: var(--text); cursor: pointer;
  transition: all .15s; text-align: center;
}
.util-style-btn.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); font-weight: 700; }

/* Font size slider */
.util-slider {
  width: 100%; accent-color: var(--amber); height: 6px;
  margin: 4px 0; cursor: pointer;
}

/* Size quick-pick pills */
.util-sizes { display: flex; gap: 8px; }
.util-size {
  flex: 1; padding: 12px 0; border: 1.5px solid var(--line); background: var(--bg);
  border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; transition: all .15s;
}
.util-size.on { background: var(--amber); color: var(--on-amber, #fff); border-color: var(--amber); }

/* Preview */
.util-preview {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 16px;
}
.util-prev-body { margin: 0 0 14px; font-size: 1rem; color: var(--text); line-height: 1.6; }
.util-prev-btn {
  border: none; background: var(--amber); color: var(--on-amber, #fff); padding: 12px 20px;
  border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
}

/* Reset */
.util-reset {
  width: 100%; margin-top: 16px; padding: 14px; border: 1.5px solid var(--line);
  background: var(--card); color: #c62828; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
}

/* ---- Dark mode overrides ---- */
.dark-mode { color-scheme: dark; }
.dark-mode .sub-header { background: #1e1e1e; border-color: #2e2e2e; }
.dark-mode .bottom-nav { background: #1e1e1e; border-color: #2e2e2e; }
.dark-mode input, .dark-mode select, .dark-mode textarea {
  background: #2a2a2a; color: #f1f1f1; border-color: #3a3a3a;
}
.dark-mode .login-card { background: #1e1e1e; }
