.main_content .header_iner {
  padding: 6px 16px;
}

.main_content .serach_field-area {
  display: none;
}

.main_content .main_content_iner {
  margin: 12px 16px 16px;
}

.main_content .card,
.login-wrap .card {
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 0;
  border-radius: 10px;
}

.main_content .card h1,
.main_content .card h2,
.login-wrap .card h1 {
  margin: 0 0 8px;
  color: #222222;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.main_content label,
.login-wrap label {
  display: block;
  margin: 0 0 2px;
  color: #676b84;
  font-size: 14px;
  font-weight: 500;
}

.main_content p,
.login-wrap p {
  margin: 0 0 6px;
  color: #676b84;
  font-size: 14px;
  line-height: 1.35;
}

.main_content input,
.main_content select,
.main_content textarea,
.login-wrap input {
  width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid #e4e6ef;
  border-radius: 5px;
  background: #fff;
  color: #222;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

.main_content input[type="checkbox"],
.login-wrap input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

.main_content textarea { min-height: 64px; }

.main_content button,
.main_content .button,
.login-wrap button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid #24508f;
  border-radius: 5px;
  background: #24508f;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
  cursor: pointer;
}

.main_content button.secondary,
.main_content a.secondary,
.login-wrap a.secondary {
  background: #fff;
  color: #24508f;
}

.main_content .header-logout {
  margin: 0;
  padding: 8px 0 8px 16px;
  border: 0;
  background: transparent;
  color: #676b84;
  font-size: 14px;
  font-weight: 400;
}

.header-role {
  color: #676b84;
  font-size: 14px;
}

.sidebar #sidebar_menu li a img {
  width: 19px;
  height: 19px;
}

.sidebar #sidebar_menu li.mm-active > a img {
  filter: invert(56%) sepia(61%) saturate(456%) hue-rotate(138deg) brightness(92%) contrast(91%);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.filters a { text-decoration: none; }

.toolbar,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}

.toolbar .field { width: 11.5rem; }
.toolbar .field-wide { width: min(100%, 28rem); }
.toolbar input,
.toolbar select { width: 100%; }

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.span-all { grid-column: 1 / -1; }

.setting {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f8;
}

.setting p { margin: 0; font-size: 13px; }
.setting-controls { display: flex; gap: 8px; align-items: center; }
.setting-controls input { flex: 1; min-width: 0; width: auto; }

.file-block {
  display: grid;
  gap: 10px;
  max-width: 36rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d5deea;
}

.file-block h2 { margin: 0; font-size: 18px; }
.file-block p { margin: 0; }
.file-block form { display: grid; gap: 8px; margin: 0; }
.file-block input[type="file"] { max-width: 100%; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.day-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0 0 8px;
}

