/* ══════════════════════════════════════════════════════════════
   YACHTCARE CREW — CSS DESIGN SYSTEM
   Theme: Obsidian Profondo + Teal Luminoso + Amber Advertencias
   ══════════════════════════════════════════════════════════════ */

:root {
    --bg-obsidian: #02060c;
    --bg-card: #08111a;
    --bg-surface: #0e1c27;
    --border-glow: rgba(0, 245, 212, 0.1);
    --border-dim: rgba(255, 255, 255, 0.05);
    
    --accent-teal: #00f5d4;
    --accent-teal-dk: #00bda3;
    --accent-coral: #ff5c8a;
    --accent-green: #38b000;
    --accent-amber: #ffb703;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5), 0 1px 8px rgba(0, 0, 0, 0.2);
    --font-sans: 'Outfit', sans-serif;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 0;
    overflow-x: hidden;
}

/* APP SHELL MOBILE WRAPPER */
.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-obsidian);
    min-height: 100vh;
    padding: 20px 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid var(--border-dim);
    border-right: 1px solid var(--border-dim);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* SPLASH DIVER SELECTOR */
.splash-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--bg-obsidian);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.splash-content {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.splash-icon {
    font-size: 54px;
    display: block;
    margin-bottom: 16px;
    animation: bounce 2s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.splash-content h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.splash-content p {
    font-size: 15.5px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.diver-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diver-select-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
}

.diver-select-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-teal);
    box-shadow: var(--shadow-card);
}

.diver-select-btn .btn-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--bg-obsidian);
}

.diver-select-btn .btn-name {
    font-size: 17px;
    font-weight: 700;
    color: white;
    display: block;
}

.diver-select-btn .btn-role {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
}

/* TACTILE AUTH KEYPAD BUTTONS */
.keypad-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    padding: 13px 0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.keypad-btn:active {
    background: #00f5d4;
    color: #02060c;
    transform: scale(0.93);
    border-color: #00f5d4;
}

/* APP HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    gap: 10px;
}

.diver-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--bg-obsidian);
    flex-shrink: 0;
}

.diver-profile h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.role-badge {
    font-size: 11px;
    color: var(--accent-teal);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.daily-summary {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    padding: 6px 10px;
    border-radius: 12px;
    min-width: 64px;
}

.summary-card .value {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.summary-card .label {
    font-size: 9.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

/* BRIEFING CARD (Pedro's instructions) */
.briefing-card {
    background: rgba(255, 183, 3, 0.05);
    border: 1px solid rgba(255, 183, 3, 0.15);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-amber);
    animation: fadeIn 0.3s ease;
}

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

.briefing-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-amber);
    letter-spacing: 0.5px;
}

.briefing-text {
    font-size: 14.5px;
    color: var(--text-primary);
    line-height: 1.45;
}

/* ROUTE INFO */
.route-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.date-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
}

.total-feet-label {
    font-size: 13px;
    color: var(--accent-teal);
    font-weight: 700;
}

/* ROUTE LIST */
.route-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.marina-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.marina-header {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-teal);
    padding-left: 8px;
    border-left: 2px solid var(--accent-teal);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* BOAT CARDS */
.boat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.boat-card:hover:not(.disabled-card) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.02);
}

.boat-card.disabled-card {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.02);
}

.boat-card.active-card {
    border-color: var(--accent-teal);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.15);
}

.boat-info h3 {
    font-size: 17.5px;
    font-weight: 700;
}

.boat-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.status-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-badge.pendiente {
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}

.status-badge.in_progress {
    background: rgba(0, 245, 212, 0.05);
    color: var(--accent-teal);
    border: 1px solid var(--accent-teal);
    animation: pulse 1.5s infinite alternate;
}

.status-badge.completado {
    background: rgba(56, 176, 0, 0.08);
    color: #4ade80;
    border: 1px solid #4ade80;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    border: 1px solid var(--border-dim);
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.76, 0.55, 0.94);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 19px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* SPEC GRID */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.spec-item {
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--border-dim);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
}

.spec-item .label {
    display: block;
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.spec-item .value {
    font-size: 14px;
    font-weight: 700;
}

/* TASKS CHECKLIST SHEET CARD */
.tasks-checklist-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.tasks-checklist-card h4 {
    font-size: 13px;
    color: var(--accent-teal);
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    cursor: pointer;
}

.check-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent-teal);
}

.notes-block {
    margin-top: 14px;
    border-top: 1px solid var(--border-dim);
    padding-top: 12px;
}

.notes-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-amber);
    margin-bottom: 2px;
}

