/* 装维考勤 — 手机优先报休 + 统计 */
.att-page {
  background: #f1f5f9;
  min-height: 100%;
  padding-bottom: 56px;
  box-sizing: border-box;
}

.att-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.att-app-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.att-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.att-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.att-month-input {
  width: 132px;
}

.att-branch-sel {
  min-width: 96px;
  max-width: 120px;
}

.att-filter {
  min-width: 120px;
  flex: 1;
}

.att-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.att-stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 12px;
  color: #475569;
}

.att-stat-chip strong {
  font-size: 15px;
  color: #0f172a;
}

.att-stat-chip.warn {
  background: #fff7ed;
  color: #c2410c;
}

.att-stat-chip.warn strong {
  color: #ea580c;
}

.att-tabs {
  display: flex;
  gap: 0;
  padding: 0 8px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.att-tab {
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.att-tab.active {
  color: #0f172a;
  border-bottom-color: #f59e0b;
}

.att-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  vertical-align: 1px;
}

.att-report-hint {
  padding: 8px 14px 0;
  font-size: 12px;
  color: #64748b;
}

.att-report-wrap,
.att-matrix-wrap,
.att-stats-wrap,
.att-rejected-wrap {
  padding: 10px 12px 20px;
}

.att-loading {
  color: #94a3b8;
  padding: 40px 12px;
  text-align: center;
}

/* —— 报休班卡片 —— */
.att-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.att-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.att-card-who strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
}

.att-card-meta {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.att-card-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  padding: 4px 8px;
  border-radius: 8px;
}

.att-day-chip:active:not(:disabled) {
  transform: scale(0.96);
}

.att-day-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  flex-wrap: wrap;
}

