body { background: #f5f7fa; }
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar { width: 250px; background: #111827; color: #fff; position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
.app-main { margin-left: 250px; width: calc(100% - 250px); min-height: 100vh; }
.app-sidebar .nav-link { color: #d1d5db; border-radius: .5rem; }
.app-sidebar .nav-link:hover, .app-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.app-sidebar .nav-link.disabled { color: #6b7280; }
.nav-section { color: #6b7280; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem .75rem .25rem; }
.login-page { background: #eef2f7; }
.login-card { width: min(440px, calc(100% - 2rem)); }
@media (max-width: 991.98px) { .app-sidebar { width: 82px; } .app-sidebar .brand div:last-child, .app-sidebar .nav-section { display:none; } .app-sidebar .nav-link { font-size:0; } .app-sidebar .nav-link i { font-size:1.2rem; } .app-main { margin-left:82px; width:calc(100% - 82px); } }
.avatar-sm { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-lg { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: #e9eef5; color: #64748b; }
.avatar-lg.avatar-fallback { font-size: 2rem; }
.detail-label { font-size: .78rem; color: #6b7280; margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .04em; }
.text-prewrap { white-space: pre-wrap; }
.customer-tabs { overflow-x: auto; flex-wrap: nowrap; }
.customer-tabs .nav-link { white-space: nowrap; }
.timeline { position: relative; padding-left: 1.2rem; }
.timeline:before { content: ''; position: absolute; left: .32rem; top: .5rem; bottom: .5rem; width: 2px; background: #e5e7eb; }
.timeline-item { position: relative; display: flex; gap: 1rem; padding: 0 0 1.4rem .5rem; }
.timeline-dot { position: absolute; left: -.98rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: #0d6efd; box-shadow: 0 0 0 3px #fff; }

.boat-thumb { width: 48px; height: 48px; border-radius: .65rem; object-fit: cover; flex: 0 0 auto; }
.boat-photo-lg { width: 92px; height: 72px; border-radius: .75rem; object-fit: cover; flex: 0 0 auto; }
.boat-photo-lg.avatar-fallback { font-size: 2rem; }

/* Fase 3 - operacao */
.launch-board { display: grid; grid-template-columns: repeat(6, minmax(245px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.launch-column { min-width: 245px; background: #eef2f7; border-radius: .8rem; border: 1px solid #e1e7ef; }
.launch-column-header { display:flex; justify-content:space-between; align-items:center; padding:.85rem 1rem; font-weight:600; border-bottom:1px solid #dfe5ec; background:#fff; border-radius:.8rem .8rem 0 0; }
.launch-column-body { padding:.75rem; min-height:220px; }
.launch-card { background:#fff; border:1px solid #e5e7eb; border-left:4px solid #94a3b8; border-radius:.65rem; padding:.8rem; margin-bottom:.7rem; box-shadow:0 1px 2px rgba(15,23,42,.05); }
.launch-card.priority-high { border-left-color:#f59e0b; }
.launch-card.priority-urgent { border-left-color:#dc3545; }
.launch-empty { color:#94a3b8; text-align:center; font-size:.85rem; padding:2.5rem .5rem; }
.launch-board-updated { animation: launchBoardPulse .85s ease; }
@keyframes launchBoardPulse {
  0% { background: rgba(13, 110, 253, .08); }
  100% { background: transparent; }
}
@media (max-width: 1199.98px) { .launch-board { grid-template-columns: repeat(6, 270px); } }

/* Fase 4 - servicos e agenda */
.calendar-launch { background-color:#0d6efd !important; border-color:#0d6efd !important; }
.calendar-service { background-color:#198754 !important; border-color:#198754 !important; }
#calendar .fc-toolbar-title { font-size:1.2rem; }
#calendar .fc-button { text-transform:capitalize; }
@media (max-width: 767.98px) { #calendar .fc-toolbar { flex-direction:column; gap:.6rem; } }

/* Fase 8 - dashboard consolidado e navegacao */
.global-search { width: min(430px, 42vw); }
.marina-brand-logo { width: 42px; height: 42px; border-radius: .5rem; object-fit: contain; background: #fff; border: 1px solid #e5e7eb; padding: .2rem; flex: 0 0 auto; }
.marina-logo-preview { display: block; max-width: 210px; max-height: 82px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff; padding: .5rem; }
.marina-logo-empty { min-height: 82px; display: flex; align-items: center; justify-content: center; gap: .5rem; border: 1px dashed #cbd5e1; border-radius: .5rem; color: #64748b; background: #f8fafc; }
.dashboard-kpi { transition: transform .16s ease, box-shadow .16s ease; border-left: 4px solid transparent !important; }
.dashboard-kpi:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.1rem rgba(15, 23, 42, .10) !important; }
.dashboard-kpi-primary { border-left-color: #0d6efd !important; }
.dashboard-kpi-success { border-left-color: #198754 !important; }
.dashboard-kpi-warning { border-left-color: #ffc107 !important; }
.dashboard-kpi-danger { border-left-color: #dc3545 !important; }
.dashboard-kpi-info { border-left-color: #0dcaf0 !important; }
.dashboard-kpi-icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: .8rem; background: #f1f5f9; font-size: 1.35rem; color: #475569; flex: 0 0 auto; }
.dashboard-status-box { padding: 1rem; border: 1px solid #e5e7eb; border-radius: .8rem; background: #fff; min-height: 86px; }
.finance-mini { display: flex; flex-direction: column; gap: .25rem; padding: 1rem; border-radius: .8rem; background: #f8fafc; min-height: 86px; }
.finance-mini span { color: #64748b; font-size: .82rem; }
.finance-balance { padding: 1rem; border-radius: .8rem; background: #ecfdf5; display: flex; align-items: center; justify-content: space-between; color: #166534; }
.finance-balance.negative { background: #fef2f2; color: #991b1b; }
.dashboard-list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #eef2f7; }
.dashboard-list-row:last-child { border-bottom: 0; }
.dashboard-list-row:hover strong { color: #0d6efd; }
.dashboard-empty { min-height: 110px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; color: #94a3b8; text-align: center; }
.dashboard-empty i { font-size: 1.6rem; }
.activity-icon { width: 34px; height: 34px; border-radius: 50%; background: #eff6ff; color: #0d6efd; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
@media (max-width: 767.98px) { .global-search { order: 3; width: 100%; } .app-navbar { padding-left: 1rem !important; padding-right: 1rem !important; } }

/* Fase 16.2 - Central de perfis */
.profile-metric {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5eaf1;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.profile-metric span { color: #64748b; }
.profile-metric strong { font-size: 1.7rem; color: #172033; }
.profile-accordion .accordion-button { align-items: stretch; }
.profile-accordion .accordion-button:not(.collapsed) { background: #f8fbff; color: #172033; box-shadow: none; }
.profile-role-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 1rem;
}
.profile-role-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.profile-module {
  height: 100%;
  padding: 1rem;
  border: 1px solid #e5eaf1;
  border-radius: .5rem;
  background: #fbfcfe;
}
.profile-module h3 {
  font-size: .82rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.profile-toggle-list { display: grid; gap: .55rem; }
.profile-toggle {
  display: grid;
  grid-template-columns: 2.7rem 1fr;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid #dbe3ed;
  border-radius: .5rem;
  background: #fff;
  cursor: pointer;
}
.profile-toggle:hover { border-color: #9cc5ff; }
.profile-toggle.disabled { cursor: not-allowed; opacity: .78; background: #f8fafc; }
.profile-toggle.partial { border-style: dashed; }
.profile-toggle .form-check-input {
  width: 2.25rem;
  height: 1.2rem;
  margin-top: .1rem;
}
.profile-toggle-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  color: #172033;
}
.profile-toggle small {
  display: block;
  color: #64748b;
  margin-top: .15rem;
}
@media (max-width: 767.98px) {
  .profile-role-head { flex-direction: column; }
  .profile-role-badges { justify-content: flex-start; }
}

/* MVP 1.0 - QA e responsividade */
.table-responsive { border-radius: .75rem; }
.text-break { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .app-sidebar { width: 64px; }
  .app-main { margin-left: 64px; width: calc(100% - 64px); }
  .app-sidebar .brand { padding-left: .65rem !important; padding-right: .65rem !important; }
  .app-sidebar .brand .fw-bold { font-size: .72rem !important; line-height: 1.1; }
  .app-sidebar .nav-link { padding-left: .75rem; padding-right: .75rem; }
  .container-fluid.p-4 { padding: 1rem !important; }
  .card-body { padding-left: 1rem; padding-right: 1rem; }
  .dashboard-status-box, .finance-mini { min-height: 74px; }
}

/* Fase 10 - Portal do Cliente */
.portal-body { background: #f6f8fb; color: #172033; }
.portal-shell { display: flex; min-height: 100vh; }
.portal-sidebar { width: 248px; background: #ffffff; border-right: 1px solid #e5eaf1; padding: 1rem; position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
.portal-brand { padding: .75rem .75rem 1.25rem; border-bottom: 1px solid #edf1f6; margin-bottom: .75rem; }
.portal-brand-logo { display: block; max-width: 150px; max-height: 58px; object-fit: contain; margin-bottom: .65rem; }
.portal-sidebar .nav-link { color: #42526b; border-radius: .5rem; padding: .7rem .75rem; }
.portal-sidebar .nav-link:hover, .portal-sidebar .nav-link.active { background: #eef6ff; color: #0d6efd; }
.portal-main { margin-left: 248px; width: calc(100% - 248px); min-height: 100vh; }
.portal-topbar { min-height: 68px; background: #fff; border-bottom: 1px solid #e5eaf1; padding: .85rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.portal-content { padding: 1.5rem; }
.portal-product-img { height: 168px; object-fit: cover; background: #eef2f7; }
.portal-qty { width: 78px; }
.portal-notification-button { position: relative; width: 36px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.portal-notification-button.has-unread { color: #fff; background: #dc3545; border-color: #dc3545; box-shadow: 0 0 0 .22rem rgba(220, 53, 69, .18); animation: portalBellPulse 1.1s ease-in-out infinite; }
.portal-notification-count { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc3545; color: #fff; font-size: .7rem; line-height: 18px; font-weight: 700; }
.portal-live-notifications { position: fixed; right: 1rem; top: 5.2rem; display: grid; gap: .6rem; width: min(360px, calc(100vw - 2rem)); z-index: 1080; }
.portal-live-toast { display: grid; grid-template-columns: 38px 1fr; gap: .8rem; align-items: center; padding: 1rem; background: #fff; border: 1px solid #dbe3ed; border-left: 6px solid #0d6efd; border-radius: .55rem; box-shadow: 0 16px 38px rgba(15, 23, 42, .24); }
.portal-live-toast i { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #0d6efd; background: #eef6ff; }
.portal-live-toast strong, .portal-live-toast span { display: block; }
.portal-live-toast span { color: #64748b; font-size: .85rem; }
.portal-live-toast-success { border-left-color: #198754; }
.portal-live-toast-success i { color: #198754; background: #ecfdf5; }
.portal-live-toast-warning { border-left-color: #f59e0b; }
.portal-live-toast-warning i { color: #b45309; background: #fff7ed; }
.portal-live-toast-secondary { border-left-color: #64748b; }
.portal-live-toast-secondary i { color: #64748b; background: #f1f5f9; }
.portal-live-toast-info { border-left-color: #0dcaf0; }
.portal-live-toast-info i { color: #087990; background: #ecfeff; }
@keyframes portalBellPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}
@media (max-width: 991.98px) {
  .portal-sidebar { width: 76px; padding: .75rem .5rem; }
  .portal-brand .small { display: none; }
  .portal-brand .fw-bold { font-size: .78rem; line-height: 1.1; }
  .portal-sidebar .nav-link { font-size: 0; text-align: center; }
  .portal-sidebar .nav-link i { font-size: 1.25rem; margin: 0 !important; }
  .portal-main { margin-left: 76px; width: calc(100% - 76px); }
}
@media (max-width: 575.98px) {
  .portal-sidebar { width: 62px; }
  .portal-main { margin-left: 62px; width: calc(100% - 62px); }
  .portal-content { padding: 1rem; }
  .portal-topbar { padding: .75rem 1rem; }
  .portal-live-notifications { top: 4.6rem; right: .65rem; width: min(330px, calc(100vw - 1.3rem)); }
}

/* Fase 11 - Meu App */
.meu-app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.1rem; }
.meu-app-actions { display: grid; gap: .9rem; margin-bottom: 1.1rem; }
.meu-app-action { min-height: 72px; display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; color: #0f2741; text-decoration: none; background: #fff; border: 1px solid #e5eaf1; border-radius: .5rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.meu-app-action:hover { color: #0b5d78; border-color: #9bd5e5; }
.meu-app-action span:nth-child(2) { display: grid; min-width: 0; }
.meu-app-action small { color: #667085; overflow-wrap: anywhere; }
.meu-app-action-icon { width: 46px; height: 46px; border-radius: 50%; background: #eef9fc; color: #0b6b88; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); }
.meu-app-action-icon i { font-size: 1.35rem; }
.meu-app-ticket { display: flex; align-items: center; gap: .8rem; padding: .85rem 0; color: #172033; text-decoration: none; border-bottom: 1px solid #edf1f6; }
.meu-app-ticket:last-child { border-bottom: 0; }
.meu-app-ticket:hover strong { color: #0b6b88; }
.meu-app-ticket small { display: block; color: #667085; }
.meu-app-mini { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: #fff; color: #172033; text-decoration: none; border: 1px solid #e5eaf1; border-radius: .5rem; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.meu-app-mini:hover { color: #0b6b88; border-color: #9bd5e5; }
.meu-app-wizard { padding-bottom: 4.8rem; }
.meu-app-stepbar { display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid #e7edf4; }
.meu-app-step { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; color: #6c7480; border-bottom: 2px solid transparent; font-size: .78rem; text-align: center; }
.meu-app-step i { font-size: 1.25rem; }
.meu-app-step.active { color: #0b456d; border-bottom-color: #13a8d8; font-weight: 600; }
.meu-app-panel { position: relative; background: #fff; border: 1px solid #e5eaf1; border-radius: .5rem; padding: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.meu-app-panel-title { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #0b456d; font-size: 1.1rem; margin-bottom: 1rem; border-bottom: 1px solid #edf1f6; }
.meu-app-floating-icon { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #0b6b88; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 7px rgba(15,23,42,.18); transform: translateY(-.25rem); }
.meu-app-field-card, .meu-app-product, .meu-app-cart-summary { background: #f9fbfd; border: 1px solid #edf1f6; border-radius: .5rem; padding: 1rem; }
.meu-app-counter { display: grid; grid-template-columns: auto 1fr; gap: .55rem .8rem; align-items: center; background: #f9fbfd; border: 1px solid #edf1f6; border-radius: .5rem; padding: 1rem; }
.meu-app-counter i { grid-row: span 2; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: #0b6b88; font-size: 1.6rem; }
.meu-app-counter label { font-weight: 600; }
.meu-app-stepper { display: grid; grid-template-columns: 46px minmax(70px, 1fr) 46px; gap: .5rem; align-items: center; }
.meu-app-stepper button { height: 42px; border: 1px solid #d7e0ea; border-radius: .5rem; background: #fff; color: #0b6b88; display: inline-flex; align-items: center; justify-content: center; }
.meu-app-stepper button i { width: auto; height: auto; font-size: 1rem; }
.meu-app-stepper input { text-align: center; }
.meu-app-product { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.meu-app-cart-row, .meu-app-cart-total { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid #e5eaf1; }
.meu-app-cart-total { border-bottom: 0; font-size: 1.05rem; }
.meu-app-ticket-paper { background: #fff2da; border: 1px solid #f4ddb8; border-radius: .25rem; padding: 1rem; color: #4b5563; }
.meu-app-ticket-paper hr { border-style: dashed; border-color: #98866e; opacity: .75; }
.meu-app-bottom-bar { position: sticky; bottom: -1.5rem; margin: 1.25rem -1rem -1rem; padding: .9rem 1rem; background: #12b7c9; display: flex; align-items: center; justify-content: center; gap: .75rem; z-index: 2; border-radius: 0 0 .5rem .5rem; }
.portal-chat { display: grid; gap: .8rem; }
.portal-chat-row { display: flex; }
.portal-chat-row.mine { justify-content: flex-end; }
.portal-chat-row.team { justify-content: flex-start; }
.portal-chat-bubble { max-width: min(680px, 86%); padding: .8rem 1rem; border-radius: .5rem; background: #eef6ff; border: 1px solid #dbeafe; }
.portal-chat-row.mine .portal-chat-bubble { background: #ecfdf5; border-color: #bbf7d0; }
@media (max-width: 767.98px) {
  .meu-app-head { align-items: stretch; flex-direction: column; }
  .meu-app-stepbar { grid-template-columns: repeat(3, minmax(68px, 1fr)); }
  .meu-app-step { font-size: .72rem; }
  .meu-app-action { align-items: flex-start; }
  .meu-app-bottom-bar { bottom: -1rem; }
}

/* Fase 15 - Operacao Real 1 Marina */
.pilot-check-row, .pilot-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1.25rem;
  border-bottom: 1px solid #edf1f6;
}
.pilot-check-row:last-child, .pilot-list-row:last-child { border-bottom: 0; }
.pilot-list-row:hover strong { color: #0d6efd; }
.pilot-check-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.pilot-check-icon.ok { color: #198754; background: #ecfdf5; }
.pilot-check-icon.pending { color: #b45309; background: #fff7ed; }
.pilot-info-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid #edf1f6;
}
.pilot-info-line:last-child { border-bottom: 0; }
.pilot-info-line span { color: #64748b; }
@media (max-width: 767.98px) {
  .pilot-check-row, .pilot-list-row { align-items: flex-start; flex-direction: column; }
  .pilot-check-row .btn, .pilot-list-row .btn { width: 100%; }
}
/* Conversation Center 1.7.6.3.2 */
.chat-panel{min-height:420px;max-height:62vh;overflow:auto;background:#f7f8fa}
.chat-message{max-width:min(76%,720px);padding:.8rem 1rem;border-radius:1rem;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.chat-message-team{background:#0d6efd;color:#fff;border-bottom-right-radius:.3rem}
.chat-message-customer{background:#fff;color:#212529;border:1px solid #e8ebef;border-bottom-left-radius:.3rem}
.chat-avatar{width:24px;height:24px;border-radius:50%;object-fit:cover}
.chat-image{display:block;max-width:320px;max-height:260px;border-radius:.75rem;object-fit:cover;background:#eee}
.chat-file{display:flex;align-items:center;gap:.35rem;padding:.55rem .7rem;border:1px solid currentColor;border-radius:.65rem;text-decoration:none;max-width:360px}.chat-file span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-file small{margin-left:auto;white-space:nowrap}
.inbox-avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;flex:0 0 46px}.inbox-avatar-fallback{display:flex;align-items:center;justify-content:center;background:#e9ecef;color:#495057;font-weight:700}.min-w-0{min-width:0}
@media(max-width:576px){.chat-message{max-width:90%}.chat-image{max-width:100%;height:auto}.chat-panel{max-height:none;min-height:320px}}

/* v1.7.6.7 - horario 12h no Meu App */
.meu-app-time-part { display:inline-block; width:auto; min-width:72px; margin-right:.25rem; }
@media (max-width: 575.98px) { .meu-app-time-part { min-width:68px; margin-bottom:.35rem; } }
