:root {
  --kw-bg: #ffffff;
  --kw-surface: #f5f5f5;
  --kw-border: #b9b9b9;
  --kw-text: #555555;
  --kw-icon: #7a7a7a;
  --kw-accent: #4a6fa5;
}

html, body {
  height: 100%;
}

body {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--kw-text);
  background: var(--kw-bg);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Top navigation bar */
.kw-navbar {
  position: relative;
  z-index: 10;
  background: linear-gradient(var(--kw-sunk), var(--kw-sunk));
  border-bottom: 1px solid var(--kw-line);
  padding: 2px 12px;
}

.kw-navbar .nav-link {
  color: var(--kw-ink-text);
  font-size: 12px;
  padding: 10px 11px;
}

.kw-navbar .nav-link:hover {
  color: var(--kw-accent);
}

.kw-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kw-text);
}

.kw-user svg {
  color: #aaa;
}

/* Mega dropdown menu: columns with headers on grey bars */
.kw-mega-menu {
  padding: 0;
  border-radius: 2px;
  border-color: #cfcfcf;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
  margin-top: 0 !important;
}

.kw-mega-menu.show {
  display: flex;
}

.kw-mega-col {
  min-width: 190px;
  padding-bottom: 6px;
}

.kw-mega-col + .kw-mega-col {
  border-right: 1px solid var(--kw-line);
}

.kw-mega-head {
  background: var(--kw-sunk);
  color: var(--kw-ink-text);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.kw-mega-subhead {
  margin-top: 4px;
}

.kw-mega-menu .dropdown-item {
  color: var(--kw-ink-text);
  font-size: 12px;
  font-weight: 400;
  padding: 4px 14px;
}

.kw-mega-menu .dropdown-item:hover {
  background: var(--kw-accent-soft);
  color: #0d5bb5;
}

/* Items that open a submenu get a small arrow on the left */
.kw-mega-menu .kw-has-sub {
  position: relative;
  padding-left: 26px;
}

.kw-mega-menu .kw-has-sub::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  margin-top: -4px;
  border: 4px solid transparent;
  border-right: 5px solid #333;
  border-left: 0;
}

.kw-mega-menu .dropdown-divider {
  margin: 4px 10px;
}

@media (min-width: 768px) {
  .kw-mega:hover > .kw-mega-menu {
    display: flex;
  }
}

/* Logo: "Kara" large, "Web" small */
.kw-logo {
  font-family: "Century Gothic", "Segoe UI", sans-serif;
  color: var(--kw-text) !important;
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
}

.kw-logo-main {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 1px;
}

.kw-logo-sub {
  font-size: 15px;
  margin-left: 2px;
}

.kw-logo-sm .kw-logo-main { font-size: 20px; }
.kw-logo-sm .kw-logo-sub { font-size: 12px; }

/* Page body */
.kw-main {
  flex: 1;
  position: relative;
  padding: 22px 16px;
}

/* Main menu tiles: 5 per row, filled right-to-left */
.kw-tiles {
  display: grid;
  grid-template-columns: repeat(5, 126px);
  gap: 8px;
  width: max-content;
  margin-right: max(16px, calc(50% - 390px));
  position: relative;
  z-index: 1;
}

.kw-tile {
  display: flex;
  flex-direction: column;
  height: 94px;
  border: 1px solid var(--kw-border);
  border-radius: 4px;
  background: var(--kw-card);
  color: var(--kw-icon);
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}

.kw-tile:hover {
  border-color: var(--kw-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  color: var(--kw-accent);
}

.kw-tile-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kw-tile-icon svg {
  width: 44px;
  height: 44px;
}

.kw-tile-title {
  background: var(--kw-surface);
  color: var(--kw-text);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  padding: 5px 2px;
  white-space: nowrap;
}

/* Decorative gear/clock in the bottom-left corner */
.kw-bg-gear {
  position: fixed;
  left: -30px;
  bottom: 20px;
  width: 260px;
  height: 260px;
  color: #ececec;
  z-index: 0;
  pointer-events: none;
}

/* Footer */
.kw-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--kw-sunk);
  border-top: 1px solid var(--kw-line);
  padding: 6px 140px;
  font-size: 11px;
  color: var(--kw-text);
  position: relative;
  z-index: 1;
}

.kw-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kw-version {
  font-size: 10px;
  color: var(--kw-muted);
}

@media (max-width: 720px) {
  .kw-tiles {
    grid-template-columns: repeat(2, 1fr);
    width: auto;
    margin: 0;
  }

  .kw-footer {
    padding: 6px 16px;
  }
}

/* ---------- Personnel form (Employee) ---------- */
.kw-page {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* An open window (modal) inside a page box with z-index would sit behind the backdrop: drop the boxes' z-index meanwhile. */
body.modal-open :has(.modal.show) {
  z-index: auto !important;
}

.kw-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-page-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--kw-ink-text);
  margin: 0;
}

.kw-nav-tools {
  display: flex;
  align-items: center;
  gap: 40px;
}

.kw-count {
  font-size: 12px;
  color: var(--kw-text);
}

.kw-nav-tools .btn,
.kw-sort {
  font-size: 12px;
  border-color: var(--kw-line-strong);
}

.kw-nav-btn {
  font-size: 16px !important;
  line-height: 1;
  padding: 3px 10px;
}

.kw-sort {
  width: auto;
  border-radius: 0;
}

.kw-alert,
.kw-validation {
  font-size: 12px;
  margin: 6px 0 0;
}

.kw-validation ul {
  margin: 0;
}

/* Tabs: small blue links, active tab boxed */
.kw-tabs {
  gap: 4px;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-tabs .nav-link {
  font-size: 11.5px;
  color: #1d5fa8;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 3px;
}

.kw-tabs .nav-link.active {
  border: 2px solid #2b3a4a;
  background: var(--kw-accent-soft);
}

.tab-content {
  padding-top: 8px;
}

/* Label/field grid: label, field, label, field */
.kw-grid {
  display: grid;
  grid-template-columns: 110px 132px 110px 132px;
  gap: 6px 10px;
  align-items: center;
  padding: 3px 4px;
}

.kw-grid-wide {
  grid-template-columns: 150px 50px 130px 108px;
  column-gap: 60px;
}

.kw-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--kw-ink-text);
  white-space: nowrap;
}

.kw-in,
.kw-in-sm {
  font-size: 11.5px;
  height: 26px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.kw-in[readonly] {
  background: var(--kw-sunk);
}

.kw-span3 {
  grid-column: span 3;
  max-width: 182px;
}

.kw-time {
  width: 50px;
  height: 22px;
  font-size: 11px;
  padding: 1px 3px;
  text-align: center;
  direction: ltr;
  background: var(--kw-row-hover);
  border-color: var(--kw-line);
}

.kw-sep {
  margin: 6px 0;
  color: #bbb;
}

.kw-basic {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.kw-picker,
.kw-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.kw-date {
  gap: 0;
}

.kw-date .kw-in {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.kw-cal-btn {
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-color: var(--kw-line-strong);
}

.kw-icon-btn {
  height: 26px;
  padding: 0 7px;
  border-color: var(--kw-line-strong);
  line-height: 1;
}

.kw-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-left: 60px;
}

.kw-photo-frame {
  width: 130px;
  height: 158px;
  border: 1px solid var(--kw-line);
  padding: 3px;
  background: var(--kw-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kw-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kw-photo-empty {
  color: #aaa;
  font-size: 12px;
}

.kw-btn {
  font-size: 11.5px;
  border: 1px solid var(--kw-line-strong);
  background: var(--kw-card);
  color: var(--kw-ink-text);
}

.kw-btn-save {
  font-size: 11.5px;
  min-width: 44px;
}

.kw-check {
  font-size: 11.5px;
  font-weight: 600;
  padding-right: 1.6em;
}

.kw-check .form-check-input {
  margin-right: -1.6em;
  float: right;
}

.kw-group-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  padding: 4px;
}

.kw-group-row .kw-lbl:not(:first-child) {
  margin-right: 70px;
}

.kw-link-text {
  color: #1d5fa8;
  font-size: 11px;
}

.kw-actions {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 20px;
}

.kw-actions > div {
  display: flex;
  gap: 4px;
}

/* Tab 2 */
.kw-section-head {
  background: var(--kw-sunk);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--kw-ink-text);
  padding: 5px 8px;
  margin: 6px 0;
}

.kw-extra-personal {
  display: flex;
  gap: 30px;
}

.kw-address {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex: 1;
  padding-top: 3px;
}

.kw-address textarea {
  max-width: 210px;
  font-size: 11.5px;
}

.kw-two-heads,
.kw-food {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kw-food .kw-check {
  margin-bottom: 4px;
  font-weight: 400;
}

.kw-radios {
  font-size: 11.5px;
  padding: 2px 6px;
}

.kw-radios .form-check-inline {
  margin-left: 12px;
  margin-right: 0;
  padding-right: 1.5em;
  padding-left: 0;
}

.kw-radios .form-check-input {
  float: right;
  margin-right: -1.5em;
}

/* Tab 3 */
.kw-over-top {
  display: grid;
  grid-template-columns: auto 56px auto 56px auto 56px;
  gap: 6px 14px;
  align-items: center;
  justify-content: start;
  padding: 4px;
}

.kw-over-table {
  margin: 4px;
  font-size: 11.5px;
}

.kw-over-table th {
  font-weight: 600;
  text-align: center;
  padding: 2px 6px;
  white-space: nowrap;
}

.kw-over-table tbody th {
  text-align: right;
}

.kw-over-table td {
  padding: 2px 6px;
}

.kw-spec-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--kw-ink-text);
  margin: 8px 0;
}

.kw-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.kw-spec-table th,
.kw-spec-table td {
  border: 1px solid var(--kw-line);
  padding: 0;
}

.kw-spec-table thead th {
  background: var(--kw-sunk);
  font-weight: 600;
  text-align: center;
  padding: 3px 2px;
}

.kw-spec-table tbody th {
  font-weight: 400;
  padding: 2px 6px;
  white-space: nowrap;
}

.kw-spec-in {
  width: 100%;
  min-width: 52px;
  border: 0;
  padding: 3px 4px;
  font-size: 11px;
  text-align: center;
  background: transparent;
}

.kw-spec-in:focus {
  outline: 1px solid #4a6fa5;
  background: var(--kw-row-hover);
}

/* Pickers and search */
.kw-pick-item {
  display: block;
  width: 100%;
  text-align: right;
  border: 0;
  background: none;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 3px;
}

.kw-pick-item:hover {
  background: var(--kw-accent-soft);
  color: #0d5bb5;
}

.kw-search-table {
  font-size: 12px;
}

/* Persian date picker popup */
.kw-dp {
  position: absolute;
  z-index: 2000;
  width: 220px;
  background: var(--kw-card);
  border: 1px solid var(--kw-line-strong);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  padding: 6px;
  font-size: 12px;
  direction: rtl;
}

.kw-dp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 4px;
}

