/* ============================================================
   Manning Agency Dashboard - Main Stylesheet
   ============================================================ */

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

:root {
  --sidebar-bg: #1a3a5c;
  --sidebar-hover: #22496e;
  --sidebar-active: #2a5a82;
  --sidebar-active-indicator: #4a90d9;
  --sidebar-text: #c8d8e8;
  --sidebar-text-active: #ffffff;
  --sidebar-width: 200px;
  --sidebar-logo-bg: #15304e;

  --main-bg: #eef1f6;
  --card-bg: #ffffff;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  --card-radius: 12px;

  --primary: #1a6fc4;
  --primary-light: #e8f1fb;
  --success: #27ae60;
  --success-light: #e8f8ef;
  --warning: #e67e22;
  --warning-light: #fef3e8;
  --danger: #e74c3c;
  --danger-light: #fdf0ef;

  --text-dark: #1a2b3c;
  --text-medium: #4a6380;
  --text-light: #8aa0b8;
  --border: #e2e8f0;

  --font: 'Inter', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font);
  background-color: var(--main-bg);
  color: var(--text-dark);
  height: 100%;
  font-size: 14px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  background: var(--sidebar-logo-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: #fff;
}

.sidebar-logo-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 12px 16px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
  border-left-color: rgba(74, 144, 217, 0.5);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active-indicator);
  font-weight: 500;
}

.nav-item .nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Sidebar Footer (Logout) */
.sidebar-footer {
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 24px;
}

/* ============================================================
   TOP HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.header-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-select select {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
}

.filter-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.filter-select .filter-label + select {
  font-size: 13px;
  font-weight: 500;
}

.filter-icon {
  color: var(--text-light);
  font-size: 14px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-card-number {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 10px;
}

.stat-card-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-value-icon {
  font-size: 22px;
  color: var(--text-medium);
}

.stat-value-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.stat-trend {
  font-size: 18px;
  color: var(--success);
}

/* Manning Status / Crew Movement cards with donut */
.stat-card-donut {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.donut-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.donut-wrap canvas {
  position: absolute;
  top: 0; left: 0;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-medium);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-item strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ============================================================
   CONTENT GRID
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 16px 18px;
}

/* ============================================================
   TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 11px 12px;
  font-size: 13px;
  color: var(--text-medium);
  border-bottom: 1px solid #f1f4f8;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #f8fafc;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.quality-icon {
  font-size: 14px;
}

.quality-verified { color: var(--success); }
.quality-alert { color: var(--danger); }

/* ============================================================
   ALERTS PANEL (Right sidebar)
   ============================================================ */
.alert-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
}

.alert-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.alert-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
}

.alert-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.alert-tag-red {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(231,76,60,0.2);
}

.alert-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.alert-avatars {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #c8d8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--sidebar-bg);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.alert-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--danger);
  text-decoration: none;
  font-weight: 500;
}

.alert-link:hover {
  text-decoration: underline;
}

.alert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

/* ============================================================
   ACTIVITY & CHARTS
   ============================================================ */
.activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f4f8;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
}

.timeline-dot-onboard { background: var(--primary); }
.timeline-dot-shore { background: var(--text-light); }

.timeline-text {
  font-size: 12.5px;
  color: var(--text-medium);
  line-height: 1.4;
}

/* ============================================================
   DOWNLOAD REPORTS
   ============================================================ */
.download-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-top: 12px;
}