.notes-content {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* GPS BLOCKER CARD */
.gps-verify-card {
    background: rgba(255, 183, 3, 0.03);
    border: 1px solid rgba(255, 183, 3, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.gps-status {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent-amber);
    margin-bottom: 10px;
}

.btn-small {
    padding: 8px 14px;
    font-size: 11.5px;
}

/* BUTTONS */
.btn {
    border: none;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-large {
    padding: 14px;
    font-size: 14.5px;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-teal);
    color: var(--bg-obsidian);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-teal-dk);
}

.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-success {
    background-color: var(--accent-green);
    color: white;
}

.btn-success:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.02);
    color: white;
    border: 1px solid var(--border-dim);
}

/* TIMER */
.timer-container {
    background: rgba(255,255,255,0.01);
    border: 1px dashed var(--border-dim);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-digits {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-teal);
    letter-spacing: 1.5px;
    font-family: monospace;
    margin: 8px 0;
}

.timer-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.timer-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 245, 212, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-teal);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CHECKOUT FORM */
.checkout-form {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-sub-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -3px;
    line-height: 1.3;
}

/* COUNTER INPUT */
.counter-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.counter-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dim);
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.counter-input input {
    width: 50px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

/* VIDEO PREVIEW ON FINISH */
.video-preview-thumbnail {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.thumb-block {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-teal);
}

.gps-stamp {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* SUCCESS CHECKMARK */
.invoice-summary {
    text-align: center;
    padding: 10px 0;
}

.success-checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(56, 176, 0, 0.08);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.invoice-summary h4 {
    font-size: 18px;
    font-weight: 700;
}

.invoice-summary .desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.invoice-details {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.detail-row span {
    color: var(--text-secondary);
}

.detail-row strong.highlight {
    color: var(--accent-teal);
    font-size: 15px;
}

input[type="date"], textarea {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: white;
    font-family: var(--font-sans);
    font-size: 13px;
}

/* ANIMATIONS & STATES */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ─── BOTTOM NAVIGATION BAR ─── */
.bottom-nav-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 480px !important;
    height: 64px !important;
    background: #08111a !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 99999 !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.8) !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    padding: 6px 4px;
    flex: 1;
}

.nav-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.nav-item .nav-icon svg {
    stroke: var(--text-secondary);
    transition: stroke 0.2s ease;
}

.nav-item:hover {
    color: #fff;
}

.nav-item:hover .nav-icon svg {
    stroke: #ffffff;
}

.nav-item.active {
    color: var(--accent-teal);
    font-weight: 700;
}

.nav-item.active .nav-icon {
    transform: scale(1.15) translateY(-2px);
}

.nav-item.active .nav-icon svg {
    stroke: var(--accent-teal);
    filter: drop-shadow(0 0 6px rgba(0, 245, 212, 0.5));
}

/* ─── PANELS LAYOUT ─── */
.crew-panel {
    display: none;
    animation: fadeIn 0.25s ease forwards;
}

.crew-panel.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── AGENDA TAB PANELS ─── */
.agenda-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.agenda-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 8px;
}

.agenda-day-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-teal);
    text-transform: uppercase;
}

.agenda-day-count {
    font-size: 11px;
    background: rgba(0, 245, 212, 0.08);
    color: var(--accent-teal);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}

.agenda-jobs-subgrid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agenda-job-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.02);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.agenda-job-row:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--accent-teal);
}

/* ─── CHAT TAB PANELS ─── */
.chat-tab-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
}

.chat-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent-teal);
    background: rgba(255,255,255,0.02);
}

.contact-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--bg-obsidian);
}

.contact-meta {
    flex: 1;
}

.contact-name-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.contact-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.contact-time {
    font-size: 11px;
    color: var(--text-muted);
}

.contact-lastmsg {
    font-size: 12.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* Chat view panel overlays (inside container) */
.chat-window {
    display: none;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.chat-window.active {
    display: flex;
}

.chat-win-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-dim);
}

.chat-win-back {
    background: none;
    border: none;
    color: var(--accent-teal);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.chat-messages-box {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.4;
}

.chat-msg.inbound {
    align-self: flex-start;
    background: var(--bg-surface);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-msg.outbound {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-teal-dk) 0%, rgba(0,245,212,0.4) 100%);
    color: var(--bg-obsidian);
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.chat-win-footer {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-dim);
    background: rgba(0,0,0,0.2);
}

.chat-win-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 12px;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
}

