:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #111827;
  --primary: #0ea5e9;
  --border: #e5e7eb;
  --rounded: 14px;
  --ok-bg: #f0fdf4;
  --ok-border: #bbf7d0;
  --warn-bg: #fff7ed;
  --warn-border: #fed7aa;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(10, 15, 25, .65), rgba(10, 15, 25, .65)),
    url("../assets/bg.jpg") no-repeat center center fixed;
  background-size: cover;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--rounded);
  padding: 14px;
  margin-bottom: 12px;
}

.row {
  display: grid;
  gap: 12px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical
}

table {
  width: 100%;
  border-collapse: collapse
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top
}

.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn.green,
.btn.okBtn.pressed,
.stat-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
}

.btn.amber,
.stat-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.btn.red,
.soft-danger,
.req-miss,
.is-nok {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.muted {
  color: var(--muted)
}

.small {
  font-size: 12px
}

.hidden {
  display: none !important
}

.right {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.headerline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pill {
  display: inline-block;
  background: #e5f3ff;
  color: #075985;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
}

.pill.small {
  padding: 4px 8px
}

.pill.status-open {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: #9a3412
}

.pill.status-progress {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8
}

.pill.status-done {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: #166534
}

.login-card {
  max-width: 520px;
  margin: 40px auto;
}

.operator-hero h2 {
  font-size: 28px
}

.stats-grid,
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  min-height: 120px
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  margin: 6px 0
}

.action-btn {
  min-height: 64px;
  width: 100%
}

.device-box {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fff
}

.check-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 10px 0 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border)
}

.chkTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px
}

.chkActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.chkTitle {
  font-weight: 700
}

.chkCard.is-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border)
}

.note-list {
  display: grid;
  gap: 10px
}

.note-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff
}

.note-card.status-open {
  border-color: var(--warn-border);
  background: #fffaf5
}

.note-card.status-progress {
  border-color: #bfdbfe;
  background: #f8fbff
}

.note-card.status-done {
  border-color: var(--ok-border);
  background: #f7fef8
}

.note-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px
}

.note-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap
}

.note-text {
  font-weight: 600;
  white-space: pre-wrap;
  margin-bottom: 8px
}

.blink {
  animation: blinkSoft 1.5s ease-in-out infinite
}

@keyframes blinkSoft {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.01)
  }
}

@media (max-width: 720px) {
  .container {
    padding: 12px
  }

  .headerline {
    align-items: flex-start;
    flex-direction: column
  }

  .stats-grid,
  .action-grid {
    grid-template-columns: 1fr
  }

  .chkTop {
    flex-direction: column
  }

  .chkActions {
    width: 100%
  }

  .chkActions .btn {
    flex: 1
  }

  .right {
    justify-content: stretch
  }
}

.note-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
}

.note-summary-text {
  font-weight: 600;
  flex: 1;
}

.note-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.check-admin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.check-admin-row:last-child {
  border-bottom: none;
}

.mech-list {
  display: grid;
  gap: 8px;
}

.mech-row {
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.mech-row.open {
  border-color: #ef4444;
  background: #fff5f5;
}

.mech-row.done {
  border-color: #22c55e;
  background: #f0fdf4;
}

.mech-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.mech-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1;
}