.facts div { margin: 0; }
.facts dt { margin: 0; color: #676b84; font-size: 13px; font-weight: 500; }
.facts dd { margin: 0; color: #222; font-size: 14px; }

.sheet {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 40rem);
  gap: 2px 12px;
  align-items: baseline;
  max-width: 52rem;
  margin: 8px 0 12px;
}

.sheet dt,
.sheet dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.sheet dt { color: #5c6478; }
.sheet dd { color: #222; }
.sheet-id { font-size: 14px; word-break: break-all; }

.main_content input:focus,
.main_content select:focus,
.main_content textarea:focus,
.login-wrap input:focus,
.login-wrap select:focus,
.login-wrap textarea:focus {
  outline: 3px solid #24508f !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px #24508f !important;
  border-color: #24508f;
}

.main_content button:focus-visible,
.main_content a:focus-visible,
.login-wrap button:focus-visible,
.login-wrap a:focus-visible,
.sidebar a:focus-visible {
  outline: 3px solid #24508f;
  outline-offset: 2px;
}

.main_content table { width: 100%; border-collapse: collapse; background: #fff; }
.main_content table th,
.main_content table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f3f8;
  color: #222;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
}

.matters { list-style: none; margin: 0; padding: 0; }
.matters li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 6px 0;
  border-top: 1px solid #f1f3f8;
}
.matters strong { color: #222; font-size: 14px; font-weight: 500; }
.matters span { color: #676b84; font-size: 14px; }
.matters p { grid-column: 1 / -1; margin: 0; }

.note {
  padding: 12px 16px;
  border-radius: 10px;
  background: #eef3f9;
  margin-bottom: 12px;
}
.note.error { background: #fde8e6; color: #ba1a1a; }
.note.ok { background: #e8f6df; color: #4e9a1d; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card { width: min(100%, 28rem); }

.map-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.map-heading h2 { margin: 0; }
.legend { margin: 0 0 8px; }

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 22rem);
  gap: 12px;
  align-items: start;
}

#day-map,
#route-map {
  height: min(72vh, 760px);
  min-height: 560px;
  border-radius: 10px;
  overflow: hidden;
}

.map-list {
  max-height: min(72vh, 760px);
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.map-list h3 { margin: 0 0 6px; font-size: 14px; }
.map-list li { margin: 0 0 8px; }

.main_content a.choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #c5cad6;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}
.main_content a.choice.is-current {
  border-color: #24508f;
  box-shadow: inset 0 0 0 2px #24508f;
}
.map-list form { margin: 0 0 8px; }

@media (max-width: 800px) {
  .columns,
  .facts,
  .map-layout { grid-template-columns: 1fr; }
  .sheet { grid-template-columns: 7rem minmax(0, 1fr); }
  #day-map,
  #route-map { min-height: 420px; }
}

.main_content .day-toolbar { margin: 4px 0 12px; }
.main_content .day-toolbar .field { width: 16rem; }
.main_content .day-toolbar label {
  color: #222;
  font-size: 16px;
  font-weight: 600;
}
.main_content .day-toolbar input {
  min-height: 52px;
  padding: 8px 12px;
  border: 2px solid #24508f;
  font-size: 18px;
  font-weight: 600;
}
.main_content .day-toolbar button {
  min-height: 52px;
  padding: 8px 22px;
  font-size: 18px;
  font-weight: 600;
}

.matters-strip { margin: 8px 0; }
.matters-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main_content .matters-strip h2 { margin-bottom: 2px; }
.main_content .matters-strip a { color: #24508f; }

.main_content table.plan {
  margin-top: 8px;
  border: 1px solid #c5d0e0;
}
.main_content table.plan th,
.main_content table.plan td {
  padding: 4px 8px;
  border-right: 1px solid #d5deea;
  border-bottom: 1px solid #d5deea;
  font-size: 14px;
  line-height: 1.3;
  vertical-align: top;
}
.main_content table.plan th:last-child,
.main_content table.plan td:last-child { border-right: 0; }
.main_content table.plan thead th {
  background: #24508f;
  color: #fff;
  border-right-color: #4d74aa;
  font-weight: 500;
  white-space: nowrap;
}
.main_content table.plan td:first-child { white-space: nowrap; }
.main_content table.plan tbody tr.alt td { background: #e8eef6; }
.main_content table.plan tbody tr.is-open td { background: #d4e2f5; }
.main_content table.plan tr.assign-row td {
  background: #f7f9fc;
  border-right: 0;
}
.plan .state {
  display: inline-block;
  margin: 0 4px 2px 0;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef0f4;
  color: #3d4450;
  font-weight: 500;
}
.plan .state-wait { background: #fff4d6; color: #7a4e00; }
.plan .state-set { background: #e7eef8; color: #24508f; }
.plan .state-go { background: #e8f6df; color: #2f6b12; }
.plan .state-done { background: #eef0f4; color: #4a5160; }
.plan .state-out { background: #efe8f8; color: #5c3d8a; }
.plan .state-alert { background: #fde8e6; color: #9b1515; }
.plan .state-muted { background: #f3f4f6; color: #5c6370; }
.plan .state-important { background: #fff4d6; color: #7a4e00; }
.main_content button.state {
  border: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}
dialog#state-help {
  width: min(28rem, calc(100% - 32px));
  padding: 16px;
  border: 0;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
}
dialog#state-help::backdrop { background: rgba(20, 32, 51, 0.45); }
dialog#state-help h2 { margin: 0 0 8px; color: #222; font-size: 18px; }
dialog#state-help p { margin: 0 0 16px; color: #222; font-size: 16px; line-height: 1.4; }
.plan .sub {
  display: block;
  color: #676b84;
  font-size: 13px;
}
.plan .note-line { color: #222; font-size: 14px; }
.plan-actions { white-space: nowrap; }
.plan-actions a { margin-right: 8px; }

.assign-list { list-style: none; margin: 4px 0 0; padding: 0; }
.assign-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0;
  padding: 4px 0;
  border-top: 1px solid #f1f3f8;
}
.assign-list p { margin: 0; }
.assign-list span { margin-left: 8px; }
.assign-list form { display: flex; align-items: center; gap: 8px; margin: 0; }
