/* ============================================================
   PORT PILOT MANAGEMENT SYSTEM — STYLESHEET v2
   Aesthetic: Clean Light + Mint/Teal Accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --mint:        #2abf9e;
  --mint-dark:   #1e9b80;
  --mint-light:  #e6f7f3;
  --mint-soft:   #c4ede4;
  --teal-dim:    #5bbfab;

  --bg:          #f4f7f6;
  --bg-alt:      #edf2f0;
  --surface:     #ffffff;
  --surface-2:   #f9fbfa;
  --border:      #d8e8e3;
  --border-focus:#2abf9e;

  --text-main:   #1a2e29;
  --text-sec:    #4a6b62;
  --text-muted:  #8aada6;

  --orange:      #e8732a;
  --orange-soft: #fdf0e8;
  --danger:      #d94f4f;
  --danger-soft: #fdeaea;
  --success:     #27ae60;
  --success-soft:#eaf7ef;
  --warn:        #e8a72a;
  --warn-soft:   #fdf5e6;
  --info:        #2a89e8;
  --info-soft:   #e8f3fd;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow:      0 2px 12px rgba(42,191,158,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg:   0 8px 32px rgba(42,191,158,0.13), 0 2px 8px rgba(0,0,0,0.08);

  --radius:      8px;
  --radius-lg:   12px;
  --font:        'Plus Jakarta Sans', sans-serif;
  --mono:        'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── NAVBAR ─────────────────────── */
.navbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border-bottom: 2px solid var(--mint);
  padding: 0 24px; height: 58px;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 8px rgba(42,191,158,0.08);
}
.nav-brand { display: flex; align-items: center; flex-shrink: 0; margin-right: 16px; }
.nav-brand-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img   { height: 38px; width: auto; object-fit: contain; display: block;
                  border-radius: 7px; transition: opacity .2s; }