.kw-dp button {
  border: 0;
  background: none;
  border-radius: 3px;
  padding: 2px 0;
}

.kw-dp-head button {
  font-size: 16px;
  padding: 0 8px;
}

.kw-dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.kw-dp-grid b {
  font-weight: 600;
  color: var(--kw-muted);
}

.kw-dp-grid button:hover,
.kw-dp-foot button:hover {
  background: var(--kw-accent-soft);
}

.kw-dp-grid button.sel {
  background: #4a6fa5;
  color: #fff;
}

.kw-dp-foot {
  text-align: center;
  margin-top: 4px;
}

.kw-dp-foot button {
  padding: 2px 10px;
  color: #1d5fa8;
}

/* Selected date line, clickable month / year titles, month and year lists, today and Fridays. */
.kw-dp { width: 250px; }
.kw-dp-top {
  text-align: center;
  font-weight: 600;
  color: #34495e;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--kw-line);
}
.kw-dp-head button { font-size: 14px; padding: 0 6px; border: 1px solid var(--kw-line); }
.kw-dp-head .kw-dp-title { border: 0; font-size: 13px; font-weight: 600; padding: 1px 4px; }
.kw-dp-head .kw-dp-title:hover,
.kw-dp-list button:hover { background: var(--kw-accent-soft); }
.kw-dp-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  text-align: center;
}
.kw-dp-list button { padding: 8px 0; }
.kw-dp-list button.sel { background: #4a6fa5; color: #fff; }
.kw-dp-grid b.fri,
.kw-dp-grid button.fri { color: #c62828; }
.kw-dp-grid button.today { outline: 1px solid #4a6fa5; }
.kw-dp-grid button.sel.fri { color: #fff; }

.kw-lbl-wrap {
  white-space: normal;
}

/* ---------- Personnel list ---------- */
.kw-list-page {
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.kw-list-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--kw-ink-text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--kw-line);
  margin-bottom: 10px;
}

.kw-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: rgba(255, 255, 255, .85);
}

.kw-list-table th,
.kw-list-table td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--kw-line);
  white-space: nowrap;
}

.kw-list-table thead tr:last-child th {
  background: var(--kw-sunk);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--kw-line);
}

.kw-list-filters th {
  border: 0 !important;
  padding: 0 4px 8px;
}

.kw-list-filters .form-control,
.kw-list-filters .form-select {
  font-size: 12px;
  height: 30px;
}

.kw-list-table tbody tr {
  cursor: pointer;
}

.kw-list-table tbody tr:hover {
  background: var(--kw-row-hover);
}

.kw-list-table .kw-rownum,
.kw-list-table .kw-empno {
  color: #1d5fa8;
  text-align: center;
}

.kw-list-table td:nth-child(3) {
  text-align: right;
}

.kw-list-table td:nth-child(n+4) {
  text-align: center;
}

.kw-list-empty {
  text-align: center;
  color: var(--kw-muted);
  padding: 20px;
}

/* ---------- Employee authentication method ---------- */
.kw-auth-table tbody tr {
  cursor: default;
}

.kw-auth-table td {
  padding: 2px 4px;
}

.kw-auth-table .form-select,
.kw-auth-table .form-control {
  font-size: 12px;
  height: 24px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.kw-auth-sel {
  min-width: 250px;
}

.kw-role-sel {
  min-width: 90px;
}

.kw-pass-in {
  width: 92px;
  margin: 0 auto;
}

.kw-dev-btn {
  font-size: 11px;
  padding: 0 10px;
  line-height: 20px;
}

.kw-emp-link {
  color: #1d5fa8;
  text-decoration: none;
}

.kw-emp-link:hover {
  text-decoration: underline;
}

.kw-sec-filter {
  height: 30px;
  min-width: 94px;
}

.kw-noserial {
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

.kw-saved {
  outline: 2px solid #2e9e5b;
}

.kw-save-err {
  outline: 2px solid #c0392b;
}

.kw-dev-body {
  font-size: 12px;
}

/* ---------- Overtime limits ---------- */
.kw-over-limits tbody tr {
  cursor: default;
}

.kw-over-groups th {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--kw-line);
  padding-bottom: 8px;
}

.kw-over-groups th:not(.kw-filter-cell) {
  border-right: 1px solid var(--kw-line);
}

.kw-over-limits .kw-filter-cell {
  padding: 0 4px 8px;
}

.kw-over-limits .kw-filter-cell .form-control {
  font-size: 12px;
  height: 30px;
}

.kw-over-limits td:nth-child(n+4):nth-child(-n+5) {
  text-align: right;
}

.kw-cell-time {
  font-weight: 400;
  color: var(--kw-ink-text);
  width: 58px;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  direction: ltr;
  font-size: 12px;
  padding: 1px 2px;
  border-radius: 2px;
}

.kw-cell-time:hover {
  border-color: var(--kw-line);
  background: var(--kw-card);
}

.kw-cell-time:focus {
  outline: none;
  border-color: #4a6fa5;
  background: var(--kw-row-hover);
}

/* ---------- Bulk-edit employee grids (FixKar / Nbat / Jobran) ---------- */
.kw-field-grid tbody tr {
  cursor: default;
}

.kw-field-grid-narrow {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
}

.kw-field-grid td {
  padding: 1px 6px;
}

.kw-field-grid td:nth-child(3) {
  text-align: right;
}

.kw-field-grid .kw-value-cell {
  background: var(--kw-row-hover);
  padding: 0;
  min-width: 180px;
}

.kw-value-sel {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  font-size: 12px;
  height: 22px;
  padding-top: 0;
  padding-bottom: 0;
  color: var(--kw-ink-text);
}

.kw-value-sel:focus {
  box-shadow: none;
  background-color: var(--kw-row-hover);
}

.kw-value-filter {
  font-size: 12px;
  height: 30px;
  width: auto;
  min-width: 100px;
}

.kw-undo-btn {
  font-size: 11px;
  padding: 0 8px;
  line-height: 18px;
}

.kw-tabs-boxed {
  margin-bottom: 12px;
}

/* ---------- Termination (قطع کار پرسنل) ---------- */
.kw-cut-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-top: 8px;
}

.kw-cut-info {
  display: grid;
  grid-template-columns: 160px 320px;
  row-gap: 6px;
  margin: 0;
  font-size: 12px;
}

.kw-cut-info dt {
  font-weight: 400;
  color: var(--kw-text);
  padding-top: 3px;
}

.kw-cut-info dd {
  margin: 0;
  min-height: 22px;
  padding-top: 3px;
  color: var(--kw-ink-text);
}

.kw-cut-info textarea,
.kw-cut-date .kw-in {
  font-size: 12px;
}

.kw-cut-date .kw-in {
  width: 130px;
  flex: 0 0 auto;
}

.kw-cut-page .kw-photo-frame {
  cursor: default;
}

.kw-cut-history {
  margin-top: 16px;
  max-width: 640px;
}

.kw-cut-history-title {
  background: var(--kw-sunk);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  margin-bottom: 4px;
}

.kw-form-actions {
  display: flex;
  gap: 4px;
  padding: 14px 0 20px;
}

.kw-btn-main {
  font-size: 11.5px;
  min-width: 80px;
}

/* ---------- Editable date grids (تاریخ پایان استخدام و کاربری) ---------- */
.kw-date-grid {
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
}

.kw-date-grid tbody tr {
  cursor: default;
}

.kw-date-grid td {
  padding: 1px 6px;
}

.kw-date-grid td:nth-child(3) {
  text-align: right;
}

.kw-date-grid .kw-date-cell {
  background: var(--kw-row-hover);
  padding: 0 4px;
  width: 170px;
}

.kw-date-cell .kw-date {
  justify-content: center;
  gap: 4px;
}

.kw-cell-date {
  width: 96px;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  font-size: 12px;
  padding: 1px 2px;
  border-radius: 2px;
}

.kw-cell-date:hover {
  border-color: var(--kw-line);
  background: var(--kw-card);
}

.kw-cell-date:focus {
  outline: none;
  border-color: #4a6fa5;
  background: var(--kw-row-hover);
}

.kw-cell-cal {
  border: 0;
  background: transparent;
  color: #8a6d3b;
  height: 20px;
  padding: 0 3px;
}

/* ---------- Reports activity (پرسنل فعال در گزارشات) ---------- */
.kw-quick-filters {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.kw-quick-filters .kw-btn.active {
  background: var(--kw-row-hover);
  border-color: #d9b94a;
}

/* ---------- Floating compensation tabs (اصلاح گروهی مدت شناوری) ---------- */
.kw-jobran-grid tbody tr {
  cursor: default;
}

.kw-jobran-grid td {
  padding: 1px 6px;
}

.kw-jobran-grid td:nth-child(3) {
  text-align: right;
}

.kw-jobran-grid .kw-jobran-cell {
  background: var(--kw-row-hover);
  padding: 0 4px;
  width: 110px;
}

.kw-jobran-grid .kw-cell-time {
  width: 70px;
}

.kw-jobran-grid .kw-cell-time.kw-dirty {
  background: var(--kw-row-hover);
  border-color: #d9b94a;
}

.kw-jobran-group {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid var(--kw-line);
  vertical-align: bottom;
}

.kw-jobran-all-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
  align-items: center;
  font-size: 12px;
}

