@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #1f4e79;
  --primary-strong: #173a5a;
  --secondary: #2a7f9e;
  --secondary-strong: #236b86;
  --bg: #f7f9fb;
  --bg-soft: #f1f5f9;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sand: #d4a657;
  --sand-soft: #f6edd9;
  --alert: #c44536;
  --alert-soft: #fbe8e5;
  --success: #2e8b57;
  --success-soft: #e7f4ec;
  --color-berth-standard: #2F4F4F;
  --color-berth-member: #9ACD32;
  --color-berth-transit: #FF6347;
  --color-reservation-standard: #6495ED;
  --color-reservation-member: #48D1CC;
  --info-soft: #e9f3f8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 45px rgba(31, 78, 121, 0.12);
  --radius-lg: 12px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --sidebar-width: 272px;
  font-family: 'Inter', 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

#root {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px;
  background: linear-gradient(180deg, var(--primary) 0%, #183d61 100%);
  color: #e6eef5;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid rgba(230, 238, 245, 0.12);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--secondary) 0%, #5ca8c3 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fbff;
}

.brand-subtitle,
.user-chip-role,
.topbar-kicker,
.section-subtitle,
.side-panel-subtitle,
.stat-card-label,
.entity-card-kicker,
.berth-meta,
.register-legend-item,
.entity-card p,
.alert-card p,
.empty-placeholder p,
.detail-note,
.harbor-zone span,
.info-strip,
.key-value-row dt {
  color: var(--muted);
}

