/* ── Reset & base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: #f5f6f6;
  color: #060f10;
  min-height: 100vh;
}

/* ── App header ── */
.app-header {
  background: #fff;
  border-top: 2px solid #e60102;
  box-shadow:
    0 1px 1px rgba(151, 166, 167, 0.25),
    0 1px 1px rgba(151, 166, 167, 0.31),
    0 4px 8px rgba(151, 166, 167, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  min-height: 48px;
}

.app-header-title {
  flex: 1;
  font-weight: 700;
  color: #060f10;
}

/* ── Nav tabs ── */
.nav-tabs {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid #e8ecec;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 12px 8px;
  font-size: 16px;
  color: #404b4c;
  white-space: nowrap;
  border-bottom: 4px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}

.nav-tab.active {
  border-bottom-color: #e60102;
  font-weight: 500;
  color: #060f10;
}

/* ── Worklist ── */
.wl-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}

.wl-filter-row {
  margin-bottom: 12px;
}


.wl-task-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Task card ── */
.task-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 80px;
}

.task-checkbox {
  padding-top: 2px;
  flex-shrink: 0;
}

.task-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.task-date-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.task-date {
  font-size: 14px;
  color: #404b4c;
  white-space: nowrap;
}

.task-time {
  font-size: 16px;
  color: #060f10;
}

.task-title {
  font-size: 16px;
  font-weight: 700;
  color: #060f10;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-subtitle {
  font-size: 14px;
  color: #404b4c;
  line-height: 20px;
}

.task-ref {
  font-size: 14px;
  color: #060f10;
  line-height: 20px;
}

.task-divider {
  border: none;
  border-top: 1px solid #cbd2d3;
  margin: 0;
}

.task-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}



/* ── Booking attribute ── */
.booking-attribute {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px dashed;
  border-radius: 4px;
  padding: 4px;
  color: #060f10;
  position: relative;
  height: 20px;
}

.booking-attribute--warning {
  background: #fffbe7;
  border-color: #9a860f;
}

.booking-attribute--success {
  background: #effae9;
  border-color: #39801c;
}

.booking-attribute-indicator {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-attribute-indicator--warning {
  background: #9a860f;
}

.booking-attribute-indicator--success {
  background: #39801c;
}

.booking-attribute-indicator zenith-icon {
  font-size: 8px;
  color: #fff;
  line-height: 1;
}

.booking-attr-icon {
  font-size: 12px;
  flex-shrink: 0;
  display: inline-flex;
}

/* ── Category list ── */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 60px;
}

.category-title {
  flex: 1;
  font-weight: 700;
}

/* ── Items inside zenith-card-details ── */
.items-content {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

/* ── Comment ── */
.comment-bubble {
  background: #f5f6f6;
  border-radius: 4px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.comment-text {
  flex: 1;
  font-size: 14px;
  color: #060f10;
  line-height: 1.5;
}

.comment-input-area {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.comment-input-area.open {
  display: flex;
}

/* ── Set-all-OK button row ── */
.set-ok-row {
  padding: 8px 0 4px;
  margin-bottom: 60px;
}

/* ── Footers ── */
.fixed-footer,
.overview-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #e8ecec;
  padding: 16px;
  padding-bottom: max(16px, calc(16px + env(safe-area-inset-bottom, 0px)));
}

.overview-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Switch row ── */
.switch-row {
  padding: 12px 16px;
  background: #f5f6f6;
}

/* ── Read-only value ── */
.readonly-value {
  font-weight: 400;
  min-width: 60px;
  text-align: right;
  line-height: 1.5;
  flex-shrink: 0;
}


/* ── Zenith component overrides ── */
zenith-modal {
  --zn-modal-z-index: 9000;
}

zenith-card {
  margin-bottom: 0;
}

.zn-row {
  row-gap: 4px;
  margin-left: -4px;
  margin-right: -4px;
}

.cat-header-row {
  align-items: center;
}

.zn-col, .zn-col-auto, .zn-col-sm-12, .zn-col-md-6{
  padding-left: 4px;
  padding-right: 4px;
}

/* ── Worklist item ── */
.wl-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.wl-item > .zn-row {
  align-items: center;
}

.wl-item-title {
  font-size: 16px;
  font-weight: 700;
  color: #060f10;
  line-height: 1.5;
}

.wl-item-serial {
  font-size: 14px;
  color: #404b4c;
  line-height: 1.5;
}

.wl-item-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: #060f10;
}

.wl-machine-icon {
  width: 43px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wl-machine-name {
  font-size: 14px;
  color: #060f10;
  line-height: 1.5;
}

.wl-machine-type {
  font-size: 12px;
  color: #404b4c;
  line-height: 1.5;
}