.kw-selected td {
  background: var(--kw-row-hover) !important;
}

/* ---------- Invite to work (دعوت به کار پرسنل) ---------- */
.kw-invite-list {
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.kw-invite-table tbody tr {
  cursor: pointer;
}

.kw-invite-table td:nth-child(3),
.kw-invite-table td:nth-child(6) {
  text-align: right;
}

.kw-invite-panel {
  width: 480px;
  max-width: 100%;
  margin: 16px auto 20px;
  border: 1px solid var(--kw-line);
  border-radius: 3px;
}

.kw-invite-body {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
}

.kw-invite-info {
  flex: 1;
  display: grid;
  grid-template-columns: 120px 1fr;
  margin: 0;
  font-size: 11.5px;
}

.kw-invite-info dt,
.kw-invite-info dd {
  margin: 0;
  padding: 2px 0;
  border-top: 1px solid var(--kw-line);
  min-height: 20px;
}

.kw-invite-info dt {
  font-weight: 400;
  color: var(--kw-ink-text);
}

.kw-invite-photo {
  width: 150px;
  height: 145px;
  background: var(--kw-sunk);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.kw-invite-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kw-invite-photo svg {
  width: 120px;
  height: 120px;
}

.kw-invite-foot {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--kw-sunk);
  border-top: 1px solid var(--kw-line);
}

.kw-x {
  color: #c0392b;
}

.kw-ok {
  color: #2e9e5b;
}

/* ---------- Notifications (اطلاعیه ها) ---------- */
.kw-notif-body {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.kw-notif-form {
  flex: 1;
  max-width: 460px;
  font-size: 12px;
}

.kw-notif-grid {
  display: grid;
  grid-template-columns: 80px 150px 50px 150px;
  gap: 6px 8px;
  align-items: center;
}

.kw-notif-grid .kw-span3 {
  max-width: none;
}

.kw-span2 {
  grid-column: span 2;
}

.kw-notif-all {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kw-notif-emps {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kw-notif-attach {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.kw-notif-content {
  min-height: 220px;
}

.kw-notif-list {
  width: 440px;
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  min-height: 280px;
  max-height: 520px;
  overflow-y: auto;
}

.kw-notif-list-title {
  background: var(--kw-sunk);
  border-bottom: 1px solid var(--kw-line);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 10px;
}

.kw-notif-list table {
  margin: 6px;
  width: calc(100% - 12px);
  font-size: 11px;
  table-layout: fixed;
}

.kw-notif-list tbody tr {
  cursor: pointer;
}

.kw-notif-list td:nth-child(3) {
  text-align: right;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Monthly specs (EmpYearSpec) ---------- */
.kw-yspec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.kw-yspec-years {
  display: flex;
  gap: 14px;
  font-size: 12px;
  margin-bottom: 10px;
}

.kw-yspec-years input {
  vertical-align: middle;
}

.kw-yspec-box {
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  padding: 4px;
  overflow-x: auto;
}

.kw-yspec-grid td {
  padding: 1px 4px;
}

.kw-yspec-grid td:nth-child(3),
.kw-yspec-grid td:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}

.kw-yspec-grid .kw-yspec-cell {
  background: var(--kw-row-hover);
  padding: 0 2px;
}

.kw-yspec-grid .kw-cell-time {
  width: 56px;
}

.kw-cell-time.kw-dirty {
  background: var(--kw-row-hover);
  border-color: #d9b94a;
}

.kw-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 2px;
  font-size: 12px;
}

.kw-pager-count {
  margin-left: auto;
}

.kw-pager-go {
  width: 50px;
  text-align: center;
}

.kw-notif-list td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Monthly traffic (تردد ماهیانه) ---------- */
.kw-tradod-page {
  max-width: 1100px;
}

.kw-tradod-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.kw-tradod-emp {
  color: #1d5fa8;
  font-size: 17px;
  font-weight: 600;
}

.kw-tradod-sub {
  font-size: 11.5px;
  color: var(--kw-text);
}

.kw-tradod-month {
  display: flex;
  gap: 4px;
  align-items: center;
}

.kw-tradod-month .btn {
  height: 26px;
  padding: 0 7px;
  line-height: 24px;
}

.kw-tradod-month select {
  width: 100px;
  height: 26px;
  font-size: 12px;
  padding-top: 0;
  padding-bottom: 0;
}

.kw-tradod-month input {
  width: 58px;
  height: 26px;
  font-size: 12px;
  text-align: center;
}

.kw-tradod-box {
  border: 1px solid var(--kw-line);
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.kw-tradod-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  background: var(--kw-card);
}

.kw-tradod-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--kw-sunk);
  font-weight: 600;
  text-align: center;
  padding: 3px 2px;
  border: 1px solid var(--kw-line);
}

.kw-tradod-grid td {
  border: 1px solid var(--kw-line);
  padding: 0;
  text-align: center;
  height: 22px;
}

.kw-tradod-grid tbody tr:nth-child(even) td.kw-td-slot {
  background: var(--kw-sunk);
}

.kw-tradod-grid .kw-td-date {
  width: 118px;
  background: var(--kw-row-hover) !important;
  text-align: right;
  padding: 0 6px;
  white-space: nowrap;
}

.kw-tradod-grid th.kw-td-date,
.kw-tradod-grid th.kw-td-shift,
.kw-tradod-grid th.kw-td-group {
  background: var(--kw-sunk) !important;
}

.kw-tradod-grid .kw-friday {
  color: #d01c1c;
}

.kw-tradod-grid .kw-td-shift,
.kw-tradod-grid .kw-td-group {
  width: 100px;
  background: var(--kw-row-hover);
  font-weight: 600;
}

.kw-tradod-grid .kw-td-group {
  width: 80px;
}

.kw-tradod-grid tr.kw-today td {
  background: var(--kw-row-hover) !important;
}

.kw-tradod-grid tr.kw-row-dirty .kw-td-date {
  background: #ffe08a !important;
}

.kw-slot {
  width: 100%;
  min-width: 46px;
  height: 21px;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
}

.kw-slot:focus {
  outline: none;
  border-color: #1d5fa8;
  background: var(--kw-card);
}

.kw-tradod-grid td.kw-odd {
  background: var(--kw-bad-soft) !important;
}

.kw-k-normal { color: #111; }
.kw-k-prev { color: #8b4513; }
.kw-k-leave { color: #d01c1c; }
.kw-k-mission { color: #1a5fd0; }
.kw-k-overtime { color: #e0559b; }
.kw-k-unauth { color: #8e44ad; }
.kw-k-excuse { color: #1e8449; }
.kw-k-other { color: #d35400; }

.kw-tradod-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 20px;
}

.kw-ctx {
  position: absolute;
  z-index: 1080;
  min-width: 170px;
  background: var(--kw-card);
  border: 1px solid var(--kw-line-strong);
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  padding: 4px 0;
  font-size: 11.5px;
}

.kw-ctx-head {
  text-align: center;
  color: var(--kw-text);
  padding: 3px 8px 5px;
  border-bottom: 1px solid var(--kw-line);
  margin-bottom: 3px;
}

.kw-ctx-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: right;
  padding: 3px 14px;
  font-weight: 600;
  white-space: nowrap;
}

.kw-ctx-item:hover {
  background: var(--kw-accent-soft);
}

.kw-ctx-item.kw-ctx-on::before {
  content: "\2714  ";
}

.kw-ctx-sep {
  border-top: 1px solid var(--kw-line);
  margin: 4px 0;
}

.kw-ctx-revert {
  color: #d01c1c;
}

.kw-help {
  font-size: 12px;
  font-weight: 600;
}

.kw-help p {
  font-weight: 400;
}

.kw-help-swatch {
  display: inline-block;
  width: 14px;
  height: 12px;
  vertical-align: middle;
  border: 1px solid var(--kw-line);
}

.kw-help-dirty { background: #ffe08a; }
.kw-help-odd { background: var(--kw-bad-soft); }

.kw-td-off {
  color: #d01c1c;
}

.kw-tradod-grid .kw-td-shift.kw-td-off {
  font-size: 10.5px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Traffic on one day (اصلاح تردد در یک روز) ---------- */
.kw-tradod-day .kw-td-name {
  text-align: right;
  padding: 0 6px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kw-tradod-day .kw-list-filters th {
  background: var(--kw-card);
  border: 0;
  padding: 3px 2px 5px;
  position: static;
}

.kw-tradod-day tbody td:nth-child(-n+3) {
  background: var(--kw-card);
}

.kw-tradod-day .kw-date .kw-in {
  width: 100px;
}

/* ---------- Permits (Mor_Mam) ---------- */
.kw-mm-page {
  max-width: 760px;
}

.kw-panel {
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  background: var(--kw-card);
}

.kw-panel-body {
  padding: 12px 16px;
}

.kw-panel-foot {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  background: var(--kw-sunk);
  border-top: 1px solid var(--kw-line);
}

.kw-panel-title {
  background: var(--kw-sunk);
  border-bottom: 1px solid var(--kw-line);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 12px;
}

.kw-mm-grid {
  display: grid;
  grid-template-columns: 110px 190px 50px 1fr;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
}

.kw-mm-grid .kw-span3 {
  max-width: none;
}

.kw-mm-grid .kw-date .kw-in {
  width: 150px;
}

.kw-mm-days {
  font-size: 12px;
  white-space: nowrap;
}

.kw-mm-list {
  max-height: 300px;
  min-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.kw-mm-list tbody tr,
.kw-kardex-list tbody tr {
  cursor: pointer;
}

.kw-mm-group {
  max-width: 600px;
  margin: 0 auto;
}

.kw-mm-note {
  font-size: 11.5px;
  margin-bottom: 10px;
}

.kw-mm-grid-group {
  grid-template-columns: 70px 180px 60px 1fr;
}

.kw-mm-emps {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.kw-mm-skip {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kw-kardex {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

.kw-kardex-kinds {
  display: flex;
  gap: 16px;
  font-weight: 400;
  font-size: 12px;
}

.kw-kardex-list {
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}

.kw-kardex-head {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
}

.kw-kardex-start {
  font-size: 11px;
  color: #8a6d3b;
  margin-left: 16px;
}

/* ---------- Opening balance / leave adjustments ---------- */
.kw-esteh-page {
  max-width: 900px;
  margin: 0 auto;
}

.kw-esteh-grid td:nth-child(3),
.kw-esteh-grid td:nth-child(4) {
  text-align: right;
}

.kw-esteh-grid .kw-cell-time {
  width: 110px;
}

.kw-esteh-grid th .form-select,
.kw-esteh-grid th .form-control {
  font-size: 11.5px;
}

.kw-esteh-foot {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 4px;
  border-top: 1px solid var(--kw-line);
  margin-top: 10px;
}

.kw-esteh-hint {
  font-size: 11px;
  color: var(--kw-muted);
  padding-bottom: 20px;
}

.kw-adjust-page {
  max-width: 800px;
}

.kw-adjust-grid {
  grid-template-columns: 120px 190px 60px 1fr;
  margin: 12px 0;
}

.kw-gift-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 16px;
}

.kw-gift-line .form-select {
  width: auto;
}

.kw-gift-amount {
  width: 70px;
}

.kw-gift-babat {
  width: 200px;
}

.kw-tradod-page .kw-tradod-month .kw-date .kw-in {
  width: 100px;
}

.kw-kardex-list td:last-child {
  white-space: normal;
  max-width: 160px;
}

.kw-kardex-list th,
.kw-kardex-list td {
  padding: 3px 4px;
}

/* ---------- Entry grids (overtime sheets, hourly permit fix) ---------- */
.kw-overs-page,
.kw-hourly-page {
  max-width: 900px;
}

.kw-entry-grid td {
  padding: 0 3px;
  height: 24px;
}

.kw-entry-grid td:nth-child(4) {
  text-align: right;
  min-width: 150px;
}

.kw-cell-in,
.kw-cell-sel {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  text-align: center;
  padding: 1px 2px;
  height: 22px;
}

.kw-cell-in:hover,
.kw-cell-sel:hover {
  border-color: var(--kw-line);
  background: var(--kw-card);
}

.kw-cell-in:focus,
.kw-cell-sel:focus {
  outline: none;
  border-color: #4a6fa5;
  background: var(--kw-row-hover);
}

.kw-cell-date-wrap {
  gap: 2px;
}

.kw-cell-date-wrap .kw-cell-in {
  min-width: 90px;
}

.kw-row-search {
  height: 20px;
  width: 22px;
  padding: 0;
  line-height: 1;
}

.kw-overs-grid {
  display: grid;
  grid-template-columns: 70px 170px 60px 170px auto auto;
  gap: 8px 10px;
  align-items: center;
  font-size: 12px;
  margin-top: 12px;
}

.kw-overs-time {
  width: 80px;
  text-align: center;
}

.kw-emp-count {
  font-size: 12px;
}

/* ---------- Absent report / justified delay ---------- */
.kw-absent-page {
  max-width: 900px;
}

.kw-absent-line,
.kw-absent-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.kw-absent-checks {
  gap: 40px;
  font-weight: 400;
}

.kw-absent-line .form-select {
  width: 100px;
}

.kw-absent-year {
  width: 64px;
  text-align: center;
}

.kw-absent-days {
  white-space: normal !important;
  text-align: right;
  font-size: 11px;
}

.kw-section-title {
  font-weight: 600;
  font-size: 13px;
  margin: 6px 0 10px;
}

.kw-delay-time {
  width: 80px;
  text-align: center;
}

.kw-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kw-service {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 12px;
  min-width: 110px;
}

@media print {
  .navbar, .kw-footer, footer, form.kw-panel { display: none !important; }
}

/* ---------- Report forms (KaraReports) ---------- */
.kw-rep-page {
  max-width: 900px;
}

.kw-rep-form {
  max-width: 440px;
  margin: 0 auto;
}

.kw-rep-box {
  margin-bottom: 12px;
}

.kw-rep-period {
  display: grid;
  grid-template-columns: 70px 120px 70px auto;
  gap: 8px 10px;
  align-items: center;
  font-size: 12px;
}

.kw-rep-period .kw-date {
  grid-column: span 1;
}

.kw-rep-period .kw-date .kw-in {
  width: 100px;
}

.kw-rep-year {
  width: 64px;
  text-align: center;
}

.kw-rep-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 12px;
}

.kw-rep-checks-1 {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.kw-rep-checks label,
.kw-rep-col label,
.kw-rep-type label,
.kw-rep-check-line,
.kw-item-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.kw-rep-red {
  color: #c00;
  font-size: 11.5px;
}

.kw-rep-cols {
  display: flex;
  gap: 16px;
}

.kw-rep-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kw-rep-head {
  background: var(--kw-sunk);
  font-weight: 600;
  font-size: 12px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

.kw-rep-check-line {
  margin-top: 12px;
}

.kw-rep-type {
  display: flex;
  gap: 16px;
  align-items: center;
}

.kw-rep-people {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.kw-rep-items-btn {
  margin-right: auto;
}

.kw-item-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-bottom: 10px;
}

.kw-rep-actions {
  justify-content: flex-start;
}

/* ---------- Report viewer ---------- */
.kw-rview-head {
  display: flex;
  align-items: center;
}

.kw-rview-back {
  margin-right: auto;
  font-size: 22px;
  color: var(--kw-ink-text);
  text-decoration: none;
}

.kw-rtool {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--kw-sunk);
  border: 1px solid var(--kw-line);
  padding: 3px 8px;
  font-size: 12px;
  direction: ltr;
  margin-bottom: 12px;
}

.kw-rtool-btn {
  border: 0;
  background: none;
  font-size: 12px;
  padding: 2px 6px;
}

.kw-rtool-btn:hover {
  background: #d6d6d6;
}

/* «ذخیره» dropdown (PDF / Excel). */
.kw-rsave {
  position: relative;
  display: inline-block;
}

.kw-rsave-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  background: var(--kw-card);
  border: 1px solid var(--kw-line-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  display: flex;
  flex-direction: column;
  min-width: 70px;
}

.kw-rsave-menu .kw-rtool-btn {
  text-align: right;
  padding: 5px 12px;
}

.kw-rtool-sep {
  width: 1px;
  height: 18px;
  background: #bbb;
}

.kw-rtool-page {
  width: 50px;
  font-size: 12px;
  padding: 0 4px;
}

.kw-rtool-zoom {
  font-size: 12px;
}

.kw-rpages {
  overflow-x: auto;
}

.kw-rpage {
  display: none;
  background: var(--kw-card);
  border: 1px solid #999;
  padding: 10px;
  margin: 0 auto 12px;
  width: max-content;
  min-width: 190mm;
  min-height: 250mm;
  font-size: 11px;
}

.kw-landscape .kw-rpage {
  min-width: 277mm;
  min-height: 180mm;
}

.kw-rpage-on {
  display: block;
}

.kw-rhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.kw-rhead-title {
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.kw-rhead-sub {
  margin-top: 6px;
}

.kw-rhead-date {
  order: 3;
  font-size: 12px;
  line-height: 2;
}

.kw-rhead-logo {
  order: -1;
  font: 900 34px/1 Impact, sans-serif;
  min-width: 100px;
}

.kw-rhead-logo img {
  max-height: 60px;
  max-width: 120px;
}

.kw-remp {
  display: flex;
  gap: 30px;
  font-size: 12px;
  margin-bottom: 6px;
}

.kw-rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.kw-rtable th,
.kw-rtable td {
  border: 1px solid #666;
  padding: 2px 3px;
  text-align: center;
  white-space: nowrap;
}

.kw-rtable th {
  background: var(--kw-sunk);
  font-weight: 600;
  vertical-align: middle;
}

/* Grouped two-row header: the top row holds the group names spanning their columns. */
.kw-rtable-grouped thead th.kw-rgroup {
  background: var(--kw-sunk);
}

.kw-rsummary th {
  white-space: normal;
  min-width: 34px;
}

.kw-rtable tfoot td,
.kw-rsubtotal td {
  background: var(--kw-sunk);
  font-weight: 600;
}

.kw-rsub {
  font-weight: 400;
  font-size: 9px;
  color: var(--kw-text);
}

.kw-rdate {
  text-align: right !important;
}

.kw-rname {
  text-align: right !important;
}

/* Uniform compact width for the numeric (کارکرد/اضافه/کسورات …) and in-out columns. */
.kw-rtime,
.kw-rnum {
  direction: ltr;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
}

/* Let the second header row (column titles) wrap at spaces (two-word titles) but keep single words
   like «شبکاری» on one line — no mid-word break. */
.kw-rtable-grouped thead tr:nth-child(2) th {
  white-space: normal;
}

.kw-rnotes {
  min-width: 110px;
}

.kw-rholiday td {
  background: var(--kw-sunk);
}

.kw-rbad {
  color: #c00;
}

.kw-rgroup td {
  background: #dde6f0;
  font-weight: 600;
  text-align: right !important;
}

.kw-rsum {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid #666;
  margin-top: 8px;
}

.kw-rsum-col {
  border-left: 1px solid #666;
  min-height: 150px;
}

.kw-rsum-head {
  background: var(--kw-sunk);
  border-bottom: 1px solid #666;
  text-align: center;
  font-weight: 600;
  padding: 2px;
}

.kw-rsum-row {
  display: flex;
  justify-content: space-between;
  padding: 1px 6px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-rsum-row b {
  direction: ltr;
}

@media print {
  .kw-rtool, .kw-rview-head { display: none !important; }
  .kw-rpages { zoom: 1 !important; overflow: visible; }
  .kw-rpage { display: block !important; border: 0; margin: 0; padding: 0; width: auto; min-height: 0; page-break-after: always; }
  .kw-rpage:last-child { page-break-after: auto; }
  .kw-rtable th, .kw-rholiday td, .kw-rgroup td, .kw-rsum-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- One-day report forms / table report ---------- */
.kw-rep-day {
  display: grid;
  grid-template-columns: 50px 150px 50px 1fr;
}

.kw-rep-time {
  width: 64px;
  text-align: center;
}

.kw-rstriped tbody tr:nth-child(even):not(.kw-rgroup):not(.kw-rsubtotal) td {
  background: var(--kw-sunk);
}

/* Mega menu flyout submenu (opens to the left of its item) */
.kw-sub {
  position: relative;
}

.kw-sub-menu {
  display: none;
  position: absolute;
  top: 0;
  right: 100%;
  min-width: 190px;
  background: var(--kw-card);
  border: 1px solid var(--kw-line);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
  padding: 4px 0;
  z-index: 1100;
}

.kw-sub:hover > .kw-sub-menu {
  display: block;
}

/* ---------- Presence grid ---------- */
.kw-rep-form-wide {
  max-width: 520px;
}

.kw-rep-checks-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.kw-rpresence td,
.kw-rpresence th {
  padding: 2px 1px;
  min-width: 18px;
}

.kw-pc {
  font-weight: 600;
  line-height: 1.1;
}

.kw-pc-absent {
  color: #c00;
}

.kw-pc-holiday {
  background: var(--kw-sunk);
}

.kw-pc-mission {
  color: #1d5fa8;
}

.kw-pc-leave {
  color: #2d7a3a;
}

.kw-pc-incomplete {
  color: #b36b00;
}

.kw-pc-times {
  font-weight: 400;
  font-size: 8.5px;
  white-space: pre-line;
  direction: ltr;
  color: var(--kw-ink-text);
}

.kw-pc-legend {
  font-size: 11px;
  margin-top: 6px;
}

/* ---------- Leave balance form ---------- */
.kw-remain-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.kw-remain-line .kw-date .kw-in {
  width: 100px;
}

/* ---------- User activity (ثبت نشان‌ها) ---------- */
.kw-activity-page {
  max-width: 1000px;
}

.kw-act-table {
  font-size: 11px;
}

.kw-act-table .kw-date .kw-in {
  width: 90px;
}

.kw-act-title {
  text-align: right;
  white-space: normal !important;
}

.kw-act-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 8px;
}

.kw-act-pager {
  display: flex;
  gap: 2px;
}

.kw-act-pager a {
  border: 1px solid var(--kw-line);
  padding: 2px 9px;
  text-decoration: none;
  color: #1d5fa8;
}

.kw-act-pager a.active {
  background: #1d5fa8;
  color: #fff;
}

.kw-act-config {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  font-size: 13px;
}

.kw-act-config > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.kw-act-head {
  font-weight: 700;
}

.kw-act-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 22px;
}

.kw-act-num {
  width: 90px;
  text-align: center;
}

.kw-act-config .btn {
  align-self: flex-start;
}

.kw-act-chart {
  margin-top: 16px;
  max-width: 760px;
}

.kw-act-chart-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 10px;
}

.kw-act-bar-row {
  display: grid;
  grid-template-columns: 170px 1fr 150px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 3px 0;
}

.kw-act-bar-row:hover {
  background: var(--kw-accent-soft);
}

.kw-act-bar-track {
  height: 14px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-act-bar {
  display: block;
  height: 12px;
  min-width: 2px;
  background: #3b6fb6;
  border-radius: 4px 0 0 4px;
}

.kw-act-bar-value {
  color: var(--kw-ink-text);
  direction: rtl;
}

/* ---------- Leave reports ---------- */
.kw-rep-note {
  font-size: 11.5px;
  color: #1d4f8a;
  line-height: 1.8;
}

.kw-kardex-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  border: 1px solid #666;
  border-top: 0;
  padding: 6px 10px;
  font-size: 11px;
}

.kw-kardex-foot b {
  direction: ltr;
  display: inline-block;
  margin-right: 4px;
}

.kw-mazad-page {
  max-width: 820px;
}

.kw-mazad-done td {
  color: var(--kw-muted);
}

/* ---------- Traffic / hourly permit report forms ---------- */
.kw-rep-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
}

.kw-rep-inline label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.kw-rep-sub {
  margin: 8px 22px 0 0;
  padding: 6px 10px;
  background: var(--kw-sunk);
  border-radius: 3px;
}

.kw-used-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 10px;
  align-items: center;
  font-size: 12px;
}

/* «مرخصی استفاده شده سالیانه» form */
.kw-used-form {
  font-size: 11.5px;
}

.kw-used-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.kw-used-table {
  width: 100%;
  border-collapse: collapse;
}

.kw-used-table td {
  border: 1px solid #333;
  padding: 6px 8px;
}

.kw-used-v {
  font-weight: 400;
  margin-right: 12px;
}

.kw-used-sign {
  height: 120px;
  vertical-align: top;
}

.kw-used-signature {
  margin: 24px 45% 0 0;
}

.kw-used-note {
  font-weight: 700;
}

.kw-used-foot {
  margin-top: 12px;
  font-size: 11px;
}

/* ---------- Base information grids ---------- */
.kw-lookup-page {
  max-width: 760px;
}

.kw-lookup-table td {
  padding: 0 3px;
  height: 26px;
}

.kw-lookup-table .kw-lookup-text {
  text-align: right;
}

.kw-lookup-table input[readonly] {
  color: var(--kw-text);
}

.kw-lookup-new td {
  background: var(--kw-sunk);
}

/* ---------- Shift report forms ---------- */
.kw-apart-grid {
  display: grid;
  grid-template-columns: auto 70px auto 70px;
  gap: 8px 12px;
  align-items: center;
  font-size: 12px;
}

.kw-rep-shift {
  width: 130px;
}

.kw-sec-list {
  grid-template-columns: 1fr;
}

.kw-remp-legacy {
  justify-content: center;
  font-weight: 600;
  border: 1px solid #666;
  border-bottom: 0;
  margin-bottom: 0;
  padding: 4px;
}

/* ---------- Performance / control forms ---------- */
.kw-perf-grid {
  display: grid;
  grid-template-columns: 30px 130px 70px;
  gap: 8px 10px;
  align-items: center;
  font-size: 12px;
}

.kw-factor-name {
  background: #ffef3a;
  font-weight: 700;
  padding: 1px 4px;
}

/* ---------- Official calendar (BaseInfo/Calendar) ---------- */
.kw-cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kw-cal-year {
  font-size: 17px;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

.kw-cal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 8px 0;
  font-size: 12px;
}

.kw-cal-legend i {
  display: inline-block;
  width: 22px;
  border: 1px solid var(--kw-line);
  text-align: center;
  font-style: normal;
  font-weight: 700;
}

.kw-cal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  gap: 8px;
}

@media (max-width: 1100px) {
  .kw-cal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

@media (max-width: 600px) {
  .kw-cal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kw-cal-month table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.kw-cal-month th,
.kw-cal-month td {
  border: 1px solid var(--kw-line);
  height: 22px;
  text-align: center;
  padding: 0;
}

.kw-cal-month thead th {
  background: var(--kw-sunk);
  font-weight: 700;
}

.kw-cal-month col.kw-cal-wcol {
  width: 62px;
}

.kw-cal-month tbody th {
  width: 62px;
  background: var(--kw-sunk);
  font-weight: 600;
  font-size: 11px;
}

.kw-cal-day {
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}

.kw-cal-day:hover {
  outline: 2px solid #8ab4f8;
  outline-offset: -2px;
}

.kw-cal-c1 { color: var(--kw-ink-text); }
.kw-cal-c2 { color: #e00000; }
.kw-cal-c3 { color: #d000d0; }
.kw-cal-c4 { color: #1a9a1a; }

.kw-cal-ramadan {
  background: var(--kw-row-hover);
}

.kw-cal-ramadan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.kw-cal-ramadan-row .kw-date {
  width: 150px;
}

/* ---------- Shifts (معرفی شیفت ها) ---------- */
.kw-shift-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  margin-top: 8px;
}

.kw-shift-form {
  flex: 0 1 430px;
  font-size: 12px;
}

.kw-shift-sec {
  display: grid;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--kw-line);
}

.kw-shift-head,
.kw-shift-times,
.kw-shift-pair {
  grid-template-columns: 70px 110px 70px 110px;
}

.kw-shift-sentence {
  grid-template-columns: 95px 70px auto;
}

.kw-shift-grid {
  width: 100%;
  margin: 6px 0;
  border-bottom: 1px solid var(--kw-line);
}

.kw-shift-grid th {
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  padding: 2px 4px;
  white-space: nowrap;
}

.kw-shift-grid tr th:first-child {
  text-align: right;
}

.kw-shift-grid td {
  padding: 2px 4px;
}

.kw-time {
  width: 70px;
  text-align: center;
  direction: ltr;
}

.kw-shift-list {
  flex: 1 1 380px;
  max-width: 520px;
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  padding-bottom: 6px;
}

.kw-shift-list-head {
  background: var(--kw-sunk);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-shift-filters {
  display: flex;
  gap: 6px;
  padding: 6px;
}

/* ---------- Group yearly calendar (تقویم سالیانه گروه ها) ---------- */
.kw-gc-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}

.kw-gc-side {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.kw-gc-groups {
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  padding: 6px;
}

.kw-gc-groups-head {
  text-align: center;
  font-weight: 700;
  margin-bottom: 6px;
}

.kw-gc-group-list {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 6px;
}

.kw-gc-group-list a {
  display: block;
  padding: 4px 6px;
  border-bottom: 1px solid var(--kw-line);
  color: var(--kw-ink-text);
  text-decoration: none;
}

.kw-gc-group-list a.active {
  background: #3a7bd5;
  color: #fff;
}

.kw-gc-group-list a:hover:not(.active) {
  background: var(--kw-row-hover);
}

.kw-gc-shifts tbody tr {
  cursor: pointer;
}

.kw-gc-link {
  font-size: 12px;
}

.kw-gc-main {
  flex: 1 1 600px;
  min-width: 0;
}

.kw-gc-title {
  margin-inline-start: auto;
  font-weight: 700;
  align-self: center;
}

.kw-gc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  gap: 10px;
}

.kw-gc-grid[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .kw-gc-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

.kw-gc-month td.kw-gc-day {
  padding: 0 2px;
  white-space: nowrap;
}

.kw-gc-day span {
  display: inline-block;
  min-width: 16px;
  font-size: 10px;
  font-weight: 600;
  opacity: .8;
}

.kw-gc-in {
  width: 34px;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  padding: 0;
}

.kw-gc-in:focus {
  outline: 2px solid #8ab4f8;
  background: var(--kw-card);
}

.kw-gc-in::placeholder,
.kw-gc-off {
  color: #e00000;
  font-size: 10px;
  font-weight: 600;
}

.kw-gc-s0 { color: #2f3b8f; }
.kw-gc-s1 { color: #8e24aa; }
.kw-gc-s2 { color: #1565c0; }
.kw-gc-s3 { color: #00695c; }
.kw-gc-s4 { color: #ad5a00; }
.kw-gc-s5 { color: #5d4037; }

/* ---------- Groups (معرفی گروه ها) ---------- */
.kw-grp-form {
  flex: 0 1 640px;
  font-size: 12px;
}

.kw-grp-head {
  grid-template-columns: 40px 90px 50px 1fr auto;
}

.kw-grp-times {
  grid-template-columns: 1fr 70px 1fr 70px;
}

.kw-grp-row {
  grid-template-columns: 140px 160px 1fr;
}

.kw-grp-radios {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 6px;
}

.kw-grp-flags {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
  .kw-grp-times,
  .kw-grp-flags {
    grid-template-columns: 1fr 70px;
  }
  .kw-grp-flags {
    grid-template-columns: 1fr;
  }
}

.kw-grp-list {
  max-width: 300px;
}

/* ---------- Change shift code (تغییر کد شیفت) ---------- */
.kw-code-box {
  max-width: 560px;
  margin: 8px auto;
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  font-size: 12px;
}

.kw-code-head {
  background: var(--kw-sunk);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-code-body {
  padding: 12px;
}

.kw-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.kw-code-pick {
  width: 110px;
}

.kw-code-title {
  min-width: 60px;
  color: #1d5fa8;
}

.kw-code-to {
  width: 80px;
}

.kw-code-foot {
  background: var(--kw-sunk);
  border-top: 1px solid var(--kw-line);
  padding: 8px 12px;
  display: flex;
  gap: 6px;
}

.kw-code-box #kwPickList tbody tr {
  cursor: pointer;
}

/* ---------- Group rotation program (معرفی برنامه چرخشی گروه ها) ---------- */
.kw-cycle-settings {
  display: grid;
  grid-template-columns: auto 70px auto 150px;
  align-items: center;
  gap: 8px 12px;
  font-size: 12px;
  margin-bottom: 6px;
}

.kw-cycle-settings .kw-grp-radios {
  grid-column: span 2;
  margin-top: 0;
}

.kw-cycle-grid {
  max-width: 760px;
  overflow-x: auto;
}

.kw-cycle-grid td.kw-gc-day {
  height: 36px;
  min-width: 80px;
}

.kw-cycle-grid .kw-gc-day span {
  min-width: 36px;
  color: var(--kw-muted);
}

@media (max-width: 700px) {
  .kw-cycle-settings {
    grid-template-columns: auto 1fr;
  }
}

/* ---------- Group moves (تعویض شیفت و جابجایی در گروه‌ها) ---------- */
.kw-move-form {
  flex: 0 1 420px;
  font-size: 12px;
}

.kw-move-grid {
  grid-template-columns: 130px minmax(0, 1fr);
}

.kw-move-list {
  max-width: 480px;
}

.kw-move-list tbody tr {
  cursor: default;
}

/* ---------- Monthly traffic: karkard popup (گزارش کارکرد) ---------- */
.kw-tk-dialog {
  max-width: 1200px;
}

.kw-tk-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.kw-tk-table {
  font-size: 11px;
}

.kw-tk-table td,
.kw-tk-table th {
  padding: 1px 4px;
  white-space: nowrap;
}

.kw-tk-red {
  color: #e00000;
}

.kw-tk-print {
  background: var(--kw-card);
  padding: 12px;
}

.kw-tk-sum {
  width: auto;
  margin-top: 10px;
  font-size: 11px;
}

.kw-tk-sum td,
.kw-tk-sum th {
  padding: 2px 8px;
  white-space: nowrap;
}

.kw-tk-sum .kw-rnum {
  min-width: 48px;
  text-align: center;
}

/* Form buttons that stay visible while the form scrolls (shift / group forms). */
.kw-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--kw-card);
  padding: 8px 0;
  border-top: 1px solid var(--kw-line);
}

/* «روز بعد» beside a shift end time that falls on the next day. */
.kw-next-day {
  color: #c0392b;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.kw-end-cell {
  white-space: nowrap;
}

.kw-end-cell .kw-in {
  display: inline-block;
}

.kw-end-cell .kw-next-day {
  margin-inline-start: 4px;
}

/* Shift / group list beside the edit form: stays at the top of the window while the form scrolls. */
.kw-shift-list {
  position: sticky;
  top: 8px;
  align-self: flex-start;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
}

/* Save result toast (site.js kwSaved / TempData["Message"]). */
.kw-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  min-width: 220px;
  max-width: 90vw;
  padding: 10px 18px;
  border-radius: 6px;
  background: #1e8e3e;
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  transition: opacity .4s;
}

.kw-toast div {
  font-size: 12px;
  opacity: .9;
  margin-top: 2px;
}

.kw-toast-info {
  background: #2b3a4a;
}

.kw-toast-hide {
  opacity: 0;
}

/* Rotation program grid: days after the first cycle repeat it (lighter); an undefined shift number is red. */
.kw-cycle-repeat {
  background: var(--kw-sunk);
}

.kw-cycle-repeat .kw-gc-in {
  opacity: .75;
}

.kw-gc-in.kw-gc-bad {
  color: #fff;
  background: #e05252;
  border-radius: 3px;
}

/* Shift / group pages: wide enough for the form and the list side by side (the list only wraps below on narrow screens). */
.kw-shift-page {
  max-width: 1200px;
}

@media (min-width: 992px) {
  .kw-shift-page .kw-shift-layout {
    flex-wrap: nowrap;
  }
}

/* Rotation grid: positions outside the cycle days are empty boxes. */
.kw-cycle-grid td.kw-cycle-empty {
  background: var(--kw-sunk);
}

.kw-gc-in.kw-gc-off {
  color: #e00000;
  font-size: 11px;
}

/* Rotation grid: equal cells, large Persian numbers. */
.kw-cycle-grid table {
  table-layout: fixed;
  width: 100%;
}

.kw-cycle-grid tbody th {
  width: 72px;
}

.kw-cycle-grid td.kw-gc-day,
.kw-cycle-grid td.kw-cycle-empty {
  height: 44px;
  min-width: 0;
  padding: 2px 4px;
  vertical-align: middle;
}

.kw-cycle-grid td.kw-gc-day {
  display: table-cell;
  white-space: nowrap;
}

.kw-cycle-grid .kw-gc-day span {
  display: block;
  font-size: 10px;
  color: var(--kw-muted);
  text-align: center;
  line-height: 1.2;
}

.kw-cycle-grid .kw-gc-in {
  display: block;
  width: 100%;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.kw-cycle-grid .kw-gc-in.kw-gc-off {
  font-size: 14px;
}

/* Monthly traffic: day menu of the «شیفت و مجوز روزانه» column. */
.kw-td-daymenu {
  cursor: pointer;
}

.kw-td-daymenu:hover {
  outline: 2px solid #8ab4f8;
  outline-offset: -2px;
}

.kw-day-menu {
  position: fixed;
  max-height: 80vh;
  overflow-y: auto;
}

.kw-ctx-title {
  font-size: 11px;
  color: var(--kw-muted);
  padding: 3px 10px;
}

.kw-ctx-remove {
  color: #c0392b;
}

.kw-ctx-link {
  font-weight: 700;
}

.kw-ctx-item:disabled {
  opacity: .45;
  cursor: default;
}

/* ---------- Base information pages (list + form) ---------- */
.kw-simple-page {
  max-width: 760px;
}

.kw-simple-box {
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  margin-top: 10px;
  background: var(--kw-card);
}

.kw-simple-head {
  background: var(--kw-sunk);
  font-weight: 700;
  padding: 6px 10px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-simple-list {
  font-size: 12px;
}

.kw-simple-list tbody tr {
  cursor: pointer;
}

.kw-simple-list tbody td {
  text-align: center;
}

.kw-simple-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid var(--kw-line);
}

.kw-simple-form {
  padding: 10px 12px 0;
  font-size: 12px;
}

.kw-simple-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.kw-simple-actions {
  background: var(--kw-sunk);
  margin: 10px -12px 0;
  padding: 8px 12px;
  border-top: 1px solid var(--kw-line);
}

.kw-num {
  width: 80px;
  text-align: center;
}

.kw-emptype-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.kw-span3 {
  grid-column: span 3;
}

.kw-autoinc-amount {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ساختار سازمانی */
.kw-section-form {
  flex: 0 1 420px;
  padding: 10px 12px 0;
  font-size: 12px;
}

.kw-section-grid {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.kw-section-code {
  max-width: 110px;
}

.kw-section-manager {
  width: 150px;
}

.kw-section-tree {
  max-width: 560px;
  font-size: 12px;
}

.kw-section-tree .kw-shift-list-head input {
  max-width: 220px;
  margin-inline-start: auto;
}

.kw-tree {
  list-style: none;
  margin: 0;
  padding-inline-start: 18px;
}

.kw-section-tree > .kw-tree {
  padding: 6px 10px;
}

.kw-tree li > .kw-tree {
  display: none;
}

.kw-tree li.kw-tree-open > .kw-tree {
  display: block;
}

.kw-tree li {
  border-bottom: 1px solid #f0f0f0;
  padding: 2px 0;
}

.kw-tree-toggle {
  display: inline-block;
  width: 16px;
  text-align: center;
  cursor: pointer;
  color: #1d5fa8;
  font-weight: 700;
}

.kw-tree-node {
  color: var(--kw-ink-text);
  text-decoration: none;
}

.kw-tree-node.active {
  background: var(--kw-row-hover);
  font-weight: 700;
}

.kw-tree-count {
  color: var(--kw-muted);
  margin-inline-start: 2px;
}

/* مجوزهای معتبر (BaseInfo/Licenses): compact grid like Kara's; an inactive card is grey with grey read-only caps. */
.kw-lic-table {
  width: 440px;
  max-width: 100%;
  margin: 8px auto 0;
  border-collapse: collapse;
  border: 1px solid var(--kw-line);
  font-size: 11px;
  background: var(--kw-card);
}

.kw-lic-table th,
.kw-lic-table td {
  border: 1px solid var(--kw-line);
  padding: 1px 4px;
  height: 18px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.kw-lic-table th {
  background: var(--kw-card);
  font-size: 9px;
  font-weight: 700;
  color: var(--kw-ink-text);
}

.kw-lic-table th:first-child {
  text-align: right;
}

.kw-lic-table th.kw-lic-caption {
  background: var(--kw-sunk);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  padding: 4px 6px;
}

.kw-lic-table td.kw-lic-title {
  text-align: right;
  font-weight: 700;
  color: var(--kw-ink-text);
}

.kw-lic-num {
  width: 60px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid #b5b5b5;
  border-radius: 2px;
  font-size: 11px;
  text-align: left;
}

.kw-lic-state {
  cursor: pointer;
  user-select: none;
  color: #2e7d32;
  font-weight: 700;
}

.kw-lic-off td,
.kw-lic-off td.kw-lic-title {
  color: #b0b0b0;
  font-weight: 400;
}

.kw-lic-off .kw-lic-num {
  background: var(--kw-sunk);
  border-color: #cfcfcf;
  color: var(--kw-text);
}

.kw-lic-off .kw-lic-state span {
  visibility: hidden;
}

/* برنامه های نمونه */
.kw-sample-type {
  max-width: 180px;
}

.kw-sample-grid {
  margin-top: 10px;
}

.kw-sample-grid table {
  table-layout: fixed;
  width: 100%;
}

.kw-sample-grid td {
  height: 38px;
  text-align: center;
}

.kw-sample-grid .kw-gc-in {
  width: 100%;
  font-size: 16px;
  font-weight: 700;
}

/* تقویم رسمی: hovered day in three calendars */
.kw-cal-dayinfo {
  min-height: 20px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #1d5fa8;
}

/* پارامترهای سیستم */
.kw-params-page {
  max-width: 1080px;
}

.kw-params-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.kw-params-month {
  width: 110px;
}

.kw-params-year {
  width: 70px;
  text-align: center;
}

.kw-params-sec {
  border-bottom: 1px solid var(--kw-line);
  padding: 10px 0;
  font-size: 12px;
}

.kw-params-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: flex-start;
}

.kw-params-grid {
  display: grid;
  grid-template-columns: auto 90px;
  gap: 8px 10px;
  align-items: center;
}

.kw-params-meals {
  width: auto;
  border: 0;
}

.kw-params-logo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.kw-params-logo-img {
  max-width: 160px;
  max-height: 80px;
  border: 1px solid var(--kw-line);
}

.kw-params-months {
  display: grid;
  grid-template-columns: auto 70px auto;
  gap: 6px 8px;
  align-items: center;
}

.kw-params-mail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.kw-params-mandatory {
  max-width: 640px;
}

@media (max-width: 800px) {
  .kw-simple-fields,
  .kw-emptype-grid,
  .kw-params-mail {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .kw-span3 {
    grid-column: span 1;
  }
}

/* عناوین پایه سیستم / مشخصه ها / فرمت فایل حقوق */
.kw-titles-page {
  max-width: 960px;
}

.kw-titles-page .kw-tabs {
  flex-wrap: wrap;
}

.kw-titles-table td {
  text-align: center;
  vertical-align: middle;
}

.kw-ok {
  color: #1e8e3e;
  font-weight: 700;
}

.kw-title-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  font-size: 12px;
}

.kw-pay-type {
  width: 160px;
}

.kw-pay-table td {
  vertical-align: middle;
}

.kw-pay-options {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
}

.kw-pay-char {
  width: 44px;
  text-align: center;
}

/* ---------- ارتباطات (Device pages) ---------- */
.kw-dev-page {
  max-width: 1200px;
}

.kw-dev-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.kw-dev-layout > .kw-simple-box,
.kw-dev-layout > form,
.kw-dev-layout > div {
  margin-top: 10px;
}

.kw-dev-list {
  flex: 1 1 420px;
}

.kw-dev-form {
  flex: 1 1 420px;
}

.kw-dev-form-head {
  margin: -10px -12px 10px;
}

.kw-dev-collect {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.kw-dev-side {
  flex: 0 1 380px;
  font-size: 12px;
}

.kw-op-form,
.kw-spc-form {
  flex: 1 1 600px;
  font-size: 12px;
}

.kw-op-table td:first-child {
  text-align: right;
}

.kw-op-table td,
.kw-op-table th {
  text-align: center;
}

.kw-op-card {
  background: var(--kw-row-hover);
}

.kw-spc-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.kw-spc-filters .kw-in {
  max-width: 200px;
}

.kw-spc-scroll {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid var(--kw-line);
}

.kw-spc-table thead th {
  position: sticky;
  top: 0;
  background: var(--kw-sunk);
  z-index: 1;
}

.kw-spc-table td {
  text-align: center;
}

.kw-spc-table td:nth-child(3),
.kw-spc-table td:nth-child(4) {
  text-align: right;
}

.kw-spc-pw {
  max-width: 100px;
  margin: 0 auto;
}

.kw-read-left {
  flex: 1 1 460px;
}

.kw-read-left .kw-dev-side {
  min-height: 300px;
}

.kw-read-form {
  font-size: 12px;
}

.kw-read-dates {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin-top: 10px;
}

.kw-read-results {
  flex: 1 1 460px;
  font-size: 12px;
  min-height: 300px;
}

.kw-read-msg {
  padding: 4px 10px;
  border-bottom: 1px solid var(--kw-line);
}

.kw-collect-form {
  max-width: 560px;
  font-size: 12px;
}

.kw-clock-form {
  flex: 1 1 420px;
  max-width: 660px;
}

.kw-clock-form p {
  margin: 6px 0;
}

.kw-import-page {
  max-width: 620px;
  margin: 10px auto;
}

.kw-import-result {
  margin-top: 10px;
}

.kw-monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.kw-monitor-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kw-monitor-count {
  font-size: 20px;
  font-weight: 600;
}

.kw-monitor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.kw-monitor-card {
  border: 1px solid var(--kw-line);
  border-radius: 4px;
  padding: 8px 10px;
  background: var(--kw-card);
}

.kw-monitor-time {
  font-size: 20px;
  font-weight: 700;
  color: #2e7d32;
}

.kw-monitor-name {
  font-weight: 600;
}

.kw-monitor-sub {
  font-size: 11px;
  color: var(--kw-muted);
}

.kw-monitor-list {
  margin-top: 10px;
  font-size: 12px;
}

/* ---------- کاربران (User pages) ---------- */
.kw-user-page {
  max-width: 820px;
  margin: 10px auto;
  font-size: 12px;
}

.kw-user-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 200px) auto minmax(0, 200px);
  gap: 8px 14px;
  align-items: center;
}

.kw-user-emp {
  max-width: 120px;
}

.kw-user-empname {
  color: var(--kw-text);
  white-space: nowrap;
}

.kw-user-rights {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
}

.kw-users-page {
  max-width: 1100px;
  font-size: 12px;
}

.kw-users-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e7e5d8;
  padding: 6px 10px;
  margin-top: 8px;
}

.kw-users-table td {
  text-align: center;
}

.kw-users-note {
  background: #dff0d8;
  border: 1px solid #c3e6cb;
  color: #2b542c;
  padding: 4px 8px;
  border-radius: 3px;
  font-weight: 400;
}

.kw-levels-col {
  cursor: pointer;
  width: 64px;
  font-size: 11px;
}

.kw-levels-cell {
  cursor: pointer;
}

.kw-levels-cell::after {
  content: "\2714";
  color: #ddd;
}

.kw-levels-cell.kw-on::after {
  color: #2e7d32;
}

.kw-uag-page {
  max-width: 900px;
  font-size: 12px;
}

.kw-uag-list {
  max-width: 460px;
  margin: 10px auto;
  min-height: 200px;
}

.kw-uag-list tbody tr {
  cursor: pointer;
}

.kw-uag-title {
  max-width: 240px;
}

.kw-uag-grid {
  border-collapse: collapse;
  width: 100%;
  user-select: none;
}

.kw-uag-grid th,
.kw-uag-grid td {
  border: 1px solid var(--kw-line);
  text-align: center;
  padding: 2px;
  font-size: 12px;
}

.kw-uag-grid th {
  color: #337ab7;
  cursor: pointer;
}

.kw-uag-grid td {
  cursor: pointer;
  width: 3.6%;
}

.kw-uag-grid td.kw-on {
  background: #eaf7dc;
}

.kw-uag-grid td.kw-on::after {
  content: "\2714";
  color: #2e7d32;
}

.kw-uag-friday {
  background: var(--kw-bad-soft);
}

.kw-dg-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: center;
}

.kw-dg-special {
  max-width: 160px;
}

.kw-dg-list {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--kw-line);
  padding: 4px 8px;
  margin-bottom: 8px;
}

.kw-janbaz-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.kw-janbaz-row .kw-time {
  width: 70px;
}
.kw-janbaz-row[hidden] { display: none; }

.kw-pay-help {
  font-size: 11.5px;
  margin-top: 8px;
  color: var(--kw-text);
}

.kw-pay-help div {
  margin-top: 4px;
}

/* ---------- Login ---------- */
.kw-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kw-sunk);
}

.kw-login-box {
  width: 300px;
  background: var(--kw-card);
  border: 1px solid var(--kw-line);
  border-radius: 4px;
  padding: 20px;
  font-size: 13px;
}

.kw-login-brand {
  font-size: 26px;
  text-align: center;
  direction: ltr;
  margin-bottom: 14px;
  color: var(--kw-text);
}

/* «پارامترهای سیستم» tabs after «عمومی» */
.kw-prm-section {
  border-bottom: 1px solid var(--kw-line);
  padding: 8px 0;
  font-size: 12px;
}

.kw-prm-head {
  background: var(--kw-sunk);
  font-weight: 700;
  padding: 4px 10px;
  margin-bottom: 8px;
}

.kw-prm-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) auto;
  gap: 6px 14px;
  align-items: center;
}

.kw-prm-wide {
  grid-column: 1 / -1;
}

.kw-prm-green {
  color: #2e7d32;
}

.kw-prm-in {
  width: 80px;
  text-align: center;
}

.kw-prm-select {
  width: 150px;
}

/* «معرفی دستگاه»: command panels */
.kw-dev-maker {
  font-weight: 600;
}

.kw-dev-commands {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 260px);
  gap: 16px;
  margin-top: 14px;
  align-items: start;
}

.kw-dev-cmdbox {
  font-size: 12px;
}

.kw-dev-cmd {
  display: block;
  width: calc(100% - 8px);
  margin: 4px;
  text-align: right;
  background: var(--kw-card);
  border: 1px solid var(--kw-line);
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 12px;
}

.kw-dev-cmd:hover {
  background: var(--kw-accent-soft);
}

.kw-dev-result {
  min-height: 120px;
  padding: 8px 10px;
  font-size: 12px;
  margin-top: 10px;
}

.kw-dev-result-empty {
  text-align: center;
  font-size: 28px;
  color: var(--kw-muted);
  padding-top: 24px;
}

/* Progress of «ارسال / انتقال نمونه ها» in the result panel. */
.kw-dev-progress-title {
  font-weight: 600;
  margin: 18px 0 8px;
  text-align: center;
}

.kw-dev-progress {
  height: 20px;
  font-size: 12px;
}

.kw-dev-progress-text {
  margin-top: 6px;
  text-align: center;
  color: var(--kw-text);
}

/* «ارسال روش احراز هویت به دستگاه» (روش احراز هویت پرسنل). */
.kw-auth-scope,
.kw-auth-devices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.kw-auth-devices {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  padding: 6px 8px;
}

.kw-auth-all {
  font-weight: 600;
  border-bottom: 1px solid var(--kw-line);
  padding-bottom: 4px;
}

.kw-auth-result {
  margin-top: 10px;
  font-size: 12px;
}

@media (max-width: 800px) {
  .kw-dev-commands {
    grid-template-columns: 1fr;
  }
}

/* «اضافه» column of «تردد ماهیانه»: the day's overtime permit */
.kw-tradod-grid th.kw-td-over {
  background: var(--kw-sunk) !important;
}

.kw-tradod-grid .kw-td-over {
  width: 70px;
  background: var(--kw-row-hover);
  padding: 0;
}

.kw-tradod-grid .kw-over {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 12px;
  padding: 2px;
}

.kw-tradod-grid .kw-over:focus {
  outline: 1px solid #337ab7;
  background: var(--kw-card);
}

.kw-user-empbox {
  width: 170px;
  flex-wrap: nowrap;
}

.kw-user-pick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kw-user-pick[hidden],
.kw-user-manager[hidden],
.kw-user-normal[hidden] {
  display: none !important;
}

/* «تعریف کاربر»: chosen sections / employees of the group */
.kw-user-pick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kw-user-pick[hidden],
.kw-user-rights [hidden] {
  display: none !important;
}

.kw-user-time {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kw-user-time[hidden],
.kw-user-act[hidden],
.kw-menu-row[hidden],
.kw-menu-group[hidden] {
  display: none !important;
}

/* «نام کاربری مشابه» and «درگاه های قابل دسترس» */
.kw-user-similar {
  width: 160px;
}

.kw-user-gates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 6px;
}

.kw-user-time .kw-num {
  width: 70px;
}

/* Parameters: an option that depends on the field above it (data-depends). */
.kw-prm-sub { padding-inline-start: 1.6rem; }
.kw-prm-sub[hidden] { display: none !important; }

/* «مجوز نرم افزار» (License/Index): the login box, wider. */
.kw-license-box {
  width: min(460px, calc(100vw - 32px));
}

.kw-license-title {
  font-size: 15px;
  text-align: center;
  margin-bottom: 12px;
}

.kw-license-code {
  font-family: Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.kw-license-table th {
  width: 45%;
  font-weight: normal;
  color: var(--kw-text);
}

/* Warning in the header when the license ends soon (_Layout). */
.kw-license-warn {
  background: var(--kw-row-hover);
  color: #7a5b00;
  text-align: center;
  font-size: 12px;
  padding: 3px 8px;
}

/* ---------- «کارت تردد من» (Self pages of a کاربر عادی), as the legacy employee page ---------- */
.kw-self-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.kw-self-month {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid #222;
  padding: 2px 14px;
  font-size: 18px;
  margin-inline: auto;
}

.kw-self-month a {
  color: var(--kw-ink-text);
  text-decoration: none;
  font-size: 22px;
  font-weight: bold;
}

.kw-self-leave {
  background: var(--kw-sunk);
  padding: 3px 14px;
  font-size: 13px;
}

.kw-self-head {
  background: #666;
  color: #ffeb3b;
  text-align: center;
  font-size: 13px;
  padding: 3px;
}

.kw-self-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.kw-self-table th {
  background: var(--kw-bad-soft);
  color: #900;
  text-align: center;
  font-weight: bold;
  padding: 3px;
  border: 1px solid var(--kw-line);
}

.kw-self-table td {
  border: 1px solid var(--kw-line);
  height: 22px;
  padding: 1px 4px;
  text-align: center;
}

.kw-self-table tbody tr:nth-child(even) td.kw-self-time {
  background: var(--kw-sunk);
}

.kw-self-date {
  background: var(--kw-row-hover);
  white-space: nowrap;
}

.kw-self-red {
  color: #e53935;
}

.kw-self-extra {
  background: var(--kw-row-hover);
}

.kw-self-time {
  cursor: context-menu;
  min-width: 42px;
}

.kw-self-notes {
  background: var(--kw-row-hover);
  font-size: 12px;
  padding: 6px 10px;
  margin-top: 6px;
}

/* «ثبت برای بخش» bar above the employee grids (_SectionBulk). */
.kw-section-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  background: var(--kw-accent-soft);
  border: 1px solid #d4e1f2;
  border-radius: 6px;
}
.kw-section-bulk .kw-bulk-title { font-weight: 700; color: var(--kw-head-text); }
.kw-section-bulk .kw-bulk-sec { width: auto; min-width: 180px; }
.kw-section-bulk .kw-bulk-field { display: inline-flex; align-items: center; gap: 4px; }
.kw-section-bulk .kw-bulk-check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kw-section-bulk .kw-bulk-check .form-check-input { margin: 0; }
.kw-section-bulk .form-select-sm:not(.kw-bulk-sec) { width: auto; }
.kw-section-bulk .kw-bulk-time, .kw-section-bulk .kw-bulk-num { width: 70px; text-align: center; }
.kw-section-bulk .kw-bulk-date { width: 100px; text-align: center; }

/* «قرارداد ساعتی» on مشخصات پرسنلی (Employee/Index): kw-is-hourly on the form. */
#kwEmpForm.kw-is-hourly .kw-not-hourly,
#kwEmpForm:not(.kw-is-hourly) .kw-hourly-only { display: none !important; }
.kw-hourly-grid {
  display: grid;
  grid-template-columns: auto 90px auto 90px auto 80px;
  align-items: center;
  gap: 8px 12px;
}
.kw-hourly-grid .kw-time { text-align: center; }
@media (max-width: 760px) {
  .kw-hourly-grid { grid-template-columns: auto 90px; }
}
/* Rows outside the section chosen in «ثبت برای بخش». */
tr.kw-bulk-out { display: none !important; }
/* Report numbers wider than the standard column (e.g. leave balances 159:48, -012:30). */
.kw-rwide-num .kw-rnum { width: 72px; min-width: 72px; max-width: 72px; }
/* Reports with yyyy/mm/dd columns (برگه های مرخصی و ماموریت): room for the whole date. */
.kw-rwide-date .kw-rnum { width: 86px; min-width: 86px; max-width: 86px; white-space: nowrap; }
/* Many narrow columns with two-word titles (اشکال یابی روزانه: «ماموریت ساعتی»). */
.kw-rmid-num .kw-rnum { width: 60px; min-width: 60px; max-width: 60px; white-space: nowrap; }
.kw-rtable td.kw-rdatecol { width: 86px; min-width: 86px; max-width: 86px; white-space: nowrap; }
/* Last column of variable length (ترددهای روز): as wide as its content. */
.kw-rlast-free td.kw-rnum:last-child { width: auto; max-width: none; }
/* Table reports (TableReport.cshtml): the widths above are the minimum; a column grows to its longest value (date,
   time list, amount) instead of spilling into the next column. */
.kw-rtable.kw-rfit td.kw-rnum { max-width: none; }

/* «ورود کارکردهای دستی» (KarkardManual/Index): boxes like Kara's page, three columns on wide screens. */
.kw-km-month { display: flex; gap: 6px; align-items: center; }
.kw-km-month select { width: 110px; }
.kw-km-month input { width: 70px; text-align: center; }
.kw-km-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.kw-km-box { margin-top: 0; }
.kw-km-table { width: 100%; }
.kw-km-table th, .kw-km-table td { padding: 4px 8px; border-top: 1px solid var(--kw-line); vertical-align: middle; }
.kw-km-table th { font-weight: 400; }
.kw-km-table td { width: 140px; white-space: nowrap; }
.kw-km-in { display: inline-block; width: 90px; text-align: center; }
.kw-km-unit { font-size: .85em; color: var(--kw-muted); margin-right: 4px; }
.kw-km-actions { flex-wrap: wrap; }
.kw-km-nav { margin-right: auto; }
.kw-km-nav select { max-width: 220px; }
