*{box-sizing:border-box}body{margin:0;background:#f2f5f8;color:#1c2b3c;font:14px Arial,sans-serif}header{height:62px;background:#15345b;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(calc((100% - 1100px)/2),20px)}.brand{color:white;text-decoration:none;font-weight:bold;letter-spacing:.1em}.brand span{font-weight:normal;opacity:.7}main{max-width:1100px;margin:30px auto;padding:0 18px}.box{background:#fff;border:1px solid #e1e8ef;border-radius:12px;padding:22px;margin-bottom:18px}.narrow{max-width:430px;margin:70px auto}.hidden{display:none!important}h1{margin:0 0 18px}h2{margin:0;font-size:19px}label{display:block;margin:12px 0;color:#526174}input,select{display:block;width:100%;padding:11px;border:1px solid #cbd5e1;border-radius:7px;margin-top:6px;font:inherit}button,.tab{border:0;border-radius:7px;padding:10px 14px;cursor:pointer;font-weight:bold;background:#1769aa;color:#fff}.light{background:#e9f0f7;color:#234}.primary{background:#1769aa;color:white}.error{color:#b42318}.heading,.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.heading p{color:#667085;margin-top:-10px}nav{display:flex;gap:7px;margin:20px 0;flex-wrap:wrap}.tab{background:#e7edf4;color:#28435f;text-decoration:none}.tab.active{background:#15345b;color:#fff}.toolbar{margin-bottom:16px}.toolbar select{max-width:180px;margin:0}.ticket{border:1px solid #e5eaf0;border-radius:9px;padding:15px;margin:10px 0}.ticket-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.ticket small,.muted{color:#667085}.ticket pre{white-space:pre-wrap;font:13px/1.5 Arial;background:#f7f9fb;padding:10px;border-radius:6px}.ticket-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.ticket-controls select{max-width:180px;margin:0}.ticket-controls input{max-width:180px;margin:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:0 15px}.checks{display:flex;gap:14px;flex-wrap:wrap}.checks label{display:flex;align-items:center;gap:5px}.checks input{width:auto;margin:0}.device-row{border-bottom:1px solid #edf0f4;padding:13px 0}.device-row:last-child{border:0}.device-form{border:1px solid #dce5ef;padding:17px;border-radius:9px;margin-bottom:20px}fieldset{border:1px solid #dce5ef;border-radius:8px;margin:15px 0}legend{padding:0 7px;color:#526174}@media(max-width:600px){.fields{grid-template-columns:1fr}.toolbar{align-items:flex-start;flex-wrap:wrap}.heading{align-items:flex-start}}
/* История обслуживания */
.history-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 30, 48, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.history-window {
  background: #fff;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 15px 50px rgba(0,0,0,.25);
}

.history-window h3 {
  margin: 25px 0 12px;
  color: #15345b;
}

.history-item {
  border: 1px solid #e1e8ef;
  border-radius: 9px;
  padding: 15px;
  margin: 10px 0;
  background: #fff;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e5eaf0;
}

.history-table th {
  background: #f2f5f8;
  color: #526174;
}

@media(max-width:600px) {
  .history-modal { padding: 8px; }
  .history-window { padding: 15px; }
}

/* Три отдельных раздела заявок */
.request-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.request-group {
  padding: 17px;
  border-radius: 11px;
  border: 1px solid #dce5ef;
  background: #f8fafc;
}

.request-group h3 {
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 17px;
}

.request-group:nth-child(1) {
  border-left: 5px solid #2878c8;
  background: #f0f6fd;
}

.request-group:nth-child(1) h3 {
  color: #175a9b;
  background: #dcecff;
}

.request-group:nth-child(2) {
  border-left: 5px solid #29966b;
  background: #f0f9f5;
}

.request-group:nth-child(2) h3 {
  color: #18734e;
  background: #d9f2e5;
}

.request-group:nth-child(3) {
  border-left: 5px solid #dc8a27;
  background: #fff8ed;
}

.request-group:nth-child(3) h3 {
  color: #a65b0b;
  background: #ffebcb;
}

.request-group .ticket {
  background: #fff;
}


/* Три отдельных раздела заявок */
.request-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.request-group {
  padding: 17px;
  border-radius: 11px;
  border: 1px solid #dce5ef;
  background: #f8fafc;
}

.request-group h3 {
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 17px;
}

.request-group:nth-child(1) {
  border-left: 5px solid #2878c8;
  background: #f0f6fd;
}

.request-group:nth-child(1) h3 {
  color: #175a9b;
  background: #dcecff;
}

.request-group:nth-child(2) {
  border-left: 5px solid #29966b;
  background: #f0f9f5;
}

.request-group:nth-child(2) h3 {
  color: #18734e;
  background: #d9f2e5;
}

.request-group:nth-child(3) {
  border-left: 5px solid #dc8a27;
  background: #fff8ed;
}

.request-group:nth-child(3) h3 {
  color: #a65b0b;
  background: #ffebcb;
}

.request-group .ticket {
  background: #fff;
}


/* Компактный список заявок */
.ticket-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  margin: 7px 0;
  text-align: left;
  color: #24364b;
  background: #fff;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  font-weight: normal;
  transition: background .15s, border-color .15s;
}