.download-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.download-btns {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-pdf {
  background: #e8f0fb;
  color: #1a5fb4;
  border: 1px solid #c4d8f0;
}

.btn-pdf:hover {
  background: #d4e5f8;
}

.btn-excel {
  background: #1a3a5c;
  color: #ffffff;
}

.btn-excel:hover {
  background: #15304e;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a82 50%, #1a3a5c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 64px;
  height: 64px;
  background: var(--sidebar-bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
  color: #fff;
}

.login-logo h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.login-logo p {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

.form-group {
  margin-bottom: 16px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 111, 196, 0.12);
}

.form-control-icon {
  position: relative;
}

.form-control-icon .form-control {
  padding-left: 38px;
}

.form-control-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--sidebar-bg);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.btn-primary:hover {
  background: var(--sidebar-hover);
}

.btn-primary:active {
  transform: scale(0.99);
}

.login-error {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(231,76,60,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   PAGE PLACEHOLDER (for pages under construction)
   ============================================================ */
.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  color: var(--text-light);
}

.placeholder-page .placeholder-icon {
  font-size: 52px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholder-page h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.placeholder-page p {
  font-size: 13px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { width: 200px; transform: translateX(-200px); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .activity-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted { color: var(--text-light); font-size: 12px; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 999;
  padding: 30px 16px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  transform: translateY(-16px);
  transition: transform 0.25s ease;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-overlay.open .modal-dialog { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a82 100%);
  color: #fff;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  border: none; color: #fff; cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,.28); }

.modal-body {
  padding: 24px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-thumb { background: #c8d8e8; border-radius: 4px; }

.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

/* ============================================================
   FORM SECTIONS (inside modal)
   ============================================================ */
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-size: 13px; font-weight: 700;
  color: var(--primary);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex; align-items: center; gap: 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.col-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-medium); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text-dark);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; width: 100%;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,196,.1);
}
.form-control::placeholder { color: #b0c0d0; }
select.form-control {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238aa0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ============================================================
   PHOTO UPLOAD
   ============================================================ */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: #f8fafc;
}
.photo-upload-area:hover, .photo-upload-area.dragover {
  border-color: var(--primary); background: var(--primary-light);
}
.photo-upload-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.photo-upload-icon  { font-size: 36px; margin-bottom: 8px; }
.photo-upload-text  { font-size: 14px; color: var(--text-medium); font-weight: 500; }
.photo-upload-hint  { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.photo-preview      { margin-top: 12px; display: none; position: relative; }
.photo-preview img  { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.photo-preview-remove {
  position: absolute; top: 6px; right: 6px;
  background: rgba(231,76,60,.85); color: #fff;
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   MODAL BUTTONS
   ============================================================ */
.btn-cancel {
  padding: 9px 20px; border-radius: 8px;
  border: 1.5px solid var(--border); background: #fff;
  color: var(--text-medium);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
}
.btn-cancel:hover { border-color: var(--text-light); background: #f8fafc; }

.btn-save {
  padding: 9px 24px; border-radius: 8px; border: none;
  background: var(--sidebar-bg); color: #fff;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font); transition: background 0.2s, transform 0.1s;
  display: flex; align-items: center; gap: 8px;
}
.btn-save:hover   { background: var(--sidebar-hover); }
.btn-save:active  { transform: scale(0.98); }
.btn-save:disabled { background: #94a3b8; cursor: not-allowed; }

/* ============================================================
   VESSEL PAGE TOOLBAR
   ============================================================ */
.page-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 8px 14px; transition: border-color 0.2s;
  flex: 1; max-width: 320px;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  border: none; outline: none;
  font-family: var(--font); font-size: 13.5px;
  color: var(--text-dark); background: transparent; width: 100%;
}
.search-box input::placeholder { color: #b0c0d0; }
.search-icon { color: var(--text-light); font-size: 15px; }

.btn-add-vessel {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sidebar-bg); color: #fff;
  border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  transition: background 0.2s, transform 0.1s; white-space: nowrap;
}
.btn-add-vessel:hover  { background: var(--sidebar-hover); }
.btn-add-vessel:active { transform: scale(0.98); }

.vessel-thumb {
  width: 38px; height: 38px; border-radius: 8px;
  object-fit: cover; border: 1px solid var(--border);
  background: #eef1f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-light); flex-shrink: 0; overflow: hidden;
}
.vessel-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.vessel-name-cell { display: flex; align-items: center; gap: 10px; }

.table-empty { text-align: center; padding: 48px 20px; color: var(--text-light); }
.table-empty .empty-icon { font-size: 44px; opacity: .4; display: block; margin-bottom: 12px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: #fff; border-radius: 10px; padding: 14px 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 380px;
  font-size: 13.5px; font-weight: 500;
  animation: slideInToast 0.3s ease;
  border-left: 4px solid var(--success);
}
.toast.toast-error { border-left-color: var(--danger); }
.toast-icon { font-size: 18px; flex-shrink: 0; }

@keyframes slideInToast {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
