
/* ============================================================
   MODAL DE DETALLES DE NAVE
   ============================================================ */
.ship-detail-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 150; padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.ship-detail {
    background: rgba(10, 15, 30, 0.98);
    border: 1px solid rgba(196, 155, 58, 0.4);
    border-radius: 14px;
    width: 800px; max-width: 100%;
    max-height: 92vh;
    overflow: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.3s ease;
    position: relative;
}

.ship-detail__img {
    width: 100%; height: 300px;
    background: #0a1628;
    overflow: hidden;
    position: relative;
    border-radius: 13px 13px 0 0;
}
.ship-detail__img img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.ship-detail__img::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.98), transparent);
}

.ship-detail__close {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px; height: 36px;
    border-radius: 50%; cursor: pointer;
    font-size: 1rem; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.ship-detail__close:hover {
    background: rgba(255, 77, 77, 0.8);
    border-color: #ff4d4d;
}

.ship-detail__body { padding: 1.5rem 2rem 2rem; }

.ship-detail__title {
    font-family: 'MOREKS', 'Orbitron', sans-serif;
    font-size: 1.8rem; font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFD966, #FF8C42);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.4rem;
}
.ship-detail__meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.ship-detail__section-title {
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin: 1.5rem 0 0.8rem;
    border-bottom: 1px solid rgba(196, 155, 58, 0.2);
    padding-bottom: 0.4rem;
}

.ship-detail__specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.8rem;
}

.spec-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
}
.spec-box__value {
    font-size: 1.4rem; font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
}
.spec-box__label {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0.4rem;
}

.ship-detail__stock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.6rem;
}
.stock-item {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--accent-gold);
    padding: 0.6rem 0.8rem;
    border-radius: 0 6px 6px 0;
}
.stock-item__name {
    color: white; font-size: 0.85rem; font-weight: 700;
}
.stock-item__info {
    color: var(--text-muted); font-size: 0.7rem;
    letter-spacing: 1px; margin-top: 0.2rem;
}

.ship-detail__owners {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.owner-chip {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.4);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #93c5fd;
    font-weight: 600;
}

.ship-detail__actions {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

@media (max-width: 768px) {
    .ship-detail__img { height: 180px; }
    .ship-detail__body { padding: 1rem; }
    .ship-detail__title { font-size: 1.3rem; }
    .ship-detail__specs { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ACCIONES DEL MODAL DE NAVE
   ============================================================ */
.ship-detail__actions {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ship-detail__actions-right {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.ship-detail__btn {
    padding: 0.7rem 1.3rem;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ship-detail__btn:hover { filter: brightness(1.15); transform: translateY(-1px); }

.ship-detail__btn--close {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.ship-detail__btn--close:hover { border-color: white; color: white; }

.ship-detail__btn--config {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.ship-detail__btn--remove {
    background: transparent;
    color: #ff6b6b;
    border: 1px solid rgba(255, 77, 77, 0.35);
    padding: 0.45rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.85;
}
.ship-detail__btn--remove:hover {
    background: rgba(255, 77, 77, 0.15);
    border-color: #ff4d4d;
    opacity: 1;
}

/* Badge "configurada" en el modal */
.config-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    margin-left: 0.8rem;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ============================================================
   MODAL DE CONFIGURACIÓN
   ============================================================ */
.config-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.config-modal {
    background: rgba(10, 15, 30, 0.98);
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: 14px;
    width: 700px; max-width: 100%;
    max-height: 92vh;
    overflow: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.3s ease;
    padding: 1.5rem 2rem 2rem;
    position: relative;
}

.config-modal__close {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.config-modal__close:hover {
    background: rgba(255, 77, 77, 0.8);
    border-color: #ff4d4d;
}

.config-modal__title {
    font-family: 'MOREKS', 'Orbitron', sans-serif;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
}
.config-modal__subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.config-modal__section-title {
    font-size: 0.7rem;
    color: #60a5fa;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin: 1.5rem 0 0.8rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
    padding-bottom: 0.4rem;
}

.config-slot {
    display: grid;
    grid-template-columns: 1fr 2fr 40px;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.config-slot input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    color: #f0f0f0;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.config-slot input:focus { border-color: #3b82f6; }
.config-slot input::placeholder { color: #5a7ba0; }

.config-slot__remove {
    background: transparent;
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff6b6b;
    width: 36px; height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.config-slot__remove:hover {
    background: rgba(255, 77, 77, 0.15);
    border-color: #ff4d4d;
}

.config-add-slot {
    background: transparent;
    border: 1px dashed rgba(96, 165, 250, 0.5);
    color: #60a5fa;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    width: 100%;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.config-add-slot:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #60a5fa;
}

.config-notes {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    color: #f0f0f0;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
}
.config-notes:focus { border-color: #3b82f6; }

.config-modal__actions {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.config-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}
.config-btn--cancel {
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.config-btn--cancel:hover { border-color: white; color: white; }

.config-btn--save {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}
.config-btn--save:hover { filter: brightness(1.15); transform: translateY(-1px); }
.config-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
    .config-modal { padding: 1rem; }
    .config-slot { grid-template-columns: 1fr 1fr 36px; gap: 0.4rem; }
    .config-modal__title { font-size: 1.2rem; }
}

/* ============================================================
   CONFIGURADOR — PESTAÑAS Y PUERTOS
   ============================================================ */
.config-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4rem;
    overflow-x: auto;
}

.config-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
    white-space: nowrap;
}

.config-tab:hover { color: #60a5fa; background: rgba(37, 99, 235, 0.1); }

.config-tab.active {
    color: white;
    background: rgba(37, 99, 235, 0.25);
    border-bottom: 2px solid #3b82f6;
}

.config-port {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    transition: border-color 0.2s;
}

.config-port:hover { border-color: rgba(96, 165, 250, 0.3); }

.config-port__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.config-port__name {
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.config-port__size {
    background: rgba(37, 99, 235, 0.2);
    color: #93c5fd;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.config-port__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-port__gimbal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.config-port__gimbal input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 16px; height: 16px;
    cursor: pointer;
}

.config-port__select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    color: #f0f0f0;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.config-port__select:hover,
.config-port__select:focus { border-color: #3b82f6; }

.config-port__select option {
    background: #0a0f23;
    color: #f0f0f0;
    padding: 4px;
}