.sidebar-section-label {
  color: rgba(230, 238, 245, 0.65);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  padding: 12px 14px;
  border-radius: 10px;
  color: rgba(230, 238, 245, 0.92);
  font-weight: 500;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-link-active {
  background: var(--secondary);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.sidebar-footer {
  margin-top: auto;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fbff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.topbar-title,
.section-title,
.side-panel-title {
  margin: 0;
}

.topbar-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topbar-kicker {
  margin-bottom: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.role-switcher select,
.mock-form-grid input,
.editor-card textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  padding: 10px 12px;
  color: var(--ink);
}

.role-switcher select:focus,
.mock-form-grid input:focus,
.editor-card textarea:focus {
  outline: 2px solid rgba(42, 127, 158, 0.16);
  border-color: var(--secondary);
}

.user-chip {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.user-chip-name {
  font-weight: 600;
  color: var(--ink);
}

.app-content {
  padding: 24px 28px 32px;
}

.page-grid.with-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-section,
.side-panel,
.stat-card,
.entity-card,
.detail-card,
.editor-card,
.alert-card,
.table-card,
.harbor-zone {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.page-section,
.side-panel,
.table-card,
.detail-card,
.editor-card,
.harbor-zone {
  padding: 22px;
}

.section-header,
.side-panel-header,
.harbor-zone-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
}

.section-title:focus {
  outline: none;
}

.section-subtitle {
  margin: 6px 0 0;
  max-width: 720px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-weight: 500;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  background: var(--secondary);
  color: white;
  box-shadow: 0 6px 18px rgba(42, 127, 158, 0.18);
}

.primary-button:hover {
  background: var(--secondary-strong);
}

.secondary-button {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--ink);
}

.secondary-button:hover,
.ghost-button:hover {
  background: #eaf0f6;
}

.ghost-button {
  background: white;
  color: var(--primary);
  border-color: var(--line);
}

.stat-grid {
  display: grid;
  gap: 14px;
}

.stat-grid.four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 18px;
}

.stat-card-value {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat-card-sea { background: linear-gradient(180deg, #f8fdff 0%, var(--info-soft) 100%); }
.stat-card-sand { background: linear-gradient(180deg, #fffdfa 0%, var(--sand-soft) 100%); }
.stat-card-signal { background: linear-gradient(180deg, #fffafa 0%, var(--alert-soft) 100%); }
.stat-card-neutral { background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }

.register-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 14px;
}

.register-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.register-legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.register-legend-swatch-free { background: #ffffff; }
.register-legend-swatch-occupied { background: var(--color-reservation-standard); }
.register-legend-swatch-reserved { background: var(--sand); }
.register-legend-swatch-transit_exception { background: var(--color-berth-transit); }
.register-legend-swatch-maintenance { background: #f1f5f9; }
.register-legend-swatch-member_allocated { background: rgba(154, 205, 50, 0.18); border-color: var(--color-berth-member); }
.register-legend-swatch-member_owner_booking { background: var(--color-reservation-member); border-color: rgba(72, 209, 204, 0.8); }

.register-board {
  display: grid;
  gap: 6px;
}

.register-board-full-month {
  overflow-x: auto;
  overflow-y: hidden;
}

.register-header-row,
.register-row {
  display: grid;
  gap: 4px;
}

.register-header-row-full-month,
.register-row-full-month {
  grid-template-columns: 92px repeat(31, minmax(0, 1fr));
}

.register-header-row-sticky {
  position: sticky;
  top: 0;
  z-index: 8;
  padding-top: 2px;
  padding-bottom: 2px;
  background: var(--panel);
}

.register-sticky-column,
.register-day-header,
.register-cell {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.register-sticky-column,
.register-day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  font-weight: 500;
  color: #334155;
}

.register-sticky-column-compact {
  min-height: 42px;
}

.sticky-berth {
  flex-direction: column;
  align-items: start;
  justify-content: center;
  padding: 8px;
  background: #f8fafc;
}

.berth-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.berth-meta {
  font-size: 0.7rem;
}

.berth-meta-member {
  color: #2e8b57;
  font-weight: 600;
}

.register-day-header {
  font-size: 0.72rem;
}

.register-day-header-today {
  background: #eef6fb;
  color: var(--primary);
  border-color: rgba(31, 78, 121, 0.22);
}

.register-cell {
  padding: 0;
  background: #ffffff;
}

.register-cell-compact {
  min-height: 42px;
  font-size: 0.65rem;
  font-weight: 700;
}

.register-cell-today {
  outline: 2px solid rgba(42, 127, 158, 0.22);
  outline-offset: -1px;
}

.register-cell-free { background: #ffffff; color: transparent; }
.register-cell-occupied { background: var(--color-reservation-standard); color: #ffffff; border-color: rgba(100, 149, 237, 0.34); }
.register-cell-reserved { background: var(--sand); color: #543c11; border-color: rgba(212, 166, 87, 0.26); }
.register-cell-transit_exception { background: var(--color-berth-transit); color: #ffffff; border-color: rgba(255, 99, 71, 0.85); }
.register-cell-maintenance { background: #f1f5f9; color: #64748b; }
.register-cell-member-allocated {
  border-color: var(--color-berth-member);
  outline: 2px solid rgba(154, 205, 50, 0.92);
  outline-offset: -2px;
}
.register-cell-member-owner-booking {
  background: var(--color-reservation-member);
  color: #ffffff;
  border-color: rgba(72, 209, 204, 0.82);
}
.register-cell-member-third-party {
  position: relative;
}
.register-cell-member-third-party::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(46, 139, 87, 0.85);
}

.boat-photo-preview {
  max-width: 320px;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.alert-list,
.card-grid.two-cols,
.detail-layout,
.editor-layout,
.harbor-layout {
  display: grid;
  gap: 16px;
}

.card-grid.two-cols,
.detail-layout,
.editor-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.harbor-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alert-card,
.entity-card {
  padding: 18px;
}

.entity-card h3,
.alert-card h3,
.empty-placeholder h3,
.harbor-zone h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
}

.entity-card-meta {
  margin: 12px 0 16px;
  color: var(--muted);
}

.harbor-zone {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.harbor-zone-header {
  margin-bottom: 14px;
}

.harbor-pier-line {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  margin-bottom: 16px;
}

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

.map-berth {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  min-height: 110px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.map-berth:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(42, 127, 158, 0.28);
}

.map-berth-code {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.map-berth-free { background: #ffffff; }
.map-berth-occupied { background: linear-gradient(180deg, #ffffff 0%, #eef8fb 100%); }
.map-berth-reserved { background: linear-gradient(180deg, #ffffff 0%, #fbf5e8 100%); }
.map-berth-transit_exception { background: linear-gradient(180deg, #ffffff 0%, #fdf0ee 100%); }
.map-berth-maintenance { background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%); }

.harbor-view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
  background: #f8fafc;
}

.harbor-view-toggle-option {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-weight: 600;
}

.harbor-view-toggle-option-active {
  background: #ffffff;
  color: var(--primary-strong);
  box-shadow: var(--shadow-sm);
}

.harbor-map-wrapper {
  width: 100%;
}

.harbor-map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.harbor-map-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(31, 78, 121, 0.1), transparent 28%),
    radial-gradient(circle at 84% 72%, rgba(42, 127, 158, 0.1), transparent 30%),
    linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%);
}

.harbor-map-berths-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.harbor-map-berth {
  position: absolute;
  z-index: 3;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  border-radius: 10px;
  border: 2px solid rgba(23, 58, 90, 0.35);
  padding: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  text-align: left;
  min-width: 64px;
  min-height: 48px;
  transform-origin: center center;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.harbor-map-berth:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(42, 127, 158, 0.3);
}

.harbor-map-berth:focus-visible,
.harbor-map-operational-berth:focus-visible {
  outline: 2px solid rgba(42, 127, 158, 0.45);
  outline-offset: 1px;
}

.harbor-map-berth-code {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0b1220;
}

.harbor-map-berth-status {
  font-size: 0.68rem;
  color: #334155;
}

.harbor-map-berth-icon .boat-type-icon svg {
  width: 16px;
  height: 16px;
}

.harbor-map-berth-standard {
  border-style: solid;
  border-color: var(--color-berth-standard);
}

.harbor-map-berth-transit {
  border-style: dashed;
  border-color: var(--color-berth-transit);
}

.harbor-map-berth-member {
  border-style: dotted;
  border-color: var(--color-berth-member);
}

.harbor-map-berth-free { background: #ffffff; }
.harbor-map-berth-occupied { background: linear-gradient(180deg, #ffffff 0%, #eef8fb 100%); }
.harbor-map-berth-reserved { background: linear-gradient(180deg, #ffffff 0%, #fbf5e8 100%); }
.harbor-map-berth-transit_exception { background: linear-gradient(180deg, #ffffff 0%, #fdf0ee 100%); }
.harbor-map-berth-maintenance { background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%); }

.harbor-map-operational-wrapper {
  width: 100%;
}

.harbor-map-operational-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.harbor-map-operational-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

.harbor-map-operational-berths-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.harbor-map-operational-berth {
  position: absolute;
  z-index: 3;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-radius: 8px;
  border: 2px solid rgba(23, 58, 90, 0.25);
  padding: 3px 7px;
  min-width: 44px;
  min-height: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transform-origin: center center;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.harbor-map-operational-berth:hover {
  box-shadow: var(--shadow-md);
}

.harbor-map-operational-berth-standard {
  border-color: var(--color-berth-standard);
}

.harbor-map-operational-berth-transit {
  border-color: var(--color-berth-transit);
}

.harbor-map-operational-berth-member {
  border-color: var(--color-berth-member);
}

.harbor-map-operational-berth-free {
  background: rgba(241, 245, 249, 0.72);
}

.harbor-map-operational-berth-occupied {
  background: #ffffff;
}

.harbor-map-operational-berth-code {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0b1220;
}

.harbor-map-operational-berth-icon .boat-type-icon svg {
  width: 16px;
  height: 16px;
}

.harbor-map-operational-legend {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.harbor-map-operational-legend-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.harbor-map-operational-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.harbor-map-operational-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.8rem;
}

.harbor-map-operational-swatch {
  width: 16px;
  height: 16px;
  border-radius: 6px;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.harbor-map-operational-swatch-transit { background: rgba(255, 99, 71, 0.26); border-color: rgba(255, 99, 71, 0.6); }
.harbor-map-operational-swatch-member { background: rgba(154, 205, 50, 0.26); border-color: rgba(154, 205, 50, 0.62); }
.harbor-map-operational-swatch-standard { background: rgba(47, 79, 79, 0.22); border-color: rgba(47, 79, 79, 0.58); }
.harbor-map-operational-swatch-free { background: rgba(241, 245, 249, 0.9); }

.harbor-map-operational-icon-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.harbor-map-operational-icon-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 0.8rem;
}

.harbor-layout-editor {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.harbor-layout-editor-sidebar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.harbor-layout-editor-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.harbor-layout-editor-sidebar select,
.layout-editor-grid input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.layout-editor-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.76rem;
}

.layout-editor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.layout-editor-grid label {
  font-size: 0.76rem;
  color: var(--muted);
}

.layout-editor-status {
  font-size: 0.82rem;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.harbor-layout-editor-group-actions {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.harbor-layout-editor-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.harbor-layout-editor-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.harbor-layout-editor-group-rotate {
  display: flex;
  gap: 6px;
}

.harbor-layout-editor-group-rotate input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

.harbor-layout-editor-group-move {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.82rem;
}

.harbor-layout-editor-canvas {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 5 / 3;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}

.harbor-layout-editor-surface {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%);
  background-size: 40px 40px, 40px 40px, auto;
  pointer-events: none;
}

.harbor-layout-editor-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  border-radius: 8px;
  border: 2px solid rgba(23, 58, 90, 0.4);
  background: #ffffff;
  color: #0b1220;
  font-size: 0.72rem;
  font-weight: 700;
  transform-origin: center center;
  touch-action: none;
}

.harbor-layout-editor-marker-active {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(42, 127, 158, 0.24);
}

.harbor-layout-editor-marker-zone {
  border-color: rgba(31, 78, 121, 0.72);
  box-shadow: 0 0 0 1px rgba(31, 78, 121, 0.18);
}

.boat-type-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-strong);
}

.boat-type-icon svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.boat-type-icon-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.info-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.harbor-map-date-field {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.harbor-map-date-field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  padding: 10px 12px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.harbor-map-date-field input:focus {
  outline: 2px solid rgba(42, 127, 158, 0.16);
  border-color: var(--secondary);
}

.side-panel {
  position: sticky;
  top: 18px;
  height: fit-content;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.side-panel-content,
.linked-list,
.inline-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-panel-note {
  padding: 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
}

.key-value-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.key-value-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.key-value-row dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--muted);
  font-weight: 500;
}

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

.mock-form-grid label,
.editor-card textarea {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-placeholder {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 260px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.empty-placeholder.compact {
  min-height: auto;
  place-items: start;
  text-align: left;
}

@media (max-width: 1400px) {
  .harbor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .page-grid.with-panel,
  .card-grid.two-cols,
  .detail-layout,
  .editor-layout,
  .stat-grid.four-cols {
    grid-template-columns: 1fr;
  }

  .page-grid.with-panel {
    grid-template-columns: 1fr;
  }

  .harbor-layout-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 16px;
  }

  .app-content,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .register-header-row-full-month,
  .register-row-full-month {
    grid-template-columns: 88px repeat(31, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mock-form-grid,
  .harbor-zone-grid {
    grid-template-columns: 1fr;
  }

  .harbor-layout-editor {
    grid-template-columns: 1fr;
  }

  .register-header-row-full-month,
  .register-row-full-month {
    grid-template-columns: 72px repeat(31, minmax(0, 1fr));
  }

  .register-sticky-column,
  .register-day-header,
  .register-cell,
  .register-cell-compact,
  .register-sticky-column-compact {
    min-height: 34px;
  }

  .register-day-header {
    font-size: 0.62rem;
  }

  .berth-title {
    font-size: 0.78rem;
  }

  .berth-meta {
    font-size: 0.62rem;
  }
}

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

.editor-status-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.editor-status-card-success {
  background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
  border-color: rgba(46, 139, 87, 0.18);
}

.section-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-textarea-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.editor-search-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.editor-search-label input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  padding: 10px 12px;
  color: var(--ink);
}

.editor-search-label input:focus {
  outline: 2px solid rgba(42, 127, 158, 0.16);
  border-color: var(--secondary);
}

.editor-picker-section + .editor-picker-section {
  margin-top: 22px;
}

.editor-picker-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.editor-picker-item h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
}

.editor-picker-item p {
  margin: 0 0 8px;
  color: var(--muted);
}

.editor-picker-item-selected {
  background: linear-gradient(180deg, #ffffff 0%, var(--success-soft) 100%);
  border-color: rgba(46, 139, 87, 0.2);
}

.inline-feedback {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.inline-feedback-success {
  background: var(--success-soft);
  border-color: rgba(46, 139, 87, 0.2);
  color: #1f5f3d;
}

.inline-feedback-error {
  background: var(--alert-soft);
  border-color: rgba(196, 69, 54, 0.18);
  color: #8f2f23;
}

.inline-feedback-info {
  background: var(--info-soft);
  border-color: rgba(42, 127, 158, 0.2);
  color: var(--primary-strong);
}

.field-error {
  font-size: 0.82rem;
  color: var(--alert);
}

.month-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: #fff4ce;
  border-top: 1px solid #eed484;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
  z-index: 1000;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
  margin-left: 1rem;
}
