:root {
  --ink: #17212b;
  --muted: #64717f;
  --line: #dce4ea;
  --panel: #ffffff;
  --page: #eef3f5;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #15803d;
  --blue: #1d4ed8;
  --shadow: 0 18px 50px rgba(23, 33, 43, 0.08);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}

button, input, select, textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.app-shell.auth-locked {
  display: none;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef3f5;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px;
}

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.auth-card input {
  border: 1px solid var(--line);
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
}

.compact-brand {
  color: var(--ink);
}

.compact-brand span {
  color: var(--muted);
}

.sidebar {
  background: #13212b;
  color: #f8fafc;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  font-weight: 700;
}

.brand span, .account-card span {
  display: block;
  color: #aebbc7;
  font-size: 13px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  border: 0;
  color: #d7e0e8;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
}

.nav-item.active, .nav-item:hover {
  background: #20323f;
  color: #ffffff;
}

.account-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #304453;
  background: #192b37;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.topbar p, .panel-head p {
  color: var(--muted);
  margin-top: 4px;
}

.runtime-banner {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: var(--warn);
  padding: 12px 14px;
  margin: -8px 0 18px;
  font-weight: 700;
}

.top-actions, .section-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-actions {
  display: flex;
}

.primary-button, .secondary-button {
  border: 0;
  padding: 11px 15px;
  cursor: pointer;
  white-space: nowrap;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-button input {
  display: none;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:hover { background: var(--accent-dark); }

.secondary-button {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.mini-button {
  padding: 7px 9px;
  font-size: 12px;
}

.danger-button {
  color: var(--danger);
  border-color: #fecaca;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-button {
  width: 100%;
  margin-top: 12px;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: flex-end;
  background: rgba(15, 23, 31, 0.42);
}

.detail-overlay.open {
  display: flex;
}

.detail-drawer {
  width: min(620px, 100%);
  height: 100vh;
  overflow: auto;
  background: #ffffff;
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 48px rgba(23, 33, 43, 0.18);
  padding: 24px;
  position: relative;
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.detail-header {
  padding-right: 42px;
  margin-bottom: 18px;
}

.detail-kicker {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.detail-header h2 {
  font-size: 24px;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-meta div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px 12px;
}

.detail-meta span,
.detail-list small,
.empty-detail {
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list article {
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 12px;
}

.deficiency-row {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}

.deficiency-row span {
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 31, 0.42);
}

.modal-overlay.open {
  display: flex;
}

.modal-panel {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
}

.wide-modal {
  width: min(860px, 100%);
}

.modal-form {
  display: grid;
  gap: 12px;
}

.vessel-editor-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
}

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

.module-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 9px 10px;
  color: var(--ink);
}

.module-check-grid input {
  width: auto;
}

.form-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

.form-status.warn {
  color: var(--warn);
}

.form-status.danger {
  color: var(--danger);
}

.modal-actions {
  justify-content: flex-end;
}

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px;
}

.icon-button span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

.view { display: none; }
.view.active { display: block; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat, .panel, .vessel-card, .contact-card, .module-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stat {
  padding: 18px;
}

.stat span, .stat small {
  color: var(--muted);
}

.stat strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 3px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  gap: 16px;
}

.automation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.55fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

.sea-map {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    #b8d5de;
  isolation: isolate;
  border: 1px solid #b8c6cf;
}

.sea-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 1px, transparent 1px 54px);
  opacity: 0.45;
}

.sea-map::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.38);
  pointer-events: none;
}

