:root {
  --purple: #6950dc;
  --purple-dark: #5035c4;
  --purple-soft: #f0ecff;
  --ink: #1e2235;
  --muted: #82879b;
  --line: #e8eaf2;
  --bg: #f4f6fb;
  --green: #1ca664;
  --green-soft: #e6f7ef;
  --red: #e04f5f;
  --red-soft: #ffedf0;
  --amber: #d48806;
  --amber-soft: #fff7e6;
  --blue: #2b6cb0;
  --blue-soft: #ebf4ff;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  font-weight: 600;
  background: #eeedf8;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: filter .15s, transform .1s;
}
button:disabled { opacity: .6; cursor: wait; }
button:hover { filter: brightness(.96); }
.primary {
  background: linear-gradient(135deg, #6950dc 0%, #563cc9 100%);
  color: white;
  box-shadow: 0 4px 12px #6950dc30;
}
.outline-btn {
  background: white;
  color: var(--ink);
  border: 1px solid #d7dae6;
}
.wide { width: 100%; justify-content: space-between; }
.wide-center { width: 100%; justify-content: center; }
.muted { color: var(--muted); }
.error { color: var(--red); font-size: 13px; }
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #363b52;
}
label small { color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #dcdfe9;
  border-radius: 9px;
  outline: none;
  background: white;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px #6950dc15;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 24px; letter-spacing: -.6px; margin-bottom: 6px; }
h2 { font-size: 20px; letter-spacing: -.4px; }
h3 { font-size: 15px; }

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .5px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: .3px;
  margin-top: 3px;
  font-weight: 500;
  opacity: .75;
}
.brand-icon {
  display: grid;
  place-items: center;
  border-radius: 11px;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #745be6, #5238c2);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px #5238c240;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: white;
}
.login-story {
  padding: 48px 64px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  background: radial-gradient(ellipse at 25% 60%, #6a48b8 0%, #241c3c 52%, #131624 100%);
}
.login-story .brand-icon { background: #ffffff20; box-shadow: none; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: #d0befe; font-weight: 700; }
.login-story h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.12; margin: 22px 0; }
.login-story p { color: #c4bad6; max-width: 380px; line-height: 1.7; }
.story-grid { display: flex; gap: 35px; margin-top: 54px; color: #ad93f0; }
.story-grid b { display: block; font-size: 13px; color: white; margin: 12px 0 6px; }
.story-grid small { font-size: 11px; color: #bdb3ce; }
.login-story > small { font-size: 11px; color: #8e85a1; }
.login-form { width: 400px; max-width: 100%; margin: auto; padding: 35px; }
.login-form h2 { font-size: 30px; margin: 20px 0 8px; }
.login-form p { font-size: 13px; line-height: 1.6; }
.login-form form { margin-top: 28px; }
.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: #efebff;
  color: var(--purple);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
}
.login-note { margin-top: 24px; color: var(--muted); text-align: center; font-size: 12px; }

/* App Shell & Sidebar */
.shell { display: flex; min-height: 100vh; }
aside {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #171b2e 0%, #121524 100%);
  color: #afb5cc;
  padding: 22px 16px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
aside .brand {
  color: white;
  margin: 0 6px 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #262b42;
}
.aside-role-wrap {
  margin: 0 6px 12px;
}
.aside-role-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #27224a;
  border: 1px solid #453a84;
  color: #b8a8ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3d355e transparent;
  padding-right: 2px;
}
nav button {
  background: none;
  color: #aeb4ca;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  width: 100%;
}
nav button:hover {
  background: #20253d;
  color: #e4e7f5;
  filter: none;
}
nav button.active {
  background: linear-gradient(90deg, #6950dc 0%, #573ec7 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 14px #07071240;
}
nav .symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
nav .symbol svg {
  width: 17px;
  height: 17px;
}
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count {
  background: #493896;
  color: #e2dbff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}
nav button.active .nav-count {
  background: #ffffff28;
  color: white;
}
.nav-lock {
  color: #8890ab;
  display: inline-flex;
  align-items: center;
}
.nav-lock svg { width: 13px; height: 13px; }

/* Sidebar Bottom Subscription Card (TZ Mockup) */
.aside-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #252a40;
  font-size: 11px;
  flex-shrink: 0;
}
.aside-sub-card {
  border-radius: 11px;
  padding: 13px 14px;
  background: #1c2238;
  border: 1px solid #2c3350;
  color: #d6dbf0;
}
.aside-sub-card.active {
  background: linear-gradient(145deg, #132c29 0%, #14222c 100%);
  border-color: #1f5c46;
}
.aside-sub-card.expired {
  background: linear-gradient(145deg, #2d241b 0%, #221b1d 100%);
  border-color: #6b4b23;
}
.aside-sub-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
}
.aside-sub-card.active .aside-sub-head { color: #4ade80; }
.aside-sub-card.expired .aside-sub-head { color: #fbbf24; }
.aside-sub-meta {
  font-size: 11px;
  color: #9da5c0;
  margin-bottom: 6px;
}
.aside-sub-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #eef1fa;
  background: #00000028;
  padding: 6px 9px;
  border-radius: 7px;
}
.aside-sub-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px 10px;
  font-size: 11px;
  border-radius: 7px;
  background: var(--purple);
  color: white;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #2fd482;
  border-radius: 50%;
  margin-right: 6px;
}

/* Header */
.workspace { margin-left: 248px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
header {
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  gap: 16px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 13px;
}
.header-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #fff7e0;
  border: 1px solid #f5e2a8;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-title-row b {
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -.3px;
}
.header-left small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.breadcrumbs { color: var(--muted); font-size: 12px; }
.breadcrumbs span { margin: 0 6px; color: #c7c8d0; }
.breadcrumbs em { font-style: normal; font-weight: 600; color: var(--purple); }
.account { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.bell-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f5f6fa;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: #5b6178;
}
.bell-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid white;
}
.account-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: 24px;
  background: #f6f7fb;
  border: 1px solid var(--line);
}
.account-pill small { display: block; color: var(--muted); font-size: 10px; margin-top: 1px; }
.account-caret { color: var(--muted); font-size: 11px; margin-left: 2px; }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #6950dc, #4c32bf);
  font-weight: 700;
  font-size: 13px;
}
.icon-button {
  background: #f6f7fb;
  border: 1px solid var(--line);
  color: #676d85;
  padding: 7px 10px;
  font-size: 16px;
  border-radius: 9px;
}

/* Main Content */
main {
  padding: 24px 32px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}
.page-title p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.page-title button { white-space: nowrap; }
.eyeline {
  font-size: 10px;
  color: var(--purple);
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}

/* Summary Cards (4 and 5 column grids) */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.cards.cards-5 {
  grid-template-columns: repeat(5, 1fr);
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 6px #14182906;
}
.card small { font-size: 12px; color: #676d85; font-weight: 600; display: block; }
.card strong { display: block; font-size: 28px; letter-spacing: -.8px; margin: 6px 0 4px; color: var(--ink); }
.card .foot { font-size: 11px; color: #7e849c; display: inline-flex; align-items: center; gap: 4px; }
.card .foot.up { color: var(--green); font-weight: 600; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card-icon.red { background: var(--red-soft); color: var(--red); }
.card-icon.blue { background: var(--blue-soft); color: var(--blue); }

/* Client Dashboard 3 Status Widgets (TZ Mockup) */
.status-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.status-widget {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
  box-shadow: 0 2px 6px #14182906;
}
.status-widget-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.status-widget-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.status-widget-icon.green { background: var(--green-soft); color: var(--green); }
.status-widget-head b { display: block; font-size: 14px; color: var(--ink); }
.status-widget-head small { color: var(--muted); font-size: 12px; }
.status-box {
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12px;
  color: #4f556d;
}
.status-box.green {
  background: var(--green-soft);
  border-color: #bcebd4;
  color: #136f42;
  font-weight: 600;
}
.status-meta-line {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #3f445c;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Panels & Tables */
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 6px #14182906;
}
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head small { font-size: 11px; color: var(--muted); }
.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #7c8299;
  background: #f9fafd;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  border-bottom: 1px solid #f0f2f8;
  white-space: nowrap;
  vertical-align: middle;
}
tr:hover td { background: #fbfcff; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
td .sub-inline { font-size: 11px; color: var(--muted); margin-left: 6px; }
td b { font-weight: 600; color: var(--ink); }
.row-num { color: var(--muted); font-weight: 600; width: 38px; }

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  background: #f0edf9;
  color: #6b5b95;
}
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.gray { background: #f0f2f7; color: #72788f; }
.status-dot-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 12px;
}
.status-dot-text.green { color: var(--green); }
.status-dot-text.red { color: var(--red); }
.status-dot-text.amber { color: var(--amber); }

/* Notices & Empty states */
.notice {
  border: 1px solid #e2d9fc;
  background: #f3effe;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.6;
  color: #5b4b8a;
}
.notice b { color: #3c2a70; }
.notice.amber { background: #fff9eb; border-color: #f5e3b8; color: #8c6d23; }
.empty { padding: 54px 25px; text-align: center; color: var(--muted); font-size: 12px; }
.empty .empty-icon { font-size: 32px; color: #bab0dc; margin-bottom: 12px; }
.empty h3 { color: #565b73; margin-bottom: 7px; }

/* Toolbars & Row Buttons */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar label { margin: 0; }
.toolbar input, .toolbar select { padding: 8px 11px; font-size: 12px; }
.toolbar button { font-size: 12px; padding: 9px 14px; }
.row-button {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 7px;
  background: #f3f1fd;
  color: var(--purple);
}
.row-button.danger { color: var(--red); background: #fff0f2; }
.row-button.icon-only { padding: 6px 8px; }
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.info-body { padding: 20px; line-height: 1.8; font-size: 12.5px; color: #6e748a; }
.info-body b { color: #32364a; }
.step { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1edff;
  color: var(--purple);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
}
.step p { margin: 0; font-size: 12px; }
.step b { display: block; }

/* Subscription Locked Screen (TZ Page 7 Bottom-Right 1-to-1) */
.lock {
  padding: 46px 32px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.lock-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(145deg, #efebff 0%, #e2daff 100%);
  color: var(--purple);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 25px #6950dc1f;
}
.lock h2 {
  font-size: 22px;
  max-width: 520px;
  margin: 0 auto 12px;
  line-height: 1.35;
  color: var(--ink);
}
.lock > p {
  max-width: 560px;
  margin: 0 auto 26px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}
.lock-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  text-align: left;
}
.lock-mini-card {
  background: #f9fafd;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lock-mini-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lock-mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef0f7;
  color: #6b728e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.lock-mini-left b { display: block; font-size: 12.5px; color: #3c4159; }
.lock-mini-left small { font-size: 11px; color: var(--muted); }
.lock-mini-badge { color: #9aa0b8; }
.lock-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lock-actions button {
  padding: 12px 22px;
  font-size: 13px;
}

/* Footer & Dialog Modals */
footer {
  padding: 16px 32px;
  color: #a0a6ba;
  font-size: 10px;
  letter-spacing: .5px;
  border-top: 1px solid var(--line);
  background: white;
}
footer span { float: right; letter-spacing: 0; }
dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: 560px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 30px 90px #14132945;
  max-height: 92vh;
}
dialog.modal-wide {
  width: 780px;
}
dialog::backdrop { background: #14162b75; backdrop-filter: blur(3px); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 18px; }
#modal-body { padding: 22px 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* TZ Add Tenant 2-Column Layout */
.tenant-modal-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: start;
}
.isup-info-card {
  background: #f6f8fd;
  border: 1px solid #dfe5f2;
  border-radius: 12px;
  padding: 16px;
}
.isup-info-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 13px;
  color: #2b3354;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4e9f5;
}
.input-with-btn {
  display: flex;
  gap: 7px;
  align-items: center;
}
.input-with-btn input { flex: 1; }
.input-with-btn button {
  padding: 10px 12px;
  flex-shrink: 0;
  background: #f0ecff;
  color: var(--purple);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.secret {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f5fb;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 9px;
  font: 12px/1.85 Consolas, monospace;
  color: #4b4266;
  user-select: all;
}
.modal-note { color: var(--muted); font-size: 11.5px; line-height: 1.7; }
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 10px;
  background: #231f36;
  color: white;
  padding: 13px 22px;
  font-size: 12.5px;
  box-shadow: 0 8px 28px #0003;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#toast.visible { opacity: 1; }
.tenant-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
  background: white;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
}
.tenant-filter select { max-width: 280px; font-size: 12.5px; padding: 8px 11px; }
.search { width: 280px; max-width: 100%; padding: 9px 13px; font-size: 12px; border-radius: 8px; }
code { font-size: 11.5px; background: #f3f4f9; padding: 2px 6px; border-radius: 5px; }
.cell-actions { display: flex; gap: 6px; align-items: center; }
.settings-body { padding: 22px; max-width: 550px; }
.progress-label { font-size: 10px; letter-spacing: .8px; color: #8b819e; }
.info-body ul { padding-left: 20px; }
.no-margin { margin: 0; }
.check-line { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 400; margin: 0; }
.check-line input { width: auto; accent-color: var(--purple); }
.week-editor { margin-bottom: 18px; }
.week-head, .week-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 9px; align-items: center; margin-bottom: 10px; }
.week-head { font-size: 10px; color: var(--muted); }
.week-row input:not([type=checkbox]) { font-size: 11.5px; padding: 8px 6px; min-width: 0; }
.employee-checks { max-height: 240px; overflow: auto; border: 1px solid var(--line); padding: 14px; border-radius: 8px; margin-bottom: 15px; }
.employee-checks label { margin: 9px 0; }
.history-list article { border-bottom: 1px solid var(--line); padding: 14px 0; }
.history-list article > b { font-size: 12px; }
.history-list article .badge { float: right; }
.history-list article p { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; margin: 8px 0; }
.history-list article small { color: var(--muted); font-size: 10.5px; }
.wrap-cell { white-space: normal; max-width: 260px; }
.manual-tag { color: var(--purple) !important; }
.week-row .check-line { font-size: 11px; }

/* MFA Setup */
.setup-nav-note { font-size: 11px; line-height: 1.8; color: #9da2bb; padding: 10px 14px; }
.setup-progress { display: flex; gap: 22px; flex-wrap: wrap; font-size: 11.5px; color: #9694a7; margin-bottom: 22px; }
.setup-progress span:first-child { color: var(--green); }
.setup-progress b { color: var(--purple); }
.mfa-body { padding: 26px; max-width: 960px; }
.mfa-intro > p { font-size: 13px; line-height: 1.8; color: #767b92; max-width: 670px; }
.mfa-intro ol { padding-left: 21px; line-height: 2.1; color: #61677e; font-size: 12.5px; margin: 18px 0; }
.mfa-enroll { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; margin: 15px 0 24px; align-items: start; }
.qr-box { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 14px; text-align: center; }
.qr-box img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.qr-box span { font-size: 10.5px; line-height: 1.6; display: block; color: var(--muted); padding: 8px 0; }
.mfa-code-box { padding-top: 8px; max-width: 390px; }
.mfa-code-box input[name=code] { font-size: 26px; letter-spacing: 9px; font-variant-numeric: tabular-nums; }
.manual-key { margin-top: 20px; font-size: 11.5px; color: #797c92; }
.manual-key summary { cursor: pointer; line-height: 1.8; }
.manual-key .secret { font-size: 11.5px; line-height: 1.9; user-select: all; }

@media (max-width: 1280px) {
  .cards.cards-5 { grid-template-columns: repeat(3, 1fr); }
  .status-trio { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
  aside { width: 215px; padding: 20px 12px; }
  .workspace { margin-left: 215px; }
  main { padding: 20px; }
  .cards, .cards.cards-5 { grid-template-columns: repeat(2, 1fr); }
  .split, .tenant-modal-split { grid-template-columns: 1fr; }
  .lock-cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-form { padding: 40px 24px; }
  aside { position: static; width: 100%; padding: 14px; }
  .shell { display: block; }
  .aside-role-wrap, .aside-bottom { display: none; }
  nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  nav button { flex-shrink: 0; width: auto; padding: 9px 12px; font-size: 11.5px; }
  .workspace { margin: 0; }
  header { padding: 12px 16px; }
  .header-left small { display: none; }
  main { padding: 18px 14px; }
  .cards, .cards.cards-5 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .mfa-enroll { grid-template-columns: 1fr; }
}
/* Photo Upload & Sync UI */
.photo-upload-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px dashed #c8bfe8;
  background: #faf8ff;
  border-radius: 12px;
  margin-bottom: 16px;
}
.photo-preview {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ede9fe;
  color: var(--purple);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #dcd4f7;
}
.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-upload-controls {
  flex: 1;
}
.photo-upload-controls input[type=file] {
  padding: 7px;
  font-size: 11.5px;
  margin-top: 4px;
}
/* Device Binding & Direction Mode Styles */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #dfe3f2;
  background: #f8f9fe;
  color: #2f3552;
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
}
.mode-tab:hover {
  border-color: #9e8cf2;
  background: #f3f0ff;
  filter: none;
}
.mode-tab.active {
  border-color: #6347d1;
  background: #f1edff;
  color: #2c1c78;
  box-shadow: 0 3px 10px #6347d118;
}
.mode-tab b {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mode-tab small {
  font-size: 11px;
  color: #666d8c;
  font-weight: 400;
  line-height: 1.35;
}
.io-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.io-box {
  border: 1px solid #dfe3f2;
  border-radius: 11px;
  padding: 14px;
  background: #fbfcff;
}
.io-box.in-box {
  border-top: 4px solid #16a34a;
}
.io-box.out-box {
  border-top: 4px solid #ea580c;
}
.io-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eceff8;
}
.io-box-head b {
  font-size: 13px;
}
.attached-section {
  margin-top: 16px;
  border-top: 1px solid #e3e7f4;
  padding-top: 14px;
}
.attached-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.inline-select {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 7px;
  border: 1px solid #d5daec;
  background: #fff;
}
.inline-input {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 7px;
  border: 1px solid #d5daec;
  width: 100%;
  min-width: 110px;
}
.btn-attach-accent {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  font-weight: 600;
}
.btn-attach-accent:hover {
  background: #e0e7ff;
}
.sub-mode-box {
  border: 1px solid #e2e6f4;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f9faff;
  margin-bottom: 12px;
}
@media (max-width: 820px) {
  .mode-tabs, .io-split { grid-template-columns: 1fr; }
}
/* Tariff Cards & Select Styling */
.tariff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}
.tariff-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 2px solid #dfe3f2;
  background: #f8f9fe;
  color: #2c3252;
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
}
.tariff-card:hover {
  border-color: #9e8cf2;
  background: #f3f0ff;
  filter: none;
}
.tariff-card.active {
  border-color: #6347d1;
  background: #f1edff;
  color: #2c1c78;
  box-shadow: 0 3px 10px #6347d11f;
}
.tariff-card b {
  font-size: 12.5px;
  color: inherit;
}
.tariff-card small {
  font-size: 11px;
  color: #5d6484;
  font-weight: 500;
}

.pwd-eye-btn{background:#f3f1ff;border:1px solid #dcd6f7;border-radius:10px;padding:0 12px;height:42px;cursor:pointer;font-size:16px;color:#4f3cc9;}

/* === V9 RECEIPT PREVIEW STYLES === */
.receipt-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  background: #f8f7fc;
  border: 1px solid #e6e3f4;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.receipt-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f3f2f9;
  border: 1px dashed #c9c3e8;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  max-height: 440px;
  overflow: auto;
}
.receipt-preview-img {
  max-width: 100%;
  max-height: 410px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(32, 27, 54, 0.12);
}

/* === V10 DAVOMAT TABELI & PAGINATION STYLES === */
.tabel-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}
.tabel-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 170px;
  margin: 0;
}
.tabel-filter-field.emp-select-field {
  flex: 1 1 280px;
  min-width: 250px;
}
.tabel-filter-field span {
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
}
.tabel-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.btn-excel {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
  font-weight: 600;
}
.btn-excel:hover {
  background: #d1fae5 !important;
}
.btn-pdf {
  background: #eef2ff !important;
  color: #4338ca !important;
  border-color: #c7d2fe !important;
  font-weight: 600;
}
.btn-pdf:hover {
  background: #e0e7ff !important;
}
.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f3f4f6;
}
.time-pill.in {
  background: #ecfdf5;
  color: #065f46;
}
.time-pill.out {
  background: #eff6ff;
  color: #1e40af;
}
.tabel-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #eceaf6;
  background: #faf9fe;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}
.pg-info {
  font-size: 13px;
  color: #4b5563;
}
.pg-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #dcd8f0;
  background: #ffffff;
  color: #2d264b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pg-btn:hover:not(:disabled) {
  background: #f0edff;
  border-color: #6750db;
}
.pg-btn.active {
  background: #6750db;
  color: #ffffff;
  border-color: #6750db;
}
.pg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pg-dots {
  padding: 0 4px;
  color: #9ca3af;
}

.cards.cards-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
  .cards.cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .cards.cards-4 {
    grid-template-columns: 1fr;
  }
}

.badge.purple {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}