.att-day-chip {
  flex: 0 0 auto;
  min-width: 52px;
  min-height: 56px;
  padding: 8px 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.att-day-chip .att-day-lab {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.att-day-chip .att-day-sub {
  font-size: 10px;
  color: #94a3b8;
}

.att-day-chip.wk {
  background: #f1f5f9;
}

.att-day-chip.on {
  background: #fb923c;
  border-color: #ea580c;
}

.att-day-chip.on .att-day-lab,
.att-day-chip.on .att-day-sub {
  color: #fff;
}

.att-day-chip.pend {
  background: #fef3c7;
  border-color: #f59e0b;
}

.att-day-chip.pend .att-day-lab,
.att-day-chip.pend .att-day-sub,
.att-day-chip.pend .att-day-mark {
  color: #b45309;
}

.att-day-chip.pend-leader {
  background: #ecfeff;
  border-color: #22d3ee;
}

.att-day-chip.pend-leader .att-day-lab,
.att-day-chip.pend-leader .att-day-sub,
.att-day-chip.pend-leader .att-day-mark {
  color: #0e7490;
}

.att-day-mark {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 2px;
}

.att-cell.pending {
  background: #fde68a;
  color: #92400e;
  font-weight: 700;
}

.att-cell.pending-leader {
  background: #a5f3fc;
  color: #155e75;
}

.att-modal {
  width: min(440px, 100%);
}

.att-slip {
  background:
    linear-gradient(90deg, #ea580c 0 4px, transparent 4px),
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(226, 232, 240, 0.7) 28px);
  background-color: #fffdf8;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px 12px 18px;
  margin-bottom: 12px;
}

.att-action-who {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.att-action-meta {
  margin: 4px 0 12px;
  font-size: 12px;
  color: #64748b;
}

.att-pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.att-pipe {
  position: relative;
  min-height: 58px;
  padding: 8px 6px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  text-align: center;
}

.att-pipe b {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.att-pipe span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

.att-pipe.done {
  border-style: solid;
  border-color: #fdba74;
  background: #fff7ed;
}

.att-pipe.done b { color: #c2410c; }
.att-pipe.done span { color: #9a3412; }

.att-pipe.now {
  border-style: solid;
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.att-pipe.now b { color: #9a3412; }
.att-pipe.now span { color: #c2410c; font-weight: 700; }

.att-pipe.fail {
  border-style: solid;
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.att-pipe.fail b,
.att-pipe.fail span {
  color: #94a3b8;
  text-decoration: line-through;
}

.att-req {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #ea580c;
}

.att-field-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.att-action-status {
  margin: 0 0 8px;
  font-size: 13px;
  color: #b45309;
  font-weight: 600;
}

.att-flow-mini {
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.55;
}

.att-log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.att-log li {
  position: relative;
  padding: 0 0 10px 14px;
  border-left: 2px solid #fed7aa;
}

.att-log li:last-child {
  padding-bottom: 0;
}

.att-log li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ea580c;
}

.att-log time {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.att-inbox-wrap,
.att-flow-wrap {
  padding: 8px 12px 20px;
}

.att-slip-card {
  display: block;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.att-slip-card:active {
  transform: scale(0.995);
}

.att-slip-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  background:
    linear-gradient(90deg, #ea580c 0 4px, transparent 4px),
    #fffdf8;
}

.att-slip-who strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
}

.att-slip-who span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
}

.att-st-pill {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.att-st-pill.leader {
  background: #cffafe;
  color: #155e75;
}

.att-st-pill.ok {
  background: #ffedd5;
  color: #c2410c;
}

.att-st-pill.rej {
  background: #e2e8f0;
  color: #64748b;
}

.att-slip-body {
  padding: 10px 14px 12px;
}

.att-slip-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #475569;
}

.att-slip-kv b {
  color: #0f172a;
  font-weight: 700;
}

.att-empty {
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
}

.att-empty b {
  display: block;
  font-size: 15px;
  color: #334155;
  margin-bottom: 6px;
}

.att-empty span {
  font-size: 13px;
}

.att-action-btns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.att-action-btns-row .att-btn-block {
  width: auto;
}

.att-btn-ok {
  background: #ea580c;
  border-color: #c2410c;
  color: #fff;
}

.att-cover-readonly {
  margin: 0;
  padding: 8px 10px;
  background: #fff7ed;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
}

.att-slip-last {
  margin: 8px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.att-day-chip.tw {
  border-color: #cbd5e1;
}

.att-day-chip.nw {
  border-color: #fdba74;
}

.att-day-chip.nw .att-day-lab {
  color: #c2410c;
}

.att-day-chip.ro,
.att-day-chip:disabled {
  cursor: default;
  opacity: 0.85;
}

/* —— 休班周表（日必达结构） —— */
.att-week-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 0;
  flex-wrap: wrap;
}

.att-week-switch {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.att-week-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.att-week-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.att-week-range {
  font-size: 12px;
  color: #64748b;
}

.att-week-wrap {
  padding: 8px 12px 20px;
}

.att-week-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.att-week-table th.att-wk-col {
  background: #f1f5f9;
  min-width: 44px;
  line-height: 1.2;
  padding: 6px 4px !important;
}

.att-wk-day {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.att-wk-date {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.att-week-table tr.att-week-has-leave .att-sticky-l4 {
  color: #c2410c;
}
.att-week-cell {
  min-width: 36px;
  height: 32px;
  font-size: 13px;
}

/* —— 本月统计列表（手机卡片） —— */
.att-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.att-stat-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
}

.att-stat-row.hi {
  border-color: #fdba74;
  background: #fffbeb;
}

.att-stat-main strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
}

.att-stat-main span {
  font-size: 12px;
  color: #64748b;
}

.att-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: #ea580c;
  align-self: center;
}

.att-stat-num small {
  font-size: 12px;
  font-weight: 600;
  margin-left: 2px;
}

.att-stat-dates {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #64748b;
  word-break: break-all;
}

/* —— 整月课表 —— */
.att-matrix-tip {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.att-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  min-width: 100%;
}

.att-table th,
.att-table td {
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f8fafc;
  padding: 4px 3px;
  text-align: center;
  white-space: nowrap;
}

.att-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 2;
}

.att-sticky-l {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  text-align: left !important;
  padding-left: 8px !important;
  min-width: 56px;
}

.att-sticky-l2 {
  position: sticky;
  left: 56px;
  z-index: 3;
  background: #fff;
  text-align: left !important;
  min-width: 72px;
}

.att-sticky-l3 {
  position: sticky;
  left: 128px;
  z-index: 3;
  background: #fff;
  text-align: left !important;
  min-width: 72px;
}

.att-sticky-l4 {
  position: sticky;
  left: 200px;
  z-index: 3;
  background: #fff;
  text-align: left !important;
  min-width: 72px;
  font-weight: 600;
}

.att-table thead .att-sticky-l,
.att-table thead .att-sticky-l2,
.att-table thead .att-sticky-l3,
.att-table thead .att-sticky-l4 {
  background: #f8fafc;
  z-index: 4;
}

.att-branch-sum {
  background: #fef9c3 !important;
  font-weight: 700;
}

.att-branch-sum td {
  background: #fef9c3 !important;
  color: #713f12;
}

.att-branch-sum-cell {
  font-weight: 700;
  color: #c2410c;
}

.att-week-table tr.att-week-has-leave .att-sticky-l4 {
  color: #c2410c;
}

.att-days-col {
  background: #fef3c7 !important;
  color: #92400e;
  font-weight: 700;
  min-width: 40px;
}

.att-cell {
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 4px;
}

.att-cell.active {
  background: #fb923c;
  color: #fff;
  font-weight: 700;
}

.att-cell.rejected {
  background: #e2e8f0;
  color: #94a3b8;
  text-decoration: line-through;
}

.att-cell.weekend {
  background: #f8fafc;
}

.att-cell.weekend.active {
  background: #ea580c;
}

.att-label {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin: 10px 0 4px;
}

.att-action-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.att-btn-block {
  width: 100%;
  min-height: 44px;
  font-size: 15px;
}

.att-muted {
  color: #94a3b8;
  font-size: 13px;
}

.att-modal .modal-body {
  padding-bottom: 8px;
}

.att-dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 10px 12px 0;
}

.att-dash-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.att-dash-card:hover,
.att-dash-card.on {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.att-dash-card .k {
  font-size: 12px;
  color: #64748b;
}

.att-dash-card .v {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.att-dash-card.warn .v { color: #c2410c; }
.att-dash-card.cyan .v { color: #0e7490; }
.att-dash-card.ok .v { color: #15803d; }

.att-search-card {
  margin: 10px 12px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.att-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.att-st-chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.att-st-chip.on {
  background: #fff7ed;
  border-color: #fb923c;
  color: #c2410c;
}

.att-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.att-ticket-q {
  flex: 1;
  min-width: 0;
}

.att-table-card {
  margin: 10px 12px 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
}

.att-ticket-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.att-ticket-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
}

.att-ticket-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.att-ticket-table tr {
  cursor: pointer;
}

.att-ticket-table tr:hover td {
  background: #fffbeb;
}

.att-no {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

.att-desc {
  display: grid;
  grid-template-columns: 88px 1fr 88px 1fr;
  gap: 0;
  margin: 0 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.att-desc dt,
.att-desc dd {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.att-desc dt {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
}

.att-desc dd {
  color: #0f172a;
  font-weight: 600;
}

.att-cover-rank {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.att-cover-rank h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.att-create-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.att-create-fields[hidden] {
  display: none !important;
}

.att-desc[hidden] {
  display: none !important;
}

.att-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.att-rank-n {
  width: 22px;
  font-weight: 800;
  color: #ea580c;
}

@media (max-width: 720px) {
  .att-topbar {
    padding: 10px 12px;
  }

  .att-topbar-actions {
    width: 100%;
  }

  .att-filter {
    flex: 1 1 100%;
    min-width: 0;
  }

  .att-sticky-l2,
  .att-sticky-l3 {
    position: static;
  }

  .att-day-chip {
    min-width: 48px;
    min-height: 52px;
  }

  .att-desc {
    grid-template-columns: 80px 1fr;
  }

  .att-ticket-table .hide-sm {
    display: none;
  }
}