.regional-map-layer,
.land-mass,
.sea-basin,
.strait {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.regional-map-layer {
  z-index: 2;
}

.land-mass {
  background: linear-gradient(145deg, #d8d1ba, #c8bea1);
  box-shadow: inset 0 0 0 1px rgba(90, 80, 60, 0.12);
}

.land-europe {
  clip-path: polygon(0 0, 61% 0, 58% 19%, 52% 27%, 54% 38%, 48% 47%, 42% 45%, 36% 54%, 28% 48%, 18% 54%, 8% 45%, 0 47%);
}

.land-turkiye {
  clip-path: polygon(58% 48%, 95% 38%, 100% 48%, 100% 72%, 86% 66%, 72% 70%, 60% 65%, 48% 72%, 44% 62%, 51% 55%);
}

.land-africa {
  clip-path: polygon(0 82%, 20% 72%, 43% 79%, 56% 86%, 72% 81%, 100% 92%, 100% 100%, 0 100%);
  background: linear-gradient(145deg, #ded2b4, #cab88f);
}

.sea-basin {
  background: rgba(99, 169, 199, 0.55);
  border: 1px solid rgba(45, 111, 145, 0.18);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.16);
}

.sea-black {
  inset: 16% 8% 46% 58%;
  clip-path: ellipse(48% 42% at 50% 50%);
}

.sea-aegean {
  inset: 47% 40% 23% 42%;
  clip-path: polygon(34% 0, 73% 9%, 98% 42%, 77% 100%, 28% 90%, 0 50%);
}

.sea-mediterranean {
  inset: 64% 5% 6% 20%;
  clip-path: ellipse(48% 36% at 48% 52%);
}

.strait {
  width: 12%;
  height: 4%;
  z-index: 3;
  background: rgba(78, 157, 191, 0.72);
  border: 1px solid rgba(45, 111, 145, 0.18);
}

.strait-bosphorus {
  left: 57%;
  top: 48%;
  transform: rotate(72deg);
}

.strait-dardanelles {
  left: 51%;
  top: 55%;
  transform: rotate(24deg);
}

.map-label {
  position: absolute;
  z-index: 5;
  color: rgba(46, 56, 66, 0.86);
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 1px #ffffff, 0 -1px 1px #ffffff;
}

.map-label-sea {
  color: rgba(50, 78, 100, 0.62);
  font-style: italic;
  letter-spacing: 2px;
  font-weight: 500;
}

.map-port {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #26323d;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(106, 122, 137, 0.25);
  padding: 4px 7px;
  box-shadow: 0 5px 12px rgba(23, 33, 43, 0.13);
}

.map-port i {
  width: 9px;
  height: 9px;
  display: inline-block;
  background: #0f8f42;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.45);
}

.map-empty-note {
  position: absolute;
  z-index: 9;
  left: 24%;
  top: 26%;
  padding: 9px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.94);
  font-weight: 700;
}

.ship-marker {
  position: absolute;
  z-index: 10;
  width: 22px;
  height: 28px;
  border: 0;
  padding: 0;
  background: var(--blue);
  clip-path: polygon(50% 0, 0 100%, 50% 78%, 100% 100%);
  transform: translate(-50%, -50%) rotate(var(--heading, 35deg));
  filter: drop-shadow(0 1px 0 #ffffff) drop-shadow(0 3px 4px rgba(0,0,0,0.35));
  cursor: pointer;
  appearance: none;
}

.ship-marker::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(15, 118, 110, 0.7);
  border-radius: 999px;
  opacity: 0;
  clip-path: none;
}

.ship-marker:hover::after,
.ship-marker.selected::after {
  opacity: 1;
}

.ship-marker.selected {
  width: 28px;
  height: 35px;
  filter: drop-shadow(0 1px 0 #ffffff) drop-shadow(0 4px 6px rgba(0,0,0,0.42)) drop-shadow(0 0 8px rgba(15, 118, 110, 0.45));
}

.ship-marker.warning { background: var(--warn); }
.ship-marker.ok { background: var(--ok); }
.ship-marker.danger { background: var(--danger); }

.ship-tip {
  position: absolute;
  min-width: 210px;
  z-index: 8;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: var(--shadow);
  transform: translate(10px, -100%);
}

.vessel-workbench {
  margin-bottom: 18px;
}

.vessel-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.vessel-vision-map {
  min-height: 520px;
  border: 1px solid rgba(15, 118, 110, 0.15);
}

.vessel-vision-detail {
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 16px;
  min-height: 520px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.vessel-vision-detail h3 {
  margin: 0;
  font-size: 23px;
}

.vessel-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vessel-mini-list {
  display: grid;
  gap: 8px;
}

.vessel-mini-list article {
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px;
}

.mail-list, #inboxList {
  display: grid;
  gap: 10px;
}

.mail-row, .inbox-row {
  border: 1px solid var(--line);
  padding: 12px;
  background: #fbfcfd;
}

.row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  background: white;
}

.badge.ok { color: var(--ok); border-color: #bbf7d0; }
.badge.warn { color: var(--warn); border-color: #fed7aa; }
.badge.danger { color: var(--danger); border-color: #fecaca; }

.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
}

.section-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-toolbar input {
  max-width: 360px;
}

.section-toolbar select {
  min-width: 220px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
}

.login-panel {
  margin-bottom: 14px;
}

.login-test-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) auto auto;
  gap: 10px;
}

.login-test-form input {
  border: 1px solid var(--line);
  padding: 11px 12px;
}

.cards-grid, .module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.vessel-card, .contact-card, .module-card {
  padding: 16px;
}

.contact-actions {
  margin-top: 12px;
}

.vessel-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
  min-height: 18px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  padding-top: 12px;
}