.ticket-list-row:hover {
  background: #eaf2fb;
  border-color: #8eb6df;
}

.ticket-list-row b {
  color: #1769aa;
  min-width: 100px;
}

.ticket-list-row small {
  color: #667085;
  white-space: nowrap;
}

#ticketModalDetails {
  margin-top: 18px;
  line-height: 1.6;
}

#ticketModalDetails pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f7fa;
  padding: 13px;
  border-radius: 7px;
}

#ticketModal .ticket-controls {
  align-items: flex-end;
  margin-top: 20px;
}

#ticketModal .ticket-controls label {
  flex: 1;
  min-width: 180px;
}

#ticketModal .ticket-controls select,
#ticketModal .ticket-controls input {
  max-width: none;
}

@media(max-width:600px) {
  .ticket-list-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/* Миниатюры фотографий дефекта */
.ticket-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.ticket-photos a {
  display: block;
  width: 120px;
  height: 100px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: zoom-in;
}

.ticket-photos img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.ticket-photos a:hover img {
  transform: scale(1.08);
}

/* Новое оформление административной панели IMPRESS */
:root {
  --navy: #102b4c;
  --navy-light: #1b416b;
  --accent: #2878c8;
  --page-bg: #f4f6fa;
}

body {
  background: var(--page-bg);
  color: #243449;
  font-family: Arial, sans-serif;
}

body > header {
  height: 70px;
  background: #fff;
  color: var(--navy);
  padding: 0 30px;
  border-bottom: 1px solid #e5eaf0;
  box-shadow: 0 2px 8px rgba(20, 40, 70, .04);
}

body > header > span {
  color: #64748b;
}

.brand {
  color: var(--navy);
  font-size: 19px;
  letter-spacing: .12em;
}

.brand span {
  color: #718096;
}

#dashboard {
  margin-left: 220px;
}

#dashboard nav {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 220px;
  margin: 0;
  padding: 28px 16px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 9px;
}

#dashboard nav .tab {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  background: transparent;
  color: #d5e1ef;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

#dashboard nav .tab:hover {
  background: var(--navy-light);
  color: #fff;
}

#dashboard nav .tab.active {
  background: #2878c8;
  color: #fff;
}

#dashboard .heading {
  min-height: 70px;
  margin-bottom: 22px;
}

#dashboard .heading h1 {
  color: var(--navy);
  font-size: 25px;
}

#dashboard > section.box {
  border: 1px solid #e7ebf1;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 40, 70, .04);
  padding: 24px;
}

#dashboard .request-group {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(20, 40, 70, .03);
}

#dashboard .ticket-list-row {
  border-radius: 9px;
  padding: 15px 17px;
}

#dashboard button {
  transition: background .15s, box-shadow .15s;
}

#dashboard button.primary,
#dashboard button:not(.light):not(.tab) {
  background: var(--accent);
}

#dashboard button:hover {
  box-shadow: 0 3px 9px rgba(20, 60, 100, .13);
}

@media(max-width:700px) {
  #dashboard {
    margin-left: 0;
  }

  #dashboard nav {
    position: static;
    width: auto;
    height: auto;
    padding: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 10px;
    margin: 12px 0 18px;
  }

  #dashboard nav .tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 11px;
  }

  body > header {
    padding: 0 16px;
  }

  #dashboard .heading h1 {
    font-size: 21px;
  }
}

/* Светло-голубой фон карточек заявок */
.ticket-list-row {
  background: #eaf3ff;
  border-color: #cbdff5;
}

.ticket-list-row:hover {
  background: #dcecff;
  border-color: #a9c9ed;
}

.request-group .ticket {
  background: #eaf3ff;
}

/* Светло-голубой фон именно у строк заявок */
#dashboard button.ticket-list-row:not(.light):not(.tab) {
  background: #eaf3ff;
  color: #24364b;
  border-color: #cbdff5;
}

#dashboard button.ticket-list-row:not(.light):not(.tab):hover {
  background: #dcecff;
  border-color: #a9c9ed;
}