.chat-win-sendbtn {
    background: var(--accent-teal);
    color: var(--bg-obsidian);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

/* ─── ROUTE CONTROLS HEADER ─────────────────────────────────── */
.route-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}
.route-controls-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.route-date-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.1);
}
.route-controls-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* View toggle */
.view-toggle-group {
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}
.view-toggle {
    background: transparent;
    border: none;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.view-toggle.active {
    background: rgba(0,245,212,0.18);
    color: var(--accent-teal);
}

/* Job card in list */
.crew-job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.crew-job-card:hover {
    background: var(--bg-surface);
}
.crew-status-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

/* ─── JOB SHEET (REDESIGNED MODAL) ──────────────────────────── */
.job-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.job-sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.job-sheet {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #0e1c27;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    overflow: hidden;
}
.job-sheet-overlay.active .job-sheet {
    transform: translateY(0);
}
.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}
.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sheet-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sheet-boat-name {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.sheet-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sheet-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.sheet-status-label {
    font-size: 14px;
    font-weight: 700;
}
.sheet-close-btn {
    background: rgba(255,255,255,0.07);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Specs strip */
.specs-strip {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    flex-shrink: 0;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.spec-chip {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 8px 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.chip-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chip-val {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

/* Sheet body */
.sheet-body {
    overflow-y: auto;
    flex: 1;
    padding: 0 20px 30px;
}
.sheet-section {
    padding: 16px 0 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sheet-section:last-child { border-bottom: none; }
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.section-icon { font-size: 18px; }
.section-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    flex: 1;
}
.section-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Improved checklist */
.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s;
}
.check-row input[type=checkbox] {
    accent-color: var(--accent-teal);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.check-row-done {
    opacity: 0.6;
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Notes */
.notes-block {
    margin-top: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.04);
}
.notes-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 700;
}
.notes-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Anodes */
.anodes-list { display: flex; flex-direction: column; gap: 10px; }
.anode-empty { font-size: 13px; color: var(--text-muted); font-style: italic; }
.anode-row {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 10px 12px;
}
.anode-row-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.anode-name { font-size: 14px; color: var(--text-primary); font-weight: 700; }
.anode-type { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.anode-estado { font-size: 13px; font-weight: 800; }
.anode-bar-track {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}
.anode-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* GPS section */
.gps-status-text {
    font-size: 14px;
    color: var(--accent-amber);
    margin-bottom: 10px;
    line-height: 1.45;
}

/* Timer */
.timer-section {
    display: flex;
    justify-content: center;
    padding: 16px 0 8px;
}
.timer-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(0,245,212,0.06);
    border: 2px solid rgba(0,245,212,0.3);
    border-radius: 50%;
    width: 110px;
    height: 110px;
    justify-content: center;
}
.timer-digits {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent-teal);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.timer-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* Action buttons */
.sheet-actions {
    padding: 12px 0 4px;
}
.action-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.3px;
}
.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.action-btn-primary {
    background: linear-gradient(135deg, #00e5c3, #00bda3);
    color: #02060c;
}
.action-btn-primary:not(:disabled):active { transform: scale(0.98); }
.action-btn-success {
    background: linear-gradient(135deg, #38b000, #2d8f00);
    color: #fff;
}
.action-btn-ghost {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-secondary);
    padding: 11px 14px;
    font-size: 13px;
}

/* Counter input */
.counter-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
.counter-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.counter-btn:hover { background: rgba(0,245,212,0.15); }
.counter-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-teal);
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Date + textarea inputs */
.date-input-full {
    width: 100%;
    padding: 9px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    margin-top: 6px;
}
.notes-textarea {
    width: 100%;
    min-height: 70px;
    padding: 9px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    margin-top: 6px;
}
.form-hint {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 5px;
    line-height: 1.4;
}

/* Invoice success */
.success-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(56,176,0,0.15);
    border: 2px solid #38b000;
    color: #38b000;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 14px auto 10px;
}
.success-title {
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.success-desc {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.invoice-details {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.inv-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
}
.inv-row:last-child { border-bottom: none; }
.inv-row strong { color: #fff; font-weight: 700; }
.inv-row.highlight strong { color: var(--accent-teal); font-size: 14px; }

/* Flashing/pulsing marker for in-progress operations */
.marker-in-progress-dot {
    border: 1.8px dashed #00f5d4 !important;
    box-shadow: 0 0 12px rgba(255, 183, 3, 1) !important;
    animation: marker-pulse-anim 1.2s infinite alternate;
}

@keyframes marker-pulse-anim {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 4px rgba(255, 183, 3, 0.6);
    }
    100% {
        transform: scale(1.25);
        box-shadow: 0 0 12px rgba(255, 183, 3, 1);
    }
}