.card-foot b {
  color: var(--ink);
  text-align: right;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.automation-bottom {
  margin-top: 16px;
}

.import-panel {
  margin-bottom: 16px;
}

.import-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 1.25fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.drop-zone, .paste-box, .import-help {
  border: 1px dashed #b7c4cf;
  background: #fbfcfd;
  padding: 14px;
  min-height: 170px;
}

.drop-zone {
  display: grid;
  align-content: center;
  gap: 10px;
}

.drop-zone span, .paste-box, .import-help {
  color: var(--muted);
}

.paste-box {
  display: grid;
  gap: 8px;
}

.paste-box textarea {
  min-height: 112px;
}

.import-help {
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.import-actions {
  justify-content: stretch;
}

.import-actions button {
  flex: 1;
}

.import-result {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.import-result.ok {
  color: var(--ok);
}

.import-result.warn {
  color: var(--warn);
}

.import-result.danger {
  color: var(--danger);
}

.import-preview,
.import-log-list {
  margin-top: 14px;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
}

.preview-head strong {
  color: var(--ink);
}

.preview-table table {
  min-width: 900px;
}

.preview-table small,
.log-item small {
  color: var(--muted);
}

.preview-table .badge {
  white-space: normal;
  line-height: 1.35;
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.log-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  padding: 12px;
}

.composer {
  display: grid;
  gap: 13px;
}

.composer label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

textarea {
  min-height: 230px;
  resize: vertical;
  line-height: 1.45;
}

.module-toggle {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.module-card p {
  color: var(--muted);
  line-height: 1.42;
  margin-top: 8px;
}

.rule-list {
  display: grid;
  gap: 10px;
}

.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  padding: 13px;
  background: #fbfcfd;
}

.rule-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.ok-text {
  color: var(--ok);
}

.mail-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mail-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.mail-settings-form .check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px 12px;
}

.mail-settings-form .check-row input {
  width: auto;
}

.mail-settings-form input,
.mail-settings-form select {
  color: var(--ink);
}

.form-note {
  grid-column: 1 / -1;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 10px 12px;
  line-height: 1.4;
}

.form-actions {
  grid-column: 1 / -1;
}

.button-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.queue-panel {
  margin-bottom: 16px;
}

.queue-status {
  margin-bottom: 10px;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 10px 12px;
  line-height: 1.35;
}

.queue-status.ok {
  color: var(--ok);
}

.queue-status.danger {
  color: var(--danger);
}

.compact-table table {
  min-width: 840px;
}

.flow-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.switch {
  width: 48px;
  height: 26px;
  border: 0;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: white;
  transition: transform 0.18s ease;
}

.switch.on {
  background: var(--accent);
}

.switch.on::after {
  transform: translateX(22px);
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 10;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .icon-button { display: block; }
  .stats-grid, .cards-grid, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .mail-layout, .automation-grid, .import-grid, .vessel-workbench-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .main { padding: 16px; }
  .topbar { align-items: flex-start; }
  .top-actions { display: none; }
  .top-actions.inline-actions { display: flex; }
  h1 { font-size: 23px; }
  .stats-grid, .cards-grid, .module-grid { grid-template-columns: 1fr; }
  .log-grid { grid-template-columns: 1fr; }
  .detail-drawer { padding: 18px; }
  .detail-meta { grid-template-columns: 1fr; }
  .mail-settings-form { grid-template-columns: 1fr; }
  .login-test-form { grid-template-columns: 1fr; }
  .vessel-editor-form { grid-template-columns: 1fr; }
  .module-check-grid { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
  .button-row { justify-content: stretch; }
  .button-row button { flex: 1; }
  .sea-map { min-height: 340px; }
  .section-toolbar { flex-direction: column; align-items: stretch; }
  .section-toolbar input { max-width: none; }
}
