.operations-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.operations-page-header h3 {
  margin: 0.3rem 0 0;
  font-size: 1.55rem;
}
.operations-faction-select {
  width: min(330px, 100%);
  margin: 0;
  background: #1b2127;
}
.operations-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.operations-toolbar-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}
.operations-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.operations-stat {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(30, 36, 42, 0.98),
    rgba(23, 28, 33, 0.98)
  );
}
.operations-stat span,
.operations-stat strong,
.operations-stat small {
  display: block;
}
.operations-stat span {
  color: var(--muted);
  font-size: 0.68rem;
}
.operations-stat strong {
  margin: 0.4rem 0 0.1rem;
  font-size: 1.75rem;
}
.operations-stat small {
  color: #717b85;
  font-size: 0.64rem;
}
.operations-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr;
  gap: 0.75rem;
}
.operations-panel {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(
    145deg,
    rgba(30, 36, 42, 0.98),
    rgba(22, 27, 32, 0.98)
  );
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}
.operations-panel h4 {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}
.operations-table {
  width: 100%;
}
.operations-table th,
.operations-table td {
  padding: 0.58rem 0.65rem;
  font-size: 0.68rem;
}
.operations-table th {
  font-size: 0.54rem;
}
.operations-message-list {
  display: grid;
  gap: 0.45rem;
  max-height: 350px;
  overflow: auto;
}
.operations-message {
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}
.operations-message-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
  color: #7e8892;
  font-size: 0.58rem;
}
.operations-message p {
  margin: 0;
  color: #cbd1d7;
  font-size: 0.7rem;
  line-height: 1.45;
}
.operations-message-form {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.operations-message-form input {
  margin: 0;
}
.duty-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0.75rem;
}
.duty-side {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.duty-action-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #1d2329;
}
.duty-action-card h4 {
  margin: 0 0 0.7rem;
}
.duty-action-card .button {
  width: 100%;
  margin-top: 0.45rem;
}
.stamp-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.stamp-summary div {
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.stamp-summary span,
.stamp-summary strong {
  display: block;
}
.stamp-summary span {
  color: var(--muted);
  font-size: 0.58rem;
}
.stamp-summary strong {
  margin-top: 0.2rem;
  font-size: 0.78rem;
}
.patrol-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 0.65rem;
}
.patrol-card {
  display: flex;
  flex-direction: column;
  min-height: 160px;
  padding: 0.85rem;
  border: 1px solid rgba(99, 201, 155, 0.21);
  border-radius: 11px;
  background: rgba(20, 28, 25, 0.55);
}
.patrol-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.patrol-head h4 {
  margin: 0;
  font-size: 0.78rem;
}
.patrol-head small {
  color: #6fd4a4;
}
.patrol-members {
  display: grid;
  gap: 0.32rem;
  margin: 0.65rem 0;
}
.patrol-member {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.62rem;
}
.patrol-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
  flex-wrap: wrap;
}
.patrol-actions .button {
  min-height: 30px;
  padding: 0.4rem 0.55rem;
  font-size: 0.62rem;
}
.status-pill {
  display: inline-flex;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(99, 201, 155, 0.1);
  color: #83ddb5;
  font-size: 0.58rem;
}
.catalog-section {
  margin-bottom: 0.7rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.catalog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  background: rgba(130, 42, 48, 0.5);
}
.catalog-section-head h4 {
  margin: 0;
  font-size: 0.74rem;
}
.warn-stars {
  color: #e35d65;
  letter-spacing: 0.08em;
}
.money {
  color: #67d7a4;
}
.sanction-items {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.sanction-chip {
  padding: 0.2rem 0.38rem;
  border-radius: 5px;
  background: rgba(227, 93, 101, 0.18);
  color: #ff9aa0;
  font-size: 0.58rem;
}
.status-badge {
  display: inline-flex;
  padding: 0.24rem 0.45rem;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 700;
}
.status-open {
  background: #215eb4;
  color: #b9d6ff;
}
.status-paid,
.status-completed {
  background: #176a43;
  color: #a7efc9;
}
.status-rejected {
  background: #7a2930;
  color: #ffbdc1;
}
.calendar-shell {
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: #181e23;
}
.calendar-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
}
.calendar-head div {
  padding: 0.7rem;
  text-align: center;
  color: #7e8993;
  font-size: 0.6rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-day {
  min-height: 135px;
  padding: 0.55rem;
  border-right: 1px solid rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day-number {
  display: block;
  margin-bottom: 0.45rem;
  color: #8b949e;
  font-size: 0.65rem;
}
.calendar-day.today .calendar-day-number {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  margin-top: -0.2rem;
  border-radius: 50%;
  background: var(--gold);
  color: #17120a;
}
.calendar-event {
  display: block;
  width: 100%;
  margin: 0.2rem 0;
  padding: 0.32rem 0.38rem;
  border: 0;
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  background: rgba(201, 163, 88, 0.1);
  color: #e7dec9;
  text-align: left;
  font-size: 0.56rem;
  cursor: pointer;
}
.groups-grid {
  display: grid;
  gap: 0.6rem;
}
.group-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #1c2228;
}
.group-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
}
.group-card p {
  margin: 0;
  font-size: 0.62rem;
}
.group-count {
  color: var(--gold-2);
  font-size: 0.68rem;
}
.group-permissions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.group-permissions span {
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: #9ca6b0;
  font-size: 0.54rem;
}
.operations-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  max-height: 300px;
  overflow: auto;
  padding: 0.2rem;
}
.operations-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.operations-check input {
  width: auto;
  margin: 0.15rem 0 0;
}
.operations-check strong,
.operations-check small {
  display: block;
}
.operations-check strong {
  font-size: 0.68rem;
}
.operations-check small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.35;
}
.empty-operations {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1200px) {
  .operations-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .operations-dashboard-grid .operations-panel:last-child {
    grid-column: 1/-1;
  }
  .patrol-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .group-card {
    grid-template-columns: 1fr auto;
  }
  .group-permissions {
    grid-column: 1/-1;
  }
}
@media (max-width: 800px) {
  .operations-page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .operations-faction-select {
    width: 100%;
  }
  .operations-stats,
  .operations-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .operations-dashboard-grid .operations-panel:last-child {
    grid-column: auto;
  }
  .duty-layout {
    grid-template-columns: 1fr;
  }
  .patrol-grid {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    min-height: 90px;
    padding: 0.35rem;
  }
  .calendar-head div {
    padding: 0.5rem 0.2rem;
  }
  .operations-check-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .operations-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .operations-toolbar-actions {
    width: 100%;
  }
  .operations-toolbar-actions .button,
  .operations-toolbar-actions input,
  .operations-toolbar-actions select {
    width: 100%;
  }
  .stamp-summary {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    min-height: 70px;
  }
  .calendar-event {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .group-card {
    grid-template-columns: 1fr;
  }
  .group-card .button {
    width: 100%;
  }
}