.nav-logo-img:hover { opacity: .85; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link  { padding: 6px 11px; color: var(--text-sec); font-size: 13px; font-weight: 600; text-decoration: none; border-radius: var(--radius); transition: all 0.18s; white-space: nowrap; }
.nav-link:hover { color: var(--mint-dark); background: var(--mint-light); }
.nav-dropdown { position: relative; }
/* Invisible bridge between nav-link and dropdown so mouse can move freely */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px; /* covers the gap */
    background: transparent;
    display: none;
}
.nav-dropdown:hover::after { display: block; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 2px); /* reduced gap from 6px to 2px */
    left: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
    /* Add padding-top to prevent gap issue */
    padding-top: 4px;
}
.dropdown-menu a { display: block; padding: 10px 16px; color: var(--text-sec); font-size: 13px; text-decoration: none; transition: all 0.15s; font-weight: 500; }
.dropdown-menu a:hover { background: var(--mint-light); color: var(--mint-dark); }
.nav-dropdown:hover .dropdown-menu, .dropdown-menu.dd-open { display: block; }
.nav-user { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.user-badge { background: var(--mint); color: white; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.user-name  { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.btn-logout { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); padding: 4px 12px; border-radius: var(--radius); cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; transition: all 0.2s; font-family: var(--font); }
.btn-logout:hover { background: var(--danger); color: white; }

/* ── MAIN ─────────────────────── */
.main-content { padding: 24px; max-width: 1400px; margin: 0 auto; }

/* ── PAGE HEADER ─────────────────── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 22px; font-weight: 800; color: var(--text-main); letter-spacing: -0.4px; }
.page-header h1 span { color: var(--mint-dark); }
.page-subtitle { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.breadcrumb { display: flex; gap: 6px; color: var(--text-muted); font-size: 12px; align-items: center; margin-top: 4px; }
.breadcrumb a { color: var(--mint-dark); text-decoration: none; font-weight: 600; }
.breadcrumb-sep { color: var(--border); }

/* ── CARDS ─────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.card-title  { font-size: 14px; font-weight: 700; color: var(--text-main); }
.card-badge  { background: var(--mint-light); color: var(--mint-dark); padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid var(--mint-soft); }
.card-icon   { font-size: 18px; }

/* ── FORMS ─────────────────────── */
.form-grid   { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.form-grid-2 { grid-template-columns: repeat(2,1fr); }
.form-grid-3 { grid-template-columns: repeat(3,1fr); }
.form-grid-4 { grid-template-columns: repeat(4,1fr); }
.col-span-2  { grid-column: span 2; }
.col-span-3  { grid-column: span 3; }
.col-span-full { grid-column: 1/-1; }

.form-group  { display: flex; flex-direction: column; gap: 5px; position: relative; }
.form-label  { font-size: 11px; font-weight: 700; color: var(--text-sec); text-transform: uppercase; letter-spacing: 0.7px; }
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: var(--radius);
  color: var(--text-main); padding: 9px 12px; font-size: 13.5px;
  font-family: var(--font); transition: all 0.18s; width: 100%;
}
.form-control:focus { outline: none; border-color: var(--mint); background: var(--surface); box-shadow: 0 0 0 3px rgba(42,191,158,0.12); }
.form-control.auto-fill { background: var(--mint-light); border-color: var(--mint-soft); color: var(--mint-dark); font-family: var(--mono); font-weight: 600; }
.form-control[readonly]:not(.auto-fill) { cursor: default; background: var(--bg-alt); color: var(--text-muted); }
select.form-control { cursor: pointer; 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='%238aada6' d='M6 8L1 3h10z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; -webkit-appearance:none; appearance:none; }
textarea.form-control { min-height: 72px; resize: vertical; }
.form-hint  { font-size: 11px; color: var(--text-muted); }
.form-error { font-size: 11px; color: var(--danger); }

.section-divider { grid-column: 1/-1; display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.section-divider-label { font-size: 10px; font-weight: 800; color: var(--mint-dark); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.section-divider-line  { flex: 1; height: 1px; background: var(--mint-soft); }

.tunda-group { grid-column: 1/-1; background: var(--mint-light); border: 1px solid var(--mint-soft); border-radius: var(--radius-lg); padding: 16px 18px 14px; }
.tunda-group-label { font-size: 10px; font-weight: 800; color: var(--mint-dark); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }

/* Tunda one-row layout */
.tunda-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tunda-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 2; }
.tunda-col-dt { flex: 2.2; }
.tunda-col-total { flex: 1; min-width: 100px; max-width: 130px; }
.tunda-col .form-label,
.tunda-col-dt .form-label,
.tunda-col-total .form-label { margin-bottom: 4px; }
.tunda-col .datetime-pair { flex-wrap: nowrap; }

/* ── AUTOCOMPLETE ──────────────── */
.autocomplete-wrapper {
  position: relative;
  z-index: 10;
}
.autocomplete-wrapper:focus-within { z-index: 9999; }
.autocomplete-list {
  display: none;
  position: absolute;
  top: calc(100% + 2px); left: 0; right: 0;
  background: var(--surface);
  border: 2px solid var(--mint);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(42,191,158,0.18), 0 2px 8px rgba(0,0,0,0.10);
  max-height: 260px; overflow-y: auto;
  z-index: 9999;
  min-width: 100%;
}
.autocomplete-item {
  padding: 9px 13px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--bg-alt);
  display: flex; flex-direction: column; gap: 2px;
  transition: background 0.1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.hl { background: var(--mint-light); }
.ac-name { font-weight: 600; color: var(--text-main); font-size: 13.5px; }
.autocomplete-item:hover .ac-name, .autocomplete-item.hl .ac-name { color: var(--mint-dark); }
.ac-meta { font-size: 11px; color: var(--text-muted); font-family: var(--mono); }

/* Combobox */
.combo-wrapper { position: relative; z-index: 10; }
.combo-wrapper:focus-within { z-index: 9999; }
.combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 2px); left: 0; right: 0;
  background: var(--surface);
  border: 2px solid var(--mint);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(42,191,158,0.18), 0 2px 8px rgba(0,0,0,0.10);
  max-height: 210px; overflow-y: auto;
  z-index: 9999;
}
.combo-list.open { display: block; }
.combo-item { padding: 10px 13px; cursor: pointer; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--bg-alt); color: var(--text-main); }
.combo-item:last-child { border-bottom: none; }
.combo-item:hover, .combo-item.hl { background: var(--mint-light); color: var(--mint-dark); }

/* ── VESSEL INFO STRIP ─────────── */
.vessel-info-strip { display: flex; gap: 20px; align-items: center; background: var(--mint-light); border: 1px solid var(--mint-soft); border-radius: var(--radius); padding: 8px 14px; margin-top: 6px; flex-wrap: wrap; }
.vessel-info-item  { display: flex; flex-direction: column; }
.vessel-info-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.vessel-info-value { font-size: 13px; font-weight: 700; color: var(--mint-dark); font-family: var(--mono); }

/* ── BUTTONS ─────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; border: none; text-decoration: none; transition: all 0.18s; font-family: var(--font); }
.btn-primary   { background: var(--mint); color: white; box-shadow: 0 2px 8px rgba(42,191,158,0.3); }
.btn-primary:hover { background: var(--mint-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text-sec); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--mint); color: var(--mint-dark); background: var(--mint-light); }
.btn-nav-active { background: var(--mint-light); color: var(--mint-dark); border: 1.5px solid var(--mint); font-weight: 700; pointer-events: none; }
.btn-danger    { background: var(--danger); color: white; }
.btn-danger:hover { background: #c44; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── TABLES ─────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th { background: var(--mint-light); color: var(--mint-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px; padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1.5px solid var(--mint-soft); }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--mint-light); }
tbody td { padding: 9px 12px; color: var(--text-main); }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--text-sec); }

/* ── ALERTS ─────────────────────── */
.alert { padding: 11px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: var(--success-soft); border: 1px solid #a8e6c0; color: var(--success); }
.alert-danger  { background: var(--danger-soft);  border: 1px solid #f0b8b8; color: var(--danger); }
.alert-warning { background: var(--warn-soft);    border: 1px solid #f0d898; color: #b07a10; }
.alert-info    { background: var(--info-soft);    border: 1px solid #a8c8f0; color: var(--info); }

/* ── BADGES ─────────────────────── */
.badge        { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.badge-deployed { background: var(--success-soft); color: var(--success); border: 1px solid #a8e6c0; }
.badge-pending  { background: var(--warn-soft); color: #b07a10; border: 1px solid #f0d898; }
.badge-convoi   { background: var(--mint-light); color: var(--mint-dark); border: 1px solid var(--mint-soft); }
.badge-fisik    { background: var(--orange-soft); color: var(--orange); border: 1px solid #f0c8a0; }
.badge-eta      { background: var(--info-soft); color: var(--info); border: 1px solid #a8c8f0; }
.badge-etd      { background: var(--warn-soft); color: #b07a10; border: 1px solid #f0d898; }

/* ── STATS ─────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--mint); }
.stat-card.orange::before  { background: var(--orange); }
.stat-card.success::before { background: var(--success); }
.stat-card.warn::before    { background: var(--warn); }
.stat-card.info::before    { background: var(--info); }
.stat-card.aqua::before    { background: var(--mint); }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-main); font-family: var(--mono); }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; line-height: 1.3; }
.stat-icon  { position: absolute; right: 14px; top: 14px; font-size: 24px; opacity: 0.12; }

/* ── LOGIN ─────────────────────── */
.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e6f7f3 0%, #f4f9f7 50%, #edf5f2 100%); }
.login-box { background: var(--surface); border: 1px solid var(--mint-soft); border-radius: 18px; padding: 46px 40px; width: 100%; max-width: 420px; box-shadow: 0 12px 48px rgba(42,191,158,0.15); position: relative; }
.login-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--mint), var(--teal-dim)); border-radius: 18px 18px 0 0; }
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo .anchor { font-size: 44px; display: block; margin-bottom: 10px; }
.login-logo h2 { font-size: 19px; font-weight: 800; color: var(--text-main); }
.login-logo p  { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.login-logo-img { height: 56px; width: auto; object-fit: contain; display: block; margin: 0 auto 8px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }

/* ── TABS ─────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); }
.tab-btn { padding: 9px 18px; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 13px; font-weight: 700; font-family: var(--font); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.18s; }
.tab-btn.active { color: var(--mint-dark); border-bottom-color: var(--mint); }
.tab-btn:hover  { color: var(--text-main); }
.tab-content    { display: none; padding-top: 20px; }
.tab-content.active { display: block; }

/* ── PAGINATION ───────────────── */
.pagination { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.page-link { padding: 5px 11px; border-radius: var(--radius); color: var(--text-sec); font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); transition: all 0.15s; }
.page-link:hover, .page-link.active { background: var(--mint-light); color: var(--mint-dark); border-color: var(--mint-soft); }

/* ── SEARCH BAR ───────────────── */
.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-bar .form-control { max-width: 280px; }

/* ── UTILITIES ────────────────── */
.text-mint   { color: var(--mint-dark); }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text-muted); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-mono   { font-family: var(--mono); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16{ gap: 16px; }

/* ── RESPONSIVE ────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 14px; }
  .nav-links { display: none; }
  .main-content { padding: 14px 12px; }
  .form-grid, .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3, .col-span-full { grid-column: span 1; }
  .tunda-row { flex-direction: column; }
  .tunda-col, .tunda-col-dt, .tunda-col-total { flex: 1 1 100%; max-width: 100%; }
  .stats-grid  { grid-template-columns: repeat(2,1fr); }
}

/* ── ANIMATIONS ────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ── SCROLLBAR ─────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--mint-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mint); }

/* PRINT */
@media print {
  .navbar, .btn-group, .search-bar, .tabs, .pagination { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS & TRANSITIONS
   ═══════════════════════════════════════════════════ */

/* Page load fade-in */
/* ── DATETIME PAIR (tanggal + jam berdampingan) ── */
.datetime-pair {
    display: flex;
    gap: 8px;
    align-items: center;
}
.datetime-pair .dt-date {
    flex: 3;
    min-width: 130px;
    cursor: pointer;
    position: relative;
}
/* Buat seluruh area input bisa diklik untuk buka kalender */
.datetime-pair .dt-date::-webkit-calendar-picker-indicator,
.em-dt-date::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.em-dt-date {
    position: relative;
    cursor: pointer;
}
.datetime-pair .dt-time {
    flex: 2;
    min-width: 90px;
}


.main-content {
    animation: pageIn 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    will-change: opacity, transform;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE EXIT (triggered by JS before navigate) ── */
.main-content.page-exit {
    animation: pageOut 0.22s cubic-bezier(0.4, 0, 1, 1) both;
    pointer-events: none;
}
@keyframes pageOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-10px) scale(0.98); }
}

/* ── VIEW TRANSITION API (Chrome 111+) ──────────── */
@keyframes vt-slide-in {
    from { opacity: 0; transform: translateY(18px) scale(0.988); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes vt-slide-out {
    from { opacity: 1; transform: translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateY(-12px) scale(0.988); }
}
::view-transition-old(root) {
    animation: vt-slide-out 0.2s cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
    animation: vt-slide-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stat cards - no individual animation, covered by pageIn */

/* Navbar link hover */
.nav-link { position:relative; overflow:hidden; }
.nav-link::after {
    content:''; position:absolute; bottom:0; left:50%; right:50%;
    height:2px; background:var(--mint);
    transition:left .2s ease, right .2s ease;
}
.nav-link:hover::after { left:8px; right:8px; }

/* Dropdown menu animation */
.dropdown-menu {
    transform-origin: top left;
    animation: none;
}
.dropdown-menu.dd-open, .nav-dropdown:hover .dropdown-menu {
    animation: dropIn .18s ease forwards;
}
@keyframes dropIn {
    from { opacity:0; transform:translateY(-8px) scale(.97); }
    to   { opacity:1; transform:translateY(0)    scale(1); }
}

/* Button click ripple */
.btn { position:relative; overflow:hidden; }
.btn::after {
    content:''; position:absolute; inset:0;
    background:rgba(255,255,255,.25);
    opacity:0; border-radius:inherit;
    transition:opacity .3s;
}
.btn:active::after { opacity:1; transition:none; }

/* Table row hover */
tbody tr { transition:background .12s, transform .12s; }
tbody tr:hover { transform:translateX(2px); }

/* Tab button transition */
.tab-btn {
    position:relative;
    transition:color .2s;
}
.tab-btn::after {
    content:''; position:absolute; bottom:-2px; left:0; right:0;
    height:2px; background:var(--mint);
    transform:scaleX(0); transition:transform .2s ease;
}
.tab-btn.active::after { transform:scaleX(1); }

/* Alert slide-in */
.alert { animation: slideDown .3s ease forwards; }
@keyframes slideDown {
    from { opacity:0; transform:translateY(-10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Modal animation */
#editModal > div {
    animation: modalIn .25s cubic-bezier(.34,1.3,.64,1) forwards;
}
@keyframes modalIn {
    from { opacity:0; transform:translateY(-30px) scale(.95); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Vessel card accordion */
.vessel-body {
    animation: none;
    transition: none;
}
.vessel-card.open .vessel-body {
    animation: accordionOpen .25s ease forwards;
}
@keyframes accordionOpen {
    from { opacity:0; transform:translateY(-6px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Quick links card hover */
.ql-card {
    transition: all .2s cubic-bezier(.34,1.3,.64,1) !important;
}
.ql-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(42,191,158,.18) !important;
}

/* Vessel info strip pulse when filled */
@keyframes stripPulse {
    0%   { box-shadow: 0 0 0 0 rgba(42,191,158,.4); }
    70%  { box-shadow: 0 0 0 8px rgba(42,191,158,0); }
    100% { box-shadow: 0 0 0 0 rgba(42,191,158,0); }
}
.vessel-info-strip { animation: stripPulse 1s ease; }

/* Dropdown items stagger */
.dropdown-menu a {
    opacity:0;
    animation: none;
}
.dropdown-menu.dd-open a,
.nav-dropdown:hover .dropdown-menu a {
    animation: itemFade .15s ease forwards;
}
.dropdown-menu a:nth-child(1) { animation-delay:.04s; }
.dropdown-menu a:nth-child(2) { animation-delay:.08s; }
.dropdown-menu a:nth-child(3) { animation-delay:.12s; }
.dropdown-menu a:nth-child(4) { animation-delay:.16s; }
@keyframes itemFade {
    from { opacity:0; transform:translateX(-6px); }
    to   { opacity:1; transform:translateX(0); }
}
