:root{
  --vesselping-navy:#0A1628;
  --vesselping-cyan:#00B4D8;
  --vesselping-blue:#1478e8;
  --vesselping-light:#f5f9fc;
  --vesselping-text:#0A1628;
  --vesselping-muted:#5c6f82;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:Arial,sans-serif;
  background:#ffffff;
  color:var(--vesselping-text);
}

.auth-body{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:#ffffff;
  padding:32px 16px;
}

.auth-card{
  width:420px;
  max-width:calc(100vw - 32px);
  background:#ffffff;
  border:1px solid rgba(10,22,40,.08);
  border-radius:18px;
  padding:32px;
  text-align:center;
  box-shadow:0 18px 50px rgba(10,22,40,.14);
}

.auth-logo{
  display:block;
  width:180px;
  max-width:70%;
  height:auto;
  margin:0 auto 14px;
}

.auth-card h1{
  margin:0;
  color:var(--vesselping-navy);
  font-size:42px;
  line-height:1.05;
  letter-spacing:.5px;
}

.tagline{
  color:var(--vesselping-muted);
  margin:8px 0 0;
  font-weight:600;
  letter-spacing:.4px;
}

.tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:24px 0 20px;
  padding:4px;
  background:var(--vesselping-light);
  border-radius:10px;
}

.tabs button{
  background:transparent;
  color:var(--vesselping-navy);
  box-shadow:none;
}

.tabs button.active{
  background:var(--vesselping-navy);
  color:#ffffff;
}

form{
  display:grid;
  gap:12px;
}

input,textarea{
  width:100%;
  background:#ffffff;
  color:var(--vesselping-navy);
  border:1px solid rgba(10,22,40,.18);
  border-radius:8px;
  padding:11px 12px;
  font:inherit;
}

input:focus,textarea:focus{
  outline:2px solid rgba(0,180,216,.22);
  border-color:var(--vesselping-cyan);
}

.hidden{
  display:none;
}

header{
  height:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  background:var(--vesselping-navy);
  border-bottom:3px solid var(--vesselping-cyan);
  color:#ffffff;
}

.brand-header{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.nav-logo{
  width:40px;
  height:40px;
  object-fit:cover;
  border-radius:50%;
  background:#ffffff;
  box-shadow:0 0 0 2px rgba(255,255,255,.75);
}

h1{
  margin:0;
  color:inherit;
  letter-spacing:.5px;
}

header h1{
  font-size:24px;
}

header p{
  margin:2px 0 0;
  color:#bdefff;
  font-size:13px;
}

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

#userBadge{
  color:#bdefff;
  font-size:13px;
}

main{
  display:grid;
  grid-template-columns:1fr 390px;
  height:calc(100vh - 74px);
  background:#ffffff;
}

#map{
  height:100%;
}

aside{
  padding:16px;
  overflow:auto;
  background:#ffffff;
  border-left:1px solid rgba(10,22,40,.12);
  box-shadow:-8px 0 24px rgba(10,22,40,.05);
}

aside h2{
  color:var(--vesselping-navy);
  margin-bottom:8px;
}

button{
  background:var(--vesselping-blue);
  color:#ffffff;
  border:0;
  border-radius:8px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:700;
  box-shadow:0 6px 14px rgba(20,120,232,.18);
}

button:hover{
  background:var(--vesselping-cyan);
}

button.secondary{
  background:#24364f;
}

button.secondary:hover{
  background:#35516f;
}

textarea{
  height:90px;
  resize:vertical;
}

pre,#answer{
  white-space:pre-wrap;
  background:var(--vesselping-light);
  border:1px solid rgba(10,22,40,.12);
  border-radius:8px;
  padding:10px;
  color:var(--vesselping-navy);
}

.small{
  color:var(--vesselping-muted);
  font-size:13px;
}

#authMessage{
  min-height:20px;
  color:var(--vesselping-navy);
}

@media(max-width:900px){
  header{
    height:auto;
    min-height:74px;
    flex-wrap:wrap;
    gap:10px;
    padding:12px 18px;
  }

  main{
    grid-template-columns:1fr;
    height:calc(100vh - 98px);
  }

  aside{
    height:420px;
    border-left:0;
    border-top:1px solid rgba(10,22,40,.12);
  }
}