.mech-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.mech-badge.open {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.mech-badge.done {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.mech-tech,
.mech-point,
.mech-author,
.mech-date {
  white-space: nowrap;
  font-size: 13px;
}

.mech-tech {
  font-weight: 700;
}

.mech-point {
  color: #374151;
}

.mech-author,
.mech-date {
  color: var(--muted);
}

.mech-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  flex: 1;
}

.mech-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.mech-details {
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

@media (max-width: 900px) {
  .mech-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .mech-main {
    flex-wrap: wrap;
  }

  .mech-actions {
    width: 100%;
  }

  .mech-actions .btn {
    flex: 1;
  }
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.taskCard {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f4f1f1;
  margin-bottom: 10px;
  overflow: hidden;
}

.taskCard.danger {
  background: #d7a5a5;
  border-color: #d6e724;
}

.taskHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.taskHeadLeft {
  flex: 1;
  min-width: 0;
}

.taskTitle {
  font-weight: 700;
  font-size: 18px;
  margin: 4px 0;
}

.taskMeta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.taskSummary {
  margin-top: 6px;
  font-size: 13px;
  color: #374151;
}

.taskRight {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: auto;
  white-space: nowrap;
}

.taskBadge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #ddd;
  background: #fff;
  line-height: 1.2;
}

.taskCaret {
  font-size: 14px;
  opacity: .8;
}

.taskBody {
  border-top: 1px solid var(--border);
  padding: 14px;
}

.mech-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}

.mech-row.open {
  border-color: #fecaca;
  background: #fff7f7;
}

.mech-row.done {
  border-color: #bbf7d0;
  background: #f7fef8;
}

.mech-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.mech-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.compact-table th,
.compact-table td {
  padding: 8px 10px;
  vertical-align: middle;
}

.compact-table th {
  font-size: 13px;
  line-height: 1.2;
}

.compact-row td {
  font-size: 14px;
  line-height: 1.25;
}

.compact-id {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.compact-name {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-equip {
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-user {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-date {
  white-space: nowrap;
  width: 130px;
}

.compact-actions {
  width: 150px;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

@media (max-width: 900px) {

  .compact-table th,
  .compact-table td {
    padding: 7px 8px;
    font-size: 13px;
  }

  .mini-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-actions {
    width: auto;
  }
}

.mech-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #ddd;
  background: #fff;
  line-height: 1.2;
}

.mech-badge.open {
  color: #985c48;
  border-color: #fed7aa;
  background: #fff7ed;
}

.mech-badge.done {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.mech-tech {
  color: var(--muted);
  font-size: 13px;
}

.mech-point {
  color: #374151;
  font-size: 13px;
}

.mech-text {
  font-weight: 700;
  min-width: 0;
}

.mech-author,
.mech-date {
  color: var(--muted);
  font-size: 13px;
}

.mech-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mech-details {
  border-top: 1px solid var(--border);
  padding: 14px;
}

@media (max-width: 720px) {
  .kpi {
    grid-template-columns: 1fr 1fr;
  }

  .taskHead,
  .mech-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .taskRight,
  .mech-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-item {
  min-width: 140px;
}

.filter-grow {
  flex: 1 1 180px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  white-space: nowrap;
}

.filter-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

@media (max-width: 900px) {
  .filter-actions {
    margin-left: 0;
  }
}

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-item {
  min-width: 120px;
}

.filter-grow {
  flex: 0 1 220px;
}

.filter-date {
  width: 150px;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 8px;
  white-space: nowrap;
  font-size: 14px;
}

.filter-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.filter-bar input[type="text"],
.filter-bar input[type="date"] {
  height: 38px;
  padding: 8px 10px;
}

@media (max-width: 1100px) {
  .filter-actions {
    margin-left: 0;
  }
}

textarea.mComment,
textarea.mWaitComment {
  font-size: 18px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
  color: #111827 !important;
}

textarea.mComment::placeholder,
textarea.mWaitComment::placeholder {
  color: #7c2d12 !important;
  font-size: 20px !important;
  font-weight: 500 !important;
}

.weather-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 118px;
}

.weather-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.weather-place {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.weather-main {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.weather-desc {
  font-size: 13px;
  color: #475569;
  margin-top: 4px;
}

.weather-temp {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.weather-forecast-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.weather-forecast-time {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.weather-forecast-temp {
  font-weight: 700;
  margin-bottom: 4px;
}

.weather-forecast-wind {
  font-size: 12px;
  color: var(--muted);
}

.weather-loading,
.weather-error {
  font-size: 14px;
  color: #64748b;
  margin-top: 6px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.card,
.taskCard,
.admin-note-card,
.note-card,
.mech-row,
.groupBox {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.headerline,
.note-head,
.note-summary-row,
.taskHead,
.mech-line,
.row,
.tabs,
.right {
  max-width: 100%;
  flex-wrap: wrap;
}

.note-summary-text,
.note-text,
.taskTitle,
.taskSummary,
.mech-text,
.mech-author,
.mech-date,
.muted,
.pill,
.btn {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

img {
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
  display: block;
  overflow-x: auto;
}

.file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  body {
    padding: 8px;
  }

  .card {
    margin: 8px 0;
    padding: 12px;
  }

  .row,
  .row-3,
  .row-4 {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .headerline,
  .taskHead,
  .note-head,
  .note-summary-row,
  .mech-line {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
  }

  .right {
    margin-left: 0 !important;
    justify-content: flex-start;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .btn {
    width: auto;
    min-height: 42px;
    font-size: 15px;
  }

  input,
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
  }

  .pill {
    display: inline-flex;
    max-width: 100%;
  }

  .taskRight {
    align-items: flex-start;
  }
}

.userMenu {
  position: relative;
  display: inline-block;
}

.userMenuBtn {
  white-space: nowrap;
}

.userDropdown {
  position: absolute;
  right: 0;
  top: 42px;
  min-width: 220px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  padding: 6px;
  z-index: 99999;
}

.userDropItem {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: #111827;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.userDropItem:hover {
  background: #f3f4f6;
}

.userDropItem.primary {
  background: #2563eb;
  color: #fff;
}

.hidden {
  display: none !important;
}

@media(max-width:700px) {
  .headerline {
    align-items: flex-start;
  }

  .userMenuBtn {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .userDropdown {
    right: 0;
    min-width: 230px;
  }
}

.admin-history-card {
  cursor: pointer;
  display: grid;
  grid-template-columns:
    40px 170px 1fr 180px 120px 120px 30px;

  align-items: center;
  gap: 16px;

  padding: 14px 18px;
  margin-bottom: 10px;

  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  transition: .15s ease;
}

.admin-history-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}

.hist-title {
  font-size: 18px;
  font-weight: 700;
}

.hist-equip {
  color: #64748b;
  font-size: 15px;
}

.hist-user,
.hist-date {
  font-size: 14px;
  color: #475569;
}

.hist-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;

  border-radius: 999px;

  background: #dcfce7;
  color: #166534;

  font-size: 13px;
  font-weight: 700;
}

.hist-arrow {
  font-size: 18px;
  text-align: right;
}

.admin-history-card .taskBody {
  grid-column: 1 / -1;
  padding-top: 14px;
}

@media(max-width:1100px) {

  .admin-history-card {
    grid-template-columns:
      34px 1fr 100px 30px;

    gap: 10px;
  }

  .hist-user,
  .hist-date {
    display: none;
  }

  .hist-equip {
    grid-column: 2;
    font-size: 13px;
  }

  .hist-title {
    grid-column: 2;
    font-size: 15px;
  }

  .hist-status {
    font-size: 12px;
    padding: 6px 10px;
  }
}

.lube-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 12px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}

.lube-green {
  background: #dcfce7;
  color: #166534;
}

.lube-yellow {
  background: #fef3c7;
  color: #92400e;
}

.lube-red {
  background: #fee2e2;
  color: #991b1b;
}

.lube-gray {
  background: #e5e7eb;
  color: #374151;
}

.status-out {
  background: #ffe1e1;
  border: 1px solid #ff8a8a;
  color: #8a0000;
}

.status-ok {
  background: #e9fff1;
  border: 1px solid #8ee6a8;
  color: #065f2b;
}

.equipment-blocked {
  border: 2px solid #ff4d4d !important;
  background: #fff0f0 !important;
}

.taskCard.out-service {
  background: #ffd6d6 !important;
  border: 3px solid #d60000 !important;
  box-shadow: 0 0 0 3px rgba(214, 0, 0, 0.12);
}

.service-alert-box {
  margin: 10px 0;
  padding: 10px 12px;
  border: 2px solid #d60000;
  background: #fff0f0;
  color: #7a0000;
  border-radius: 10px;
  font-weight: 700;
}

.service-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #d60000;
  color: white;
  font-weight: 600;
  font-size: 13px;
  margin-right: 6px;
}

.service-reason {
  margin-top: 6px;
  font-weight: 500;
  color: #7a0000;
}

/* =========================
   COMPACT UI – MaintFlow Baltic
   ========================= */

.container {
  max-width: 1320px;
  padding: 10px 14px;
}

.card {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.headerline {
  gap: 8px;
  margin-bottom: 8px;
}

.tabs {
  gap: 6px !important;
  margin-bottom: 8px !important;
}

.btn {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.15;
}

.btn-sm,
.mini-actions .btn {
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 8px;
}

input,
select,
textarea {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 14px;
}

textarea {
  min-height: 68px;
}

.muted {
  font-size: 12px;
}

.pill,
.taskBadge,
.service-badge,
.lube-pill {
  font-size: 12px;
  padding: 4px 7px;
  border-radius: 999px;
}

.taskCard {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
}

.taskHead {
  gap: 8px;
}

.taskTitle {
  font-size: 16px;
  line-height: 1.25;
}

.taskSummary,
.taskMeta {
  font-size: 12px;
  line-height: 1.25;
}

.taskBody {
  margin-top: 8px;
  padding-top: 8px;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 6px 8px;
}

.row {
  gap: 8px;
}

.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-bar {
  gap: 8px;
  align-items: end;
}

.filter-item .muted,
.row .muted {
  margin-bottom: 3px;
}

.userDropdown {
  top: 36px;
}

.userDropItem {
  padding: 8px 10px;
  font-size: 14px;
}

/* Login ir pagrindiniai logotipai */
.login-card img,
.headerline img[alt="Logo"] {
  max-height: 82px !important;
}

/* Admin viršutinės KPI kortelės */
.card[style*="border:3px solid #17384d"] {
  padding: 8px 12px !important;
  border-width: 2px !important;
}

.card[style*="border:3px solid #17384d"] div[style*="font-size:28px"] {
  font-size: 22px !important;
}

/* Lentelėms, kur daug info */
.compact-table th,
.compact-table td,
.compact-row td {
  padding: 5px 7px;
  font-size: 12px;
}

.compact-id {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile paliekam patogesnį spaudimą */
@media (max-width: 700px) {
  .container {
    padding: 8px;
  }

  .card {
    padding: 10px;
    margin-bottom: 8px;
  }

  .btn {
    min-height: 38px;
    font-size: 14px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    padding: 9px;
  }

  textarea {
    min-height: 82px;
  }

  .login-card img,
  .headerline img[alt="Logo"] {
    max-height: 76px !important;
  }
}

.license-alert {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.license-warning {
  background: #fff7ed;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.license-expired {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.super-modules {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.super-section-title {
  grid-column: 1 / -1;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 2px;
}

.super-modules>.muted {
  grid-column: 1 / -1;
}

.super-module {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.super-module.enabled {
  background: #f0fdf4;
  border-color: #86efac;
}

.super-module.disabled {
  background: #f9fafb;
  opacity: .85;
}

.super-module input {
  width: 18px;
  height: 18px;
}

.super-module-title {
  font-weight: 800;
  font-size: 14px;
}

.super-module-desc {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
}

.super-module-state {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  white-space: nowrap;
}

.super-module.enabled .super-module-state {
  background: #bbf7d0;
  color: #166534;
}

/* =========================
   PHONE FIT FIX
   kad telefone nereikėtų slinkti į šoną
   ========================= */

@media (max-width: 600px) {

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  #app,
  .app,
  .container,
  .page,
  main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  * {
    box-sizing: border-box;
  }

  .card,
  .taskCard,
  .panel,
  .modal,
  .login-card {
    width: 100%;
    max-width: 100%;
  }

  .headerline {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .right {
    max-width: 100%;
    flex-wrap: wrap;
  }

  /* Viršutinė vartotojo / įmonės zona */
  .headerline .btn,
  .userBtn,
  .company-pill {
    max-width: 100%;
    font-size: 12px;
    padding: 6px 8px;
  }

  /* Tabai telefone turi ne slinkti, o gražiai lūžti į kelias eilutes */
  .tabs {
    width: 100%;
    max-width: 100%;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    overflow-x: hidden !important;
  }

  .tabs .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    text-align: center;
    font-size: 12px;
    line-height: 1.15;
    padding: 7px 6px;
  }

  /* Jeigu yra labai trumpi tabai, tegul irgi susispaudžia */
  .tabs .btn.primary {
    min-width: 0;
  }

  /* Bendras telefono kompaktiškumas */
  body {
    font-size: 13px;
  }

  .container {
    padding: 6px;
  }

  .card {
    padding: 8px 9px;
    margin-bottom: 7px;
    border-radius: 10px;
  }

  .card h1,
  .card h2,
  .card h3 {
    font-size: 18px;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 7px;
  }

  .taskCard {
    padding: 9px;
    margin-bottom: 7px;
    border-radius: 10px;
  }

  .taskTitle {
    font-size: 15px;
    line-height: 1.2;
  }

  .taskSummary,
  .taskMeta,
  .muted {
    font-size: 11px;
    line-height: 1.25;
  }

  .btn {
    font-size: 12px;
    padding: 7px 8px;
    min-height: 34px;
    line-height: 1.1;
    border-radius: 8px;
  }

  input,
  select,
  textarea {
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    padding: 7px 8px;
  }

  textarea {
    min-height: 62px;
  }

  .row,
  .row-2,
  .row-3,
  .row-4 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px;
    width: 100%;
    max-width: 100%;
  }

  /* Ilgi tekstai / ID nebeturi ištempti ekrano */
  .taskTitle,
  .taskSummary,
  .taskMeta,
  .muted,
  td,
  th,
  div,
  span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Logo mažiau vietos telefone */
  .login-card img,
  .headerline img[alt="Logo"] {
    max-height: 60px !important;
  }

  /* Statusų ženkliukai */
  .pill,
  .taskBadge,
  .service-badge,
  .lube-pill {
    font-size: 10px;
    padding: 3px 6px;
    max-width: 100%;
    white-space: normal;
  }

  /* Lentelės jei bus — ne ištempia puslapį, o pačios scrollina viduje */
  table {
    font-size: 11px;
    max-width: 100%;
  }

  .table-wrap,
  .history-table-wrap,
  .checks-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 600px) {

  /* Jeigu kažkur inline style ar flex ištempia viršų */
  .topbar,
  .shell,
  .app-shell,
  .main-shell {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Vartotojo mygtukas su ilgu vardu */
  .userBtn {
    flex: 1 1 100%;
    justify-content: center;
  }

  /* Įmonės pasirinkimas ir vartotojas po vieną eilutėje */
  .headerline .right {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .headerline .right>* {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* =========================
   DISABLE MOBILE ZOOM
   ========================= */

html,
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 600px) {

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  button,
  .btn,
  a {
    touch-action: manipulation;
  }
}

.demo-switcher {
  position: sticky;
  top: 0;
  z-index: 50;
  border: 2px solid #17384d;
  background: #f8fafc;
}

.demo-switcher .right {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 600px) {
  .demo-switcher {
    position: static;
  }

  .demo-switcher .right {
    width: 100%;
  }

  .demo-switcher .right .btn {
    flex: 1 1 calc(50% - 6px);
  }
}

/* =====================================================
   KROVOS PASIEKIAMUMO PLANUOKLIS
   ===================================================== */

.reach-planner-card {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}

.reach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.reach-header h2 {
  margin: 0;
  font-size: 22px;
  color: #f8fafc;
}

.reach-header p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.reach-secondary-btn {
  border: 1px solid rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.15);
  color: #bfdbfe;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.reach-secondary-btn:hover {
  background: rgba(37, 99, 235, 0.28);
}

.reach-layout {
  display: grid;
  grid-template-columns: 270px minmax(420px, 1fr) 270px;
  gap: 14px;
  margin-top: 14px;
}

.reach-panel {
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 14px;
}

.reach-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #f8fafc;
}

.reach-inputs label {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin: 10px 0 5px;
}

.reach-inputs input,
.reach-inputs select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #020617;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 9px 10px;
  outline: none;
}

.reach-inputs input:focus,
.reach-inputs select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.reach-visual-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reach-visual-top h3 {
  margin-bottom: 4px;
}

.reach-status {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.reach-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.reach-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.reach-bad {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

#reachCanvas,
#reachTopCanvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #020617;
}

.reach-result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
}

.reach-result-row span {
  color: #cbd5e1;
}

#reachCapacitySource {
  white-space: pre-line;
}

.reach-result-row b {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.reach-source-row {
  grid-template-columns: 1fr;
  gap: 4px;
}

.reach-source-row span {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
}

.reach-source-row b {
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  color: #dbeafe;
}

.reach-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  color: #bae6fd;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .reach-layout {
    grid-template-columns: 1fr;
  }

  .reach-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Pasiekiamumo planuoklis – parametrai viršuje */

.reach-layout-top {
  display: block;
}

.reach-inputs-top {
  margin-bottom: 14px;
}

.reach-input-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.reach-input-grid label {
  display: block;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 5px;
}

.reach-input-grid input,
.reach-input-grid select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #020617;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 8px 9px;
  outline: none;
}

.reach-angle-box {
  grid-column: span 2;
}

.reach-angle-box input[type="range"] {
  padding: 0;
  height: 32px;
  cursor: pointer;
}

.reach-main-grid {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) 280px;
  gap: 14px;
}

@media (max-width: 1300px) {
  .reach-input-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .reach-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .reach-input-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .reach-angle-box {
    grid-column: span 2;
  }
}

@media (max-width: 520px) {
  .reach-input-grid {
    grid-template-columns: 1fr;
  }

  .reach-angle-box {
    grid-column: span 1;
  }
}

.reach-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 12px;
  align-items: start;
}

.reach-visual-main,
.reach-visual-topside {
  min-width: 0;
}

.reach-subtitle {
  font-weight: 700;
  margin: 0 0 10px;
  color: #e5e7eb;
}

#reachCanvas,
#reachTopCanvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #020617;
  display: block;
}

@media (max-width: 1400px) {
  .reach-visual-grid {
    grid-template-columns: 1fr;
  }
}

.reach-load-chart {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.reach-load-chart-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #e5e7eb;
}

.reach-load-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.reach-load-chart-table th,
.reach-load-chart-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: left;
}

.reach-load-chart-table th {
  color: #cbd5e1;
  font-weight: 700;
}

.reach-chart-current td {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  font-weight: 700;
}
/* PRODUCT DEV / Superadmin moduliai */

.super-modules {
  margin-top: 14px;
}

.super-module {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 92px;
  padding: 14px 12px !important;
  box-sizing: border-box;
}

.super-module input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center;
}

.super-module-main {
  min-width: 0 !important;
  width: auto !important;
}

.super-module-title {
  display: block !important;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.super-module-desc {
  margin-top: 4px;
  line-height: 1.3;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

.super-module-state {
  justify-self: end;
  align-self: center;
  white-space: nowrap !important;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
}
.change-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 999998;
}

.change-modal-box {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  z-index: 999999;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
/* Superadmin viršutiniai tab'ai */

.super-tabs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  margin: 12px 0 !important;
  align-items: center !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  padding-bottom: 4px;
}

.super-tabs .btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
.mf-toast-container{

    position:fixed;

    top:20px;

    right:20px;

    z-index:99999;

    display:flex;

    flex-direction:column;

    gap:12px;
}

.mf-toast{

    min-width:280px;

    max-width:420px;

    padding:14px 18px;

    border-radius:10px;

    color:#fff;

    font-weight:600;

    opacity:0;

    transform:translateX(50px);

    transition:.25s;
}

.mf-toast.show{

    opacity:1;

    transform:translateX(0);
}

.mf-toast.success{

    background:#2e7d32;
}

.mf-toast.error{

    background:#c62828;
}

.mf-toast.warning{

    background:#ef6c00;
}

.mf-toast.info{

    background:#1565c0;
}
/* MaintFlow mobile / superadmin responsive fix */
@media (max-width: 768px) {

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  #app,
  .app,
  .page,
  .container,
  .content,
  .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .row,
  .row-2,
  .row-3,
  .row-4 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  input,
  select,
  textarea,
  button {
    max-width: 100%;
    box-sizing: border-box;
  }

  .tabs {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    max-width: 100%;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .tabs .btn,
  .tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  table {
    min-width: 700px;
  }

  .card:has(table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .headerline {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .headerline .right,
  .right {
    width: 100%;
    max-width: 100%;
  }

  #mf-version-badge {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    font-size: 12px !important;
    text-align: center;
    white-space: normal !important;
  }
}
/* Mažesnis MaintFlow versijos badge */
#mf-version-badge {
  font-size: 11px !important;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  left: 6px !important;
  bottom: 6px !important;
  max-width: 220px !important;
  line-height: 1.2 !important;
  opacity: 0.92;
}
/* Skaitiklių technikos nustatymų lentelė */

.meter-settings-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.meter-settings-table {
  display: table;
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.meter-settings-table th,
.meter-settings-table td {
  padding: 6px 8px;
  vertical-align: middle;
}

.meter-settings-table th:nth-child(1) {
  width: 22%;
}

.meter-settings-table th:nth-child(2) {
  width: 11%;
}

.meter-settings-table th:nth-child(3) {
  width: 11%;
}

.meter-settings-table th:nth-child(4) {
  width: 11%;
}

.meter-settings-table th:nth-child(5) {
  width: 18%;
}

.meter-settings-table th:nth-child(6) {
  width: 16%;
}

.meter-settings-table th:nth-child(7) {
  width: 11%;
}

.meter-settings-table input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

.meter-settings-table select,
.meter-current-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.meter-settings-table label {
  white-space: normal !important;
  gap: 5px !important;
}

@media (max-width: 1000px) {
  .meter-settings-table {
    min-width: 820px;
  }
}
/* Kompaktiškesnė sandėlio lentelė */
.warehouse-table {
  font-size: 13px;
}

.warehouse-table th {
  font-size: 13px;
  padding: 8px 6px;
}

.warehouse-table td {
  font-size: 13px;
  padding: 7px 6px;
  line-height: 1.25;
}

.warehouse-table button {
  font-size: 12px;
  padding: 6px 9px;
}

.warehouse-table .btn {
  font-size: 12px;
  padding: 6px 9px;
}
/* =========================================================
   MAINTFLOW ADMIN SHELL – kairysis meniu ir viršutinė juosta
   ========================================================= */
body.mf-admin-active {
  background: #f4f7fb;
  color: #0b1739;
  overflow-x: hidden;
}

body.mf-admin-active #app.container {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.mf-admin-active #maintflowVersionBadge,
body.mf-admin-active #mf-version-badge {
  display: none !important;
}

.mf-admin-layout {
  min-height: 100vh;
  background: #f4f7fb;
  color: #0b1739;
}

.mf-admin-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1200;
  width: 100%;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px 0 28px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e3eaf4;
  box-shadow: 0 2px 12px rgba(15, 35, 70, 0.05);
  backdrop-filter: blur(12px);
}

.mf-topbar-left,
.mf-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mf-topbar-right {
  margin-left: auto;
  justify-content: flex-end;
}

.mf-brand,
.mf-mobile-menu,
.mf-notification-button,
.mf-user-button,
.mf-topbar-action {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.mf-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 178px;
  padding: 0;
  background: transparent;
  color: #08245c;
  text-align: left;
}

.mf-brand-mark {
  width: 39px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

.mf-brand-copy {
  display: grid;
  align-content: center;
  line-height: 1;
}

.mf-brand-copy strong {
  position: relative;
  display: inline-block;
  font-size: 20px;
  letter-spacing: -0.45px;
  color: #071d4e;
}

.mf-brand-copy strong::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  background: #075be7;
  border-radius: 99px;
}

.mf-brand-copy small {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: #075be7;
}

.mf-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 260px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #dbe5f1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 35, 70, 0.04);
  color: #0a1738;
  font-size: 13px;
  font-weight: 750;
}

.mf-company-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-company-chip .mf-svg-icon {
  color: #075be7;
}

.mf-topbar-action {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #dbe5f1;
  border-radius: 9px;
  background: #fff;
  color: #17345f;
  font-weight: 700;
}

.mf-notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  color: #061a4b;
}

.mf-notification-button:hover,
.mf-user-button:hover,
.mf-topbar-action:hover {
  background: #f1f6ff;
}

.mf-notification-button > span {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e50914;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.mf-user-menu {
  position: relative;
}

.mf-user-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  max-width: 270px;
  padding: 7px 12px 7px 8px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  color: #0b1739;
  font-size: 13px;
  font-weight: 750;
}

.mf-user-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: #075be7;
}

.mf-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-user-button > .mf-svg-icon:last-child {
  width: 15px;
  height: 15px;
}

.mf-user-menu .userDropdown {
  top: 50px;
  min-width: 235px;
  border-color: #dbe5f1;
  box-shadow: 0 16px 40px rgba(9, 31, 70, 0.18);
}

.mf-mobile-menu {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 9px;
  background: #edf4ff;
  color: #075be7;
}

.mf-svg-icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.mf-admin-frame {
  display: block;
  min-height: 100vh;
  padding-top: 74px;
}

.mf-admin-sidebar {
  position: fixed;
  top: 74px;
  bottom: 0;
  left: 0;
  z-index: 800;
  width: 232px;
  height: auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    radial-gradient(circle at 40% 0%, rgba(12, 96, 220, 0.22), transparent 34%),
    linear-gradient(180deg, #071b46 0%, #031431 100%);
  color: #fff;
  box-shadow: 8px 0 24px rgba(4, 22, 55, 0.08);
}

.mf-admin-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 12px 16px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}

.mf-nav-group {
  display: grid;
  gap: 3px;
}

.mf-nav-divider {
  height: 1px;
  margin: 14px 10px;
  background: rgba(255, 255, 255, 0.14);
}

.mf-nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 9px 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eef5ff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, color .16s ease;
}

.mf-nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(1px);
}

.mf-nav-item.active {
  background: linear-gradient(135deg, #0872f6 0%, #0754dd 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 87, 230, 0.28);
}

.mf-nav-item.has-attention:not(.active)::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 99px;
  background: #ffb020;
  transform: translateY(-50%);
}

.mf-nav-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mf-nav-main .mf-svg-icon {
  width: 20px;
  height: 20px;
}

.mf-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-nav-stats {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.mf-nav-count {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #075be7;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.mf-nav-today {
  color: #7dd3fc;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.mf-nav-item.active .mf-nav-count {
  background: rgba(0, 31, 92, 0.34);
}

.mf-nav-item.active .mf-nav-today {
  color: rgba(255, 255, 255, 0.82);
}

.mf-sidebar-footer {
  flex: 0 0 auto;
  margin: 0 16px 16px;
  padding: 13px 14px;
  border: 1px solid rgba(153, 190, 255, 0.25);
  border-radius: 11px;
  background: rgba(3, 22, 55, 0.62);
  color: #f4f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mf-deployment-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
}

.mf-deployment-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-sidebar-footer small {
  display: block;
  margin: 8px 0 0 23px;
  color: #bfd0ec;
  font-size: 10px;
}

.mf-online-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #16c978;
  box-shadow: 0 0 0 4px rgba(22, 201, 120, 0.11);
}

.mf-sidebar-backdrop {
  display: none;
}

.mf-admin-content {
  min-width: 0;
  min-height: calc(100vh - 74px);
  margin-left: 232px;
  padding: 22px 26px 34px;
  background:
    radial-gradient(circle at 22% 0%, rgba(224, 235, 252, 0.56), transparent 28%),
    #f4f7fb;
}

.mf-admin-body {
  min-width: 0;
}

.mf-admin-body > .card:first-child,
.mf-admin-body > :first-child {
  margin-top: 0;
}

.mf-page-heading,
.mf-dashboard-heading {
  margin: 0 0 16px;
}

.mf-page-heading h1,
.mf-dashboard-heading h1 {
  margin: 0;
  color: #091b49;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.7px;
}

.mf-dashboard-heading p {
  margin: 6px 0 0;
  color: #536485;
  font-size: 13px;
}

.mf-update-banner {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 12px;
  padding: 10px 13px;
  border: 1px solid #bee9ce;
  border-left: 4px solid #17a967;
  border-radius: 9px;
  background: #f2fff7;
  color: #155d39;
  font-size: 12px;
}

.mf-update-banner span {
  color: #46725b;
}

.mf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mf-kpi-card {
  min-width: 0;
  min-height: 106px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid #e1e8f2;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(25, 50, 90, 0.055);
}

.mf-kpi-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
}

.mf-kpi-icon .mf-svg-icon {
  width: 29px;
  height: 29px;
  stroke-width: 1.9;
}

.mf-tone-blue {
  background: #edf4ff;
  color: #075be7;
}

.mf-tone-green {
  background: #e8fbf1;
  color: #0ca65f;
}

.mf-tone-red {
  background: #fff0f0;
  color: #e11d2e;
}

.mf-kpi-copy {
  min-width: 0;
}

.mf-kpi-label {
  color: #536485;
  font-size: 12px;
  font-weight: 650;
}

.mf-kpi-value {
  margin-top: 4px;
  color: #071842;
  font-size: 27px;
  font-weight: 830;
  line-height: 1;
}

.mf-kpi-detail {
  margin-top: 7px;
  color: #536485;
  font-size: 10px;
}

.mf-kpi-alert {
  color: #e31b23;
  font-weight: 750;
}

.mf-health-card,
.mf-quick-section {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #e1e8f2;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(25, 50, 90, 0.045);
}

.mf-section-eyebrow {
  margin-bottom: 5px;
  color: #5b6c8c;
  font-size: 11px;
  font-weight: 650;
}

.mf-health-card h2,
.mf-quick-section h2 {
  margin: 0;
  color: #0a1b48;
  font-size: 15px;
  line-height: 1.2;
}

.mf-health-bar {
  height: 14px;
  display: flex;
  overflow: hidden;
  margin: 13px 0 12px;
  border-radius: 999px;
  background: #e7edf6;
}

.mf-health-segment {
  min-width: 0;
  height: 100%;
}

.mf-health-ok { background: #13ad68; }
.mf-health-notes { background: #f3bd0d; }
.mf-health-active { background: #ff7518; }
.mf-health-out { background: #ed1525; }
.mf-health-waiting { background: #7b2bb6; }
.mf-health-unknown { background: #8a45c2; }

.mf-health-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.mf-health-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #344463;
  font-size: 11px;
}

.mf-health-legend-item b {
  color: #0b1739;
}

.mf-health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.mf-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mf-quick-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  gap: 9px;
}

.mf-quick-card {
  min-width: 0;
  min-height: 80px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 11px 8px;
  border: 1px solid #e4ebf4;
  border-radius: 9px;
  background: #fff;
  color: #12244f;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mf-quick-card:hover {
  transform: translateY(-2px);
  border-color: #a9c8fb;
  box-shadow: 0 8px 20px rgba(24, 83, 180, 0.1);
}

.mf-quick-icon {
  display: grid;
  place-items: center;
  color: #075be7;
}

.mf-quick-icon .mf-svg-icon {
  width: 28px;
  height: 28px;
}

.mf-dashboard-extra > .card {
  margin-bottom: 14px;
}

/* Moduliai išlaiko savo esamą logiką, tik gauna švaresnę išorinę erdvę. */
.mf-admin-content .card {
  border-color: #e1e8f2;
  box-shadow: 0 5px 18px rgba(25, 50, 90, 0.035);
}

@media (max-width: 1280px) {
  .mf-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mf-quick-grid {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }
}

@media (max-width: 960px) {
  .mf-admin-topbar {
    height: 66px;
    padding: 0 14px;
  }

  .mf-mobile-menu {
    display: grid;
  }

  .mf-brand {
    min-width: 0;
  }

  .mf-brand-mark {
    width: 34px;
    height: 40px;
  }

  .mf-brand-copy strong {
    font-size: 18px;
  }

  .mf-company-chip {
    max-width: 210px;
  }

  .mf-admin-frame {
    display: block;
    min-height: 100vh;
    padding-top: 66px;
  }

  .mf-admin-sidebar {
    position: fixed;
    top: 66px;
    left: 0;
    z-index: 1400;
    width: 250px;
    height: calc(100vh - 66px);
    transform: translateX(-104%);
    transition: transform .22s ease;
  }

  body.mf-admin-sidebar-open .mf-admin-sidebar {
    transform: translateX(0);
  }

  .mf-sidebar-backdrop {
    position: fixed;
    inset: 66px 0 0;
    z-index: 1300;
    display: block;
    border: 0;
    background: rgba(2, 12, 32, 0.46);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.mf-admin-sidebar-open .mf-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mf-admin-content {
    min-height: calc(100vh - 66px);
    margin-left: 0;
    padding: 18px 16px 28px;
  }
}

@media (max-width: 680px) {
  .mf-admin-topbar {
    gap: 8px;
    padding: 0 9px;
  }

  .mf-topbar-left,
  .mf-topbar-right {
    gap: 7px;
  }

  .mf-brand-copy,
  .mf-company-chip .mf-svg-icon,
  .mf-user-name {
    display: none;
  }

  .mf-brand {
    min-width: auto;
  }

  .mf-brand-mark {
    width: 31px;
    height: 37px;
  }

  .mf-company-chip {
    max-width: min(34vw, 150px);
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .mf-notification-button {
    width: 38px;
    height: 38px;
  }

  .mf-user-button {
    min-height: 38px;
    padding: 5px 7px;
  }

  .mf-user-avatar {
    width: 27px;
    height: 27px;
  }

  .mf-admin-content {
    padding: 14px 9px 24px;
  }

  .mf-update-banner {
    display: block;
  }

  .mf-update-banner span {
    display: block;
    margin-top: 3px;
  }

  .mf-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .mf-kpi-card {
    min-height: 93px;
    gap: 9px;
    padding: 12px 10px;
  }

  .mf-kpi-icon {
    width: 36px;
    height: 36px;
  }

  .mf-kpi-icon .mf-svg-icon {
    width: 23px;
    height: 23px;
  }

  .mf-kpi-value {
    font-size: 22px;
  }

  .mf-kpi-label {
    font-size: 10px;
  }

  .mf-kpi-detail {
    margin-top: 5px;
    font-size: 9px;
  }

  .mf-health-card,
  .mf-quick-section {
    padding: 13px 12px;
  }

  .mf-health-legend {
    gap: 10px 13px;
  }

  .mf-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mf-page-heading h1,
  .mf-dashboard-heading h1 {
    font-size: 24px;
  }
}

@media (max-width: 390px) {
  .mf-company-chip {
    display: none;
  }

  .mf-kpi-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   BENDRAS FIKSUOTAS VAIZDAS: MECHANIKAS / VIEWER / SUPERADMIN
   ========================================================= */
.mf-role-shell .mf-role-summary:empty {
  display: none;
}

.mf-role-shell .mf-role-summary > .card,
.mf-role-shell .mf-role-summary > :first-child {
  margin-top: 0;
}

.mf-role-shell .mf-admin-body > .card:first-child {
  margin-top: 0;
}

/* Superadmin senieji viršutiniai tab'ai pakeisti kairiuoju meniu. */
.mf-role-superadmin .mf-admin-body > .card:first-child > h2,
.mf-role-superadmin .mf-admin-body > .card:first-child .super-tabs > button[data-super-tab] {
  display: none !important;
}

.mf-role-superadmin .mf-admin-body > .card:first-child .super-tabs {
  display: block;
  margin: 0;
}

.mf-role-superadmin:not([data-role-view="companies"]) .mf-admin-body > .card:first-child {
  display: none;
}

@media (max-width: 960px) {
  .mf-role-shell .mf-admin-nav {
    padding-bottom: 18px;
  }
}

/* =========================================================
   MAINTFLOW UI POLISH – kompaktiškesnės užduotys ir vieninga sąsaja
   ========================================================= */
.mf-admin-active *,
.mf-admin-active *::before,
.mf-admin-active *::after {
  box-sizing: border-box;
}

.mf-admin-active button,
.mf-admin-active .btn,
.mf-admin-active input,
.mf-admin-active select,
.mf-admin-active textarea,
.mf-admin-active .card,
.mf-admin-active .taskCard {
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}

.mf-admin-active input:focus,
.mf-admin-active select:focus,
.mf-admin-active textarea:focus {
  outline: none;
  border-color: #72a7f6;
  box-shadow: 0 0 0 3px rgba(7, 91, 231, .11);
}

.mf-admin-active .btn:hover {
  transform: translateY(-1px);
}

.mf-task-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.mf-task-kpi {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid #e0e8f3;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(25, 50, 90, .04);
}

.mf-task-kpi span {
  color: #5b6c8c;
  font-size: 12px;
  font-weight: 700;
}

.mf-task-kpi strong {
  color: #071842;
  font-size: 24px;
  line-height: 1;
}

.mf-task-kpi.is-alert {
  border-color: #ffc7cb;
  background: #fff7f7;
}

.mf-task-kpi.is-alert strong {
  color: #d7192d;
}

.mf-task-create-card {
  padding: 16px 18px !important;
  margin-bottom: 12px !important;
  border-radius: 12px !important;
}

.mf-task-create-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.mf-task-create-heading h3 {
  margin: 0;
  color: #091b49;
  font-size: 17px;
}

.mf-task-create-hint {
  color: #71809c;
  font-size: 11px;
}

.mf-task-create-card .row {
  gap: 10px !important;
}

.mf-task-create-card .muted {
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
}

.mf-task-create-card input,
.mf-task-create-card select {
  min-height: 38px;
}

.mf-task-list {
  display: grid;
  gap: 8px;
}

.mf-task-card-polished {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid #e1e8f2 !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(25, 50, 90, .035) !important;
}

.mf-task-card-polished:hover {
  border-color: #b9cef0 !important;
  box-shadow: 0 8px 22px rgba(25, 65, 125, .075) !important;
}

.mf-task-card-polished.danger {
  border-left: 4px solid #e0313f !important;
  background: #fffafa !important;
}

.mf-task-card-polished.out-service {
  border-left: 4px solid #991b1b !important;
}

.mf-task-card-polished .taskHead {
  min-height: 72px;
  padding: 11px 14px !important;
  gap: 14px;
}

.mf-task-card-polished .taskMeta {
  margin-bottom: 3px;
  color: #62718d;
  font-size: 11px;
  line-height: 1.25;
}

.mf-task-card-polished .taskTitle {
  color: #091b49;
  font-size: 14px;
  line-height: 1.25;
}

.mf-task-card-polished .taskSummary {
  margin-top: 4px;
  color: #60708c;
  font-size: 11px;
  line-height: 1.3;
}

.mf-task-card-polished .taskBadge {
  padding: 5px 9px;
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  background: #edf4ff;
  color: #0754c9;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.mf-task-card-polished .taskCaret {
  color: #71809c;
  font-size: 11px;
}

.mf-task-card-polished .taskBody {
  padding: 14px 16px 16px !important;
  border-top: 1px solid #e8edf5;
  background: #fbfcfe;
  font-size: 12px;
}

.mf-admin-active .pill.status-open,
.mf-admin-active .pill.status-progress,
.mf-admin-active .pill.status-done {
  border-radius: 999px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .mf-task-create-card .row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .mf-task-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mf-task-create-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mf-task-create-card .row {
    grid-template-columns: 1fr !important;
  }

  .mf-task-card-polished .taskHead {
    min-height: 64px;
  }
}

/* MaintFlow UI polish: compact new-task form */
.mf-task-search {
  margin: 8px 0 14px;
}

.mf-task-search input {
  width: 100%;
  min-height: 42px;
}

.mf-task-create-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.05fr) minmax(220px, 1.35fr) minmax(220px, 1.35fr) minmax(190px, 1.1fr) minmax(190px, 1.05fr) minmax(220px, 1.25fr);
  gap: 12px;
  align-items: start;
}

.mf-task-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.mf-task-field > span {
  color: #51617d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.mf-task-field input,
.mf-task-field select {
  width: 100%;
  min-width: 0;
}

.mf-task-field-mechanic:not(.hidden) {
  display: flex;
}

.mf-task-field-file .paste-image-box {
  min-height: 38px;
  margin-top: 6px !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  line-height: 1.25;
}

.mf-task-field-file .paste-image-box .small {
  display: none;
}

.mf-task-create-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
}

.mf-task-create-footer #ntMsg {
  margin: 0;
  font-size: 11px;
}

.mf-task-create-footer #ntSave {
  min-width: 158px;
  min-height: 40px;
}

@media (max-width: 1450px) {
  .mf-task-create-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mf-task-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .mf-task-create-grid {
    grid-template-columns: 1fr;
  }

  .mf-task-create-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mf-task-create-footer #ntSave {
    width: 100%;
  }
}

/* MaintFlow Tasks Workspace 0.9.0 */
.mf-task-workspace {
  display: grid;
  grid-template-columns: minmax(310px, 34%) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.mf-task-workspace-list,
.mf-task-workspace-detail {
  min-width: 0;
  border: 1px solid #dfe5ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.mf-task-workspace-list {
  position: sticky;
  top: 12px;
  overflow: hidden;
}

.mf-task-workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 10px;
}

.mf-task-workspace-toolbar h3 { margin: 2px 0 0; }
.mf-task-workspace-count {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #244ca5;
  font-weight: 800;
}

.mf-task-quick-filters {
  display: flex;
  gap: 7px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.mf-task-filter-chip {
  border: 1px solid #d8e0ea;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.mf-task-filter-chip span { margin-left: 5px; opacity: .7; }
.mf-task-filter-chip:hover { border-color: #91a9d9; background: #f1f6ff; }
.mf-task-filter-chip.is-active { background: #173f91; color: #fff; border-color: #173f91; }

.mf-task-workspace-scroll {
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding: 0 10px 12px;
}

.mf-task-workspace-item {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 12px;
  margin: 0 0 8px;
  border: 1px solid #e3e8ef;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.mf-task-workspace-item:hover { transform: translateY(-1px); border-color: #a8bce2; box-shadow: 0 7px 18px rgba(15, 23, 42, .08); }
.mf-task-workspace-item.is-selected { border-color: #2c61c9; background: #f3f7ff; box-shadow: inset 3px 0 0 #2c61c9; }
.mf-task-workspace-item.is-late:not(.is-selected) { border-left: 3px solid #dc2626; }
.mf-task-workspace-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.mf-task-workspace-item-top strong { font-size: 14px; line-height: 1.3; }
.mf-task-workspace-item .taskBadge { flex: 0 0 auto; font-size: 10px; padding: 4px 7px; }
.mf-task-workspace-item-equipment { color: #1e3a68; font-weight: 700; font-size: 12px; }
.mf-task-workspace-item-meta { display: flex; justify-content: space-between; gap: 8px; color: #64748b; font-size: 11px; }
.mf-task-workspace-item-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mf-task-workspace-detail { padding: 10px; }
.mf-task-workspace-detail > .taskCard { margin: 0; box-shadow: none; border: 0; }
.mf-task-workspace-detail .taskCaret { display: none; }
.mf-task-workspace-placeholder,
.mf-task-workspace-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 220px;
  padding: 28px;
  color: #64748b;
  text-align: center;
}
.mf-task-workspace-placeholder strong { color: #1e293b; font-size: 18px; }

@media (max-width: 980px) {
  .mf-task-workspace { grid-template-columns: 1fr; }
  .mf-task-workspace-list { position: static; }
  .mf-task-workspace-scroll { max-height: 390px; }
}

@media (max-width: 620px) {
  .mf-task-workspace { gap: 10px; }
  .mf-task-workspace-list,
  .mf-task-workspace-detail { border-radius: 12px; }
  .mf-task-workspace-item-meta { flex-wrap: wrap; justify-content: flex-start; }
}
/* Sidebar width */
@media (min-width: 961px) {
  .mf-admin-sidebar {
    width: 300px;
  }

  .mf-admin-content {
    margin-left: 300px;
  }

  .mf-admin-nav {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mf-nav-item {
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .mf-nav-main {
    gap: 11px;
  }

  .mf-nav-label {
    overflow: visible;
    text-overflow: clip;
  }

  .mf-sidebar-footer {
    margin-left: 14px;
    margin-right: 14px;
  }
}

/* MB Control module inside Super Admin */
.mb-control-module {
  width: 100%;
  min-height: calc(100vh - 150px);
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.mb-control-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 150px);
  min-height: 720px;
  border: 0;
  background: #0b1220;
}

@media (max-width: 760px) {
  .mb-control-module,
  .mb-control-frame {
    min-height: calc(100vh - 96px);
    height: calc(100vh - 96px);
    border-radius: 12px;
  }
}


/* MB Control native Super Admin module */
.mbc-shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:680px;border:1px solid #ccd7e6;border-radius:16px;overflow:hidden;background:#f5f7fb;box-shadow:0 14px 38px rgba(10,30,70,.08)}
.mbc-sidebar{background:linear-gradient(180deg,#0a234d 0%,#071a39 100%);padding:18px 12px;color:#fff;display:flex;flex-direction:column;gap:16px}
.mbc-brand{display:flex;align-items:center;gap:10px;padding:4px 8px 14px;border-bottom:1px solid rgba(255,255,255,.13)}
.mbc-brand-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#7958ff,#4f7cff);font-weight:900}
.mbc-brand small{display:block;color:#9eb4d8;margin-top:2px}.mbc-nav{display:grid;gap:5px}.mbc-nav-btn{border:0;background:transparent;color:#c9d7ed;border-radius:10px;padding:10px 11px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}.mbc-nav-btn:hover,.mbc-nav-btn.active{background:#1769e8;color:#fff}.mbc-nav-btn span{width:22px;text-align:center}.mbc-storage-note{margin-top:auto;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:11px;color:#dce7f8}.mbc-storage-note small{color:#aabbd5}
.mbc-main{padding:22px;min-width:0}.mbc-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.mbc-topbar h2{margin:2px 0 0;font-size:25px}.mbc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.mbc-kpis-3{grid-template-columns:repeat(3,minmax(0,1fr))}.mbc-kpi,.mbc-panel,.mbc-mini-card{background:#fff;border:1px solid #dfe6f0;border-radius:14px;box-shadow:0 6px 18px rgba(20,38,70,.05)}.mbc-kpi{padding:16px}.mbc-kpi span,.mbc-kpi small{display:block;color:#64748b}.mbc-kpi strong{display:block;font-size:24px;margin:7px 0;color:#10254a}.mbc-grid-2{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(260px,.8fr);gap:14px}.mbc-panel{padding:16px;margin-bottom:14px;min-width:0}.mbc-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.mbc-panel-title h3{margin:0}.mbc-table-wrap{overflow:auto}.mbc-table{width:100%;border-collapse:collapse}.mbc-table th,.mbc-table td{padding:11px 10px;border-bottom:1px solid #e8edf4;text-align:left;white-space:nowrap}.mbc-table th{font-size:12px;text-transform:uppercase;color:#718096}.mbc-status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;background:#fff4cc;color:#8a6500}.mbc-status.is-ok{background:#dff8e8;color:#08783d}.mbc-status.is-danger{background:#ffe2e2;color:#b42318}.mbc-quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mbc-quick-actions button{border:1px solid #dce5f2;background:#f7f9fc;border-radius:12px;padding:16px;text-align:left;font-weight:700;cursor:pointer}.mbc-quick-actions button:hover{border-color:#1769e8;background:#eef5ff}.mbc-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.mbc-mini-card{padding:15px;display:grid;gap:8px}.mbc-mini-card span,.mbc-mini-card small{color:#64748b}.mbc-empty{padding:28px;display:grid;gap:5px;color:#64748b}.mbc-empty b{color:#10254a}.mbc-event{display:grid;grid-template-columns:110px 1fr auto;gap:14px;align-items:center;padding:12px;border-bottom:1px solid #e8edf4}.mbc-event-date{font-weight:800;color:#1769e8}.mbc-report-bars{display:grid;gap:18px}.mbc-report-bars>div{display:grid;grid-template-columns:100px 1fr 130px;align-items:center;gap:12px}.mbc-report-bars progress{width:100%;height:14px}.mbc-settings{display:grid;max-width:520px;gap:13px}.mbc-settings label,.mbc-form-grid label{display:grid;gap:6px;font-weight:700}.mbc-modal-backdrop{position:fixed;inset:0;background:rgba(5,15,35,.58);z-index:9999;display:grid;place-items:center;padding:20px}.mbc-modal{width:min(620px,100%);background:#fff;border-radius:16px;padding:18px;box-shadow:0 30px 80px rgba(0,0,0,.3)}.mbc-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}.mbc-form-grid input,.mbc-form-grid select{width:100%}
@media(max-width:980px){.mbc-shell{grid-template-columns:1fr}.mbc-sidebar{position:static}.mbc-nav{display:flex;overflow:auto}.mbc-nav-btn{white-space:nowrap}.mbc-storage-note{display:none}.mbc-kpis{grid-template-columns:1fr 1fr}.mbc-grid-2{grid-template-columns:1fr}}
@media(max-width:620px){.mbc-main{padding:12px}.mbc-kpis,.mbc-kpis-3,.mbc-form-grid{grid-template-columns:1fr}.mbc-quick-actions{grid-template-columns:1fr}.mbc-topbar{align-items:flex-start}.mbc-event{grid-template-columns:1fr}.mbc-report-bars>div{grid-template-columns:1fr}}

/* MB Control v1.0 papildymai */
.mbc-top-actions{display:flex;gap:8px;align-items:center}.mbc-modal.wide{width:min(980px,calc(100vw - 30px))}.mbc-line-head{display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px}.mbc-invoice-line{display:grid;grid-template-columns:minmax(240px,1fr) 90px 90px 130px 42px;gap:8px;margin-bottom:8px}.mbc-invoice-line input{min-width:0}.mbc-invoice-total{text-align:right;font-size:20px;font-weight:800;padding:14px 0}.mbc-check{display:flex!important;align-items:center;gap:8px}.mbc-check input{width:auto!important}.mbc-table td:last-child{white-space:nowrap}.mbc-table .small{font-size:11px}.mbc-modal select,.mbc-settings select{width:100%;min-height:40px;border:1px solid var(--line,#ccd5e0);border-radius:8px;padding:8px;background:var(--card,#fff);color:inherit}.mbc-modal input[type=file]{padding:7px}.mbc-storage-note{line-height:1.35}
@media(max-width:850px){.mbc-invoice-line{grid-template-columns:1fr 70px 70px}.mbc-invoice-line input[name=description]{grid-column:1/-1}.mbc-invoice-line button{grid-column:3}.mbc-top-actions{flex-wrap:wrap;justify-content:flex-end}}

/* MB Control v1.2: ranka pasirašomos sąskaitos */
.mbc-sign-wrap{display:grid;gap:12px}.mbc-sign-wrap label{display:grid;gap:6px;font-weight:700}.mbc-sign-wrap input{width:100%}.mbc-sign-wrap canvas{width:100%;height:240px;border:1px dashed #8fa3bf;border-radius:12px;background:#fff;touch-action:none;cursor:crosshair}.mbc-sign-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}

/* =========================================================
   ECOFLEET INTEGRATION
========================================================= */
.mf-eco-page {
  display: grid;
  gap: 16px;
}

.mf-eco-toolbar,
.mf-eco-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}

.mf-eco-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.mf-eco-toolbar h2,
.mf-eco-section h3 {
  margin: 0 0 6px;
}

.mf-eco-toolbar p,
.mf-eco-section p {
  margin: 0;
  color: #64748b;
}

.mf-eco-toolbar-actions,
.mf-eco-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mf-eco-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mf-eco-kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.mf-eco-kpi-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.mf-eco-kpi-value {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.mf-eco-kpi-detail {
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
}

.mf-eco-kpi.mf-eco-working {
  background: #f0fdf4;
  border-color: #86efac;
}

.mf-eco-kpi.mf-eco-missing {
  background: #fef2f2;
  border-color: #fca5a5;
}

.mf-eco-kpi.mf-eco-late {
  background: #fff7ed;
  border-color: #fdba74;
}

.mf-eco-kpi.mf-eco-stale {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.mf-eco-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mf-eco-machine-list,
.mf-eco-link-list {
  display: grid;
  gap: 10px;
}

.mf-eco-machine-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) auto auto;
  align-items: center;
  gap: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  padding: 13px;
}

.mf-eco-machine-main {
  display: grid;
  gap: 3px;
}

.mf-eco-machine-main span,
.mf-eco-machine-meta {
  color: #64748b;
  font-size: 12px;
}

.mf-eco-machine-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.mf-eco-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.mf-eco-badge.mf-eco-working,
.mf-eco-badge.mf-eco-ok {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.mf-eco-badge.mf-eco-missing {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.mf-eco-badge.mf-eco-late {
  background: #ffedd5;
  border-color: #fdba74;
  color: #9a3412;
}

.mf-eco-badge.mf-eco-stale,
.mf-eco-badge.mf-eco-stopped,
.mf-eco-badge.mf-eco-neutral {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.mf-eco-new-link {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.mf-eco-new-link label {
  display: block;
  margin-bottom: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.mf-eco-link-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(210px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 13px;
  padding: 12px;
}

.mf-eco-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
}

.mf-eco-toggle input {
  width: auto;
}

.mf-eco-empty {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  color: #64748b;
}

.mf-eco-alert {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid;
}

.mf-eco-alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.mf-eco-alert-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

@media (max-width: 1100px) {
  .mf-eco-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mf-eco-new-link,
  .mf-eco-link-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .mf-eco-toolbar {
    display: grid;
  }

  .mf-eco-toolbar-actions,
  .mf-eco-toolbar-actions .btn {
    width: 100%;
  }

  .mf-eco-kpi-grid,
  .mf-eco-new-link,
  .mf-eco-link-row,
  .mf-eco-machine-row {
    grid-template-columns: 1fr;
  }

  .mf-eco-machine-meta {
    grid-column: 1;
  }

  .mf-eco-badge {
    justify-self: start;
  }
}


/* ECOFLEET PRIORITY GROUPS */
.mf-eco-state-group {
  margin-top: 16px;
}

.mf-eco-state-group:first-child {
  margin-top: 0;
}

.mf-eco-state-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border, #d9e1e8);
  border-radius: 12px;
}

.mf-eco-state-group-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mf-eco-state-group-head strong {
  font-size: 14px;
}

.mf-eco-state-group-head span {
  font-size: 12px;
  opacity: 0.78;
}

.mf-eco-state-group-count {
  min-width: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
}

.mf-eco-state-group-danger .mf-eco-state-group-head {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.mf-eco-state-group-success .mf-eco-state-group-head {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.mf-eco-state-group-muted .mf-eco-state-group-head {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.mf-eco-state-group-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* MAINTFLOW MOBILE RESPONSIVE FIX 20260730 */

.mbc-document-name,
.mbc-document-file,
.mbc-document-category {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mbc-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.mbc-document-count {
  min-width: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  text-align: center;
  background: #eef4ff;
  color: #1769e8;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img,
  video,
  canvas,
  iframe {
    max-width: 100%;
    height: auto;
  }

  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
  }

  .card,
  .panel,
  .taskCard,
  .taskBody,
  .taskHead,
  .mf-task-card-polished,
  .mf-eco-machine-row,
  .mbc-shell,
  .mbc-main,
  .mbc-panel,
  .mbc-mini-card {
    min-width: 0;
    max-width: 100%;
  }

  .taskHead,
  .headerline,
  .right {
    min-width: 0;
    flex-wrap: wrap;
  }

  .taskHeadLeft,
  .taskTitle,
  .taskSummary,
  .taskMeta {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .mbc-shell {
    display: block;
    width: 100%;
    min-height: 0;
    overflow: visible;
    border-radius: 12px;
  }

  .mbc-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .mbc-brand {
    min-width: 0;
  }

  .mbc-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .mbc-nav-btn {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .mbc-main {
    width: 100%;
    min-width: 0;
    padding: 10px;
    overflow: visible;
  }

  .mbc-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .mbc-topbar h2 {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  .mbc-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .mbc-top-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .mbc-kpis,
  .mbc-kpis-3,
  .mbc-grid-2,
  .mbc-form-grid,
  .mbc-quick-actions,
  .mbc-card-grid,
  .mbc-documents-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .mbc-panel {
    width: 100%;
    padding: 12px;
    overflow: visible;
  }

  .mbc-panel-title {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mbc-panel-title > div {
    min-width: 0;
  }

  .mbc-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .mbc-table {
    width: max-content;
    min-width: 680px;
  }

  .mbc-table th,
  .mbc-table td {
    white-space: nowrap;
  }

  .mbc-documents-panel {
    overflow: visible;
  }

  .mbc-documents-grid {
    display: grid;
    width: 100%;
    max-height: none;
    overflow: visible;
    gap: 10px;
  }

  .mbc-document-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
  }

  .mbc-document-name {
    font-size: 15px;
    line-height: 1.35;
    white-space: normal;
  }

  .mbc-document-file {
    display: block;
    width: 100%;
    line-height: 1.4;
    white-space: normal;
  }

  .mbc-document-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .mbc-document-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .mbc-event {
    grid-template-columns: minmax(0, 1fr);
  }

  .mbc-settings {
    width: 100%;
    max-width: 100%;
  }

  .mbc-modal-backdrop {
    display: block;
    padding: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mbc-modal,
  .mbc-modal.wide {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    margin: 0 auto;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 12px;
  }

  .mbc-modal .right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }

  .mbc-modal .right .btn {
    width: 100%;
    min-width: 0;
  }

  .mbc-invoice-line {
    grid-template-columns: minmax(0, 1fr) minmax(70px, .5fr) !important;
  }

  .mbc-invoice-line input[name="description"] {
    grid-column: 1 / -1;
  }

  .mbc-invoice-line button {
    width: 100%;
  }

  .mf-eco-state-group {
    max-width: 100%;
  }

  .mf-eco-state-group-head {
    align-items: flex-start;
  }

  .mf-eco-machine-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
    gap: 9px;
  }

  .mf-eco-machine-main,
  .mf-eco-machine-meta {
    min-width: 0;
    max-width: 100%;
  }

  .mf-eco-machine-main strong,
  .mf-eco-machine-main span,
  .mf-eco-machine-meta span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .mf-eco-machine-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .mf-eco-badge {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }

  .mf-eco-phone-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .mf-eco-copy-phone {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .mbc-top-actions,
  .mbc-document-actions,
  .mbc-modal .right {
    grid-template-columns: minmax(0, 1fr);
  }

  .mbc-invoice-line {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .mbc-invoice-line > * {
    grid-column: 1 !important;
  }
}


.mf-nav-section-label {
  padding: 17px 18px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

/* === MAINTFLOW DEMO ROLE SWITCHER START === */
.demo-switcher {
  position: fixed !important;
  top: 12px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 20000 !important;

  width: auto !important;
  max-width: min(760px, calc(100vw - 650px));
  margin: 0 !important;
  padding: 6px 8px !important;

  border: 1px solid #cbd5e1 !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.16),
    0 2px 6px rgba(15, 23, 42, 0.08) !important;

  color: #0f172a !important;
  backdrop-filter: blur(12px);
}

.demo-switcher .headerline {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 !important;
}

.demo-switcher .headerline > div:first-child {
  display: flex;
  align-items: center;
}

.demo-switcher h3 {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #475569 !important;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-switcher .muted {
  display: none !important;
}

.demo-switcher .right {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.demo-switcher [data-demo-view] {
  min-height: 38px !important;
  padding: 0 14px !important;

  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;

  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  white-space: nowrap;

  box-shadow: none !important;
  opacity: 1 !important;
}

.demo-switcher [data-demo-view]:hover {
  border-color: #60a5fa !important;
  background: #e0efff !important;
  color: #0756b3 !important;
}

.demo-switcher [data-demo-view].primary {
  border-color: #0878e8 !important;
  background: #0878e8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(8, 120, 232, 0.28) !important;
}

@media (max-width: 1100px) {
  .demo-switcher {
    max-width: calc(100vw - 330px);
  }

  .demo-switcher .headerline > div:first-child {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .demo-switcher {
    top: auto !important;
    bottom: 12px !important;
    left: 12px !important;
    right: 12px !important;
    transform: none !important;

    width: auto !important;
    max-width: none !important;
    padding: 7px !important;
  }

  .demo-switcher .right {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100% !important;
  }

  .demo-switcher [data-demo-view] {
    min-width: 0 !important;
    padding: 0 5px !important;
    font-size: 12px !important;
  }
}
/* === MAINTFLOW DEMO ROLE SWITCHER END === */