/* VesselPing app upgrade styles */
body{margin:0;font-family:Inter,Arial,sans-serif}.vp-auth-light{background:#fff;color:#0A1628;min-height:100vh}.back-home{position:fixed;top:22px;left:24px;color:#0A1628;font-weight:800}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:64px 18px}.auth-logo{text-align:center;margin-bottom:24px}.auth-logo img{width:96px;height:96px;object-fit:contain}.auth-logo h1{font-size:42px;letter-spacing:-.05em;margin:8px 0 0;color:#0A1628}.auth-logo h1 span{color:#1687ff}.auth-logo p{color:#64748b;font-weight:700;margin:4px 0 0}.vp-auth-card{width:min(430px,94vw);background:#fff;border:2px solid #0A1628;border-radius:26px;box-shadow:0 24px 80px rgba(10,22,40,.16);padding:28px}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#f1f5f9;border-radius:18px;padding:5px;margin-bottom:20px}.auth-tab{border:0;border-radius:14px;background:transparent;padding:12px;font-weight:900;color:#0A1628;cursor:pointer}.auth-tab.active{background:#0A1628;color:#fff}.auth-form{display:none}.auth-form.active{display:grid;gap:14px}.auth-form h2{margin:0 0 6px;font-size:26px}.auth-form label{display:grid;gap:7px;font-weight:800;color:#0A1628}.auth-form input,.auth-form textarea{padding:13px 15px;border:1px solid #d7e2ee;border-radius:14px;font-size:15px}.primary-btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;background:#00B4D8;color:#fff;font-weight:900;padding:12px 18px;cursor:pointer;text-decoration:none}.primary-btn.small{padding:9px 12px;font-size:12px}.ghost-btn{border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer}.auth-message{min-height:20px;font-weight:800}.auth-message.err{color:#dc2626}.auth-message.ok{color:#059669}
.dashboard-body{height:100vh;background:#07111f;color:#f5f7fa;overflow:hidden}.app-header{height:70px;background:#0A1628;border-bottom:1px solid rgba(255,255,255,.09);display:flex;align-items:center;gap:18px;padding:0 18px;position:relative;z-index:1000}.app-brand{display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none;font-weight:900;font-size:22px}.app-brand img{width:42px;height:42px}.app-title{font-weight:800;color:#dff7ff;white-space:nowrap}.app-nav{display:flex;align-items:center;gap:12px;margin-left:auto}.app-nav a,.back-dashboard{color:#dff7ff;text-decoration:none;font-weight:800}.user-badge{background:rgba(0,180,216,.16);border:1px solid rgba(0,180,216,.4);border-radius:999px;padding:8px 12px;color:#baf4ff;font-weight:800}.dashboard-layout{height:calc(100vh - 70px);display:grid;grid-template-columns:1fr 380px}.map-panel{height:100%;width:100%;background:#0b1726}.intel-panel{background:#0d1728;border-left:1px solid rgba(255,255,255,.08);padding:16px;overflow:auto}.panel-card{background:#111f34;border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:16px;margin-bottom:14px}.panel-card h2{margin:0 0 10px;font-size:18px}.panel-card textarea{width:100%;box-sizing:border-box;border-radius:14px;border:1px solid #233a59;background:#07111f;color:#fff;padding:12px}.muted{color:#9fb0c7}.ai-answer{white-space:pre-wrap;color:#dff7ff;margin-top:12px;line-height:1.5}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.summary-grid div{background:#07111f;border-radius:12px;padding:12px}.summary-grid b{display:block;color:#00B4D8;font-size:22px}.summary-grid span{font-size:12px;color:#9fb0c7}.vessel-dot-icon span{display:block;width:14px;height:14px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 5px rgba(0,180,216,.24),0 0 18px currentColor}.vessel-detail h3{margin-top:0;color:#fff}.small-link{color:#67e8f9;font-weight:800}
#searchContainer{position:relative;flex:1;max-width:400px;margin:0 16px}#vesselSearch{width:100%;padding:8px 16px;border-radius:24px;border:2px solid #00B4D8;background:white;color:#0A1628;font-size:14px;outline:none}#searchResults{position:absolute;top:100%;left:0;right:0;background:white;border-radius:8px;box-shadow:0 8px 32px rgba(0,0,0,0.2);max-height:320px;overflow-y:auto;z-index:9999;display:none}.search-result-item{padding:10px 16px;cursor:pointer;border-bottom:1px solid #f0f4f8;display:flex;justify-content:space-between;align-items:center}.search-result-item:hover{background:#f0f9ff}.search-result-name{font-weight:600;color:#0A1628;font-size:14px}.search-result-meta{font-size:12px;color:#666}.search-badge{background:#00B4D8;color:white;border-radius:12px;padding:2px 8px;font-size:11px;text-decoration:none}.search-filters{display:flex;gap:6px;margin-top:4px}.search-filters select{font-size:11px;border:1px solid #00B4D8;border-radius:999px;padding:2px 8px;background:#fff;color:#0A1628}
#vpOnboarding{position:fixed;inset:0;z-index:20000;display:grid;place-items:center}.ob-backdrop{position:absolute;inset:0;background:rgba(3,9,18,.72);backdrop-filter:blur(3px)}.ob-card{position:relative;width:min(560px,92vw);background:#fff;color:#0A1628;border-radius:30px;box-shadow:0 30px 100px rgba(0,0,0,.38);padding:34px;animation:obIn .28s ease}.ob-close{position:absolute;right:18px;top:14px;border:0;background:#eef4f8;border-radius:50%;width:34px;height:34px;font-size:24px;cursor:pointer}.ob-step{text-align:center;min-height:270px;display:grid;align-content:center;animation:fadeSlide .25s ease}.ob-icon{font-size:68px}.ob-logo{width:112px;height:112px;object-fit:contain}.ob-step h2{font-size:32px;margin:14px 0 10px}.ob-step p{font-size:17px;line-height:1.65;color:#475569}.ob-footer{display:flex;align-items:center;gap:12px;justify-content:space-between}.ob-prev,.ob-next{border:0;border-radius:999px;padding:11px 16px;font-weight:900;cursor:pointer}.ob-next{background:#00B4D8;color:#fff}.ob-prev{background:#edf2f7;color:#0A1628}.ob-dots{display:flex;gap:7px}.ob-dots span{width:9px;height:9px;border-radius:50%;background:#cbd5e1}.ob-dots span.active{background:#00B4D8;transform:scale(1.35)}.ob-upgrade{display:none;background:#0A1628;color:#fff;border-radius:999px;padding:11px 16px;font-weight:900;text-decoration:none}.unlock-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;text-align:left}.unlock-grid div{background:#f0f9ff;border:1px solid #bae6fd;border-radius:16px;padding:14px}.unlock-grid span{display:block;color:#475569;margin-top:5px}.ob-map-highlight{position:fixed;left:18px;top:88px;right:398px;bottom:18px;border:4px solid #00B4D8;border-radius:22px;box-shadow:0 0 0 9999px rgba(0,0,0,.18),0 0 34px #00B4D8;z-index:19999;pointer-events:none}@keyframes obIn{from{transform:translateY(20px);opacity:0}}@keyframes fadeSlide{from{transform:translateX(18px);opacity:0}}
.fleet-layout{height:calc(100vh - 70px);display:grid;grid-template-columns:280px 1fr;background:#f4f8fb;color:#0A1628}.watch-sidebar{background:#fff;border-right:1px solid #dbe7f1;padding:18px;overflow:auto}.sidebar-head h2{margin:0 0 12px}.new-watch{display:none;gap:6px;margin:12px 0}.new-watch.open{display:flex}.new-watch input{flex:1;border:1px solid #cbd5e1;border-radius:12px;padding:10px}.new-watch button{border:0;background:#0A1628;color:#fff;border-radius:12px;padding:0 12px}.watchlists{display:grid;gap:9px}.watch-item{border:1px solid #e2e8f0;border-radius:16px;padding:12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.watch-item.active,.watch-item:hover{border-color:#00B4D8;background:#e8fbff}.watch-item span{display:block;color:#64748b;font-size:12px}.trash{border:0;background:transparent;cursor:pointer}.fleet-main{padding:24px;overflow:auto}.page-title h1{font-size:36px;margin:0}.page-title p{color:#64748b;margin:4px 0 24px}.fleet-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.fleet-stats div{background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:22px;box-shadow:0 10px 30px rgba(10,22,40,.06)}.fleet-stats b{font-size:32px;color:#00B4D8;display:block}.fleet-stats span{font-weight:800;color:#475569}.empty-state,.table-wrap{margin-top:20px;background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:22px}.fleet-head{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #e2e8f0;border-radius:22px;padding:18px 22px;margin-bottom:16px}.fleet-head h2{margin:0}.fleet-head p{margin:4px 0 0;color:#64748b}.fleet-table{width:100%;border-collapse:collapse}.fleet-table th,.fleet-table td{text-align:left;padding:13px;border-bottom:1px solid #edf2f7}.fleet-table th{color:#475569;font-size:12px;text-transform:uppercase}.status{border-radius:999px;padding:4px 9px;font-size:12px;font-weight:900}.status.green{background:#dcfce7;color:#166534}.status.orange{background:#ffedd5;color:#9a3412}.status.grey{background:#e2e8f0;color:#475569}.icon-btn,.remove{margin-right:8px;border:0;border-radius:999px;padding:7px 9px;text-decoration:none;background:#e0f2fe;color:#075985;font-weight:900;cursor:pointer}.remove{background:#fee2e2;color:#991b1b}.fleet-modal{position:fixed;inset:0;z-index:20000;background:rgba(3,9,18,.62);display:grid;place-items:center}.fleet-modal>div{position:relative;width:min(520px,92vw);background:#fff;color:#0A1628;border-radius:24px;padding:28px;box-shadow:0 25px 80px rgba(0,0,0,.3)}.modal-x{position:absolute;right:14px;top:12px;border:0;background:#eef2f7;border-radius:50%;width:32px;height:32px;font-size:22px}.fleet-modal input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:14px;padding:13px}.modal-results{margin-top:12px;max-height:320px;overflow:auto}.modal-row{padding:12px;border-bottom:1px solid #edf2f7;cursor:pointer}.modal-row:hover{background:#f0f9ff}.modal-row span{display:block;color:#64748b;font-size:12px}.pad{padding:12px}@media(max-width:1000px){.dashboard-layout{grid-template-columns:1fr}.intel-panel{display:none}.ob-map-highlight{right:18px}.fleet-layout{grid-template-columns:1fr}.watch-sidebar{height:230px}.fleet-stats{grid-template-columns:repeat(2,1fr)}.app-title{display:none}#searchContainer{max-width:none;margin:0}}@media(max-width:700px){.app-header{height:auto;min-height:70px;flex-wrap:wrap;padding:10px}.dashboard-body{overflow:auto}.dashboard-layout,.fleet-layout{height:auto}.map-panel{height:70vh}.fleet-stats{grid-template-columns:1fr}.app-nav{margin-left:0}.search-filters{display:none}}

/* ── PWA Mobile responsive (VesselPing Feature 4) ── */
@media (max-width: 768px) {
  .dashboard-body { overflow: auto; }
  main.dashboard-layout { grid-template-columns: 1fr !important; height: auto; }
  aside.intel-panel { display: block !important; height: auto; max-height: none; border-left: 0; border-top: 1px solid #1e365c; overflow: auto; }
  .app-header { flex-wrap: wrap; height: auto; min-height: 60px; padding: 8px 12px; gap: 8px; }
  #searchContainer { order: 3; width: 100%; max-width: 100%; margin: 0; }
  .app-nav { margin-left: 0; flex-wrap: wrap; gap: 8px; }
  .header-actions { gap: 6px; flex-wrap: wrap; }
  .header-actions button { padding: 6px 10px; font-size: 12px; }
  .map-panel, #map { height: 55vh; }
  .app-title { display: none; }
}
@media (max-width: 480px) {
  aside.intel-panel { height: auto; }
  .map-panel, #map { height: 50vh; }
  .app-brand span { font-size: 18px !important; }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
}

/* UX polish: clear disabled state and improved small-screen auth layout */
button:disabled, input:disabled, textarea:disabled{
  opacity:.62;
  cursor:not-allowed;
}
@media(max-width:560px){
  .auth-card{padding:24px 18px;border-radius:16px;}
  .auth-card h1{font-size:34px;}
  .tabs{margin:18px 0 16px;}
}
